Professional Documents
Culture Documents
Q1
AIM: Perform the 8-bit addition and subtraction using the following addressing
modes:
a. Immediate addressing mode
b. Register addressing mode
c. Register indirect addressing mode
d. Direct addressing mode
THEORY:
● Immediate addressing mode: The addressing mode in which immediate
data is part of the instruction.
● Direct addressing mode: Indirect addressing mode 16-bit memory address
is directly specified in the instruction.
● Register addressing mode: It means that the data is stored in a register.
● Register indirect addressing mode: The address of the memory location
which contains data or operand is determined in an indirect way using an
offset register.
ALGORITHM:
CODE:
SIMULATION:
MANUAL CALCULATION AND VERIFICATION:
THEORY: ADD is the command used for adding two numbers without carry and
ADC is used when carry is involved. SUB is the command used for adding two
numbers without borrow and SBB is used when borrow is involved.
CODE:
SIMULATION:
MANUAL CALCULATION:
● INPUT: AX = 2222 BX= 3333
OUTPUT: AX = (2222 + 3333) = 5555
● INPUT: AX = 2222 BX = 6667
OUTPUT: AX = (2222 + 6667) = 8889
● INPUT: AX = 3333 BX = 2222
OUTPUT: AX = (3333 - 2222) = 1111
● INPUT AX = 2222 BX = 1132
OUTPUT: AX = (2222 - 1132) = 10F0
Q3
AIM: Perform 16-bit addition and subtraction with data located at locations
0200H and 0220H.
CODE:
SIMULATION:
MANUAL CALCULATION:
RESULTS: