Program: Disassemble the Nibbles of a Byte
(E.g. XY into 0X & 0Y, where X is the higher nibble, Y is the lower nibble)
Note: Program starts from memory location 8000H.
Assuming total no. of numbers to be added stored in 9000H,
Assuming total no. of numbers to be added stored in 9000H,
numbers to be added stored from 9001H to 900AH.
Storing sum(lower byte) at 8FFEH, carry(higher byte) at 8FFFH.
Storing sum(lower byte) at 8FFEH, carry(higher byte) at 8FFFH.
|
Label
|
Memory Location
|
Mnemonics
|
Opcode
|
Operand
|
|
|
|
8000
|
LDA 9000H
|
3A
|
OO
|
90
|
|
|
8003
|
ANI 0FH
|
E6
|
OF
|
|
|
|
8005
|
STA 9001H
|
32
|
O1
|
90
|
|
|
8008
|
LDA 900H
|
3A
|
OO
|
90
|
|
|
800B
|
RRC
|
OF
|
|
|
|
|
800C
|
RRC
|
OF
|
|
|
|
|
800D
|
RRC
|
OF
|
|
|
|
|
800E
|
RRC
|
OF
|
|
|
|
|
800F
|
ANI 0FH
|
E6
|
OF
|
|
|
|
8011
|
STA 9002H
|
32
|
O2
|
90
|
|
|
8014
|
HLT
|
76
|
|
|
No comments:
Post a Comment