📄 text2.lst
字号:
C51 COMPILER V7.50 TEXT2 04/18/2008 09:18:54 PAGE 1
C51 COMPILER V7.50, COMPILATION OF MODULE TEXT2
OBJECT MODULE PLACED IN Text2.OBJ
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE Text2.c BROWSE DEBUG OBJECTEXTEND
line level source
1 #include"regx51.h"
2 #include "absacc.h"
3
4 unsigned char xdata ins _at_ 0x0001;
5 unsigned char xdata dat _at_ 0x0000;
6
7 unsigned char read_state()
8 {
9 1 unsigned char temp;
10 1 temp=ins;
11 1 return(temp);
12 1 }
13
14 void stste_check(void) //状态检测
15 {
16 1 while((read_state() & 0x03) != 0x03);
17 1 }
18
19
20 void ins_write(unsigned char s)
21 {
22 1 stste_check();
23 1 ins=s;
24 1 }
25
26 void dat_write(unsigned char d)
27 {
28 1 stste_check();
29 1 dat=d;
30 1 }
31
32 void set_gra_pos(unsigned char x,unsigned char y) //x:0-16 y:0-127
33 {
34 1 unsigned int temp=x+16*y;
35 1 dat_write((unsigned char)(temp&0xff));
36 1 dat_write((unsigned char)(temp>>8)+0x08);
37 1 ins_write(0x24);
38 1 }
39
40 void set_text_pos(unsigned char x,unsigned char y) //x:0-16 y:0-16
41 {
42 1 unsigned int temp=x+16*y;
43 1 dat_write((unsigned char)(temp&0xff));
44 1 dat_write((unsigned char)(temp>>8));
45 1 ins_write(0x24);
46 1 }
47 void lcd_init()
48 {
49 1 dat_write(0);//设置文本显示区域首地址
50 1 dat_write(0);
51 1 ins_write(0x40);
52 1
53 1 dat_write(0x10);//设置文本显示区域宽度
54 1 dat_write(0); //即一行显示所占的字节数
55 1 ins_write(0x41);
C51 COMPILER V7.50 TEXT2 04/18/2008 09:18:54 PAGE 2
56 1
57 1 dat_write(0x0);//设置图形显示区域首地址
58 1 dat_write(0x08);
59 1 ins_write(0x42);
60 1
61 1 dat_write(0x10);//设置图形显示区域宽度
62 1 dat_write(0);
63 1 ins_write(0x43);
64 1
65 1 ins_write(0xa1);//光标形状设置
66 1
67 1 ins_write(0x80);//显示或合成
68 1
69 1 ins_write(0x9c);//显示开关设置
70 1
71 1 dat_write(0);//设置显示RAM首地址
72 1 dat_write(0x08);
73 1 ins_write(0x24);
74 1 }
75
76 void lcd_char(unsigned char c)
77 {
78 1 dat_write(c);
79 1 ins_write(0xc0);
80 1 }
81
82 void pixel(unsigned char x,unsigned char y) //x:0-128 y:0-128
83 {
84 1
85 1 }
*** WARNING C280 IN LINE 82 OF TEXT2.C: 'x': unreferenced local variable
*** WARNING C280 IN LINE 82 OF TEXT2.C: 'y': unreferenced local variable
86
87
88 void main()
89 {
90 1 lcd_init();
91 1 //lcd_char(0xff);
92 1 ins_write(0xff);
93 1 while(1);
94 1 }
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 199 ----
CONSTANT SIZE = ---- ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 2
IDATA SIZE = ---- ----
BIT SIZE = ---- ----
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 2 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -