📄 1-8-1.lst
字号:
C51 COMPILER V8.08 1_8_1 09/30/2008 15:17:35 PAGE 1
C51 COMPILER V8.08, COMPILATION OF MODULE 1_8_1
OBJECT MODULE PLACED IN 1-8-1.OBJ
COMPILER INVOKED BY: c:\SiLabs\MCU\IDEfiles\C51\BIN\C51.EXE 1-8-1.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include<reg52.h>
2 #include<intrins.h>
3 #define uint unsigned int
4 void delay_10us(uint n)
5 {
6 1 do{
7 2 _nop_();
8 2 _nop_();
9 2
10 2 _nop_();
11 2
12 2 _nop_();
13 2
14 2 _nop_();
15 2
16 2 } while(--n);
17 1
18 1 }
19
20 void delay_ms(uint m)
21 {
22 1 do
23 1 delay_10us(131);
24 1 while(--m);
25 1
26 1 }
27 main()
28 {
29 1 uint LEDIndex = 0;
30 1 bit LEDDirection = 1;
31 1
32 1 while(1)
33 1 {
34 2 if(LEDDirection)
35 2 P2 = ~(0x01<<LEDIndex);
36 2 else
37 2 P2 = ~(0x80>>LEDIndex);
38 2 if(LEDIndex==7)
39 2 LEDDirection = !LEDDirection;
40 2 LEDIndex = (LEDIndex+1)%8;
41 2 delay_ms(100);
42 2 }
43 1 }
44
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 102 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- 1
END OF MODULE INFORMATION.
C51 COMPILER V8.08 1_8_1 09/30/2008 15:17:35 PAGE 2
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -