Computer Science, asked by himanshubisht2796, 1 year ago

Write an assembly language program to add two double precision numbers.

Answers

Answered by Shaizakincsem
8
LDA BL/Create 2's compl. of
CMA/BL
INC
STA TL/Save BL to TL
CLA/Clear AC and ..
CIL/Get E (carry) to AC(0)
STA TMP/Save AC to TMP
LDA BH/Load BH
CMA/Create 2's compl. of
ADD TMP/BH (no INC, use carry)
STA TH/Save BH
LDA TL
ADD AL/Subtract BL form AL
STA CL/Save result
CLA/Save carry
CIL
ADD AH/Add AH and carry
ADD BH/Add BH
STA CH/Save result
HLT
TMP,-
AL,-/A
AH-
BL,-/B
BH,-
CL,-/Result
CH,-
TL,-/Temporary data
TH,-
Similar questions