Q2/ Answer the following: 1- Find the machine code for the program shown below , then store the code in the ROM : ORG 0 BRNE=1111 01kk kkkk k001 LDI R30 , 20 DEC =1001 010d dddd 1010 LDI R25 , 0...


Answer the following:


1- Find the machine code for the program shown below, then store the code in the ROM :


ORGO


LDI R30, 20


LDI R25.0


LDI R31 ,6


AGAIN : ADD R25, R31


DEC R20


BRNE AGAIN OUT PORTB R25


2- Write an assembly program to implement the following equation :


Y


20 4 +3-2


Q2/ Answer the following:<br>1- Find the machine code for the program shown below , then store the code in the ROM :<br>ORG 0<br>BRNE=1111 01kk kkkk k001<br>LDI R30 , 20<br>DEC =1001 010d dddd 1010<br>LDI R25 , 0<br>LDI=1110 kkkk dddd kkkk<br>LDI R31 , 6<br>OUT=1011 lddr rrr dddd<br>AGAIN : ADD R25 , R31<br>DEC R20<br>BRNE AGAIN<br>OUT PORTB ,R25<br>2- Write an assembly program to implement the following equation :<br>20<br>Y=<br>+ 3 - 2<br>4<br>

Extracted text: Q2/ Answer the following: 1- Find the machine code for the program shown below , then store the code in the ROM : ORG 0 BRNE=1111 01kk kkkk k001 LDI R30 , 20 DEC =1001 010d dddd 1010 LDI R25 , 0 LDI=1110 kkkk dddd kkkk LDI R31 , 6 OUT=1011 lddr rrr dddd AGAIN : ADD R25 , R31 DEC R20 BRNE AGAIN OUT PORTB ,R25 2- Write an assembly program to implement the following equation : 20 Y= + 3 - 2 4

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here