📄
字号:
C51 COMPILER V8.02 延时 08/06/2007 17:46:34 PAGE 1
C51 COMPILER V8.02, COMPILATION OF MODULE 延时
OBJECT MODULE PLACED IN 延时.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE 延时.c BROWSE DEBUG OBJECTEXTEND
line level source
1
2
3 #include <REG52.H> /* special function register declarations */
4 /* for the intended 8051 derivative */
5
6 #include <stdio.h> /* prototype declarations for I/O functions */
7
8 #define uint unsigned int
9 #define uchar unsigned char
10 #ifdef MONITOR51 /* Debugging with Monitor-51 needs */
char code reserve [3] _at_ 0x23; /* space for serial interrupt if */
#endif /* Stop Exection with Serial Intr. */
13 /* is enabled */
14
15
16 /*------------------------------------------------
17 The main C function. Program execution starts
18 here after stack initialization.
19 ------------------------------------------------*/
20 void main (void) {
21 1 uint x;
22 1 uchar i,j;
23 1 /*------------------------------------------------
24 1 Setup the serial port for 1200 baud at 16MHz.
25 1 ------------------------------------------------*/
26 1 #ifndef MONITOR51
27 1 SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
28 1 TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
29 1 TH1 = 221; /* TH1: reload value for 1200 baud @ 16MHz */
30 1 TR1 = 1; /* TR1: timer 1 run */
31 1 TI = 1; /* TI: set TI to send first char of UART */
32 1 #endif
33 1 while(1){
34 2 printf("please enter the delay time:\n",x);
35 2 scanf("%d",&x);
36 2 while(x-->0){
37 3 for(j=0;j<200;j++)
38 3 for(i=0;i<200;i++){;}}
39 2 }
40 1 }
41
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 84 ----
CONSTANT SIZE = 33 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 3
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -