📄 miin.lst
字号:
C51 COMPILER V8.06 MIIN 11/20/2011 17:25:09 PAGE 1
C51 COMPILER V8.06, COMPILATION OF MODULE MIIN
OBJECT MODULE PLACED IN miin.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE miin.c BROWSE DEBUG OBJECTEXTEND
line level source
1 //实验平台:HL-1 V6.1+Keil U3
2 //开发公司:慧净电子WWW.HLMCU.COM
3 //淘宝店铺:http://shop37031453.taobao.com
4
5 //打开串口调试程序,将波特率设置为9600,无奇偶校验
6
7
8 #include <REG52.H> /* special function register declarations */
9 /* for the intended 8051 derivative */
10
11 #include <stdio.h> /* prototype declarations for I/O functions */
12
13
14 #ifdef MONITOR51 /* Debugging with Monitor-51 needs */
char code reserve [3] _at_ 0x23; /* space for serial interrupt if */
#endif /* Stop Exection with Serial Intr. */
17 /* is enabled */
18 sbit KEY=P3^2;
19
20 void delay(unsigned int U)
21 {
22 1 while(--U);
23 1 }
24 /*------------------------------------------------
25 The main C function. Program execution starts
26 here after stack initialization.
27 ------------------------------------------------*/
28 void main (void)
29 {
30 1
31 1 /*------------------------------------------------
32 1 Setup the serial port for 1200 baud at 11.0592MHz.
33 1 ------------------------------------------------*/
34 1 #ifndef MONITOR51
35 1 SCON = 0x50; /* SCON: mode 1, 8-bit UART, enable rcvr */
36 1 TMOD |= 0x20; /* TMOD: timer 1, mode 2, 8-bit reload */
37 1 TH1 = 0xf3; /* TH1: reload value for 2400 baud @ 12MHz */
38 1 TR1 = 1; /* TR1: timer 1 run */
39 1 TI = 1; /* TI: set TI to send first char of UART */
40 1 #endif
41 1
42 1 /*------------------------------------------------
43 1 Note that an embedded program never exits (because
44 1 there is no operating system to return to). It
45 1 must loop and execute forever.
46 1 ------------------------------------------------*/
47 1 while (1)
48 1 {
49 2
50 2 if(!KEY)
51 2 {
52 3 delay(10000);
53 3 if(!KEY)
54 3 {
55 4 printf ("This programer test ok!\n");
C51 COMPILER V8.06 MIIN 11/20/2011 17:25:09 PAGE 2
56 4 printf ("12:25:26\n");
57 4 }
58 3 }
59 2 }
60 1 }
61
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 56 ----
CONSTANT SIZE = 35 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
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 + -