📄 24c512.lst
字号:
C51 COMPILER V3.20, SN-50203013 24C512 09/26/06 11:26:33 PAGE 1
DOS C51 COMPILER V3.20, COMPILATION OF MODULE 24C512
OBJECT MODULE PLACED IN 24C512.OBJ
COMPILER INVOKED BY: F:\COMP51\BIN\C51.EXE 24C512.C DB OE SMALL ROM(LARGE)
stmt level source
1 #define uchar unsigned char
2 #define uint unsigned int
3 #define ulong unsigned long
4 #pragma ROM(LARGE)
5
6 //#include <reg59264.h>
7 #include <intrins.h>
8 //#include <comm.h>
9 //#include <io.h>
10 #include <Pub.h>
*** ERROR 202 IN LINE 8 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 9 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 18 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 21 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 22 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 23 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 24 OF Pub.h: 'P1': undefined identifier
*** ERROR 202 IN LINE 25 OF Pub.h: 'P3': undefined identifier
*** ERROR 202 IN LINE 26 OF Pub.h: 'P3': undefined identifier
11 //#include <PCF8583.h>
12 #pragma RB(0)
13 #define nop _nop_();
14
15
16 char rdByte(uchar chip)
17 {
18 1 uchar byte;
19 1 chip++;
20 1 start();
*** WARNING 206 IN LINE 20 OF 24C512.C: 'start': missing function-prototype
21 1 shiftOut(chip); waitAck();
*** WARNING 206 IN LINE 21 OF 24C512.C: 'shiftOut': missing function-prototype
*** ERROR 267 IN LINE 21 OF 24C512.C: 'shiftOut': requires ANSI-style prototype
*** WARNING 206 IN LINE 21 OF 24C512.C: 'waitAck': missing function-prototype
22 1 byte = shiftIn(); noAck();
*** WARNING 206 IN LINE 22 OF 24C512.C: 'shiftIn': missing function-prototype
*** WARNING 206 IN LINE 22 OF 24C512.C: 'noAck': missing function-prototype
23 1 return byte;
24 1 }
25
26 uchar rd24c512(uint addr)
27 {
28 1 uchar volume;
29 1 uchar chip;
30 1
31 1 chip=0xa2;
32 1 start();
33 1 shiftOut(chip); waitAck();
34 1 shiftOut( (uchar)(addr/0x100) ); waitAck();
35 1 shiftOut( (uchar)addr ); waitAck();
36 1 volume = rdByte(chip);
37 1 stop();
*** WARNING 206 IN LINE 37 OF 24C512.C: 'stop': missing function-prototype
38 1
39 1 return volume;
C51 COMPILER V3.20, SN-50203013 24C512 09/26/06 11:26:33 PAGE 2
40 1 }
41
42 void rd24c512String(uint addr,uchar * Oaddr, uint Len)
43 {
44 1 uchar chip,volume;
45 1 uint i;
46 1
47 1 chip=0xa2;
48 1 start();
49 1 shiftOut(chip); waitAck();
50 1 shiftOut( (uchar)(addr/0x100) ); waitAck();
51 1 shiftOut( (uchar)addr ); waitAck();
52 1
53 1 start();
54 1 shiftOut(chip+1); waitAck();
55 1 for ( i=0;i<Len-1;i++ )
56 1 {
57 2 Oaddr[i]=shiftIn(); ack();
*** WARNING 206 IN LINE 57 OF 24C512.C: 'ack': missing function-prototype
58 2 }
59 1 Oaddr[i]=shiftIn(); noAck();
60 1 stop();
61 1 }
62
63 bit wr24c512(uint addr, uchar byte)
64 {
65 1 uint kk;
66 1 uchar i=0;
67 1 uchar chip;
68 1 bit flag;
69 1
70 1 WP=0;
*** ERROR 202 IN LINE 70 OF 24C512.C: 'WP': undefined identifier
71 1 chip=0xa2;
72 1 start();
73 1 shiftOut(chip); waitAck();
74 1 shiftOut( (uchar)(addr/0x100) ); waitAck();
75 1 shiftOut( (uchar)addr ); waitAck();
76 1 shiftOut(byte); waitAck();
77 1 stop();
78 1 for (kk=0;kk<800;kk++) nop;
79 1 WP=1;
*** ERROR 202 IN LINE 79 OF 24C512.C: 'WP': undefined identifier
80 1 }
81 void wr24c512String(uint addr,uchar * Oaddr, uint Len)
82 {
83 1 uint i;
84 1 for(i=0;i<Len;i++) wr24c512(addr+i, Oaddr[i]);
85 1 }
86
87 void init24c512()
88 {
89 1 RSDA = 1;
*** ERROR 202 IN LINE 89 OF 24C512.C: 'T0': undefined identifier
90 1 RSCK = 1;
*** ERROR 202 IN LINE 90 OF 24C512.C: 'INT1': undefined identifier
91 1 stop();
92 1 }
93
C51 COMPILATION COMPLETE. 7 WARNING(S), 14 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -