📄 lcd_lm016l.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-51037 Sat Jun 21 19:53:50 2008
Licensed to: ONE
1 processor 16F877A
2 opt pw 79
3 psect __Z51037RS_,global,delta=1
4 psect text0,local,class=CODE,delta=2
5 psect text1,local,class=CODE,delta=2
6 psect text2,local,class=CODE,delta=2
7 psect text13,local,class=CODE,delta=2
8 psect text18,local,class=CODE,delta=2
9 0000
10 0000
11 0000
12 0000
13 0000
14 0000
15 0000
16 0000
17 0000
18 0000
19
20 psect __Z51037RS_
21 0190
22 0190
23
24 psect text0
25 0690 _delay_1us
26 ;lcd_lm016l.c: 47: asm("nop");
27 0690 0000 nop ;#
28 ;lcd_lm016l.c: 48: }
29 0691 0183 clrf 3 ;select bank 0
30 0692 0008 return
31
32 psect text1
33 0725 _delay_nus
34 ; _i assigned to ?a_delay_nus+0
35 0000 _delay_nus$i set ?a_delay_nus
36 ;lcd_lm016l.c: 52: unsigned int i=0;
37 0725 0183 clrf 3 ;select bank 0
38 0726 01A1 clrf ?a_delay_nus
39 0727 01A2 clrf ?a_delay_nus+1
40 ;lcd_lm016l.c: 53: for (i=0;i<n;i++)
41 0728 01A1 clrf ?a_delay_nus
42 0729 01A2 clrf ?a_delay_nus+1
43 072A 2F30 goto l6
44 072B l3
45 ;lcd_lm016l.c: 54: delay_1us();
46 ;lcd_lm016l.c: 47: asm("nop");
47 072B 0000 nop ;#
48 ;lcd_lm016l.c: 48: }
49 072C 0183 clrf 3 ;select bank 0
50 072D 0AA1 incf ?a_delay_nus
51 072E 1903 btfsc 3,2
52 072F 0AA2 incf ?a_delay_nus+1
53 0730 l6
54 0730 0822 movf ?_delay_nus+1,w
55 0731 0222 subwf ?a_delay_nus+1,w
56 0732 1D03 btfss 3,2
57 0733 2F36 goto u15
58 0734 0821 movf ?_delay_nus,w
59 0735 0221 subwf ?a_delay_nus,w
60 0736 u15
61 0736 1803 btfsc 3,0
62 0737 0008 return
63 0738 2F2B goto l3
64 ;lcd_lm016l.c: 71: void LCD_INIT(void)
65 ;lcd_lm016l.c: 72: {
66 0739 _LCD_INIT
67 ;lcd_lm016l.c: 73: TRISD=0X00;
68 0739 1683 bsf 3,5
69 073A 1303 bcf 3,6 ;carry unused
70 073B 0188 clrf 8 ;volatile
71 ;lcd_lm016l.c: 75: (PORTD &= ~(1 << 1));
72 073C 1283 bcf 3,5
73 073D 1088 bcf 8,1 ;volatile
74 ;lcd_lm016l.c: 76: (PORTD &= ~(1 << 0));
75 073E 1008 bcf 8,0 ;volatile
76 ;lcd_lm016l.c: 77: (PORTD |= (1 << 2));
77 073F 1508 bsf 8,2 ;volatile
78 ;lcd_lm016l.c: 78: asm("nop");
79 0740 0000 nop ;#
80 ;lcd_lm016l.c: 79: asm("nop");
81 0741 0000 nop ;#
82 ;lcd_lm016l.c: 80: (PORTD &= ~(1 << 2));
83 0742 1108 bcf 8,2 ;volatile
84 ;lcd_lm016l.c: 81: delay_nus(40);
85 0743 3028 movlw 40
86 0744 00A1 movwf ?_delay_nus
87 0745 01A2 clrf ?_delay_nus+1
88 0746 2725 fcall _delay_nus
89 ;lcd_lm016l.c: 94: PORTD = 0x20;
90 0747 3020 movlw 32
91 0748 0088 movwf 8 ;volatile
92 ;lcd_lm016l.c: 95: (PORTD |= (1 << 2));
93 0749 1508 bsf 8,2 ;volatile
94 ;lcd_lm016l.c: 96: asm("nop");
95 074A 0000 nop ;#
96 ;lcd_lm016l.c: 97: asm("nop");
97 074B 0000 nop ;#
98 ;lcd_lm016l.c: 98: (PORTD &= ~(1 << 2));
99 074C 1108 bcf 8,2 ;volatile
100 ;lcd_lm016l.c: 99: delay_nus(40);
101 074D 3028 movlw 40
102 074E 00A1 movwf ?_delay_nus
103 074F 01A2 clrf ?_delay_nus+1
104 0750 2F25 ljmp _delay_nus
105 ;lcd_lm016l.c: 104: void LCD_Busy ( void )
106 ;lcd_lm016l.c: 105: {
107 0751 _LCD_Busy
108 ; _low assigned to ?a_LCD_Busy+0
109 0000 _LCD_Busy$low set ?a_LCD_Busy
110 ; _high assigned to ?a_LCD_Busy+1
111 0000 _LCD_Busy$high set ?a_LCD_Busy+1
112 ;lcd_lm016l.c: 106: unsigned char high,low;
113 0751 30F0 movlw -16
114 0752 1683 bsf 3,5
115 0753 1303 bcf 3,6 ;carry unused
116 0754 0088 movwf 8 ;volatile
117 0755 l20
118 ;lcd_lm016l.c: 108: do
119 ;lcd_lm016l.c: 109: {
120 0755 1283 bcf 3,5
121 0756 1488 bsf 8,1 ;volatile
122 ;lcd_lm016l.c: 111: (PORTD &= ~(1 << 0));
123 0757 1008 bcf 8,0 ;volatile
124 ;lcd_lm016l.c: 112: (PORTD |= (1 << 2));
125 0758 1508 bsf 8,2 ;volatile
126 ;lcd_lm016l.c: 113: delay_nus(3);
127 0759 3003 movlw 3
128 075A 00A1 movwf ?_delay_nus
129 075B 01A2 clrf ?_delay_nus+1
130 075C 2725 fcall _delay_nus
131 ;lcd_lm016l.c: 114: high = PORTD;
132 075D 0808 movf 8,w ;volatile
133 075E 00A2 movwf ?a_LCD_Busy+1
134 ;lcd_lm016l.c: 115: (PORTD &= ~(1 << 2));
135 075F 1108 bcf 8,2 ;volatile
136 ;lcd_lm016l.c: 116: (PORTD |= (1 << 2));
137 0760 1508 bsf 8,2 ;volatile
138 ;lcd_lm016l.c: 117: asm("nop");
139 0761 0000 nop ;#
140 ;lcd_lm016l.c: 118: asm("nop");
141 0762 0000 nop ;#
142 ;lcd_lm016l.c: 119: low = PORTD;
143 0763 0808 movf 8,w ;volatile
144 0764 00A1 movwf ?a_LCD_Busy
145 ;lcd_lm016l.c: 120: (PORTD &= ~(1 << 2));
146 0765 1108 bcf 8,2 ;volatile
147 ;lcd_lm016l.c: 121: } while(high & 0x80);
148 0766 1BA2 btfsc ?a_LCD_Busy+1,7
149 0767 2F55 goto l20
150 ;lcd_lm016l.c: 122: delay_nus(20);
151 0768 3014 movlw 20
152 0769 00A1 movwf ?_delay_nus
153 076A 01A2 clrf ?_delay_nus+1
154 076B 2F25 ljmp _delay_nus
155 ;lcd_lm016l.c: 127: void LCD_WriteControl (unsi
+ gned char CMD)
156 ;lcd_lm016l.c: 128: {
157 076C _LCD_WriteControl
158 ; _CMD assigned to ?a_LCD_WriteControl+0
159 0000 _LCD_WriteControl$CMD set ?a_LCD_WriteControl
160 ;_CMD stored from w
161 076C 0183 clrf 3 ;select bank 0
162 076D 00A1 movwf ?a_LCD_WriteControl
163 ;lcd_lm016l.c: 130: LCD_Busy();
164 076E 2751 120A 118A fcall _LCD_Busy
165 ;lcd_lm016l.c: 131: TRISD=0X00;
166 0771 1683 bsf 3,5
167 0772 0188 clrf 8 ;volatile
168 ;lcd_lm016l.c: 134: PORTD =CMD & 0xf0;
169 0773 1283 bcf 3,5
170 0774 0821 movf ?a_LCD_WriteControl,w
171 0775 39F0 andlw -16
172 0776 0088 movwf 8 ;volatile
173 ;lcd_lm016l.c: 135: (PORTD &= ~(1 << 1));
174 0777 1088 bcf 8,1 ;volatile
175 ;lcd_lm016l.c: 136: (PORTD &= ~(1 << 0));
176 0778 1008 bcf 8,0 ;volatile
177 ;lcd_lm016l.c: 137: (PORTD |= (1 << 2));
178 0779 1508 bsf 8,2 ;volatile
179 ;lcd_lm016l.c: 138: asm("nop");
180 077A 0000 nop ;#
181 ;lcd_lm016l.c: 139: asm("nop");
182 077B 0000 nop ;#
183 ;lcd_lm016l.c: 140: (PORTD &= ~(1 << 2));
184 077C 1108 bcf 8,2 ;volatile
185 ;lcd_lm016l.c: 141: PORTD =CMD<<4;
186 077D 0E21 swapf ?a_LCD_WriteControl,w
187 077E 39F0 andlw 240
188 077F 0088 movwf 8 ;volatile
189 ;lcd_lm016l.c: 142: (PORTD &= ~(1 << 1));
190 0780 1088 bcf 8,1 ;volatile
191 ;lcd_lm016l.c: 143: (PORTD &= ~(1 << 0));
192 0781 1008 bcf 8,0 ;volatile
193 ;lcd_lm016l.c: 144: (PORTD |= (1 << 2));
194 0782 1508 bsf 8,2 ;volatile
195 ;lcd_lm016l.c: 145: asm("nop");
196 0783 0000 nop ;#
197 ;lcd_lm016l.c: 146: asm("nop");
198 0784 0000 nop ;#
199 ;lcd_lm016l.c: 147: (PORTD &= ~(1 << 2));
200 0785 1108 bcf 8,2 ;volatile
201 ;lcd_lm016l.c: 148: }
202 0786 0008 return
203 ;lcd_lm016l.c: 177: void Init_LCD(void)
204 ;lcd_lm016l.c: 178: {
205 0787 _Init_LCD
206 ;lcd_lm016l.c: 179: LCD_INIT();
207 0787 2739 120A 118A fcall _LCD_INIT
208 ;lcd_lm016l.c: 181: LCD_WriteControl (0x28);
209 078A 3028 movlw 40
210 078B 276C 120A 118A fcall _LCD_WriteControl
211 ;lcd_lm016l.c: 182: LCD_WriteControl (0x08);
212 078E 3008 movlw 8
213 078F 276C 120A 118A fcall _LCD_WriteControl
214 ;lcd_lm016l.c: 183: LCD_WriteControl (0x01);
215 0792 3001 movlw 1
216 0793 276C 120A 118A fcall _LCD_WriteControl
217 ;lcd_lm016l.c: 184: LCD_WriteControl (0x06);
218 0796 3006 movlw 6
219 0797 276C 120A 118A fcall _LCD_WriteControl
220 ;lcd_lm016l.c: 185: LCD_WriteControl (0x0C);
221 079A 300C movlw 12
222 079B 276C 120A 118A fcall _LCD_WriteControl
223 ;lcd_lm016l.c: 186: LCD_WriteControl (0x02);
224 079E 3002 movlw 2
225 079F 2F6C ljmp _LCD_WriteControl
226 ;lcd_lm016l.c: 193: void LCD_Clear(void)
227 ;lcd_lm016l.c: 194: {
228 07A0 _LCD_Clear
229 ;lcd_lm016l.c: 195: LCD_WriteControl(0x01);
230 07A0 3001 movlw 1
231 07A1 2F6C ljmp _LCD_WriteControl
232 ;lcd_lm016l.c: 200: void LCD_Home(void)
233 ;lcd_lm016l.c: 201: {
234 07A2 _LCD_Home
235 ;lcd_lm016l.c: 202: LCD_WriteControl(0x02);
236 07A2 3002 movlw 2
237 07A3 2F6C ljmp _LCD_WriteControl
238 07A4 _LCD_Cursor
239 ; _row assigned to ?a_LCD_Cursor+0
240 0000 _LCD_Cursor$row set ?a_LCD_Cursor
241 ;_row stored from w
242 07A4 0183 clrf 3 ;select bank 0
243 07A5 00A1 movwf ?a_LCD_Cursor
244 ;lcd_lm016l.c: 216: switch (row) {
245 07A6 2FB3 goto l29
246 07A7 l30
247 ;lcd_lm016l.c: 217: case 1: LCD_WriteControl (0
+ x80 + column - 1); break;
248 07A7 0821 movf ?_LCD_Cursor,w
249 07A8 3E7F addlw 127
250 07A9 2F6C ljmp _LCD_WriteControl
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -