错误A2108:在汇编中使用假定为错误的寄存器

时间:2018-12-04 03:03:16

标签: assembly x86 portable-executable masm32

我有一个使用MASM的汇编代码,它将获取kernel32.ddl基址。

.386
.model flat, stdcall

OPTION CASEMAP:NONE

.data
;hello db "hello word",0

.code
Main:
    mov ebx, [fs:30H]   ; Get pointer to PEB
    mov ebx, [ebx + 0CH] ; Get pointer to PEB_LDR_DATA
    mov ebx, [ebx + 14H] ; Get pointer to first entry in InMemoryOrderModuleList
    mov ebx, [ebx]      ; Get pointer to second (ntdll.dll) entry in InMemoryOrderModuleList
    mov ebx, [ebx]      ; Get pointer to third (kernel32.dll) entry in InMemoryOrderModuleList
    mov ebx, [ebx + 10H] ; Get kernel32.dll base address

end Main

但是我收到一个错误,错误A2108:使用假定为ERROR的寄存器 有什么建议吗?谢谢!

0 个答案:

没有答案