📄 display.lst
字号:
C51 COMPILER V7.10 DISPLAY 10/31/2007 09:58:21 PAGE 1
C51 COMPILER V7.10, COMPILATION OF MODULE DISPLAY
OBJECT MODULE PLACED IN display.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE display.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include <bianliang.h>
2
3 void putsizeimage(unsigned char XSIZE,unsigned char YSIZE,unsigned char code *s)
4 { unsigned char k,lx,ly,a1,a2,y;
5 1 k=Lcd_CurrentY&0x7;
6 1 YSIZE+=k;
7 1 y=Lcd_CurrentY;
8 1 for(lx=0;lx<XSIZE;lx++,Lcd_CurrentX++)
9 1 for(Lcd_CurrentY=y,ly=k,a1=0;ly<YSIZE;s++)
10 1 { unsigned char p;
11 2 a2=*s;
12 2 for(p=0;p<k;p++)
13 2 { a2<<=1;
14 3 if((a1&0x80)==0x80)
15 3 a2++;
16 3 a1<<=1;
17 3 }
18 2 lcdpos();
19 2 p=YSIZE&0x7;
20 2 if(ly<8)
21 2 { if(YSIZE<8)
22 3 { Lcd_Mask=LeftMask[k]&RightMask[p];
23 4 a1=lcdrd();
24 4 a1&=(~Lcd_Mask);
25 4 a1|=(a2&Lcd_Mask);
26 4 lcdwd(a1);
27 4 ly=YSIZE;
28 4 Lcd_CurrentY+=YSIZE-k;
29 4 }
30 3 else
31 3 { Lcd_Mask=LeftMask[k];
32 4 a1=lcdrd();
33 4 a1&=(~Lcd_Mask);
34 4 a1|=(a2&Lcd_Mask);
35 4 lcdwd(a1);
36 4 ly+=8-k;
37 4 Lcd_CurrentY+=8-k;
38 4 }
39 3 }
40 2 else if(ly>=YSIZE-p)
41 2 { if(k>=p)
42 3 { s--;
43 4 a1=*s;
44 4 a2=0;
45 4 for(p=0;p<k;p++)
46 4 { a2<<=1;
47 5 if((a1&0x80)==0x80)
48 5 a2++;
49 5 a1<<=1;
50 5 }
51 4 p=YSIZE&0x7;
52 4 }
53 3 Lcd_Mask=RightMask[p];
54 3 a1=lcdrd();
55 3 a1&=(~Lcd_Mask);
C51 COMPILER V7.10 DISPLAY 10/31/2007 09:58:21 PAGE 2
56 3 a1|=(a2&Lcd_Mask);
57 3 lcdwd(a1);
58 3 ly+=p;
59 3 Lcd_CurrentY+=p;
60 3 }
61 2 else
62 2 { lcdwd(a2);
63 3 ly+=8;
64 3 Lcd_CurrentY+=8;
65 3 }
66 2 a1=*s;
67 2 }
68 1 Lcd_CurrentY=y;
69 1 }
70
71 //显示汉字
72 void displaychinesechardot(unsigned int Index)
73 { unsigned char code *s;
74 1 s=ChineseCharDot+Index*CHINESECHARDOTSIZE; //赋值汉字点阵首地址(数组名+ )
*** ERROR C202 IN LINE 74 OF DISPLAY.C: 'ChineseCharDot': undefined identifier
75 1 { if(Lcd_CurrentX>LCD_RIGHT-CHINESECHARSIZE+1)
*** ERROR C202 IN LINE 75 OF DISPLAY.C: 'LCD_RIGHT': undefined identifier
76 2 { Lcd_CurrentX=LCD_LEFT;
*** ERROR C202 IN LINE 76 OF DISPLAY.C: 'LCD_LEFT': undefined identifier
77 3 Lcd_CurrentY+=CHINESECHARSIZE;
*** ERROR C202 IN LINE 77 OF DISPLAY.C: 'CHINESECHARSIZE': undefined identifier
78 3 if(Lcd_CurrentY>LCD_BOTTOM-CHINESECHARSIZE+1)
*** ERROR C202 IN LINE 78 OF DISPLAY.C: 'LCD_BOTTOM': undefined identifier
79 3 Lcd_CurrentY=LCD_TOP;
*** ERROR C202 IN LINE 79 OF DISPLAY.C: 'LCD_TOP': undefined identifier
80 3 }
81 2 putsizeimage(CHINESECHARSIZE,CHINESECHARSIZE,s);
*** ERROR C202 IN LINE 81 OF DISPLAY.C: 'CHINESECHARSIZE': undefined identifier
82 2 }
83 1 }
84
85 //显示英文字符
86 void displayenglishchardot(unsigned int Index)
87 { unsigned char code *s;
88 1 s=EnglishCharDot+Index*ENGLISHCHARDOTSIZE;
*** ERROR C202 IN LINE 88 OF DISPLAY.C: 'EnglishCharDot': undefined identifier
89 1 if(Lcd_CurrentX>LCD_RIGHT-ENGLISHCHARSIZE+1)
*** ERROR C202 IN LINE 89 OF DISPLAY.C: 'LCD_RIGHT': undefined identifier
90 1 { Lcd_CurrentX=LCD_LEFT;
*** ERROR C202 IN LINE 90 OF DISPLAY.C: 'LCD_LEFT': undefined identifier
91 2 Lcd_CurrentY+=CHINESECHARSIZE;
*** ERROR C202 IN LINE 91 OF DISPLAY.C: 'CHINESECHARSIZE': undefined identifier
92 2 if(Lcd_CurrentY>LCD_BOTTOM-CHINESECHARSIZE+1)
*** ERROR C202 IN LINE 92 OF DISPLAY.C: 'LCD_BOTTOM': undefined identifier
93 2 Lcd_CurrentY=LCD_TOP;
*** ERROR C202 IN LINE 93 OF DISPLAY.C: 'LCD_TOP': undefined identifier
94 2 }
95 1 putsizeimage(ENGLISHCHARSIZE,CHINESECHARSIZE,s);
*** ERROR C202 IN LINE 95 OF DISPLAY.C: 'ENGLISHCHARSIZE': undefined identifier
96 1 }
97
98 //信息显示
99 void putchar(unsigned int uChar)
100 { unsigned int i;
101 1 if(uChar<128)
102 1 for(i=0;i!=ENGLISHCHARNUMBER;i++)
*** ERROR C202 IN LINE 102 OF DISPLAY.C: 'ENGLISHCHARNUMBER': undefined identifier
C51 COMPILER V7.10 DISPLAY 10/31/2007 09:58:21 PAGE 3
103 1 { if(uChar==EnglishCode[i])
*** ERROR C202 IN LINE 103 OF DISPLAY.C: 'EnglishCode': undefined identifier
104 2 { displayenglishchardot(i);
105 3 break;
106 3 }
107 2 }
108 1 else
109 1 for(i=0;i!=CHINESECHARNUMBER;i++)
*** ERROR C202 IN LINE 109 OF DISPLAY.C: 'CHINESECHARNUMBER': undefined identifier
110 1 { if(uChar==ChineseCode[i])
*** ERROR C202 IN LINE 110 OF DISPLAY.C: 'ChineseCode': undefined identifier
111 2 { displaychinesechardot(i);
112 3 break;
113 3 }
114 2 }
115 1 }
116
117 //显示汉字或英文字符
118 void put_str(unsigned char code *s)
119 { unsigned int i;
120 1 for(;*s!=0;s++)
121 1 { i=*s;
122 2 if(*s>127)
123 2 { s++;
124 3 i=i*256+*s;
125 3 }
126 2 if(i=='\n')
127 2 { Lcd_CurrentX=LCD_LEFT;
*** ERROR C202 IN LINE 127 OF DISPLAY.C: 'LCD_LEFT': undefined identifier
128 3 if(Lcd_CurrentY>LCD_BOTTOM-CHINESECHARSIZE+1)
*** ERROR C202 IN LINE 128 OF DISPLAY.C: 'LCD_BOTTOM': undefined identifier
129 3 Lcd_CurrentY=LCD_TOP;
*** ERROR C202 IN LINE 129 OF DISPLAY.C: 'LCD_TOP': undefined identifier
130 3 else
131 3 Lcd_CurrentY+=CHINESECHARSIZE;
*** ERROR C202 IN LINE 131 OF DISPLAY.C: 'CHINESECHARSIZE': undefined identifier
132 3 }
133 2 putchar(i);
134 2 }
135 1 }
136
137 //显示汉字或英文字符
138 void put_str_xy(unsigned char x,unsigned char y,unsigned char code *s)
139 { Lcd_CurrentX=x;
140 1 Lcd_CurrentY=y;
141 1 put_str(s);
142 1 }
C51 COMPILATION COMPLETE. 0 WARNING(S), 22 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -