Files
8051_LED/Listings/led.lst
2018-05-06 01:44:44 +08:00

100 lines
3.1 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

C51 COMPILER V9.54 LED 04/22/2018 23:23:55 PAGE 1
C51 COMPILER V9.54, COMPILATION OF MODULE LED
OBJECT MODULE PLACED IN .\Objects\led.obj
COMPILER INVOKED BY: C:\Keil_v5\C51\BIN\C51.EXE led.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listings\led.l
-st) TABS(2) OBJECT(.\Objects\led.obj)
line level source
1 #include "reg51.h"
2 //#include <at89x51.h>
3
4 bit lightoff = 1;
5 bit lighton = 0;
6 sbit P1_0 = P1^0;
7 sbit P1_1 = P1^1;
8 sbit P1_2 = P1^2;
9 sbit P1_3 = P1^3;
10 sbit P1_4 = P1^4;
11 sbit P1_5 = P1^5;
12 sbit P1_6 = P1^6;
13 sbit P1_7 = P1^7;
14 void delay_1500ms();
15
16 int main () {
17 1 P1 = 0xFF;
18 1 while (1) {
19 2 delay_1500ms();
20 2
21 2 P1_0 = lighton;
22 2 delay_1500ms();
23 2
24 2 P1_1 = lighton;
25 2 delay_1500ms();
26 2
27 2 P1_2 = lighton;
28 2 delay_1500ms();
29 2
30 2 P1_3 = lighton;
31 2 delay_1500ms();
32 2
33 2 P1_4 = lighton;
34 2 delay_1500ms();
35 2
36 2 P1_5 = lighton;
37 2 delay_1500ms();
38 2
39 2 P1_6 = lighton;
40 2 delay_1500ms();
41 2
42 2 P1_7 = lighton;
43 2 delay_1500ms();
44 2
45 2 P1_7 = lightoff;
46 2 delay_1500ms();
47 2
48 2 P1_6 = lightoff;
49 2 delay_1500ms();
50 2
51 2 P1_5 = lightoff;
52 2 delay_1500ms();
53 2
54 2 P1_4 = lightoff;
C51 COMPILER V9.54 LED 04/22/2018 23:23:55 PAGE 2
55 2 delay_1500ms();
56 2
57 2 P1_3 = lightoff;
58 2 delay_1500ms();
59 2
60 2 P1_2 = lightoff;
61 2 delay_1500ms();
62 2
63 2 P1_1 = lightoff;
64 2 delay_1500ms();
65 2
66 2 P1_0 = lightoff;
67 2 } // end of while(1)
68 1 } // end of main()
69
70 void delay_1500ms() {
71 1 unsigned short kk;
72 1 for (kk = 0; kk < 33000; kk++);
73 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 143 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = 2 ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)