How many time the loop will execute(in decimal)? [8085]

Status
Not open for further replies.

Atri Pal

Newbie
Joined
Apr 16, 2021
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
31
LXI H 1234H
LOOP: DCX H
MOV A H
SUB L
JNZ LOOP
 

The code doesn't make much sense, but I think the loop will be executed 34 (decimal) times.
0x34 - 0x12 = 0x22 = decimal 34
 

Solution
Hi,

what about using a sheet of paper and a pencil?
That´s how I´d do it.

Klaus
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…