📄 key_display.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Fri Dec 12 10:06:07 2008
1 processor 16F877A
2 opt pw 79
3 psect __Z49231UD_,global,delta=1
4 psect strings,global,class=STRING,delta=2
5 psect const1,local,class=CONST,delta=2
6 psect text1,local,class=CODE,delta=2
7 psect text2,local,class=CODE,delta=2
8 psect text3,local,class=CODE,delta=2
9 psect rbss_1,global,class=BANK1,space=1,delta=
+ 1
10 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
11 0000
12 0000
13 0000
14 0000
15 0000
16 0000
17 0000
18 0000
19 0000
20 0000
21
22 psect const1
23 082B 0782 addwf 2
24 082C _dispcode
25 082C 343F retlw 63
26 082D 3406 retlw 6
27 082E 345B retlw 91
28 082F 344F retlw 79
29 0830 3466 retlw 102
30 0831 346D retlw 109
31 0832 347D retlw 125
32 0833 3407 retlw 7
33 0834 347F retlw 127
34 0835 346F retlw 111
35 0836 3477 retlw 119
36 0837 347C retlw 124
37 0838 3400 retlw 0
38
39 psect text1
40 ;Key_Display.c: 34: void LED_CS(unsigned char l
+ ednum)
41 ;Key_Display.c: 35: {
42 0DCF _LED_CS
43 ; _lednum assigned to ?a_LED_CS+0
44 0000 _LED_CS$lednum set ?a_LED_CS
45 ;_lednum stored from w
46 0DCF 0183 clrf 3 ;select bank 0
47 0DD0 00DC movwf ?a_LED_CS
48 ;Key_Display.c: 37: if(lednum==0)
49 0DD1 08DC movf ?a_LED_CS
50 0DD2 1D03 btfss 3,2
51 0DD3 2DD6 goto l7
52 ;Key_Display.c: 38: {
53 0DD4 1009 bcf 9,0
54 ;Key_Display.c: 40: }
55 0DD5 0008 return
56 0DD6 l7
57 0DD6 0B5C decfsz ?a_LED_CS,w
58 0DD7 2DDA goto l9
59 ;Key_Display.c: 42: {
60 0DD8 1089 bcf 9,1
61 ;Key_Display.c: 44: }
62 0DD9 0008 return
63 0DDA l9
64 0DDA 085C movf ?a_LED_CS,w
65 0DDB 3A02 xorlw 2
66 0DDC 1D03 btfss 3,2
67 0DDD 2DE0 goto l11
68 ;Key_Display.c: 46: {
69 0DDE 1109 bcf 9,2
70 ;Key_Display.c: 48: }
71 0DDF 0008 return
72 0DE0 l11
73 0DE0 085C movf ?a_LED_CS,w
74 0DE1 3A03 xorlw 3
75 0DE2 1D03 btfss 3,2
76 0DE3 2DE6 goto l13
77 ;Key_Display.c: 50: {
78 0DE4 1007 bcf 7,0
79 ;Key_Display.c: 52: }
80 0DE5 0008 return
81 0DE6 l13
82 0DE6 085C movf ?a_LED_CS,w
83 0DE7 3A04 xorlw 4
84 0DE8 1D03 btfss 3,2
85 0DE9 2DEC goto l15
86 ;Key_Display.c: 54: {
87 0DEA 1207 bcf 7,4
88 ;Key_Display.c: 56: }
89 0DEB 0008 return
90 0DEC l15
91 0DEC 085C movf ?a_LED_CS,w
92 0DED 3A05 xorlw 5
93 0DEE 1D03 btfss 3,2
94 0DEF 2DF2 goto l17
95 ;Key_Display.c: 58: {
96 0DF0 1287 bcf 7,5
97 ;Key_Display.c: 60: }
98 0DF1 0008 return
99 0DF2 l17
100 0DF2 085C movf ?a_LED_CS,w
101 0DF3 3A06 xorlw 6
102 0DF4 1D03 btfss 3,2
103 0DF5 2DF8 goto l19
104 ;Key_Display.c: 62: {
105 0DF6 1307 bcf 7,6
106 ;Key_Display.c: 64: }
107 0DF7 0008 return
108 0DF8 l19
109 0DF8 085C movf ?a_LED_CS,w
110 0DF9 3A07 xorlw 7
111 0DFA 1903 btfsc 3,2
112 ;Key_Display.c: 66: {
113 0DFB 1387 bcf 7,7
114 ;Key_Display.c: 68: }
115 0DFC 0008 return
116 0DFD _display
117 ; _data assigned to ?a_display+0
118 0000 _display$data set ?a_display
119 ;Key_Display.c: 17: unsigned char data;
120 0DFD 0183 clrf 3 ;select bank 0
121 0DFE 1409 bsf 9,0
122 ;Key_Display.c: 19: RE1=1;
123 0DFF 1489 bsf 9,1
124 ;Key_Display.c: 20: RE2=1;
125 0E00 1509 bsf 9,2
126 ;Key_Display.c: 21: RC0=1;
127 0E01 1407 bsf 7,0
128 ;Key_Display.c: 22: RC4=1;
129 0E02 1607 bsf 7,4
130 ;Key_Display.c: 23: RC5=1;
131 0E03 1687 bsf 7,5
132 ;Key_Display.c: 24: RC6=1;
133 0E04 1707 bsf 7,6
134 ;Key_Display.c: 25: RC7=1;
135 0E05 1787 bsf 7,7
136 ;Key_Display.c: 26: data = DisData.data[DisData
+ .bitnum/4][DisData.bitnum%4];
137 0E06 1683 bsf 3,5
138 0E07 085A movf (_DisData+8)^(0+128),w
139 0E08 00F0 movwf btemp
140 0E09 1003 bcf 3,0
141 0E0A 0CF0 rrf btemp
142 0E0B 1003 bcf 3,0
143 0E0C 0C70 rrf btemp,w
144 0E0D 00F0 movwf btemp
145 0E0E 1003 bcf 3,0
146 0E0F 0DF0 rlf btemp
147 0E10 1003 bcf 3,0
148 0E11 0D70 rlf btemp,w
149 0E12 00F0 movwf btemp
150 0E13 085A movf (_DisData+8)^(0+128),w
151 0E14 3903 andlw 3
152 0E15 0770 addwf btemp,w
153 0E16 3ED2 addlw _DisData
154 0E17 0084 movwf 4
155 0E18 1383 bcf 3,7
156 0E19 0800 movf 0,w
157 0E1A 1283 bcf 3,5
158 0E1B 00DB movwf ?a_display
159 ;Key_Display.c: 27: PORTD = data;
160 0E1C 0088 movwf 8 ;volatile
161 ;Key_Display.c: 28: LED_CS(DisData.bitnum);
162 0E1D 1683 bsf 3,5
163 0E1E 085A movf (_DisData+8)^(0+128),w
164 0E1F 25CF fcall _LED_CS
165 ;Key_Display.c: 29: DisData.bitnum++;
166 0E20 1683 bsf 3,5
167 0E21 0ADA incf (_DisData+8)^(0+128)
168 ;Key_Display.c: 31: if(DisData.bitnum>=8) DisDa
+ ta.bitnum = 0;
169 0E22 3008 movlw 8
170 0E23 025A subwf (_DisData+8)^(0+128),w
171 0E24 1803 btfsc 3,0
172 0E25 01DA clrf (_DisData+8)^(0+128)
173 ;Key_Display.c: 32: }
174 0E26 1283 bcf 3,5
175 0E27 0008 return
176
177 psect text2
178 012F _TO_Displaydata
179 ; _bitcount assigned to ?a_TO_Displaydata+0
180 0000 _TO_Displaydata$bitcount set ?a_TO_Displaydata
181 ; _n assigned to ?a_TO_Displaydata+1
182 0000 _TO_Displaydata$n set ?a_TO_Displaydata+1
183 ; _i assigned to ?a_TO_Displaydata+2
184 0000 _TO_Displaydata$i set ?a_TO_Displaydata+2
185 ; _Dec_data assigned to ?a_TO_Displaydata+3
186 0000 _TO_Displaydata$Dec_data set ?a_TO_Displaydata+
+ 3
187 ; _floatdata assigned to ?a_TO_Displaydata+5
188 0000 _TO_Displaydata$floatdata set ?a_TO_Displaydata
+ +5
189 ; _m assigned to ?a_TO_Displaydata+7
190 0000 _TO_Displaydata$m set ?a_TO_Displaydata+7
191 ;Key_Display.c: 78: unsigned char i,bitcount,n;
192 012F 0183 clrf 3 ;select bank 0
193 0130 0825 movf ?_TO_Displaydata+3,w
194 0131 00F3 movwf btemp+3
195 0132 0824 movf ?_TO_Displaydata+2,w
196 0133 00F2 movwf btemp+2
197 0134 0823 movf ?_TO_Displaydata+1,w
198 0135 00F1 movwf btemp+1
199 0136 0822 movf ?_TO_Displaydata,w
200 0137 00F0 movwf btemp
201 0138 120A 118A 2701 fcall lwdiv
202 013B 0874 movf btemp+4,w
203 013C 00AA movwf ?a_TO_Displaydata+3
204 013D 0875 movf btemp+5,w
205 013E 00AB movwf ?a_TO_Displaydata+4
206 ;Key_Display.c: 81: floatdata = data%Dis_floatn
+ um;
207 013F 0825 movf ?_TO_Displaydata+3,w
208 0140 00F3 movwf btemp+3
209 0141 0824 movf ?_TO_Displaydata+2,w
210 0142 00F2 movwf btemp+2
211 0143 0823 movf ?_TO_Displaydata+1,w
212 0144 00F1 movwf btemp+1
213 0145 0822 movf ?_TO_Displaydata,w
214 0146 00F0 movwf btemp
215 0147 120A 118A 2701 fcall lwmod
216 014A 0870 movf btemp,w
217 014B 00AC movwf ?a_TO_Displaydata+5
218 014C 0871 movf btemp+1,w
219 014D 00AD movwf ?a_TO_Displaydata+6
220 ;Key_Display.c: 82: m = 1000/Dis_floatnum;
221 014E 0825 movf ?_TO_Displaydata+3,w
222 014F 00F3 movwf btemp+3
223 0150 0824 movf ?_TO_Displaydata+2,w
224 0151 00F2 movwf btemp+2
225 0152 30E8 movlw 232
226 0153 00F0 movwf btemp
227 0154 3003 movlw 3
228 0155 00F1 movwf btemp+1
229 0156 120A 118A 2701 fcall lwdiv
+ 120A 118A
230 015B 0874 movf btemp+4,w
231 015C 00AE movwf ?a_TO_Displaydata+7
232 015D 0875 movf btemp+5,w
233 015E 00AF movwf ?a_TO_Displaydata+8
234 ;Key_Display.c: 83: bitcount = 0;
235 015F 01A7 clrf ?a_TO_Displaydata
236 ;Key_Display.c: 84: for(i=0;i<4;i++)
237 0160 01A9 clrf ?a_TO_Displaydata+2
238 0161 l23
239 ;Key_Display.c: 85: {
240 ;Key_Display.c: 86: if(m>0)
241 0161 082F movf ?a_TO_Displaydata+8,w
242 0162 042E iorwf ?a_TO_Displaydata+7,w
243 0163 1903 btfsc 3,2
244 0164 29F0 goto l26
245 ;Key_Display.c: 87: {
246 0165 082F movf ?a_TO_Displaydata+8,w
247 0166 00F3 movwf btemp+3
248 0167 082E movf ?a_TO_Displaydata+7,w
249 0168 00F2 movwf btemp+2
250 0169 082B movf ?a_TO_Displaydata+4,w
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -