-
A software delay subroutine is written as given below:
How many times DCR L instruction will be executed?
-
- 255
- 510
- 65025
- 65279
Correct Option: A
DCRL will be executed 255 times till it content of L becomes zero.
Then, for every decrement of content of H, DCRL will again be executed by 256 times. (When L is decremented by 1 and becomes FFH). This will be repeated by 254 times.
Hence, no. of execution of DCRL = 254 × 256 + 255 = 65279