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 Jul 2, 2025

-> ESE Mains 2025 exam date has been released. As per the schedule, UPSC IES Mains exam 2025 will be conducted on August 10. 

-> UPSC ESE result 2025 has been released. Candidates can download the ESE prelims result PDF from here.

->  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

Hot Links: teen patti gold new version teen patti classic teen patti master old version teen patti gold