LOOP : DCR L /////////// L==> 01
FIRST : JNZ LOOP CONTROL transfered 4th time
LOOP : DCR L /////////// L==> 00
FIRST : JNZ LOOP CONTROL transfered will not be transfred condition failed now execute next instruction
LOOP : DCR L
FIRST : JNZ LOOP
DCR H /////////////h==>01
SECOND : JNZ LOOP /////////////// CONTROL transfered 1st time
LOOP : DCR L
FIRST : JNZ LOOP
DCR H /////////////h==>00
SECOND : JNZ LOOP /////////////// CONTROL will not be transfred condition failed
part 1 first = 4 ,,second ==1/////////////all options given are wrong
part---2 begins
MVI L,05H
LOOP : SUB L , #1 /////////// L==> 04
FIRST : JNZ LOOP CONTROL transfered 1st time
......will be same as above till L==00//////////////means it ran 4times upto now
LOOP : SUB L , #1
FIRST :JNZ LOOP
next DCR H ///h==>01
SECOND : JNZ LOOP //////CONTROL transfered 1st time
LOOP : SUB L , #1 ////// now this will be again executed SUB actually invokes carry flag but DCR doesn't
00000000 (carry flag will be generated ) |
subtract(--) 1111111
|
11111111===>255 |
FIRST :JNZ LOOP///////////////////so first will again run 255 times
after that
DCR H ///h==>00
SECOND : JNZ LOOP //////CONTROL not transfered condition failed
so part2 first= 255+4 ==259 and second ==1...