Professional Documents
Culture Documents
ASSIGNMENT - # 3
Program : BSCS
Section : 3-C
SAP ID : 70077813
(a)
.model small
.data
quotient db ?
remainder db ?
.code
main proc far
mov ax, 9980h
mov bl, 230
div bl
mov quotient, al
mov remainder, ah
endp
end main
(b)
.model small
.data
data_1 dw 9980h
data_2 dw 300h
result dw ?
.code
main proc far
mov ax, data_1
mul data_2
mov result, ax
mov result+2, dx
endp
end main
2. Which of the following code performs the same operations as LOOP. (2 marks)
a. Dec CH
JNZ XXX
b. DEC CX
JNZ XXX
Answer:
SUB BH, BH
STC
RCR BH, 1
STC
RCR BH, 1
Answer:
Solution:
DAA__BCD addition
DAS__BCD subtraction
AAS__ASCII subtraction
AAA__ASCII addition