Lab 1 and Lab 2 - Microprocessor
Lab 1 and Lab 2 - Microprocessor
8-BIT ADDITION
PROGRAM:
Program Explanation
MNEMONICS:
ADDRESS INSTRUCTIONS OPCODE
C000 MVI A, 05 3E
C001 05
C002 MVI B, 04 06
C003 04
C004 ADD B 80
C006 00
C007 C3
C008 RST 1 CF
INPUT & OUTPUT:
ADDRESS Values
C001 INPUT 1 05
C003 INPUT 2 04
C300 RESULT 09
ADDRESS Values
C001 INPUT 1 05
C003 INPUT 2 02
C300 RESULT 07
RESULT: The program for adding two 8-bit hexadecimal numbers using accumulator &
registers has been performed with different sets of data.
CALCULATION:
INPUT 1 = 05 = 0000 0101
INPUT 2 = 04 = 0000 0100
+ 09 = 0000 1000
8 BIT MULTIPLICATION
OBJECTIVE: To multiply two 8-bit hexadecimal numbers using 8085 microprocessor
PROGRAM:
Address/Label Program Explanation
C001 01
C002 82
C003 XRA A AF
C005 INX H 23
C007 ADD D 82
C009 0E
C00A C0
C00B DCR B 05
C00D 09
C00E C0
C00F INX H 23
C010 MOV M, A 77
C011 INX H 23
C012 RST 1 CF
INPUT & OUTPUT:
C201 INPUT 1 5
C202 INPUT 2 3
C203 PRODUCT F
CALCULATION:
05 = 0000 0101
+ 05 = 0000 0101
= 0000 1010
+ 05 = 0000 0101
= 0F = 0000 1111
= 0F H
RESULT: The program to multiply two 8-bit hexadecimal numbers using 8085 was executed.