📄 usart_1.lst
字号:
HI-TECH Software PICC Macro Assembler V8.05PL1
Serial number: HCPIC-51037 Sat Jun 21 19:17:16 2008
Licensed to: ONE
1 processor 16F877A
2 opt pw 79
3 psect __Z51037RS_,global,delta=1
4 psect rdata_0,global,class=BANK0,space=1,delta
+ =1
5 psect idata_0,global,class=CODE,delta=2
6 psect text1,local,class=CODE,delta=2
7 psect text2,local,class=CODE,delta=2
8 psect text5,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 rdata_0
25 002C _string_usart
26 002C ds 1
27
28 psect idata_0
29 07FF 3400 retlw 0
30
31 psect text1
32 06F0 _get_usart_string
33 ; _count assigned to ?a_get_usart_string+0
34 0000 _get_usart_string$count set ?a_get_usart_string
35 ;usart_1.c: 37: unsigned int count=0;
36 06F0 0183 clrf 3 ;select bank 0
37 06F1 01A0 clrf ?a_get_usart_string
38 06F2 01A1 clrf ?a_get_usart_string+1
39 ;usart_1.c: 38: do{
40 06F3 l8
41 ;usart_1.c: 39: do{;}while(RCIF==0);
42 06F3 1E8C btfss 12,5
43 06F4 2EF3 goto l8
44 ;usart_1.c: 40: RCIF=0;
45 06F5 128C bcf 12,5
46 ;usart_1.c: 41: string_usart[count]=RCREG;
47 06F6 0820 movf ?a_get_usart_string,w
48 06F7 3E2C addlw _string_usart
49 06F8 0084 movwf 4
50 06F9 1383 bcf 3,7
51 06FA 081A movf 26,w ;volatile
52 06FB 0080 movwf 0
53 ;usart_1.c: 42: count++;
54 06FC 0AA0 incf ?a_get_usart_string
55 06FD 1903 btfsc 3,2
56 06FE 0AA1 incf ?a_get_usart_string+1
57 ;usart_1.c: 43: if('*'==RCREG)
58 06FF 081A movf 26,w ;volatile
59 0700 3A2A xorlw 42
60 0701 1D03 btfss 3,2
61 0702 2F09 goto l9
62 ;usart_1.c: 44: {
63 0703 120A 118A 27B6 fcall _LCD_Clear
+ 120A 118A
64 ;usart_1.c: 46: break;
65 0708 2F0D goto l4
66 0709 l9
67 ;usart_1.c: 47: }
68 0709 081A movf 26,w ;volatile
69 070A 3A2F xorlw 47
70 070B 1D03 btfss 3,2
71 070C 2EF3 goto l8
72 070D l4
73 ;usart_1.c: 49: string_usart[count-1]='\0';
74 070D 0320 decf ?a_get_usart_string,w
75 070E 3E2C addlw _string_usart
76 070F 0084 movwf 4
77 0710 1383 bcf 3,7
78 0711 0180 clrf 0
79 ;usart_1.c: 50: }
80 0712 0008 return
81 ;usart_1.c: 60: void display()
82 ;usart_1.c: 61: {
83 0713 _display
84 ;usart_1.c: 62: get_usart_string();
85 0713 26F0 fcall _get_usart_string
86 ;usart_1.c: 63: LCD_DisplayString (1,1 ,string_
+ usart);
87 0714 01A0 clrf ?_LCD_DisplayString
88 0715 0AA0 incf ?_LCD_DisplayString
89 0716 302C movlw _string_usart
90 0717 00A1 movwf ?_LCD_DisplayString+1
91 0718 3001 movlw 1
92 0719 120A 118A 2EB3 ljmp _LCD_DisplayString
93 071C _usartint
94 071C 1683 bsf 3,5
95 071D 1303 bcf 3,6 ;carry unused
96 071E 1307 bcf 7,6
97 ;usart_1.c: 25: TRISC7=1;
98 071F 1787 bsf 7,7
99 ;usart_1.c: 26: SPBRG=0X67;
100 0720 3067 movlw 103
101 0721 0099 movwf 25 ;volatile
102 ;usart_1.c: 27: TXSTA=0X24;
103 0722 3024 movlw 36
104 0723 0098 movwf 24 ;volatile
105 ;usart_1.c: 28: RCSTA=0X90;
106 0724 3090 movlw -112
107 0725 1283 bcf 3,5
108 0726 0098 movwf 24 ;volatile
109 ;usart_1.c: 29: GIE=0;
110 0727 138B bcf 11,7
111 ;usart_1.c: 30: TRISD=0x00;
112 0728 1683 bsf 3,5
113 0729 0188 clrf 8 ;volatile
114 ;usart_1.c: 31: PORTD=0x00;
115 072A 1283 bcf 3,5
116 072B 0188 clrf 8 ;volatile
117 ;usart_1.c: 33: }
118 072C 0008 return
119 ;usart_1.c: 66: void main()
120 ;usart_1.c: 67: {
121 072D _main
122 ;usart_1.c: 68: usartint();
123 072D 271C fcall _usartint
124 ;usart_1.c: 69: Init_LCD();
125 072E 120A 118A 279D fcall _Init_LCD
126 ;usart_1.c: 70: LCD_WriteControl(0x80);
127 0731 3080 movlw -128
128 0732 120A 118A 2782 fcall _LCD_WriteControl
+ 120A 118A
129 0737 l17
130 ;usart_1.c: 71: while(1)
131 ;usart_1.c: 72: {
132 0737 2713 120A 118A fcall _display
133 ;usart_1.c: 75: }
134 073A 2F37 goto l17
135
136 psect text2
137 ;usart_1.c: 53: void send_usart_date(unsigned c
+ har send_temp)
138 ;usart_1.c: 54: {
139 06AB _send_usart_date
140 ; _send_temp assigned to ?a_send_usart_date+0
141 0000 _send_usart_date$send_temp set ?a_send_usart_da
+ te
142 ;_send_temp stored from w
143 06AB 0183 clrf 3 ;select bank 0
144 06AC 00A0 movwf ?a_send_usart_date
145 ;usart_1.c: 55: TXREG=send_temp;
146 06AD 0820 movf ?a_send_usart_date,w
147 06AE 0099 movwf 25 ;volatile
148 06AF l13
149 ;usart_1.c: 56: do{;}while(0==TXIF);
150 06AF 1E0C btfss 12,4
151 06B0 2EAF goto l13
152 ;usart_1.c: 57: TXIF=0;
153 06B1 120C bcf 12,4
154 ;usart_1.c: 58: }
155 06B2 0008 return
156
157 psect text5
158 0000
159 0000
160 0000
161 0000
162 0000
163 0000
164 0000
165 0000
166 0000
167 0000
168 0000
169 0000
170 0000
171 0000
172 0000
173 0000
174 0000
175 0000
176 0000
177 0000
178 0000
179 0000
180 0000
181 0000
182 0000
183 0000
184 0000
185 0000
186 0000
187 0000
188 0000
189 0000
190 0000
191 0000
192 0000
193 0000
194 0000
195 0000
196 0000
197 0000
198 0000
199 0000
200 0000
201 0000
202 0000
203 0000
204 0000
205 0000
206 0000
207 0000
208 0000
209 0000
210 0000
211 0000
212 0000
213 0000
214 0000
215 0000
216 0000
217 0000
218 0000
219 0000
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -