有人可以帮我在这个问题上停留几天。我想以 2 个十进制/十六进制的二进制值计算 1 的数字。但我得到的结果不正确。下面是一段代码:
.386 //32-bit processor
.model small, stdcall
ExitProcess PROTO, deExitCode:DWORD
.data
var1 dw 2
.code
main PROC
LEA ESI,var1
MOV EBX, 4 //SIZE OF ARRAY AS 2 binary will be 0010
MOV ECX,0
L1:CMP EBX,0
JE L3
MOV EAX,[ESI]
CMP EAX,0
JE L2
INC ECX
L2:DEC EBX
ADD SI,2
JMP L1
L3: INVOKE ExitProcess,0
main ENDP
END main