Question: PLEASE sole it using PUSH & POP with ONLY 1-REGISTER. thanks in advance. This program blinks LEDs every half second (500 msec approx.) ORG 0000H

 PLEASE sole it using PUSH & POP with ONLY 1-REGISTER. thanks

PLEASE sole it using PUSH & POP with ONLY 1-REGISTER.

thanks in advance.

This program blinks LEDs every half second (500 msec approx.) ORG 0000H ; After reset, start fetching instructions from OOH MOV A, #55H ; load B01010101 in A MOV DPTR, #0FF00H ; LEDs 00-07: controlled by FF00H memory address AGAIN: MOVX @DPTR, A ; move A to memory address 50% Duty Cycle ACALL DELAY 500ms ON ; call delay routine 500ms OFF CPL A ; invert A to 1010 1010 1 1 SJMP AGAIN ; repeat blinking f = 1 Hz T 1000ms DONE: SJMP DONE DELAY: OUTER2: OUTER1: INNER: ; this routine implements a delay of 500ms MOV R4, #05 ; move 5 in R4, 1 MC (machine cycle) MOV R3, #200 ; move 200 in R3, 1 MC MOV R2, #255 ; move 255 in R2, 1 MC DJNZ R2, INNER ; decrement R2 until 0,2 MC DJNZ R3, OUTER1 ; decrement R3 until 0,2 MC DJNZ R4, OUTER2 ; decrement R4 until 0, 2 MC RET END 3. Rewrite the procedure DELAY with the same duration, but using only 1 register RO instead of 3 registers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!