문제

I recently delved into assembly and toyed with emu8086 a bit. I am having a lot of fun and learning quite a bit. However I really do miss one thing, It would be SO awesome if I could see ALL register contents AS I WRITE, before I emulate or compile. Does any assembly IDE offer this functionality? I would prefer if I could write also 8086 assembly with NASM syntax in it, but any general x86 assembly that lifts the burden of keeping track of registers in my head would be a godsend and also highly efficient!

도움이 되었습니까?

해결책

I don't think you have thought this through. Roughly speaking, if you could know the value of the registers you wouldn't need a program. Register values change based on input and other things, and also are not guaranteed to be the same at the same point in the code at different times. Think of a loop variable. What value do you want displayed?

    call get_int ; this function returns a number entered by the user in eax
    ; so, what's the value of eax here that your IDE should print?
    ; okay let's multiply it by 10 using addition in a loop
    mov edx, eax
    mov ecx, 9   ; ecx is 9 here, no problem
addloop:
    add eax, edx ; but what's the value of eax here?
    dec ecx      ; or ecx here?
    jnz addloop
    ; what's the result in eax?
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top