Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
111 | mikeljo | 1 | 1 .file "rs232.c" |
2 | 2 .arch atmega32 |
||
3 | 3 __SREG__ = 0x3f |
||
4 | 4 __SP_H__ = 0x3e |
||
5 | 5 __SP_L__ = 0x3d |
||
6 | 6 __tmp_reg__ = 0 |
||
7 | 7 __zero_reg__ = 1 |
||
8 | 8 .global __do_copy_data |
||
9 | 9 .global __do_clear_bss |
||
10 | 17 .Ltext0: |
||
11 | 18 .global __vector_13 |
||
12 | 20 __vector_13: |
||
13 | 21 .LFB4: |
||
14 | 22 .LM1: |
||
15 | 23 /* prologue: frame size=0 */ |
||
16 | 24 0000 1F92 push __zero_reg__ |
||
17 | 25 0002 0F92 push __tmp_reg__ |
||
18 | 26 0004 0FB6 in __tmp_reg__,__SREG__ |
||
19 | 27 0006 0F92 push __tmp_reg__ |
||
20 | 28 0008 1124 clr __zero_reg__ |
||
21 | 29 000a 8F93 push r24 |
||
22 | 30 000c 9F93 push r25 |
||
23 | 31 000e EF93 push r30 |
||
24 | 32 0010 FF93 push r31 |
||
25 | 33 /* prologue end (size=9) */ |
||
26 | 34 .LM2: |
||
27 | 35 0012 9091 0000 lds r25,write_index |
||
28 | 36 0016 E0E0 ldi r30,lo8(rs232_buffer) |
||
29 | 37 0018 F0E0 ldi r31,hi8(rs232_buffer) |
||
30 | 38 001a E90F add r30,r25 |
||
31 | 39 001c F11D adc r31,__zero_reg__ |
||
32 | 40 001e 8CB1 in r24,44-0x20 |
||
33 | 41 0020 8083 st Z,r24 |
||
34 | 42 0022 9F5F subi r25,lo8(-(1)) |
||
35 | 43 0024 9093 0000 sts write_index,r25 |
||
36 | 44 .LM3: |
||
37 | 45 0028 8091 0000 lds r24,write_index |
||
38 | 46 002c 8F70 andi r24,lo8(15) |
||
39 | 47 002e 8093 0000 sts write_index,r24 |
||
40 | 48 /* epilogue: frame size=0 */ |
||
41 | 49 0032 FF91 pop r31 |
||
42 | 50 0034 EF91 pop r30 |
||
43 | 51 0036 9F91 pop r25 |
||
44 | 52 0038 8F91 pop r24 |
||
45 | 53 003a 0F90 pop __tmp_reg__ |
||
46 | 54 003c 0FBE out __SREG__,__tmp_reg__ |
||
47 | 55 003e 0F90 pop __tmp_reg__ |
||
48 | 56 0040 1F90 pop __zero_reg__ |
||
49 | 57 0042 1895 reti |
||
50 | 58 /* epilogue end (size=9) */ |
||
51 | 59 /* function __vector_13 size 34 (16) */ |
||
52 | 60 .LFE4: |
||
53 | 62 .global RS232_init |
||
54 | 64 RS232_init: |
||
55 | 65 .LFB5: |
||
56 | 66 .LM4: |
||
57 | 67 /* prologue: frame size=0 */ |
||
58 | 68 /* prologue end (size=0) */ |
||
59 | 69 .LM5: |
||
60 | 70 0044 88E9 ldi r24,lo8(-104) |
||
61 | 71 0046 8AB9 out 42-0x20,r24 |
||
62 | 72 .LM6: |
||
63 | 73 0048 87E0 ldi r24,lo8(7) |
||
64 | 74 004a 89B9 out 41-0x20,r24 |
||
65 | 75 /* epilogue: frame size=0 */ |
||
66 | 76 004c 0895 ret |
||
67 | 77 /* epilogue end (size=1) */ |
||
68 | 78 /* function RS232_init size 5 (4) */ |
||
69 | 79 .LFE5: |
||
70 | 81 .global RS232_get |
||
71 | 83 RS232_get: |
||
72 | 84 .LFB6: |
||
73 | 85 .LM7: |
||
74 | 86 /* prologue: frame size=0 */ |
||
75 | 87 /* prologue end (size=0) */ |
||
76 | 88 .LM8: |
||
77 | 89 004e 8AE0 ldi r24,lo8(10) |
||
78 | 90 0050 8093 0000 sts rs232_timer,r24 |
||
79 | 91 .L4: |
||
80 | 92 .LM9: |
||
81 | 93 0054 9091 0000 lds r25,read_index |
||
82 | 94 0058 8091 0000 lds r24,write_index |
||
83 | 95 005c 9817 cp r25,r24 |
||
84 | 96 005e 21F4 brne .L5 |
||
85 | 97 0060 8091 0000 lds r24,rs232_timer |
||
86 | 98 0064 8823 tst r24 |
||
87 | 99 0066 B1F7 brne .L4 |
||
88 | 100 .L5: |
||
89 | 101 .LM10: |
||
90 | 102 0068 8091 0000 lds r24,rs232_timer |
||
91 | 103 006c 8823 tst r24 |
||
92 | 104 006e 81F0 breq .L7 |
||
93 | 105 .LM11: |
||
94 | 106 0070 8091 0000 lds r24,read_index |
||
95 | 107 0074 E82F mov r30,r24 |
||
96 | 108 0076 FF27 clr r31 |
||
97 | 109 0078 E050 subi r30,lo8(-(rs232_buffer)) |
||
98 | 110 007a F040 sbci r31,hi8(-(rs232_buffer)) |
||
99 | 111 007c 8F5F subi r24,lo8(-(1)) |
||
100 | 112 007e 8093 0000 sts read_index,r24 |
||
101 | 113 0082 E081 ld r30,Z |
||
102 | 114 .LM12: |
||
103 | 115 0084 8091 0000 lds r24,read_index |
||
104 | 116 0088 8F70 andi r24,lo8(15) |
||
105 | 117 008a 8093 0000 sts read_index,r24 |
||
106 | 118 008e 01C0 rjmp .L8 |
||
107 | 119 .L7: |
||
108 | 120 .LM13: |
||
109 | 121 0090 E82F mov r30,r24 |
||
110 | 122 .L8: |
||
111 | 123 .LM14: |
||
112 | 124 0092 8E2F mov r24,r30 |
||
113 | 125 0094 9927 clr r25 |
||
114 | 126 /* epilogue: frame size=0 */ |
||
115 | 127 0096 0895 ret |
||
116 | 128 /* epilogue end (size=1) */ |
||
117 | 129 /* function RS232_get size 37 (36) */ |
||
118 | 130 .LFE6: |
||
119 | 132 .global RS232_send |
||
120 | 134 RS232_send: |
||
121 | 135 .LFB7: |
||
122 | 136 .LM15: |
||
123 | 137 /* prologue: frame size=0 */ |
||
124 | 138 /* prologue end (size=0) */ |
||
125 | 139 .L10: |
||
126 | 140 .LM16: |
||
127 | 141 0098 5D9B sbis 43-0x20,5 |
||
128 | 142 009a FECF rjmp .L10 |
||
129 | 143 .LM17: |
||
130 | 144 009c 8CB9 out 44-0x20,r24 |
||
131 | 145 /* epilogue: frame size=0 */ |
||
132 | 146 009e 0895 ret |
||
133 | 147 /* epilogue end (size=1) */ |
||
134 | 148 /* function RS232_send size 4 (3) */ |
||
135 | 149 .LFE7: |
||
136 | 151 .global RS232_text |
||
137 | 153 RS232_text: |
||
138 | 154 .LFB8: |
||
139 | 155 .LM18: |
||
140 | 156 /* prologue: frame size=0 */ |
||
141 | 157 00a0 CF93 push r28 |
||
142 | 158 00a2 DF93 push r29 |
||
143 | 159 /* prologue end (size=2) */ |
||
144 | 160 00a4 EC01 movw r28,r24 |
||
145 | 161 .LM19: |
||
146 | 162 00a6 8881 ld r24,Y |
||
147 | 163 00a8 8823 tst r24 |
||
148 | 164 00aa 31F0 breq .L18 |
||
149 | 165 .L16: |
||
150 | 166 .LM20: |
||
151 | 167 00ac 8991 ld r24,Y+ |
||
152 | 168 00ae 0E94 0000 call RS232_send |
||
153 | 169 .LM21: |
||
154 | 170 00b2 8881 ld r24,Y |
||
155 | 171 00b4 8823 tst r24 |
||
156 | 172 00b6 D1F7 brne .L16 |
||
157 | 173 .L18: |
||
158 | 174 /* epilogue: frame size=0 */ |
||
159 | 175 00b8 DF91 pop r29 |
||
160 | 176 00ba CF91 pop r28 |
||
161 | 177 00bc 0895 ret |
||
162 | 178 /* epilogue end (size=3) */ |
||
163 | 179 /* function RS232_text size 15 (10) */ |
||
164 | 180 .LFE8: |
||
165 | 182 .comm read_index,1,1 |
||
166 | 183 .comm write_index,1,1 |
||
167 | 184 .comm rs232_buffer,16,1 |
||
168 | 185 .Letext0: |
||
169 | DEFINED SYMBOLS |
||
170 | *ABS*:00000000 rs232.c |
||
171 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:3 *ABS*:0000003f __SREG__ |
||
172 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:4 *ABS*:0000003e __SP_H__ |
||
173 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:5 *ABS*:0000003d __SP_L__ |
||
174 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:6 *ABS*:00000000 __tmp_reg__ |
||
175 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:7 *ABS*:00000001 __zero_reg__ |
||
176 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:20 .text:00000000 __vector_13 |
||
177 | *COM*:00000001 write_index |
||
178 | *COM*:00000010 rs232_buffer |
||
179 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:64 .text:00000044 RS232_init |
||
180 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:83 .text:0000004e RS232_get |
||
181 | *COM*:00000001 read_index |
||
182 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:134 .text:00000098 RS232_send |
||
183 | C:\DOKUME~1\thomas\LOKALE~1\Temp/ccm4aaaa.s:153 .text:000000a0 RS232_text |
||
184 | |||
185 | UNDEFINED SYMBOLS |
||
186 | __do_copy_data |
||
187 | __do_clear_bss |
||
188 | rs232_timer |