Question: Modify the below subroutine to perform the following: Counts up from 0 to 21. After reaching 21, the next value should be 0 followed by

Modify the below subroutine to perform the following: Counts up from 0 to 21. After reaching 21, the next value should be 0 followed by 1, 2,4,8,16,32,64,128 and then restarting the count from 0. Delay1: MOV R5, #250D Label: Acall dela Acall delay Acall delay Acall delay DJNZ R5, label Ret Delay2: MOV R6, #250D MOV R7, #250D Loop1: DJNZ R6, Loop 1 Loop2: DJNZ R7, Loop 2 Ret
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
