MICROPROCESSOR Question -
Write an Airthematic Logical Program to multiply the two numbers
stored in memory locations 2050 and 2051h and store the results in
2055 and 2056h. Also write a program in 8085 to enable all the
interrupts in 8085 systems
Program for multiplication of two numbers
2000 LHLD 2050
2003 XCHG
2004 MOV C, D
2005 MVI D, 00
2007 LXI H 0000
200A DAD D
200B DCR C
200C JNZ 200A
200F SHLD 2055
2012 HLT
Explanation – Registers used: A, H, L, C, D, E
LHLD 2050 loads content of 2051 in H and content of 2050 in L
XCHG exchanges contents of H with D and contents of L with E
MOV C, D copies content of D in C
MVI D 00 assigns 00 to D
LXI H 0000 assigns 00 to H and 00 to L
DAD D adds HL and DE and assigns the result to HL
DCR C decreamentsC by 1
JNZ 200A jumps program counter to 200A if zero flag = 0
SHLD stores value of H at memory location 2056 and L at 2055
HLT stops executing the program and halts any further execution
Program for enabling interrupts
START TRAP To Enable TRAP interrupt
RST 1
RST 2
RST 3
RST 4
RST 5
RST 6
RST 7
END HLT
Get Answers For Free
Most questions answered within 1 hours.