book name Microprocessors and Interfacing N Senthil Kumar, M Saravanan, S Jeevan
ID: 3762783 • Letter: B
Question
book name
Microprocessors and Interfacing
N Senthil Kumar, M Saravanan, S Jeevananthan, and Satish Shah
Write an 8086 ISR to add the byte type data stored in an array starting at the address 2000H: 5000H in the memory with the corresponding data in another array stored the memory starting at the address 3000H: 5000H result in another array in the memory starting at the address 4000H: 5000H, when the NMI interrupt is given to the 8086. The number of byte type data in the array is 100. Assume that the result after addition of all the data in the array is an 8-bit data. The ISR must be accessible by any module.Explanation / Answer
LXI H, 2000H : input Array 1
LXI B, 3000H : input Array 2
LXI D, 4000H : Result array 3
LOOP: LDAX B : Get the data from array 2
ADD M : Add it with data in array 1
STAX D : Store the result in array 3
INX H : Increment pointer 1
INX B : Increment pointer 2
INX D : Increment result pointer
MOV A, L
CPI 0AH : Check pointer 1 for last number
JNZ LOOP: If not, repeat
HLT : Stop
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.