出于某种原因,我的 cmp 语句总是会导致je
to DoubleScore
,而不是jne
函数RegularScore
。我对组装相当陌生,所以这可能是一个简单的错误。
Approved:
mov eax,[prev]
mov edi, dword[buffermaze+eax]
mov eax,edi
call print_nl
call print_int
mov eax, 45
call print_nl
call print_int
cmp eax,edi
je DoubleScore
dump_regs 1
jne RegularScore
dump_regs 2
DoubleScore:
mov ebx,0
ret
RegularScore:
mov edx, 0
mov eax,[new]
ret
The Output for this part of the code is
774778411
45
Register Dump # 1
EAX = 0000002D EBX = F7704FF4 ECX = 00000000 EDX = 00000000
ESI = 0804A434 EDI = 2E2E2E2B EBP = FFF2D4E8 ESP = FFF2D4C4
EIP = 080487B0 FLAGS = 0283 SF CF