Question: Procedure II: Subtraction with and without borrow 1 A . Lets subtract 3 3 H ( 5 1 1 0 ) from A 5 H

Procedure II: Subtraction with and without borrow
1
A. Lets subtract 33H(5110) from A5H(16510). We should get 72H(11410). FIRST write all the following code, which uses SUB to perform subractions that do not require a borrow, THEN single step, recording data as required:
MOV AL,A5
MOV BL,33
SUB AL,BL
AL:
BL:
MOV AX,2771
MOV CX,00B3
MOV BX,87A0
MOV DX,0004
SUB AX,BX
AX:
Carry Flag:
Carry Flag:
; CX,AX loaded with B32771H
; DX,BX loaded with 487A0H
; subtract the lower 16-bits
Question 5: Is the carry bit set? Why? B32771 is larger than 487AO.
SBB CX,DX
; now we subtract the upper 16 bits with borrow
Ax
Cx:
 Procedure II: Subtraction with and without borrow 1 A. Lets subtract

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!