The document contains assembly language code that implements a delay loop. The code pushes values onto the stack, loads the B register with an initial value of 1000, loads the A register with 100, and then enters nested loops that decrement the registers and check for terminal values. The summary calculates the time taken for the delay loop to execute based on the number of machine cycles for each instruction.
The document contains assembly language code that implements a delay loop. The code pushes values onto the stack, loads the B register with an initial value of 1000, loads the A register with 100, and then enters nested loops that decrement the registers and check for terminal values. The summary calculates the time taken for the delay loop to execute based on the number of machine cycles for each instruction.
The document contains assembly language code that implements a delay loop. The code pushes values onto the stack, loads the B register with an initial value of 1000, loads the A register with 100, and then enters nested loops that decrement the registers and check for terminal values. The summary calculates the time taken for the delay loop to execute based on the number of machine cycles for each instruction.
DELAY: push B ; 1001 C5 CO 12 push PSW ; lxi B,1000 ; 1002 01 CO 10 push B ; 1003 E8 OP1 1004 03 OP2 lxi B,1000 ; DELAY10: ; DELAY10: ; mvi A,100 ; 1005 3E CO 7 1006 64 OP1 mvi A,100 ; DELAY20: DELAY20: nop ; 1007 00 CO 4 dcr A ; A-1 1008 3D CO 4 nop ; dcr A ; A-1 1008 3D CO 4 dcr A ; A-1 cpi 200 ; 1009 FE CO 7 dcr A ; A-1 100A C8 OP1 jnz DELAY20 ; 100B C2 CO 7/10 cpi 200 ; 100C 07 OP1 jnz DELAY20 ; 100D 10 OP2 nop ; 100E 00 CO 4 nop ; dcx B ; BC-1 100F 0B CO 6 dcx B ; BC-1 dcx B ; BC-1 1010 0B CO 6 mov A,C ; 1011 79 CO 4 dcx B ; BC-1 ora B ; 1012 B0 CO 4 mov A,C ; jnz DELAY10 ; Z=? 1013 C2 CO 7/10 ora B ; 1014 05 OP1 1015 10 OP2 jnz DELAY10 ; Z=? pop B ; 1016 C1 CO 10 pop B ; pop PSW ; 1017 F1 CO 10 ret ; 1018 C9 CO 10 pop PSW ; ret ; Tn = 12+12+10+ Ne[7+Ni(4+4+4+7+10)-3 +4+6+6+4+4+10]-3+ 10+10+10 Tn=61+Ne[38+29Ni] Tn(1000,100) =61+ 1000*[38+29*100] Tn=2,938,061 T(Cy=5MHz) =Tn*2/Cy =2,938,061*2/5E6 =1.175 Seg