A software delay subroutine is written as given below:

DELAY:

MVI

H, 255 D

 

MVI

L, 255 D

LOOP:

DCR

 L

 

JNZ

 LOOP

 

DCR 

H

 

JNZ

 LOOP

How many times DCR L instruction will be executed?

This question was previously asked in
ESE Electrical 2013 Paper 2: Official Paper
View all UPSC IES Papers >
  1. 255
  2. 510
  3. 65025
  4. 65279

Answer (Detailed Solution Below)

Option 4 : 65279
Free
ST 1: UPSC ESE (IES) Civil - Building Materials
20 Qs. 40 Marks 24 Mins

Detailed Solution

Download Solution PDF

H & L registers initialized with 255 D (i.e. FFH)

(H) = 255 ⇒ (L) is decremented 255 times

(H) = 254 ⇒ (L) is decremented 256 times

(H) = 0 ⇒ Looping terminated.

No. of times execution of DCR L instruction = 255 + (256 × 254) = 65279

Latest UPSC IES Updates

Last updated on May 28, 2025

->  UPSC ESE admit card 2025 for the prelims exam has been released. 

-> The UPSC IES Prelims 2025 will be held on 8th June 2025.

-> The selection process includes a Prelims and a Mains Examination, followed by a Personality Test/Interview.

-> Candidates should attempt the UPSC IES mock tests to increase their efficiency. The UPSC IES previous year papers can be downloaded here.

More Programming with 8085 Questions

More Microprocessors Questions

Hot Links: teen patti gold real cash teen patti master king teen patti game - 3patti poker teen patti 100 bonus teen patti game paisa wala