Micro processor Lab Manual / Subtraction of two 16 bit numbers

Program Name

Write a Assembly Language Program for Subtraction of two 16 bit numbers.
Theory
Instruction Mnemonic Operand Comments
LDA 8100 Load contents of 8100 half 1st input of 16-bit into accumulator
MOV B,A Move 1st 8-bit input of 16-bit half to register B
LDA 8200 Load the 1st 8-bit input of half 2nd 16-bit to accumulator
SUB B Subtract the content of B to accumulator and store in accumulator
STA 8300 Store result of 1st 8-bit in 8300
LDA 8101 Load 1st input of 16-bit remaining half 16-bit input to accumulator
MOV B,A Move 2nd 8-bit input of 1st 16-bit input to register B
LDA 8201 Load 2nd input of 1st remaining half 16-bit input
SBB B Subtract with carry content of B to accumulator
STA 8301 Store result of 2nd 8-bit in 8301
HLT Stop
Program Code


Online compiler for 8085 Microprocess Compiler


Home     Back