110VCGQ/project/power_c51(用于修改测试)/Listings/main.lst

109 lines
3.0 KiB
Plaintext
Raw Normal View History

2024-11-18 10:09:39 +08:00
C51 COMPILER V9.60.7.0 MAIN 11/08/2023 13:56:18 PAGE 1
C51 COMPILER V9.60.7.0, COMPILATION OF MODULE MAIN
OBJECT MODULE PLACED IN .\Objects\main.obj
COMPILER INVOKED BY: D:\Keil_v5\C51\BIN\C51.EXE main.c OPTIMIZE(8,SPEED) BROWSE DEBUG OBJECTEXTEND PRINT(.\Listings\main
-.lst) TABS(2) OBJECT(.\Objects\main.obj)
line level source
1 #include <reg52.h>
2 #include <intrins.h>
3
4 sfr P3M0 = 0xb2;
5 sfr P3M1 = 0xb1;
6 sfr P5M0 = 0xca;
7 sfr P5M1 = 0xc9;
8
9 sfr P5 = 0xc8;
10
11 sbit negative = P3^3;
12 sbit positive = P3^2;
13 sbit synchronous = P5^5;
14 void Delay1ms() //@30.000MHz
15 {
16 1 unsigned char i, j;
17 1
18 1 _nop_();
19 1 _nop_();
20 1 i = 39;
21 1 j = 243;
22 1 do
23 1 {
24 2 while (--j);
25 2 } while (--i);
26 1 }
27
28
29 void Delay500us() //@30.000MHz
30 {
31 1 unsigned char i, j;
32 1
33 1 _nop_();
34 1 _nop_();
35 1 i = 39;
36 1 j = 121;
37 1 do
38 1 {
39 2 while (--j);
40 2 } while (--i);
41 1 }
42
43 void delay_ms(unsigned int ms)
44 {
45 1 unsigned int a ;
46 1 for (a = 0;a<ms;a++)
47 1 {
48 2 Delay1ms();
49 2 }
50 1 }
51
52
53 void main(void)
54 {
C51 COMPILER V9.60.7.0 MAIN 11/08/2023 13:56:18 PAGE 2
55 1 P3M0 = 0xff;
56 1 P3M1 = 0x00;
57 1 P5M0 = 0xff;
58 1 P5M1 = 0x00; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ
59 1
60 1 while(1)
61 1 {
62 2 positive = 1;
63 2 negative = 0;
64 2 synchronous = 1;
65 2 delay_ms(1000);
66 2
67 2
68 2 // positive = 0; //<2F>ŵ<EFBFBD>
69 2 // synchronous = 0;
70 2 // delay_ms(50);
71 2
72 2 positive = 0;
73 2 negative = 1;
74 2 synchronous = 0;
75 2 delay_ms(1000);
76 2
77 2 // negative = 0; //<2F>ŵ<EFBFBD>
78 2 // synchronous = 1;
79 2 // delay_ms(50);
80 2 }
81 1
82 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 86 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- ----
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)