0

I'm still learning asm. im trying to find out why ax reg turns to 28 and not 25. I'm using emu8086.

mov dx,0h    ; dx = 0
mov ax,0050h ; ax = 50
mov bx,2     ; bx = 2
    
div bx ; ax / 2 =50.
       ; but ax is now 28?
janithcooray
  • 188
  • 2
  • 15

1 Answers1

4

Values in assembly are usually in hex, explicitly stated with the h at the of 0050h

50h or 0x50 is 80 in base 10
80/2=40
40 in hex is 0x28
therefore your result is 0x28 or 28h

gkhaos
  • 694
  • 9
  • 20