The source file CIDR block of C51 is as follows:
Void main ()
{
Jn1 = 1;
Jn2 = 0;
While (1)
{
Jn1 = 0;
Delay (1 );
Jn1 = 1;
Delay (1 );
// Pulse ();
}
}
Void delay (u8 counter)
{
For (; counter> 0; counter --)
{
//
// Note the followingProgramThe Assembly SRC file generated after interactive compilation.
//
# Pragma ASM
NOP
NOP
NOP
NOP
# Pragma endasm
}
}
The optional segments of the Assembly SRC file generated after the interactive compilation are as follows:
Rseg? PR? Main? Main
Main:
Using 0
; Source line #18
;{
; Source line #19
; Jn1 = 1;
; Source line #20
SETB jn1
; Jn2 = 0;
; Source line #21
CLR jn2
? C0001:
; While (1)
; Source line #22
;{
; Source line #23
; Jn1 = 0;
; Source line #24
CLR jn1
; Delay (1 );
; Source line #25
MoV R7, #01 H
Lcall _ Delay
;
; Jn1 = 1;
; Source line #27
SETB jn1
; Delay (1 );
; Source line #28
MoV R7, #01 H
Lcall _ Delay
;
;
;
; // Pulse ();
;}
; Source line #33
Sjmp? C0001
; End of main
;
;}
;
; Void delay (u8 counter)
Rseg? PR? _ Delay? Main
_ Delay:
Using 0
; Source line #37
; ---- Variable 'counter? 140 'assigned to register 'r7 '----
;{
; Source line #38
; For (; counter> 0; counter --)
; Source line #39
? C0004:
MoV A, r7
SETB C
Subb A, #00 h
JC? C0007
;{
; Source line #40
; Counter ++;
; Source line #41
INC r7
; # Pragma ASM
; NOP
NOP
; NOP
NOP
; NOP
NOP
; NOP
NOP
; # Pragma endasm
;
;}
; Source line #49
Dec r7
Sjmp? C0004
;}
; Source line #50
? C0007:
;
Note: After the C51 calls the subfunction, the main function is directly returned instead of executing the NOP statement.
;
RET
; End of _ Delay
Postscript:
I have no clue about this question. If you have any answers, please contact me. Thank you for your advice!