Question: 1- For the program below: a) Find the number of times the NOP instruction is executed. b) Modify the program to execute the NOP
1- For the program below: a) Find the number of times the NOP instruction is executed. b) Modify the program to execute the NOP operation 20000 times. LDI R16, 0xC8 R18, 0xAA LDI NOP +0000: +0001: +0002: +0003: +0004: +0005: +0006: +0008: +0100: COUNTI: COUNT2: END: 2- For the program below: a) Analyze the stack and stack pointer SP after the each one of the underlined instructions. b) Calculate the time delay provided by the subroutine if processor frequency is 1 MHz. +0101: +0102 +0103: +0104: +0105: .ORG 0 LDI OUT LDI OUT LDI PUSH CALL POP .ORG 0x100 DELAY: AGAIN: NOP DEC R18 BRNE COUNT2 LDI NOP NOP DEC BRNE RET DEC R16 BRNE COUONTI RJMP END R16, HIGH (RAMEND) SPH, R16 R16, LOW (RAMEND) SPL, R16 R31, OxAA R31 DELAY R16 R20, 200 R20 AGAIN 0x08FF 3- Write an assembly language program that continuously monitor port B then send the received data to port C if positive or port D if negative. A delay subroutine of 5000 NOP instructions should be called after each data sending.
Step by Step Solution
3.42 Rating (155 Votes )
There are 3 Steps involved in it
Step 1 1 Number of times the NOP instruction is executed The NOP instruction is executed twice each time the COUNT2 loop is iterated Since the COUNT2 loop is iterated R18 times the NOP instruction is ... View full answer
Get step-by-step solutions from verified subject matter experts
