0

What would be in registers ax, ah and al after these commands:

MOV AX, 1010
MOV AH, 5
ADD AL, 5

I understand that ax contains ah and al but I don't know the answer of this question

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by Srcee
0

You can type in the code using DEBUG at the DOS command-line and step through each command and watch the registers.

C:\science>debug
-a
1424:0100 mov ax, 1010
1424:0103 mov ah, 5
1424:0105 add al, 5
1424:0107
-r
AX=0000  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=1424  ES=1424  SS=1424  CS=1424  IP=0100   NV UP EI PL NZ NA PO NC
1424:0100 B81010        MOV     AX,1010
-p

AX=1010  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=1424  ES=1424  SS=1424  CS=1424  IP=0103   NV UP EI PL NZ NA PO NC
1424:0103 B405          MOV     AH,05
-p

AX=0510  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=1424  ES=1424  SS=1424  CS=1424  IP=0105   NV UP EI PL NZ NA PO NC
1424:0105 0405          ADD     AL,05
-p

AX=0515  BX=0000  CX=0000  DX=0000  SP=FFEE  BP=0000  SI=0000  DI=0000
DS=1424  ES=1424  SS=1424  CS=1424  IP=0107   NV UP EI PL NZ NA PO NC
1424:0107 0000          ADD     [BX+SI],AL                         DS:0000=CD
-q
C:\science>

Edited by thines01: clarity

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.