📄 shizhong.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Sun Jul 20 18:05:31 2008
1 processor 16F877
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 const2,local,class=CONST,delta=2
7 psect rdata_0,global,class=BANK0,space=1,delta
+ =1
8 psect idata_0,global,class=CODE,delta=2
9 psect text1,local,class=CODE,delta=2
10 psect text3,local,class=CODE,delta=2
11 psect intcode,global,class=CODE,delta=2
12 psect intsave_0,global,ovrld,class=COMBANK,spa
+ ce=1,delta=1
13 psect intret,global,class=CODE,delta=2
14 psect intentry,global,class=CODE,delta=2
15 psect intsave,global,class=BANK0,space=1,delta
+ =1
16 psect rbss_0,global,class=BANK0,space=1,delta=
+ 1
17 psect temp,global,ovrld,class=BANK0,space=1,de
+ lta=1
18 0000
19 0000
20 0000
21 0000
22 0000
23 0000
24 0000
25 0000
26 0000
27 0000
28
29 psect const1
30 006C 0782 addwf 2
31 006D _led_digit
32 006D 34C0 retlw -64
33 006E 34F9 retlw -7
34 006F 34A4 retlw -92
35 0070 34B0 retlw -80
36 0071 3499 retlw -103
37 0072 3492 retlw -110
38 0073 3482 retlw -126
39 0074 34F8 retlw -8
40 0075 3480 retlw -128
41 0076 3490 retlw -112
42 0077 34BF retlw -65
43
44 psect const2
45 0078 0782 addwf 2
46 0079 _led_bit
47 0079 3480 retlw -128
48 007A 3440 retlw 64
49 007B 3420 retlw 32
50 007C 3410 retlw 16
51 007D 3408 retlw 8
52 007E 3404 retlw 4
53 007F 3402 retlw 2
54 0080 3401 retlw 1
55
56 psect rdata_0
57 0025 _table
58 0025 ds 1
59 0026 ds 1
60 0027 ds 1
61 0028 ds 1
62 0029 ds 1
63 002A ds 1
64 002B ds 1
65 002C ds 1
66
67 psect idata_0
68 07F8 3400 retlw 0
69 07F9 3400 retlw 0
70 07FA 340A retlw 10
71 07FB 3400 retlw 0
72 07FC 3400 retlw 0
73 07FD 340A retlw 10
74 07FE 3400 retlw 0
75 07FF 3400 retlw 0
76
77 psect text1
78 0765 _IO_INIT
79 ;shizhong.c: 25: TRISC = 0X00;
80 0765 1683 bsf 3,5
81 0766 1303 bcf 3,6 ;carry unused
82 0767 0187 clrf 7 ;volatile
83 ;shizhong.c: 26: TRISD = 0X00;
84 0768 0188 clrf 8 ;volatile
85 ;shizhong.c: 27: TRISE = 0X07;
86 0769 3007 movlw 7
87 076A 0089 movwf 9 ;volatile
88 ;shizhong.c: 28: PORTC = 0X00;
89 076B 1283 bcf 3,5
90 076C 0187 clrf 7 ;volatile
91 ;shizhong.c: 29: PORTD = 0X00;
92 076D 0188 clrf 8 ;volatile
93 ;shizhong.c: 30: }
94 076E 0008 return
95 076F _TMR0_INIT
96 ;shizhong.c: 17: OPTION = 0X03;
97 076F 3003 movlw 3
98 0770 1683 bsf 3,5
99 0771 1303 bcf 3,6 ;carry unused
100 0772 0081 movwf 1
101 ;shizhong.c: 18: TMR0 = 0X06;
102 0773 3006 movlw 6
103 0774 1283 bcf 3,5
104 0775 0081 movwf 1 ;volatile
105 ;shizhong.c: 19: T0IE = 1;
106 0776 168B bsf 11,5
107 ;shizhong.c: 20: T0IF = 0;
108 0777 110B bcf 11,2
109 ;shizhong.c: 21: }
110 0778 0008 return
111 0779 _main
112 ;shizhong.c: 60: GIE = 1;
113 0779 178B bsf 11,7
114 ;shizhong.c: 61: TMR0_INIT();
115 077A 276F fcall _TMR0_INIT
116 ;shizhong.c: 62: IO_INIT();
117 077B 2765 fcall _IO_INIT
118 077C l5
119 ;shizhong.c: 63: while(1)
120 ;shizhong.c: 64: {
121 077C 0820 movf _counter,w
122 077D 3AFA xorlw -6
123 077E 1D03 btfss 3,2
124 077F 2F82 goto l7
125 ;shizhong.c: 68: {
126 0780 0AA4 incf _second
127 ;shizhong.c: 70: counter = 0;
128 0781 01A0 clrf _counter
129 0782 l7
130 ;shizhong.c: 71: }
131 0782 0824 movf _second,w
132 0783 3A3C xorlw 60
133 0784 1D03 btfss 3,2
134 0785 2F88 goto l8
135 ;shizhong.c: 73: {
136 0786 01A4 clrf _second
137 ;shizhong.c: 75: minute++;
138 0787 0AA3 incf _minute
139 0788 l8
140 ;shizhong.c: 76: }
141 0788 0823 movf _minute,w
142 0789 3A3C xorlw 60
143 078A 1D03 btfss 3,2
144 078B 2F8E goto l9
145 ;shizhong.c: 78: {
146 078C 01A3 clrf _minute
147 ;shizhong.c: 80: hour++;
148 078D 0AA1 incf _hour
149 078E l9
150 ;shizhong.c: 81: }
151 078E 0821 movf _hour,w
152 078F 3A18 xorlw 24
153 0790 1903 btfsc 3,2
154 ;shizhong.c: 83: {
155 0791 01A1 clrf _hour
156 ;shizhong.c: 85: }
157 0792 300A movlw 10
158 0793 00F1 movwf btemp+1
159 0794 0821 movf _hour,w
160 0795 120A 118A 27C2 fcall lbdiv
161 0798 00AC movwf _table+7 ;volatile
162 ;shizhong.c: 91: table[6] = hour%10;
163 0799 300A movlw 10
164 079A 00F1 movwf btemp+1
165 079B 0821 movf _hour,w
166 079C 120A 118A 27C2 fcall lbmod
167 079F 0870 movf btemp,w
168 07A0 00AB movwf _table+6 ;volatile
169 ;shizhong.c: 92: table[4] = minute/10;
170 07A1 300A movlw 10
171 07A2 00F1 movwf btemp+1
172 07A3 0823 movf _minute,w
173 07A4 120A 118A 27C2 fcall lbdiv
174 07A7 00A9 movwf _table+4 ;volatile
175 ;shizhong.c: 93: table[3] = minute%10;
176 07A8 300A movlw 10
177 07A9 00F1 movwf btemp+1
178 07AA 0823 movf _minute,w
179 07AB 120A 118A 27C2 fcall lbmod
180 07AE 0870 movf btemp,w
181 07AF 00A8 movwf _table+3 ;volatile
182 ;shizhong.c: 94: table[1] = second/10;
183 07B0 300A movlw 10
184 07B1 00F1 movwf btemp+1
185 07B2 0824 movf _second,w
186 07B3 120A 118A 27C2 fcall lbdiv
187 07B6 00A6 movwf _table+1 ;volatile
188 ;shizhong.c: 95: table[0] = second%10;
189 07B7 300A movlw 10
190 07B8 00F1 movwf btemp+1
191 07B9 0824 movf _second,w
192 07BA 120A 118A 27C2 fcall lbmod
+ 120A 118A
193 07BF 0870 movf btemp,w
194 07C0 00A5 movwf _table ;volatile
195 ;shizhong.c: 98: }
196 07C1 2F7C goto l5
197
198 psect intcode
199 ;shizhong.c: 101: void interrupt tmr0()
200 ;shizhong.c: 102: {
201 000D _tmr0
202 000D int_func
203 ;shizhong.c: 105: T0IF = 0;
204 000D 110B bcf 11,2
205 ;shizhong.c: 106: TMR0 = 0X06;
206 000E 3006 movlw 6
207 000F 1283 bcf 3,5
208 0010 1303 bcf 3,6 ;carry unused
209 0011 0081 movwf 1 ;volatile
210 ;shizhong.c: 107: counter++;
211 0012 0AA0 incf _counter
212 ;shizhong.c: 110: PORTC = led_digit[table[i]];
213 0013 3000 movlw _led_digit shr (0+8)
214 0014 008A movwf 10
215 0015 0822 movf _i,w
216 0016 3E25 addlw _table
217 0017 0084 movwf 4
218 0018 1383 bcf 3,7
219 0019 0800 movf 0,w
220 001A 206C call ((_led_digit+-1)& (0+2047))| (($)& (0+-20
+ 48))
221 001B 0087 movwf 7 ;volatile
222 ;shizhong.c: 111: PORTD = led_bit[i];
223 001C 3000 movlw _led_bit shr (0+8)
224 001D 008A movwf 10
225 001E 0822 movf _i,w
226 001F 2078 call ((_led_bit+-1)& (0+2047))| (($)& (0+-2048
+ ))
227 0020 120A 118A pagesel $
228 0022 0088 movwf 8 ;volatile
229 ;shizhong.c: 113: i++;
230 0023 0AA2 incf _i
231 ;shizhong.c: 114: if(i == 7)
232 0024 0822 movf _i,w
233 0025 3A07 xorlw 7
234 0026 1903 btfsc 3,2
235 ;shizhong.c: 115: i = 0;
236 0027 01A2 clrf _i
237
238 psect intsave_0
239 0075 saved_w
240 0075 ds 1
241
242 psect intret
243 0028 082E movf saved_fsr,w
244 0029 0084 movwf 4 ;restore FSR
245 002A 082F movf saved_pclath,w
246 002B 008A movwf 10
247 002C int_restore
248 002C 082D movf saved_status,w
249 002D 0083 movwf 3
250 002E 0EF5 swapf saved_w
251 002F 0E75 swapf saved_w,w
252 0030 0009 retfie
253
254 psect intentry
255 0004 int_entry
256 0004 00F5 movwf saved_w
257 0005 0803 movf 3,w
258 0006 0183 clrf 3
259 0007 00AD movwf saved_status
260 0008 0804 movf 4,w
261 0009 00AE movwf saved_fsr
262 000A 080A movf 10,w
263 000B 00AF movwf saved_pclath
264 000C 018A clrf 10
265 0000
266 0000
267 0000
268 0000
269 0000
270 0000
271 0000
272 0000
273 0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -