8 BIT DATA SUBTRACTION
ADDRESS
|
OPCODE
|
LABEL
|
MNEMONICS
|
OPERAND
|
COMMENT
|
4100
|
|
START
|
MVI
|
C, 00
|
Clear C reg.
|
4101
|
|
|
|
|
|
4102
|
|
|
LXI
|
H, 4500
|
Initialize HL reg. to
4500
|
4103
|
|
|
|
|
|
4104
|
|
|
|
|
|
4105
|
|
|
MOV
|
A, M
|
Transfer first data to
accumulator
|
4106
|
|
|
INX
|
H
|
Increment HL reg. to point next
mem. Location.
|
4107
|
|
|
SUB
|
M
|
Subtract first number from acc.
Content.
|
4108
|
|
|
JNC
|
L1
|
Jump to location if result does
not yield borrow.
|
4109
|
|
|
|
|
|
410A
|
|
|
|
|
|
410B
|
|
|
INR
|
C
|
Increment C reg.
|
410C
|
|
|
CMA
|
|
Complement the Acc. content
|
410D
|
|
|
ADI
|
01H
|
Add 01H to content of acc.
|
410E
|
|
|
|
|
|
410F
|
|
L1
|
INX
|
H
|
Increment HL reg. to point next
mem. Location.
|
4110
|
|
|
MOV
|
M, A
|
Transfer the result from acc. to
memory.
|
4111
|
|
|
INX
|
H
|
Increment HL reg. to point next
mem. Location.
|
4112
|
|
|
MOV
|
M, C
|
Move carry to mem.
|
4113
|
|
|
HLT
|
|
Stop the program
|
Comments
Post a Comment