📄 show.lst
字号:
C51 COMPILER V6.12 SHOW 12/19/2005 09:45:44 PAGE 1
C51 COMPILER V6.12, COMPILATION OF MODULE SHOW
OBJECT MODULE PLACED IN .\show.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE .\show.c BROWSE DEBUG OBJECTEXTEND
stmt level source
1 #include <reg51.h>
2 #include <stdio.h>
3 #include "var.h"
4 #include "sub.h"
5
6
7 void showhz(void);
8 void main ()
9 {
10 1 int loop=9;
11 1 EA=1;
12 1 EX0=1;
13 1 IT0=1;
14 1
15 1 ET0=1;
16 1 TMOD=1;
17 1 TH0=0xFC;
18 1 TL0=0x17;
19 1 TR0=1;
20 1
21 1 InitLCD(30);
22 1
23 1 showhz();
24 1
25 1 while(loop==9){};
26 1
27 1 }
28
29 void showhz()
30 {
31 1 char col=0,row=0,j=0;
32 1
33 1 int start_tep=0,index=0;
34 1
35 1 for (hz_pointer=0;hz_pointer<hz_size;hz_pointer++)
36 1 {
37 2 row=hz_pointer/(12/2);//汉子所在的行数。
38 2 col=hz_pointer%(12/2);//汉字的列数
39 2
40 2 start_tep=row*LineChar*16+col*2;//下一个汉字的开启地址
41 2
42 2
43 2 for(j=0;j<16;j++)
44 2 {
45 3 start_tep=start_tep+LineChar;//地址换一行
46 3 OutPortCom3( (unsigned char)(start_tep), (unsigned char)(start_tep>>8), 0x24); //set address
47 3 index=hz_pointer*32+j*2;
48 3 OutPortCom2( hzdot[index], 0xc0);//输出低位
49 3 index=hz_pointer*32+j*2+1;
50 3 OutPortCom2(hzdot[index], 0xc4);//输出高位
51 3
52 3 OutPortCom3( (unsigned char)(start_tep+12), (unsigned char)((start_tep+12)>>8), 0x24); //set addre
-ss
53 3 index=hz_pointer*32+j*2;
54 3 OutPortCom2( hzdot[index], 0xc0);//输出低位
C51 COMPILER V6.12 SHOW 12/19/2005 09:45:44 PAGE 2
55 3 index=hz_pointer*32+j*2+1;
56 3 OutPortCom2(hzdot[index], 0xc4);//输出高位
57 3
58 3 if(col<3)
59 3 {
60 4 OutPortCom3( (unsigned char)(start_tep+24), (unsigned char)((start_tep+24)>>8), 0x24); //set addre
-ss
61 4 index=hz_pointer*32+j*2;
62 4 OutPortCom2( hzdot[index], 0xc0);//输出低位
63 4 index=hz_pointer*32+j*2+1;
64 4 OutPortCom2(hzdot[index], 0xc4);//输出高位
65 4 }
66 3
67 3 }
68 2
69 2
70 2 }
71 1
72 1
73 1
74 1 /*
75 1 OutPortCom3( (unsigned char)(StartAddr), (unsigned char)(StartAddr>>8), 0x24); //set address
76 1 OutPortCom2( 0xff, 0xc0);
77 1 OutPortCom2( 0xff, 0xc4);*/
78 1
79 1
80 1 }
81 void shack() interrupt 0
82
83 {
84 1 if (key_counter<40)key_counter++;
85 1 else key_counter=0;
86 1
87 1 OutPortCom3((unsigned char)key_counter*60, (unsigned char)((key_counter*60)>>8), 0x42); //set address
88 1
89 1
90 1 }
91
92 void ontime() interrupt 1
93 {
94 1 TH0=0xFC;
95 1 TL0=0x17;
96 1
97 1 if (timer_counter<500)timer_counter++;
98 1 else
99 1 {
100 2 timer_counter=0;
101 2 if (key_counter<8)key_counter++;
102 2 else key_counter=0;
103 2 OutPortCom3((unsigned char)(key_counter*240),(unsigned char)((key_counter*240)>>8), 0x42); //set addres
-s
104 2 }
105 1 }
106
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1420 ----
CONSTANT SIZE = 768 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = 8 12
C51 COMPILER V6.12 SHOW 12/19/2005 09:45:44 PAGE 3
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -