1 .file "twimaster.c" 2 .arch atmega644p 3 __SREG__ = 0x3f 4 __SP_H__ = 0x3e 5 __SP_L__ = 0x3d 6 __tmp_reg__ = 0 7 __zero_reg__ = 1 8 .global __do_copy_data 9 .global __do_clear_bss 10 .text 11 .global i2c_init 13 i2c_init: 14 /* prologue: frame size=0 */ 15 /* prologue end (size=0) */ 16 0000 1092 B900 sts 185,__zero_reg__ 17 0004 8AE2 ldi r24,lo8(42) 18 0006 8093 B800 sts 184,r24 19 /* epilogue: frame size=0 */ 20 000a 0895 ret 21 /* epilogue end (size=1) */ 22 /* function i2c_init size 6 (5) */ 24 .global i2c_start 26 i2c_start: 27 /* prologue: frame size=0 */ 28 /* prologue end (size=0) */ 29 000c 85EA ldi r24,lo8(-91) 30 000e 8093 BC00 sts 188,r24 31 0012 80E0 ldi r24,lo8(0) 32 0014 90E0 ldi r25,hi8(0) 33 /* epilogue: frame size=0 */ 34 0016 0895 ret 35 /* epilogue end (size=1) */ 36 /* function i2c_start size 6 (5) */ 38 .global i2c_stop 40 i2c_stop: 41 /* prologue: frame size=0 */ 42 /* prologue end (size=0) */ 43 0018 84E9 ldi r24,lo8(-108) 44 001a 8093 BC00 sts 188,r24 45 /* epilogue: frame size=0 */ 46 001e 0895 ret 47 /* epilogue end (size=1) */ 48 /* function i2c_stop size 4 (3) */ 50 .global i2c_write_byte 52 i2c_write_byte: 53 /* prologue: frame size=0 */ 54 /* prologue end (size=0) */ 55 0020 1092 B900 sts 185,__zero_reg__ 56 0024 8093 BB00 sts 187,r24 57 0028 85E8 ldi r24,lo8(-123) 58 002a 8093 BC00 sts 188,r24 59 002e 80E0 ldi r24,lo8(0) 60 0030 90E0 ldi r25,hi8(0) 61 /* epilogue: frame size=0 */ 62 0032 0895 ret 63 /* epilogue end (size=1) */ 64 /* function i2c_write_byte size 10 (9) */ 66 .global __vector_26 68 __vector_26: 69 /* prologue: frame size=0 */ 70 0034 1F92 push __zero_reg__ 71 0036 0F92 push __tmp_reg__ 72 0038 0FB6 in __tmp_reg__,__SREG__ 73 003a 0F92 push __tmp_reg__ 74 003c 1124 clr __zero_reg__ 75 003e 8F93 push r24 76 0040 9F93 push r25 77 0042 EF93 push r30 78 0044 FF93 push r31 79 /* prologue end (size=9) */ 80 0046 8091 0000 lds r24,twi_state 81 004a 8F5F subi r24,lo8(-(1)) 82 004c 8093 0000 sts twi_state,r24 83 0050 8150 subi r24,lo8(-(-1)) 84 0052 8330 cpi r24,lo8(3) 85 0054 01F0 breq .L14 86 0056 8430 cpi r24,lo8(4) 87 0058 00F4 brsh .L19 88 005a 8130 cpi r24,lo8(1) 89 005c 01F0 breq .L12 90 005e 8230 cpi r24,lo8(2) 91 0060 00F4 brsh .L13 92 0062 00C0 rjmp .L38 93 .L19: 94 0064 8530 cpi r24,lo8(5) 95 0066 01F0 breq .L16 96 0068 8530 cpi r24,lo8(5) 97 006a 00F0 brlo .L17 98 006c 8630 cpi r24,lo8(6) 99 006e 01F0 breq .L17 100 0070 8730 cpi r24,lo8(7) 101 0072 01F0 breq .+2 102 0074 00C0 rjmp .L10 103 0076 00C0 rjmp .L18 104 .L38: 105 0078 8091 0000 lds r24,motor 106 007c 880F lsl r24 107 007e 8E5A subi r24,lo8(-(82)) 108 0080 00C0 rjmp .L39 109 .L12: 110 0082 8091 0000 lds r24,motor 111 0086 8F5F subi r24,lo8(-(1)) 112 0088 8093 0000 sts motor,r24 113 008c 8150 subi r24,lo8(-(-1)) 114 008e 00C0 rjmp .L47 115 .L20: 116 0090 8091 0000 lds r24,Motor_Vorne 117 .L39: 118 0094 1092 B900 sts 185,__zero_reg__ 119 0098 8093 BB00 sts 187,r24 120 009c 85E8 ldi r24,lo8(-123) 121 .L40: 122 009e 8093 BC00 sts 188,r24 123 00a2 00C0 rjmp .L10 124 .L13: 125 00a4 84E9 ldi r24,lo8(-108) 126 00a6 8093 BC00 sts 188,r24 127 00aa 8091 0000 lds r24,motor 128 00ae 8430 cpi r24,lo8(4) 129 00b0 00F4 brsh .L24 130 00b2 1092 0000 sts twi_state,__zero_reg__ 131 00b6 00C0 rjmp .L26 132 .L24: 133 00b8 1092 0000 sts motor,__zero_reg__ 134 .L26: 135 00bc 85EA ldi r24,lo8(-91) 136 00be 00C0 rjmp .L40 137 .L14: 138 00c0 8091 0000 lds r24,motorread 139 00c4 880F lsl r24 140 00c6 8D5A subi r24,lo8(-(83)) 141 00c8 00C0 rjmp .L39 142 .L16: 143 00ca 8091 BB00 lds r24,187 144 00ce E091 0000 lds r30,motorread 145 00d2 FF27 clr r31 146 00d4 E050 subi r30,lo8(-(motor_rx)) 147 00d6 F040 sbci r31,hi8(-(motor_rx)) 148 00d8 8083 st Z,r24 149 .L17: 150 00da 8091 0000 lds r24,motorread 151 .L47: 152 00de 8130 cpi r24,lo8(1) 153 00e0 01F0 breq .L32 154 00e2 8130 cpi r24,lo8(1) 155 00e4 00F0 brlo .L20 156 00e6 8230 cpi r24,lo8(2) 157 00e8 01F0 breq .L33 158 00ea 8330 cpi r24,lo8(3) 159 00ec 01F4 brne .L10 160 00ee 00C0 rjmp .L34 161 .L32: 162 00f0 8091 0000 lds r24,Motor_Hinten 163 00f4 00C0 rjmp .L39 164 .L33: 165 00f6 8091 0000 lds r24,Motor_Rechts 166 00fa 00C0 rjmp .L39 167 .L34: 168 00fc 8091 0000 lds r24,Motor_Links 169 0100 00C0 rjmp .L39 170 .L18: 171 0102 8091 0000 lds r24,motorread 172 0106 9091 BB00 lds r25,187 173 010a E82F mov r30,r24 174 010c FF27 clr r31 175 010e E050 subi r30,lo8(-(motor_rx)) 176 0110 F040 sbci r31,hi8(-(motor_rx)) 177 0112 9483 std Z+4,r25 178 0114 8F5F subi r24,lo8(-(1)) 179 0116 8093 0000 sts motorread,r24 180 011a 8430 cpi r24,lo8(4) 181 011c 00F0 brlo .L35 182 011e 1092 0000 sts motorread,__zero_reg__ 183 .L35: 184 0122 84E9 ldi r24,lo8(-108) 185 0124 8093 BC00 sts 188,r24 186 0128 8AE0 ldi r24,lo8(10) 187 012a 90E0 ldi r25,hi8(10) 188 012c 9093 0000 sts (I2CTimeout)+1,r25 189 0130 8093 0000 sts I2CTimeout,r24 190 0134 1092 0000 sts twi_state,__zero_reg__ 191 .L10: 192 0138 8091 BC00 lds r24,188 193 013c 8068 ori r24,lo8(-128) 194 013e 8093 BC00 sts 188,r24 195 /* epilogue: frame size=0 */ 196 0142 FF91 pop r31 197 0144 EF91 pop r30 198 0146 9F91 pop r25 199 0148 8F91 pop r24 200 014a 0F90 pop __tmp_reg__ 201 014c 0FBE out __SREG__,__tmp_reg__ 202 014e 0F90 pop __tmp_reg__ 203 0150 1F90 pop __zero_reg__ 204 0152 1895 reti 205 /* epilogue end (size=9) */ 206 /* function __vector_26 size 144 (126) */ 208 .global i2c_reset 210 i2c_reset: 211 /* prologue: frame size=0 */ 212 /* prologue end (size=0) */ 213 0154 4CEB ldi r20,lo8(188) 214 0156 50E0 ldi r21,hi8(188) 215 0158 84E9 ldi r24,lo8(-108) 216 015a DA01 movw r26,r20 217 015c 8C93 st X,r24 218 015e 1092 0000 sts twi_state,__zero_reg__ 219 0162 2BEB ldi r18,lo8(187) 220 0164 30E0 ldi r19,hi8(187) 221 0166 F901 movw r30,r18 222 0168 8081 ld r24,Z 223 016a 1092 0000 sts motor,__zero_reg__ 224 016e 80E8 ldi r24,lo8(-128) 225 0170 8C93 st X,r24 226 0172 1092 BD00 sts 189,__zero_reg__ 227 0176 1092 BA00 sts 186,__zero_reg__ 228 017a 1082 st Z,__zero_reg__ 229 017c E9EB ldi r30,lo8(185) 230 017e F0E0 ldi r31,hi8(185) 231 0180 1082 st Z,__zero_reg__ 232 0182 A8EB ldi r26,lo8(184) 233 0184 B0E0 ldi r27,hi8(184) 234 0186 1C92 st X,__zero_reg__ 235 0188 1082 st Z,__zero_reg__ 236 018a 8AE2 ldi r24,lo8(42) 237 018c 8C93 st X,r24 238 018e 85EA ldi r24,lo8(-91) 239 0190 DA01 movw r26,r20 240 0192 8C93 st X,r24 241 0194 1082 st Z,__zero_reg__ 242 0196 F901 movw r30,r18 243 0198 1082 st Z,__zero_reg__ 244 019a 85E8 ldi r24,lo8(-123) 245 019c 8C93 st X,r24 246 /* epilogue: frame size=0 */ 247 019e 0895 ret 248 /* epilogue end (size=1) */ 249 /* function i2c_reset size 38 (37) */ 251 .global twi_state 252 .global twi_state 253 .section .bss 256 twi_state: 257 0000 00 .skip 1,0 258 .global motor 259 .global motor 262 motor: 263 0001 00 .skip 1,0 264 .global motorread 265 .global motorread 268 motorread: 269 0002 00 .skip 1,0 270 .comm motor_rx,8,1 271 /* File "twimaster.c": code 208 = 0x00d0 ( 185), prologues 9, epilogues 14 */ DEFINED SYMBOLS *ABS*:00000000 twimaster.c C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:3 *ABS*:0000003f __SREG__ C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:4 *ABS*:0000003e __SP_H__ C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:5 *ABS*:0000003d __SP_L__ C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:6 *ABS*:00000000 __tmp_reg__ C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:7 *ABS*:00000001 __zero_reg__ C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:13 .text:00000000 i2c_init C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:26 .text:0000000c i2c_start C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:40 .text:00000018 i2c_stop C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:52 .text:00000020 i2c_write_byte C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:68 .text:00000034 __vector_26 C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:256 .bss:00000000 twi_state C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:262 .bss:00000001 motor C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:268 .bss:00000002 motorread *COM*:00000008 motor_rx C:\Users\gunterl\AppData\Local\Temp/ccG704Yc.s:210 .text:00000154 i2c_reset UNDEFINED SYMBOLS __do_copy_data __do_clear_bss Motor_Vorne Motor_Hinten Motor_Rechts Motor_Links I2CTimeout