variables in assembler

Posted by stupid_idiot on Stack Overflow See other posts from Stack Overflow or by stupid_idiot
Published on 2010-03-15T17:14:51Z Indexed on 2010/03/15 17:19 UTC
Read the original article Hit count: 347

Filed under:
|

hi, i know this is kinda retarded but I just can't figure it out. I'm debugging this:

xor eax,eax

mov ah,[var1]
mov al,[var2]

call addition

stop: jmp stop

var1: db 5
var2: db 6

addition:
add ah,al
ret

the numbers that I find on addresses var1 and var2 are 0x0E and 0x07. I know it's not segmented, but that ain't reason for it to do such escapades, because the addition call works just fine. Could you please explain to me where is my mistake?

© Stack Overflow or respective owner

Related posts about assembler

Related posts about variables