4

So I have an array of length 20 which stores a 64 bit decimal number by digits. The starting address is let's say array64. When I am trying to build up my number in ECX:EBX, I am using EDX as the iterator to access the individual elements of the array (I am loading them into AL)

.LOOP:
....
MOV AL, [array64+EDX]
INC EDX
....
JMP .LOOP

The problem is: somehow EDX cannot get higher than 10, so the program just stops and waits for input, when I try to work with a 12 digit number...
This module is outside the main function, and I thought about some Far Pointer problems, but all of my ideas just failed...

What is wrong here?

Comments
  • 0
    Yes, I figured it out - it was my mistake: I forgot to POP something out of stack, so the program went to an arbitrary address in the memory... It took me 2 days to find this out... 😂
Add Comment