GAS LISTING /tmp/cceI9NM3.s page 1 1 .file "test.c" 2 __SP_H__ = 0x3e 3 __SP_L__ = 0x3d 4 __SREG__ = 0x3f 5 __tmp_reg__ = 0 6 __zero_reg__ = 1 9 .text 10 .Ltext0: 111 .global delay_ms 113 delay_ms: 114 .stabd 46,0,0 1:test.c **** #include 2:test.c **** #include 3:test.c **** #include 4:test.c **** #include 5:test.c **** #include "huetabler.h" 6:test.c **** #include "avr_print.h" 7:test.c **** 8:test.c **** void delay_ms(uint32_t time) { 116 .LM0: 117 .LFBB1: 118 0000 0F93 push r16 119 0002 1F93 push r17 120 /* prologue: function */ 121 /* frame size = 0 */ 122 /* stack size = 2 */ 123 .L__stack_usage = 2 9:test.c **** uint32_t i; 10:test.c **** for (i = 0; i < time; i++) { 125 .LM1: 126 0004 00E0 ldi r16,0 127 0006 10E0 ldi r17,0 128 0008 9801 movw r18,r16 129 .L2: 131 .LM2: 132 000a 0617 cp r16,r22 133 000c 1707 cpc r17,r23 134 000e 2807 cpc r18,r24 135 0010 3907 cpc r19,r25 136 0012 01F0 breq .L5 137 .LBB12: 138 .LBB13: 140 .Ltext1: 1:/usr/lib/avr/include/util/delay.h **** /* Copyright (c) 2002, Marek Michalkiewicz 2:/usr/lib/avr/include/util/delay.h **** Copyright (c) 2004,2005,2007 Joerg Wunsch 3:/usr/lib/avr/include/util/delay.h **** Copyright (c) 2007 Florin-Viorel Petrov 4:/usr/lib/avr/include/util/delay.h **** All rights reserved. 5:/usr/lib/avr/include/util/delay.h **** 6:/usr/lib/avr/include/util/delay.h **** Redistribution and use in source and binary forms, with or without 7:/usr/lib/avr/include/util/delay.h **** modification, are permitted provided that the following conditions are met: 8:/usr/lib/avr/include/util/delay.h **** 9:/usr/lib/avr/include/util/delay.h **** * Redistributions of source code must retain the above copyright 10:/usr/lib/avr/include/util/delay.h **** notice, this list of conditions and the following disclaimer. 11:/usr/lib/avr/include/util/delay.h **** 12:/usr/lib/avr/include/util/delay.h **** * Redistributions in binary form must reproduce the above copyright 13:/usr/lib/avr/include/util/delay.h **** notice, this list of conditions and the following disclaimer in 14:/usr/lib/avr/include/util/delay.h **** the documentation and/or other materials provided with the GAS LISTING /tmp/cceI9NM3.s page 2 15:/usr/lib/avr/include/util/delay.h **** distribution. 16:/usr/lib/avr/include/util/delay.h **** 17:/usr/lib/avr/include/util/delay.h **** * Neither the name of the copyright holders nor the names of 18:/usr/lib/avr/include/util/delay.h **** contributors may be used to endorse or promote products derived 19:/usr/lib/avr/include/util/delay.h **** from this software without specific prior written permission. 20:/usr/lib/avr/include/util/delay.h **** 21:/usr/lib/avr/include/util/delay.h **** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22:/usr/lib/avr/include/util/delay.h **** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23:/usr/lib/avr/include/util/delay.h **** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24:/usr/lib/avr/include/util/delay.h **** ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 25:/usr/lib/avr/include/util/delay.h **** LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26:/usr/lib/avr/include/util/delay.h **** CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27:/usr/lib/avr/include/util/delay.h **** SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28:/usr/lib/avr/include/util/delay.h **** INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29:/usr/lib/avr/include/util/delay.h **** CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30:/usr/lib/avr/include/util/delay.h **** ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31:/usr/lib/avr/include/util/delay.h **** POSSIBILITY OF SUCH DAMAGE. */ 32:/usr/lib/avr/include/util/delay.h **** 33:/usr/lib/avr/include/util/delay.h **** /* $Id$ */ 34:/usr/lib/avr/include/util/delay.h **** 35:/usr/lib/avr/include/util/delay.h **** #ifndef _UTIL_DELAY_H_ 36:/usr/lib/avr/include/util/delay.h **** #define _UTIL_DELAY_H_ 1 37:/usr/lib/avr/include/util/delay.h **** 38:/usr/lib/avr/include/util/delay.h **** #ifndef __HAS_DELAY_CYCLES 39:/usr/lib/avr/include/util/delay.h **** #define __HAS_DELAY_CYCLES 1 40:/usr/lib/avr/include/util/delay.h **** #endif 41:/usr/lib/avr/include/util/delay.h **** 42:/usr/lib/avr/include/util/delay.h **** #include 43:/usr/lib/avr/include/util/delay.h **** #include 44:/usr/lib/avr/include/util/delay.h **** #include 45:/usr/lib/avr/include/util/delay.h **** 46:/usr/lib/avr/include/util/delay.h **** /** \file */ 47:/usr/lib/avr/include/util/delay.h **** /** \defgroup util_delay : Convenience functions for busy-wait delay loops 48:/usr/lib/avr/include/util/delay.h **** \code 49:/usr/lib/avr/include/util/delay.h **** #define F_CPU 1000000UL // 1 MHz 50:/usr/lib/avr/include/util/delay.h **** //#define F_CPU 14.7456E6 51:/usr/lib/avr/include/util/delay.h **** #include 52:/usr/lib/avr/include/util/delay.h **** \endcode 53:/usr/lib/avr/include/util/delay.h **** 54:/usr/lib/avr/include/util/delay.h **** \note As an alternative method, it is possible to pass the 55:/usr/lib/avr/include/util/delay.h **** F_CPU macro down to the compiler from the Makefile. 56:/usr/lib/avr/include/util/delay.h **** Obviously, in that case, no \c \#define statement should be 57:/usr/lib/avr/include/util/delay.h **** used. 58:/usr/lib/avr/include/util/delay.h **** 59:/usr/lib/avr/include/util/delay.h **** The functions in this header file are wrappers around the basic 60:/usr/lib/avr/include/util/delay.h **** busy-wait functions from . They are meant as 61:/usr/lib/avr/include/util/delay.h **** convenience functions where actual time values can be specified 62:/usr/lib/avr/include/util/delay.h **** rather than a number of cycles to wait for. The idea behind is 63:/usr/lib/avr/include/util/delay.h **** that compile-time constant expressions will be eliminated by 64:/usr/lib/avr/include/util/delay.h **** compiler optimization so floating-point expressions can be used 65:/usr/lib/avr/include/util/delay.h **** to calculate the number of delay cycles needed based on the CPU 66:/usr/lib/avr/include/util/delay.h **** frequency passed by the macro F_CPU. 67:/usr/lib/avr/include/util/delay.h **** 68:/usr/lib/avr/include/util/delay.h **** \note In order for these functions to work as intended, compiler 69:/usr/lib/avr/include/util/delay.h **** optimizations must be enabled, and the delay time 70:/usr/lib/avr/include/util/delay.h **** must be an expression that is a known constant at 71:/usr/lib/avr/include/util/delay.h **** compile-time. If these requirements are not met, the resulting GAS LISTING /tmp/cceI9NM3.s page 3 72:/usr/lib/avr/include/util/delay.h **** delay will be much longer (and basically unpredictable), and 73:/usr/lib/avr/include/util/delay.h **** applications that otherwise do not use floating-point calculations 74:/usr/lib/avr/include/util/delay.h **** will experience severe code bloat by the floating-point library 75:/usr/lib/avr/include/util/delay.h **** routines linked into the application. 76:/usr/lib/avr/include/util/delay.h **** 77:/usr/lib/avr/include/util/delay.h **** The functions available allow the specification of microsecond, and 78:/usr/lib/avr/include/util/delay.h **** millisecond delays directly, using the application-supplied macro 79:/usr/lib/avr/include/util/delay.h **** F_CPU as the CPU clock frequency (in Hertz). 80:/usr/lib/avr/include/util/delay.h **** 81:/usr/lib/avr/include/util/delay.h **** */ 82:/usr/lib/avr/include/util/delay.h **** 83:/usr/lib/avr/include/util/delay.h **** #if !defined(__DOXYGEN__) 84:/usr/lib/avr/include/util/delay.h **** static inline void _delay_us(double __us) __attribute__((always_inline)); 85:/usr/lib/avr/include/util/delay.h **** static inline void _delay_ms(double __ms) __attribute__((always_inline)); 86:/usr/lib/avr/include/util/delay.h **** #endif 87:/usr/lib/avr/include/util/delay.h **** 88:/usr/lib/avr/include/util/delay.h **** #ifndef F_CPU 89:/usr/lib/avr/include/util/delay.h **** /* prevent compiler error by supplying a default */ 90:/usr/lib/avr/include/util/delay.h **** # warning "F_CPU not defined for " 91:/usr/lib/avr/include/util/delay.h **** # define F_CPU 1000000UL 92:/usr/lib/avr/include/util/delay.h **** #endif 93:/usr/lib/avr/include/util/delay.h **** 94:/usr/lib/avr/include/util/delay.h **** #ifndef __OPTIMIZE__ 95:/usr/lib/avr/include/util/delay.h **** # warning "Compiler optimizations disabled; functions from won't work as designed" 96:/usr/lib/avr/include/util/delay.h **** #endif 97:/usr/lib/avr/include/util/delay.h **** 98:/usr/lib/avr/include/util/delay.h **** #if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \ 99:/usr/lib/avr/include/util/delay.h **** !defined(__DELAY_BACKWARD_COMPATIBLE__) && \ 100:/usr/lib/avr/include/util/delay.h **** __STDC_HOSTED__ 101:/usr/lib/avr/include/util/delay.h **** # include 102:/usr/lib/avr/include/util/delay.h **** #endif 103:/usr/lib/avr/include/util/delay.h **** 104:/usr/lib/avr/include/util/delay.h **** /** 105:/usr/lib/avr/include/util/delay.h **** \ingroup util_delay 106:/usr/lib/avr/include/util/delay.h **** 107:/usr/lib/avr/include/util/delay.h **** Perform a delay of \c __ms milliseconds, using _delay_loop_2(). 108:/usr/lib/avr/include/util/delay.h **** 109:/usr/lib/avr/include/util/delay.h **** The macro F_CPU is supposed to be defined to a 110:/usr/lib/avr/include/util/delay.h **** constant defining the CPU clock frequency (in Hertz). 111:/usr/lib/avr/include/util/delay.h **** 112:/usr/lib/avr/include/util/delay.h **** The maximal possible delay is 262.14 ms / F_CPU in MHz. 113:/usr/lib/avr/include/util/delay.h **** 114:/usr/lib/avr/include/util/delay.h **** When the user request delay which exceed the maximum possible one, 115:/usr/lib/avr/include/util/delay.h **** _delay_ms() provides a decreased resolution functionality. In this 116:/usr/lib/avr/include/util/delay.h **** mode _delay_ms() will work with a resolution of 1/10 ms, providing 117:/usr/lib/avr/include/util/delay.h **** delays up to 6.5535 seconds (independent from CPU frequency). The 118:/usr/lib/avr/include/util/delay.h **** user will not be informed about decreased resolution. 119:/usr/lib/avr/include/util/delay.h **** 120:/usr/lib/avr/include/util/delay.h **** If the avr-gcc toolchain has __builtin_avr_delay_cycles(unsigned long) 121:/usr/lib/avr/include/util/delay.h **** support, maximal possible delay is 4294967.295 ms/ F_CPU in MHz. For 122:/usr/lib/avr/include/util/delay.h **** values greater than the maximal possible delay, overflows results in 123:/usr/lib/avr/include/util/delay.h **** no delay i.e., 0ms. 124:/usr/lib/avr/include/util/delay.h **** 125:/usr/lib/avr/include/util/delay.h **** Conversion of __us into clock cycles may not always result in integer. 126:/usr/lib/avr/include/util/delay.h **** By default, the clock cycles rounded up to next integer. This ensures that 127:/usr/lib/avr/include/util/delay.h **** the user gets atleast __us microseconds of delay. 128:/usr/lib/avr/include/util/delay.h **** GAS LISTING /tmp/cceI9NM3.s page 4 129:/usr/lib/avr/include/util/delay.h **** Alternatively, user can define __DELAY_ROUND_DOWN__ and __DELAY_ROUND_CLOSEST__ 130:/usr/lib/avr/include/util/delay.h **** to round down and round to closest integer. 131:/usr/lib/avr/include/util/delay.h **** 132:/usr/lib/avr/include/util/delay.h **** Note: The new implementation of _delay_ms(double __ms) with 133:/usr/lib/avr/include/util/delay.h **** __builtin_avr_delay_cycles(unsigned long) support is not backward compatible. 134:/usr/lib/avr/include/util/delay.h **** User can define __DELAY_BACKWARD_COMPATIBLE__ to get a backward compatible delay. 135:/usr/lib/avr/include/util/delay.h **** Also, the backward compatible 136:/usr/lib/avr/include/util/delay.h **** algorithm will be chosen if the code is compiled in a freestanding 137:/usr/lib/avr/include/util/delay.h **** environment (GCC option \c -ffreestanding), as the math functions 138:/usr/lib/avr/include/util/delay.h **** required for rounding are not available to the compiler then. 139:/usr/lib/avr/include/util/delay.h **** 140:/usr/lib/avr/include/util/delay.h **** */ 141:/usr/lib/avr/include/util/delay.h **** void 142:/usr/lib/avr/include/util/delay.h **** _delay_ms(double __ms) 143:/usr/lib/avr/include/util/delay.h **** { 144:/usr/lib/avr/include/util/delay.h **** double __tmp ; 145:/usr/lib/avr/include/util/delay.h **** #if __HAS_DELAY_CYCLES && defined(__OPTIMIZE__) && \ 146:/usr/lib/avr/include/util/delay.h **** !defined(__DELAY_BACKWARD_COMPATIBLE__) && \ 147:/usr/lib/avr/include/util/delay.h **** __STDC_HOSTED__ 148:/usr/lib/avr/include/util/delay.h **** uint32_t __ticks_dc; 149:/usr/lib/avr/include/util/delay.h **** extern void __builtin_avr_delay_cycles(unsigned long); 150:/usr/lib/avr/include/util/delay.h **** __tmp = ((F_CPU) / 1e3) * __ms; 151:/usr/lib/avr/include/util/delay.h **** 152:/usr/lib/avr/include/util/delay.h **** #if defined(__DELAY_ROUND_DOWN__) 153:/usr/lib/avr/include/util/delay.h **** __ticks_dc = (uint32_t)fabs(__tmp); 154:/usr/lib/avr/include/util/delay.h **** 155:/usr/lib/avr/include/util/delay.h **** #elif defined(__DELAY_ROUND_CLOSEST__) 156:/usr/lib/avr/include/util/delay.h **** __ticks_dc = (uint32_t)(fabs(__tmp)+0.5); 157:/usr/lib/avr/include/util/delay.h **** 158:/usr/lib/avr/include/util/delay.h **** #else 159:/usr/lib/avr/include/util/delay.h **** //round up by default 160:/usr/lib/avr/include/util/delay.h **** __ticks_dc = (uint32_t)(ceil(fabs(__tmp))); 161:/usr/lib/avr/include/util/delay.h **** #endif 162:/usr/lib/avr/include/util/delay.h **** 163:/usr/lib/avr/include/util/delay.h **** __builtin_avr_delay_cycles(__ticks_dc); 142 .LM3: 143 0014 EFE9 ldi r30,lo8(3999) 144 0016 FFE0 ldi r31,hi8(3999) 145 0018 3197 1: sbiw r30,1 146 001a 01F4 brne 1b 147 001c 00C0 rjmp . 148 001e 0000 nop 149 .LBE13: 150 .LBE12: 152 .Ltext2: 154 .LM4: 155 0020 0F5F subi r16,-1 156 0022 1F4F sbci r17,-1 157 0024 2F4F sbci r18,-1 158 0026 3F4F sbci r19,-1 159 0028 00C0 rjmp .L2 160 .L5: 161 /* epilogue start */ 11:test.c **** _delay_ms(1); 12:test.c **** } 13:test.c **** } 163 .LM5: GAS LISTING /tmp/cceI9NM3.s page 5 164 002a 1F91 pop r17 165 002c 0F91 pop r16 166 002e 0895 ret 171 .Lscope1: 173 .stabd 78,0,0 175 .global __vector_2 177 __vector_2: 178 .stabd 46,0,0 14:test.c **** 15:test.c **** #define NOOP asm volatile("nop" ::) 16:test.c **** 17:test.c **** 18:test.c **** #define TOUCHPORT PORTA 19:test.c **** #define TOUCHPIN PINA 20:test.c **** #define TOUCHDDR DDRA 21:test.c **** 22:test.c **** 23:test.c **** //If pin breaches, this has to get called. 24:test.c **** ISR( PCINT0_vect, ISR_NAKED ) { asm volatile( "reti" ); } 180 .LM6: 181 .LFBB2: 182 /* prologue: naked */ 183 /* frame size = 0 */ 184 /* stack size = 0 */ 185 .L__stack_usage = 0 187 .LM7: 188 /* #APP */ 189 ; 24 "test.c" 1 190 0030 1895 reti 191 ; 0 "" 2 192 /* epilogue start */ 193 /* #NOAPP */ 195 .Lscope2: 197 .stabd 78,0,0 199 .global __vector_3 201 __vector_3: 202 .stabd 46,0,0 25:test.c **** ISR( PCINT1_vect, ISR_NAKED ) { asm volatile( "reti" ); } 204 .LM8: 205 .LFBB3: 206 /* prologue: naked */ 207 /* frame size = 0 */ 208 /* stack size = 0 */ 209 .L__stack_usage = 0 211 .LM9: 212 /* #APP */ 213 ; 25 "test.c" 1 214 0032 1895 reti 215 ; 0 "" 2 216 /* epilogue start */ 217 /* #NOAPP */ 219 .Lscope3: 221 .stabd 78,0,0 223 .global __vector_7 225 __vector_7: 226 .stabd 46,0,0 26:test.c **** GAS LISTING /tmp/cceI9NM3.s page 6 27:test.c **** int overflow; 28:test.c **** 29:test.c **** //Handle if pin is down too long. 30:test.c **** ISR( TIMER1_COMPB_vect ) 31:test.c **** { 228 .LM10: 229 .LFBB4: 230 0034 1F92 push r1 231 0036 0F92 push r0 232 0038 0FB6 in r0,__SREG__ 233 003a 0F92 push r0 234 003c 1124 clr __zero_reg__ 235 003e 8F93 push r24 236 0040 9F93 push r25 237 /* prologue: Signal */ 238 /* frame size = 0 */ 239 /* stack size = 5 */ 240 .L__stack_usage = 5 32:test.c **** overflow = 1; 242 .LM11: 243 0042 81E0 ldi r24,lo8(1) 244 0044 90E0 ldi r25,0 245 0046 9093 0000 sts overflow+1,r25 246 004a 8093 0000 sts overflow,r24 247 /* epilogue start */ 33:test.c **** } 249 .LM12: 250 004e 9F91 pop r25 251 0050 8F91 pop r24 252 0052 0F90 pop r0 253 0054 0FBE out __SREG__,r0 254 0056 0F90 pop r0 255 0058 1F90 pop r1 256 005a 1895 reti 258 .Lscope4: 260 .stabd 78,0,0 263 .global ReadTouch 265 ReadTouch: 266 .stabd 46,0,0 34:test.c **** 35:test.c **** 36:test.c **** #define NR_TOUCH 6 37:test.c **** volatile uint8_t * tDDRs[NR_TOUCH] = { &DDRA, &DDRA, &DDRA, &DDRA, &DDRB, &DDRB }; 38:test.c **** uint8_t tMask[NR_TOUCH] = { _BV(0), _BV(1), _BV(2), _BV(3), _BV(2), _BV(1) }; 39:test.c **** volatile uint8_t * tPORTs[NR_TOUCH]= { &PORTA, &PORTA, &PORTA, &PORTA, &PORTB, &PORTB }; 40:test.c **** volatile uint8_t * tMASKs[NR_TOUCH]= { &PCMSK0, &PCMSK0, &PCMSK0, &PCMSK0, &PCMSK1, &PCMSK1 }; 41:test.c **** volatile uint8_t * tPUEs[NR_TOUCH] = { &PUEA, &PUEA, &PUEA, &PUEA, &PUEB, &PUEB }; 42:test.c **** 43:test.c **** int16_t tBaselines[NR_TOUCH]; 44:test.c **** int16_t tPins[NR_TOUCH]; 45:test.c **** 46:test.c **** uint16_t ReadTouch( int pin ) 47:test.c **** { 268 .LM13: 269 .LFBB5: 270 /* prologue: function */ 271 /* frame size = 0 */ GAS LISTING /tmp/cceI9NM3.s page 7 272 /* stack size = 0 */ 273 .L__stack_usage = 0 48:test.c **** uint8_t mask = tMask[pin]; 275 .LM14: 276 005c FC01 movw r30,r24 277 005e E050 subi r30,lo8(-(tMask)) 278 0060 F040 sbci r31,hi8(-(tMask)) 279 0062 B081 ld r27,Z 49:test.c **** uint8_t tmask = ~mask; 281 .LM15: 282 0064 AB2F mov r26,r27 283 0066 A095 com r26 50:test.c **** int16_t ret; 51:test.c **** 52:test.c **** sleep_enable(); 285 .LM16: 286 0068 25B7 in r18,0x35 287 006a 2062 ori r18,lo8(32) 288 006c 25BF out 0x35,r18 53:test.c **** TCNT1 = 0; 290 .LM17: 291 006e 1DBC out 0x2c+1,__zero_reg__ 292 0070 1CBC out 0x2c,__zero_reg__ 54:test.c **** TIFR1 |= _BV(OCIE1B); 294 .LM18: 295 0072 729A sbi 0xe,2 55:test.c **** TIMSK1 |= _BV(OCIE1B); 297 .LM19: 298 0074 7A9A sbi 0xf,2 56:test.c **** overflow = 0; 300 .LM20: 301 0076 1092 0000 sts overflow+1,__zero_reg__ 302 007a 1092 0000 sts overflow,__zero_reg__ 57:test.c **** 58:test.c **** *tMASKs[pin] |= mask; 304 .LM21: 305 007e 9C01 movw r18,r24 306 0080 220F lsl r18 307 0082 331F rol r19 308 0084 F901 movw r30,r18 309 0086 E050 subi r30,lo8(-(tMASKs)) 310 0088 F040 sbci r31,hi8(-(tMASKs)) 311 008a 0190 ld __tmp_reg__,Z+ 312 008c F081 ld r31,Z 313 008e E02D mov r30,__tmp_reg__ 314 0090 4081 ld r20,Z 315 0092 4B2B or r20,r27 316 0094 4083 st Z,r20 59:test.c **** *tDDRs[pin] &= tmask; 318 .LM22: 319 0096 F901 movw r30,r18 320 0098 E050 subi r30,lo8(-(tDDRs)) 321 009a F040 sbci r31,hi8(-(tDDRs)) 322 009c 0190 ld __tmp_reg__,Z+ 323 009e F081 ld r31,Z 324 00a0 E02D mov r30,__tmp_reg__ 325 00a2 2081 ld r18,Z GAS LISTING /tmp/cceI9NM3.s page 8 326 00a4 2A23 and r18,r26 327 00a6 2083 st Z,r18 60:test.c **** 61:test.c **** TCNT1 = 0; 329 .LM23: 330 00a8 1DBC out 0x2c+1,__zero_reg__ 331 00aa 1CBC out 0x2c,__zero_reg__ 62:test.c **** sleep_cpu(); 333 .LM24: 334 /* #APP */ 335 ; 62 "test.c" 1 336 00ac 8895 sleep 337 338 ; 0 "" 2 63:test.c **** ret = TCNT1; 340 .LM25: 341 /* #NOAPP */ 342 00ae 4CB5 in r20,0x2c 343 00b0 5DB5 in r21,0x2c+1 64:test.c **** if( overflow ) ret = 0xffff; 345 .LM26: 346 00b2 6091 0000 lds r22,overflow 347 00b6 7091 0000 lds r23,overflow+1 348 00ba 9C01 movw r18,r24 349 00bc 220F lsl r18 350 00be 331F rol r19 351 00c0 672B or r22,r23 352 00c2 01F4 brne .L12 63:test.c **** ret = TCNT1; 354 .LM27: 355 00c4 CA01 movw r24,r20 356 00c6 00C0 rjmp .L10 357 .L12: 359 .LM28: 360 00c8 8FEF ldi r24,lo8(-1) 361 00ca 9FEF ldi r25,lo8(-1) 362 .L10: 65:test.c **** TIMSK1 &= ~_BV(OCIE1B); 364 .LM29: 365 00cc 7A98 cbi 0xf,2 66:test.c **** 67:test.c **** *tDDRs[pin] |= mask; 367 .LM30: 368 00ce F901 movw r30,r18 369 00d0 E050 subi r30,lo8(-(tDDRs)) 370 00d2 F040 sbci r31,hi8(-(tDDRs)) 371 00d4 0190 ld __tmp_reg__,Z+ 372 00d6 F081 ld r31,Z 373 00d8 E02D mov r30,__tmp_reg__ 374 00da 4081 ld r20,Z 375 00dc 4B2B or r20,r27 376 00de 4083 st Z,r20 68:test.c **** *tMASKs[pin] &= tmask; 378 .LM31: 379 00e0 F901 movw r30,r18 380 00e2 E050 subi r30,lo8(-(tMASKs)) 381 00e4 F040 sbci r31,hi8(-(tMASKs)) GAS LISTING /tmp/cceI9NM3.s page 9 382 00e6 0190 ld __tmp_reg__,Z+ 383 00e8 F081 ld r31,Z 384 00ea E02D mov r30,__tmp_reg__ 385 00ec 4081 ld r20,Z 386 00ee 4A23 and r20,r26 387 00f0 4083 st Z,r20 69:test.c **** 70:test.c **** ret = (ret>>1)-tBaselines[pin]; 389 .LM32: 390 00f2 9595 asr r25 391 00f4 8795 ror r24 392 00f6 F901 movw r30,r18 393 00f8 E050 subi r30,lo8(-(tBaselines)) 394 00fa F040 sbci r31,hi8(-(tBaselines)) 395 00fc 2081 ld r18,Z 396 00fe 3181 ldd r19,Z+1 397 0100 821B sub r24,r18 398 0102 930B sbc r25,r19 399 0104 97FF sbrs r25,7 400 0106 00C0 rjmp .L11 401 0108 80E0 ldi r24,0 402 010a 90E0 ldi r25,0 403 .L11: 71:test.c **** if( ret < 0 ) ret = 0; 72:test.c **** return ret; 73:test.c **** } 405 .LM33: 406 010c 0895 ret 412 .Lscope5: 414 .stabd 78,0,0 417 .global InitPin 419 InitPin: 420 .stabd 46,0,0 74:test.c **** 75:test.c **** void InitPin( int pin ) 76:test.c **** { 422 .LM34: 423 .LFBB6: 424 010e DF92 push r13 425 0110 EF92 push r14 426 0112 FF92 push r15 427 0114 0F93 push r16 428 0116 1F93 push r17 429 0118 CF93 push r28 430 011a DF93 push r29 431 /* prologue: function */ 432 /* frame size = 0 */ 433 /* stack size = 7 */ 434 .L__stack_usage = 7 435 011c EC01 movw r28,r24 77:test.c **** uint8_t i; 78:test.c **** int sum = 0; 79:test.c **** tBaselines[pin] = 0; 437 .LM35: 438 011e FC01 movw r30,r24 439 0120 EE0F lsl r30 440 0122 FF1F rol r31 GAS LISTING /tmp/cceI9NM3.s page 10 441 0124 E050 subi r30,lo8(-(tBaselines)) 442 0126 F040 sbci r31,hi8(-(tBaselines)) 443 0128 1182 std Z+1,__zero_reg__ 444 012a 1082 st Z,__zero_reg__ 80:test.c **** ReadTouch( pin ); _delay_ms(1); 446 .LM36: 447 012c 00D0 rcall ReadTouch 448 .LBB14: 449 .LBB15: 451 .Ltext3: 453 .LM37: 454 012e 8FE9 ldi r24,lo8(3999) 455 0130 9FE0 ldi r25,hi8(3999) 456 0132 0197 1: sbiw r24,1 457 0134 01F4 brne 1b 458 0136 00C0 rjmp . 459 0138 0000 nop 460 013a 14E0 ldi r17,lo8(4) 461 013c D12E mov r13,r17 462 .LBE15: 463 .LBE14: 465 .Ltext4: 78:test.c **** tBaselines[pin] = 0; 467 .LM38: 468 013e 00E0 ldi r16,0 469 0140 10E0 ldi r17,0 470 0142 7E01 movw r14,r28 471 0144 EE0C lsl r14 472 0146 FF1C rol r15 473 .L15: 81:test.c **** for( i = 0; i < 4; i++ ) 82:test.c **** { 83:test.c **** sum += ReadTouch( pin ); 475 .LM39: 476 0148 CE01 movw r24,r28 477 014a 00D0 rcall ReadTouch 478 014c 080F add r16,r24 479 014e 191F adc r17,r25 480 .LBB16: 481 .LBB17: 483 .Ltext5: 485 .LM40: 486 0150 8FE9 ldi r24,lo8(3999) 487 0152 9FE0 ldi r25,hi8(3999) 488 0154 0197 1: sbiw r24,1 489 0156 01F4 brne 1b 490 0158 00C0 rjmp . 491 015a 0000 nop 492 015c DA94 dec r13 493 .LBE17: 494 .LBE16: 496 .Ltext6: 81:test.c **** for( i = 0; i < 4; i++ ) 498 .LM41: 499 015e 01F4 brne .L15 84:test.c **** _delay_ms(1); 85:test.c **** } GAS LISTING /tmp/cceI9NM3.s page 11 86:test.c **** tBaselines[pin] = sum>>2; 501 .LM42: 502 0160 F701 movw r30,r14 503 0162 E050 subi r30,lo8(-(tBaselines)) 504 0164 F040 sbci r31,hi8(-(tBaselines)) 505 0166 1595 asr r17 506 0168 0795 ror r16 507 016a 1595 asr r17 508 016c 0795 ror r16 509 016e 1183 std Z+1,r17 510 0170 0083 st Z,r16 511 /* epilogue start */ 87:test.c **** } 513 .LM43: 514 0172 DF91 pop r29 515 0174 CF91 pop r28 516 0176 1F91 pop r17 517 0178 0F91 pop r16 518 017a FF90 pop r15 519 017c EF90 pop r14 520 017e DF90 pop r13 521 0180 0895 ret 526 .Lscope6: 528 .stabd 78,0,0 530 .global InitPins 532 InitPins: 533 .stabd 46,0,0 88:test.c **** 89:test.c **** void InitPins() 90:test.c **** { 535 .LM44: 536 .LFBB7: 537 0182 EF92 push r14 538 0184 FF92 push r15 539 0186 0F93 push r16 540 0188 1F93 push r17 541 018a CF93 push r28 542 018c DF93 push r29 543 /* prologue: function */ 544 /* frame size = 0 */ 545 /* stack size = 6 */ 546 .L__stack_usage = 6 91:test.c **** uint8_t i; 92:test.c **** 93:test.c **** PUEA = 0; 548 .LM45: 549 018e 1092 6300 sts 99,__zero_reg__ 94:test.c **** OCR1A = OCR1B = 0x7ff; 551 .LM46: 552 0192 8FEF ldi r24,lo8(-1) 553 0194 97E0 ldi r25,lo8(7) 554 0196 99BD out 0x28+1,r25 555 0198 88BD out 0x28,r24 556 019a 9BBD out 0x2a+1,r25 557 019c 8ABD out 0x2a,r24 95:test.c **** TCCR1A = 0; 559 .LM47: GAS LISTING /tmp/cceI9NM3.s page 12 560 019e 1FBC out 0x2f,__zero_reg__ 96:test.c **** TCCR1B = _BV(CS10); 562 .LM48: 563 01a0 81E0 ldi r24,lo8(1) 564 01a2 8EBD out 0x2e,r24 97:test.c **** TIMSK1 = _BV(OCIE1B); 566 .LM49: 567 01a4 84E0 ldi r24,lo8(4) 568 01a6 8FB9 out 0xf,r24 98:test.c **** set_sleep_mode( SLEEP_MODE_IDLE ); 570 .LM50: 571 01a8 85B7 in r24,0x35 572 01aa 877E andi r24,lo8(-25) 573 01ac 85BF out 0x35,r24 99:test.c **** GIMSK |= _BV(PCIE0) | _BV(PCIE1); 575 .LM51: 576 01ae 8BB7 in r24,0x3b 577 01b0 8063 ori r24,lo8(48) 578 01b2 8BBF out 0x3b,r24 579 01b4 90E0 ldi r25,lo8(tPUEs) 580 01b6 E92E mov r14,r25 581 01b8 90E0 ldi r25,hi8(tPUEs) 582 01ba F92E mov r15,r25 583 01bc 00E0 ldi r16,lo8(tMask) 584 01be 10E0 ldi r17,hi8(tMask) 585 01c0 C0E0 ldi r28,0 586 01c2 D0E0 ldi r29,0 587 .L18: 100:test.c **** 101:test.c **** 102:test.c **** for( i = 0; i < NR_TOUCH; i++ ) 103:test.c **** { 104:test.c **** *tPUEs[i] &= ~tMask[i]; 589 .LM52: 590 01c4 D701 movw r26,r14 591 01c6 ED91 ld r30,X+ 592 01c8 FD91 ld r31,X+ 593 01ca 7D01 movw r14,r26 594 01cc 9081 ld r25,Z 595 01ce D801 movw r26,r16 596 01d0 8D91 ld r24,X+ 597 01d2 8D01 movw r16,r26 598 01d4 8095 com r24 599 01d6 8923 and r24,r25 600 01d8 8083 st Z,r24 105:test.c **** InitPin( i ); 602 .LM53: 603 01da CE01 movw r24,r28 604 01dc 00D0 rcall InitPin 605 01de 2196 adiw r28,1 102:test.c **** { 607 .LM54: 608 01e0 C630 cpi r28,6 609 01e2 D105 cpc r29,__zero_reg__ 610 01e4 01F4 brne .L18 611 /* epilogue start */ 106:test.c **** } GAS LISTING /tmp/cceI9NM3.s page 13 107:test.c **** } 613 .LM55: 614 01e6 DF91 pop r29 615 01e8 CF91 pop r28 616 01ea 1F91 pop r17 617 01ec 0F91 pop r16 618 01ee FF90 pop r15 619 01f0 EF90 pop r14 620 01f2 0895 ret 622 .Lscope7: 624 .stabd 78,0,0 625 .section .text.startup,"ax",@progbits 627 .global main 629 main: 630 .stabd 46,0,0 108:test.c **** 109:test.c **** 110:test.c **** 111:test.c **** #define WSPORT PORTB 112:test.c **** #define WSDDR DDRB 113:test.c **** #define WSPIN _BV(0) 114:test.c **** 115:test.c **** #define WSSET WSDDR |= WSPIN 116:test.c **** #define WSON WSPORT |= WSPIN 117:test.c **** #define WSOFF WSPORT &= ~WSPIN 118:test.c **** 119:test.c **** #define SEND_WS( var ) \ 120:test.c **** mask = 0x80; \ 121:test.c **** v = var; \ 122:test.c **** while( mask ) \ 123:test.c **** { \ 124:test.c **** if( mask & v ) \ 125:test.c **** { \ 126:test.c **** WSON; mask>>=1; \ 127:test.c **** NOOP; NOOP; NOOP; NOOP; \ 128:test.c **** NOOP; NOOP; NOOP; NOOP; NOOP; NOOP; NOOP; NOOP;\ 129:test.c **** WSOFF; NOOP; NOOP; NOOP; NOOP;NOOP; NOOP;NOOP;\ 130:test.c **** } \ 131:test.c **** else \ 132:test.c **** { \ 133:test.c **** WSON; NOOP; NOOP;\ 134:test.c **** WSOFF; \ 135:test.c **** mask>>=1; \ 136:test.c **** NOOP; NOOP; NOOP; NOOP;NOOP; NOOP; NOOP; NOOP; NOOP; NOOP; NOOP;\ 137:test.c **** } \ 138:test.c **** \ 139:test.c **** } 140:test.c **** 141:test.c **** 142:test.c **** 143:test.c **** #define HUE(x) pgm_read_byte( &huetable[(x)&0xff] ) 144:test.c **** #define RAND(x) pgm_read_byte( &rands[(x)&0xff] ) 145:test.c **** #define ST(x) pgm_read_byte( &sintable[(x)&0xff] ) 146:test.c **** 147:test.c **** #define MUX(x,y) ((x*y)>>8) 148:test.c **** 149:test.c **** int main( ) GAS LISTING /tmp/cceI9NM3.s page 14 150:test.c **** { 632 .LM56: 633 .LFBB8: 634 /* prologue: function */ 635 /* frame size = 0 */ 636 /* stack size = 0 */ 637 .L__stack_usage = 0 151:test.c **** int i = 0, j; 152:test.c **** uint8_t v, mask; 153:test.c **** OSCCAL0 = 0xff; 639 .LM57: 640 0000 8FEF ldi r24,lo8(-1) 641 0002 8093 7400 sts 116,r24 154:test.c **** WSSET; 643 .LM58: 644 0006 B89A sbi 0x17,0 155:test.c **** setup_spi(); 646 .LM59: 647 0008 00D0 rcall setup_spi 156:test.c **** sei(); 649 .LM60: 650 /* #APP */ 651 ; 156 "test.c" 1 652 000a 7894 sei 653 ; 0 "" 2 157:test.c **** 158:test.c **** 159:test.c **** InitPins(); 655 .LM61: 656 /* #NOAPP */ 657 000c 00D0 rcall InitPins 658 .L36: 160:test.c **** 161:test.c **** while(1) 162:test.c **** { 163:test.c **** i++; 164:test.c **** if( i == 255 ) i = 0; 165:test.c **** 166:test.c **** cli(); 660 .LM62: 661 /* #APP */ 662 ; 166 "test.c" 1 663 000e F894 cli 664 ; 0 "" 2 665 /* #NOAPP */ 666 0010 E0E0 ldi r30,lo8(tPins) 667 0012 F0E0 ldi r31,hi8(tPins) 668 .L34: 669 0014 8191 ld r24,Z+ 670 0016 9191 ld r25,Z+ 671 0018 8F3F cpi r24,-1 672 001a 9105 cpc r25,__zero_reg__ 673 001c 01F0 breq .L20 674 001e 04F0 brlt .L20 675 0020 8FEF ldi r24,lo8(-1) 676 0022 90E0 ldi r25,0 677 .L20: GAS LISTING /tmp/cceI9NM3.s page 15 678 .LBB18: 167:test.c **** for( j = 0; j < 6; j++ ) 168:test.c **** { 169:test.c **** #if 0 170:test.c **** int k = i; 171:test.c **** SEND_WS( HUE(i) ); 172:test.c **** SEND_WS( HUE(i+85)); 173:test.c **** SEND_WS( HUE(i+170) ); 174:test.c **** #else 175:test.c **** int k = tPins[j]; 176:test.c **** if( k > 255 ) k = 255; 177:test.c **** SEND_WS( k ); 680 .LM63: 681 0024 90E8 ldi r25,lo8(-128) 682 .L24: 684 .LM64: 685 0026 392F mov r19,r25 686 0028 3823 and r19,r24 687 002a 292F mov r18,r25 688 002c 2695 lsr r18 689 002e C09A sbi 0x18,0 690 0030 3323 tst r19 691 0032 01F0 breq .L21 693 .LM65: 694 0034 922F mov r25,r18 695 /* #APP */ 696 ; 177 "test.c" 1 697 0036 0000 nop 698 ; 0 "" 2 699 ; 177 "test.c" 1 700 0038 0000 nop 701 ; 0 "" 2 702 ; 177 "test.c" 1 703 003a 0000 nop 704 ; 0 "" 2 705 ; 177 "test.c" 1 706 003c 0000 nop 707 ; 0 "" 2 708 ; 177 "test.c" 1 709 003e 0000 nop 710 ; 0 "" 2 711 ; 177 "test.c" 1 712 0040 0000 nop 713 ; 0 "" 2 714 ; 177 "test.c" 1 715 0042 0000 nop 716 ; 0 "" 2 717 ; 177 "test.c" 1 718 0044 0000 nop 719 ; 0 "" 2 720 ; 177 "test.c" 1 721 0046 0000 nop 722 ; 0 "" 2 723 ; 177 "test.c" 1 724 0048 0000 nop 725 ; 0 "" 2 726 ; 177 "test.c" 1 GAS LISTING /tmp/cceI9NM3.s page 16 727 004a 0000 nop 728 ; 0 "" 2 729 ; 177 "test.c" 1 730 004c 0000 nop 731 ; 0 "" 2 732 /* #NOAPP */ 733 004e C098 cbi 0x18,0 734 0050 00C0 rjmp .L38 735 .L21: 737 .LM66: 738 /* #APP */ 739 ; 177 "test.c" 1 740 0052 0000 nop 741 ; 0 "" 2 742 ; 177 "test.c" 1 743 0054 0000 nop 744 ; 0 "" 2 745 /* #NOAPP */ 746 0056 C098 cbi 0x18,0 747 0058 922F mov r25,r18 748 /* #APP */ 749 ; 177 "test.c" 1 750 005a 0000 nop 751 ; 0 "" 2 752 ; 177 "test.c" 1 753 005c 0000 nop 754 ; 0 "" 2 755 ; 177 "test.c" 1 756 005e 0000 nop 757 ; 0 "" 2 758 ; 177 "test.c" 1 759 0060 0000 nop 760 ; 0 "" 2 761 /* #NOAPP */ 762 .L38: 763 /* #APP */ 764 ; 177 "test.c" 1 765 0062 0000 nop 766 ; 0 "" 2 767 ; 177 "test.c" 1 768 0064 0000 nop 769 ; 0 "" 2 770 ; 177 "test.c" 1 771 0066 0000 nop 772 ; 0 "" 2 773 ; 177 "test.c" 1 774 0068 0000 nop 775 ; 0 "" 2 776 ; 177 "test.c" 1 777 006a 0000 nop 778 ; 0 "" 2 779 ; 177 "test.c" 1 780 006c 0000 nop 781 ; 0 "" 2 782 ; 177 "test.c" 1 783 006e 0000 nop 784 ; 0 "" 2 GAS LISTING /tmp/cceI9NM3.s page 17 785 /* #NOAPP */ 786 0070 2111 cpse r18,__zero_reg__ 787 0072 00C0 rjmp .L24 789 .LM67: 790 0074 90E8 ldi r25,lo8(-128) 791 .L28: 178:test.c **** SEND_WS( k ); 793 .LM68: 794 0076 392F mov r19,r25 795 0078 3823 and r19,r24 796 007a 292F mov r18,r25 797 007c 2695 lsr r18 798 007e C09A sbi 0x18,0 799 0080 3323 tst r19 800 0082 01F0 breq .L25 802 .LM69: 803 0084 922F mov r25,r18 804 /* #APP */ 805 ; 178 "test.c" 1 806 0086 0000 nop 807 ; 0 "" 2 808 ; 178 "test.c" 1 809 0088 0000 nop 810 ; 0 "" 2 811 ; 178 "test.c" 1 812 008a 0000 nop 813 ; 0 "" 2 814 ; 178 "test.c" 1 815 008c 0000 nop 816 ; 0 "" 2 817 ; 178 "test.c" 1 818 008e 0000 nop 819 ; 0 "" 2 820 ; 178 "test.c" 1 821 0090 0000 nop 822 ; 0 "" 2 823 ; 178 "test.c" 1 824 0092 0000 nop 825 ; 0 "" 2 826 ; 178 "test.c" 1 827 0094 0000 nop 828 ; 0 "" 2 829 ; 178 "test.c" 1 830 0096 0000 nop 831 ; 0 "" 2 832 ; 178 "test.c" 1 833 0098 0000 nop 834 ; 0 "" 2 835 ; 178 "test.c" 1 836 009a 0000 nop 837 ; 0 "" 2 838 ; 178 "test.c" 1 839 009c 0000 nop 840 ; 0 "" 2 841 /* #NOAPP */ 842 009e C098 cbi 0x18,0 843 00a0 00C0 rjmp .L39 GAS LISTING /tmp/cceI9NM3.s page 18 844 .L25: 846 .LM70: 847 /* #APP */ 848 ; 178 "test.c" 1 849 00a2 0000 nop 850 ; 0 "" 2 851 ; 178 "test.c" 1 852 00a4 0000 nop 853 ; 0 "" 2 854 /* #NOAPP */ 855 00a6 C098 cbi 0x18,0 856 00a8 922F mov r25,r18 857 /* #APP */ 858 ; 178 "test.c" 1 859 00aa 0000 nop 860 ; 0 "" 2 861 ; 178 "test.c" 1 862 00ac 0000 nop 863 ; 0 "" 2 864 ; 178 "test.c" 1 865 00ae 0000 nop 866 ; 0 "" 2 867 ; 178 "test.c" 1 868 00b0 0000 nop 869 ; 0 "" 2 870 /* #NOAPP */ 871 .L39: 872 /* #APP */ 873 ; 178 "test.c" 1 874 00b2 0000 nop 875 ; 0 "" 2 876 ; 178 "test.c" 1 877 00b4 0000 nop 878 ; 0 "" 2 879 ; 178 "test.c" 1 880 00b6 0000 nop 881 ; 0 "" 2 882 ; 178 "test.c" 1 883 00b8 0000 nop 884 ; 0 "" 2 885 ; 178 "test.c" 1 886 00ba 0000 nop 887 ; 0 "" 2 888 ; 178 "test.c" 1 889 00bc 0000 nop 890 ; 0 "" 2 891 ; 178 "test.c" 1 892 00be 0000 nop 893 ; 0 "" 2 894 /* #NOAPP */ 895 00c0 2111 cpse r18,__zero_reg__ 896 00c2 00C0 rjmp .L28 898 .LM71: 899 00c4 80E8 ldi r24,lo8(-128) 900 .L32: 179:test.c **** SEND_WS( 10 ); 902 .LM72: GAS LISTING /tmp/cceI9NM3.s page 19 903 00c6 982F mov r25,r24 904 00c8 9A70 andi r25,lo8(10) 905 00ca 8695 lsr r24 906 00cc C09A sbi 0x18,0 907 00ce 9923 tst r25 908 00d0 01F0 breq .L29 910 .LM73: 911 /* #APP */ 912 ; 179 "test.c" 1 913 00d2 0000 nop 914 ; 0 "" 2 915 ; 179 "test.c" 1 916 00d4 0000 nop 917 ; 0 "" 2 918 ; 179 "test.c" 1 919 00d6 0000 nop 920 ; 0 "" 2 921 ; 179 "test.c" 1 922 00d8 0000 nop 923 ; 0 "" 2 924 ; 179 "test.c" 1 925 00da 0000 nop 926 ; 0 "" 2 927 ; 179 "test.c" 1 928 00dc 0000 nop 929 ; 0 "" 2 930 ; 179 "test.c" 1 931 00de 0000 nop 932 ; 0 "" 2 933 ; 179 "test.c" 1 934 00e0 0000 nop 935 ; 0 "" 2 936 ; 179 "test.c" 1 937 00e2 0000 nop 938 ; 0 "" 2 939 ; 179 "test.c" 1 940 00e4 0000 nop 941 ; 0 "" 2 942 ; 179 "test.c" 1 943 00e6 0000 nop 944 ; 0 "" 2 945 ; 179 "test.c" 1 946 00e8 0000 nop 947 ; 0 "" 2 948 /* #NOAPP */ 949 00ea C098 cbi 0x18,0 950 /* #APP */ 951 ; 179 "test.c" 1 952 00ec 0000 nop 953 ; 0 "" 2 954 ; 179 "test.c" 1 955 00ee 0000 nop 956 ; 0 "" 2 957 ; 179 "test.c" 1 958 00f0 0000 nop 959 ; 0 "" 2 960 ; 179 "test.c" 1 GAS LISTING /tmp/cceI9NM3.s page 20 961 00f2 0000 nop 962 ; 0 "" 2 963 ; 179 "test.c" 1 964 00f4 0000 nop 965 ; 0 "" 2 966 ; 179 "test.c" 1 967 00f6 0000 nop 968 ; 0 "" 2 969 ; 179 "test.c" 1 970 00f8 0000 nop 971 ; 0 "" 2 972 /* #NOAPP */ 973 00fa 00C0 rjmp .L32 974 .L29: 976 .LM74: 977 /* #APP */ 978 ; 179 "test.c" 1 979 00fc 0000 nop 980 ; 0 "" 2 981 ; 179 "test.c" 1 982 00fe 0000 nop 983 ; 0 "" 2 984 /* #NOAPP */ 985 0100 C098 cbi 0x18,0 986 /* #APP */ 987 ; 179 "test.c" 1 988 0102 0000 nop 989 ; 0 "" 2 990 ; 179 "test.c" 1 991 0104 0000 nop 992 ; 0 "" 2 993 ; 179 "test.c" 1 994 0106 0000 nop 995 ; 0 "" 2 996 ; 179 "test.c" 1 997 0108 0000 nop 998 ; 0 "" 2 999 ; 179 "test.c" 1 1000 010a 0000 nop 1001 ; 0 "" 2 1002 ; 179 "test.c" 1 1003 010c 0000 nop 1004 ; 0 "" 2 1005 ; 179 "test.c" 1 1006 010e 0000 nop 1007 ; 0 "" 2 1008 ; 179 "test.c" 1 1009 0110 0000 nop 1010 ; 0 "" 2 1011 ; 179 "test.c" 1 1012 0112 0000 nop 1013 ; 0 "" 2 1014 ; 179 "test.c" 1 1015 0114 0000 nop 1016 ; 0 "" 2 1017 ; 179 "test.c" 1 1018 0116 0000 nop GAS LISTING /tmp/cceI9NM3.s page 21 1019 ; 0 "" 2 1020 /* #NOAPP */ 1021 0118 8111 cpse r24,__zero_reg__ 1022 011a 00C0 rjmp .L32 1023 .LBE18: 167:test.c **** for( j = 0; j < 6; j++ ) 1025 .LM75: 1026 011c 80E0 ldi r24,hi8(tPins+12) 1027 011e E030 cpi r30,lo8(tPins+12) 1028 0120 F807 cpc r31,r24 1029 0122 01F0 breq .+2 1030 0124 00C0 rjmp .L34 180:test.c **** #endif 181:test.c **** } 182:test.c **** WSPORT&=~WSPIN; 1032 .LM76: 1033 0126 C098 cbi 0x18,0 183:test.c **** sei(); 1035 .LM77: 1036 /* #APP */ 1037 ; 183 "test.c" 1 1038 0128 7894 sei 1039 ; 0 "" 2 1040 /* #NOAPP */ 1041 .LBB19: 1042 .LBB20: 1044 .Ltext7: 1046 .LM78: 1047 012a EFE3 ldi r30,lo8(-25537) 1048 012c FCE9 ldi r31,hi8(-25537) 1049 012e 3197 1: sbiw r30,1 1050 0130 01F4 brne 1b 1051 0132 00C0 rjmp . 1052 0134 0000 nop 1053 0136 00E0 ldi r16,lo8(tPins) 1054 0138 10E0 ldi r17,hi8(tPins) 1055 .LBE20: 1056 .LBE19: 1058 .Ltext8: 184:test.c **** 185:test.c **** _delay_ms(10); 186:test.c **** for( i = 0; i < 6; i++ ) 1060 .LM79: 1061 013a C0E0 ldi r28,0 1062 013c D0E0 ldi r29,0 1063 .L37: 1064 .LBB21: 187:test.c **** { 188:test.c **** int k = ReadTouch(i); 1066 .LM80: 1067 013e CE01 movw r24,r28 1068 0140 00D0 rcall ReadTouch 189:test.c **** tPins[i] = k; 1070 .LM81: 1071 0142 F801 movw r30,r16 1072 0144 8193 st Z+,r24 1073 0146 9193 st Z+,r25 GAS LISTING /tmp/cceI9NM3.s page 22 1074 0148 8F01 movw r16,r30 1075 .LBE21: 186:test.c **** { 1077 .LM82: 1078 014a 2196 adiw r28,1 1079 014c C630 cpi r28,6 1080 014e D105 cpc r29,__zero_reg__ 1081 0150 01F4 brne .L37 1082 0152 00C0 rjmp .L36 1088 .Lscope8: 1090 .stabd 78,0,0 1091 .comm tPins,12,1 1092 .comm tBaselines,12,1 1093 .global tPUEs 1094 .data 1097 tPUEs: 1098 0000 6300 .word 99 1099 0002 6300 .word 99 1100 0004 6300 .word 99 1101 0006 6300 .word 99 1102 0008 6200 .word 98 1103 000a 6200 .word 98 1104 .global tMASKs 1107 tMASKs: 1108 000c 3200 .word 50 1109 000e 3200 .word 50 1110 0010 3200 .word 50 1111 0012 3200 .word 50 1112 0014 4000 .word 64 1113 0016 4000 .word 64 1114 .global tPORTs 1117 tPORTs: 1118 0018 3B00 .word 59 1119 001a 3B00 .word 59 1120 001c 3B00 .word 59 1121 001e 3B00 .word 59 1122 0020 3800 .word 56 1123 0022 3800 .word 56 1124 .global tMask 1127 tMask: 1128 0024 01 .byte 1 1129 0025 02 .byte 2 1130 0026 04 .byte 4 1131 0027 08 .byte 8 1132 0028 04 .byte 4 1133 0029 02 .byte 2 1134 .global tDDRs 1137 tDDRs: 1138 002a 3A00 .word 58 1139 002c 3A00 .word 58 1140 002e 3A00 .word 58 1141 0030 3A00 .word 58 1142 0032 3700 .word 55 1143 0034 3700 .word 55 1144 .comm overflow,2,1 1145 .global huetable 1146 .section .progmem.data,"a",@progbits GAS LISTING /tmp/cceI9NM3.s page 23 1149 huetable: 1150 0000 00 .byte 0 1151 0001 06 .byte 6 1152 0002 0C .byte 12 1153 0003 12 .byte 18 1154 0004 18 .byte 24 1155 0005 1E .byte 30 1156 0006 24 .byte 36 1157 0007 2A .byte 42 1158 0008 30 .byte 48 1159 0009 36 .byte 54 1160 000a 3C .byte 60 1161 000b 42 .byte 66 1162 000c 48 .byte 72 1163 000d 4E .byte 78 1164 000e 54 .byte 84 1165 000f 5A .byte 90 1166 0010 60 .byte 96 1167 0011 66 .byte 102 1168 0012 6C .byte 108 1169 0013 72 .byte 114 1170 0014 78 .byte 120 1171 0015 7E .byte 126 1172 0016 84 .byte -124 1173 0017 8A .byte -118 1174 0018 90 .byte -112 1175 0019 96 .byte -106 1176 001a 9C .byte -100 1177 001b A2 .byte -94 1178 001c A8 .byte -88 1179 001d AE .byte -82 1180 001e B4 .byte -76 1181 001f BA .byte -70 1182 0020 C0 .byte -64 1183 0021 C6 .byte -58 1184 0022 CC .byte -52 1185 0023 D2 .byte -46 1186 0024 D8 .byte -40 1187 0025 DE .byte -34 1188 0026 E4 .byte -28 1189 0027 EA .byte -22 1190 0028 F0 .byte -16 1191 0029 F6 .byte -10 1192 002a FF .byte -1 1193 002b FF .byte -1 1194 002c FF .byte -1 1195 002d FF .byte -1 1196 002e FF .byte -1 1197 002f FF .byte -1 1198 0030 FF .byte -1 1199 0031 FF .byte -1 1200 0032 FF .byte -1 1201 0033 FF .byte -1 1202 0034 FF .byte -1 1203 0035 FF .byte -1 1204 0036 FF .byte -1 1205 0037 FF .byte -1 GAS LISTING /tmp/cceI9NM3.s page 24 1206 0038 FF .byte -1 1207 0039 FF .byte -1 1208 003a FF .byte -1 1209 003b FF .byte -1 1210 003c FF .byte -1 1211 003d FF .byte -1 1212 003e FF .byte -1 1213 003f FF .byte -1 1214 0040 FF .byte -1 1215 0041 FF .byte -1 1216 0042 FF .byte -1 1217 0043 FF .byte -1 1218 0044 FF .byte -1 1219 0045 FF .byte -1 1220 0046 FF .byte -1 1221 0047 FF .byte -1 1222 0048 FF .byte -1 1223 0049 FF .byte -1 1224 004a FF .byte -1 1225 004b FF .byte -1 1226 004c FF .byte -1 1227 004d FF .byte -1 1228 004e FF .byte -1 1229 004f FF .byte -1 1230 0050 FF .byte -1 1231 0051 FF .byte -1 1232 0052 FF .byte -1 1233 0053 FF .byte -1 1234 0054 FF .byte -1 1235 0055 FF .byte -1 1236 0056 FF .byte -1 1237 0057 FF .byte -1 1238 0058 FF .byte -1 1239 0059 FF .byte -1 1240 005a FF .byte -1 1241 005b FF .byte -1 1242 005c FF .byte -1 1243 005d FF .byte -1 1244 005e FF .byte -1 1245 005f FF .byte -1 1246 0060 FF .byte -1 1247 0061 FF .byte -1 1248 0062 FF .byte -1 1249 0063 FF .byte -1 1250 0064 FF .byte -1 1251 0065 FF .byte -1 1252 0066 FF .byte -1 1253 0067 FF .byte -1 1254 0068 FF .byte -1 1255 0069 FF .byte -1 1256 006a FF .byte -1 1257 006b FF .byte -1 1258 006c FF .byte -1 1259 006d FF .byte -1 1260 006e FF .byte -1 1261 006f FF .byte -1 1262 0070 FF .byte -1 GAS LISTING /tmp/cceI9NM3.s page 25 1263 0071 FF .byte -1 1264 0072 FF .byte -1 1265 0073 FF .byte -1 1266 0074 FF .byte -1 1267 0075 FF .byte -1 1268 0076 FF .byte -1 1269 0077 FF .byte -1 1270 0078 FF .byte -1 1271 0079 FF .byte -1 1272 007a FF .byte -1 1273 007b FF .byte -1 1274 007c FF .byte -1 1275 007d FF .byte -1 1276 007e FF .byte -1 1277 007f FF .byte -1 1278 0080 FF .byte -1 1279 0081 F9 .byte -7 1280 0082 F3 .byte -13 1281 0083 ED .byte -19 1282 0084 E7 .byte -25 1283 0085 E1 .byte -31 1284 0086 DB .byte -37 1285 0087 D5 .byte -43 1286 0088 CF .byte -49 1287 0089 C9 .byte -55 1288 008a C3 .byte -61 1289 008b BD .byte -67 1290 008c B7 .byte -73 1291 008d B1 .byte -79 1292 008e AB .byte -85 1293 008f A5 .byte -91 1294 0090 9F .byte -97 1295 0091 99 .byte -103 1296 0092 93 .byte -109 1297 0093 8D .byte -115 1298 0094 87 .byte -121 1299 0095 81 .byte -127 1300 0096 7B .byte 123 1301 0097 75 .byte 117 1302 0098 6F .byte 111 1303 0099 69 .byte 105 1304 009a 63 .byte 99 1305 009b 5D .byte 93 1306 009c 57 .byte 87 1307 009d 51 .byte 81 1308 009e 4B .byte 75 1309 009f 45 .byte 69 1310 00a0 3F .byte 63 1311 00a1 39 .byte 57 1312 00a2 33 .byte 51 1313 00a3 2D .byte 45 1314 00a4 27 .byte 39 1315 00a5 21 .byte 33 1316 00a6 1B .byte 27 1317 00a7 15 .byte 21 1318 00a8 0F .byte 15 1319 00a9 09 .byte 9 GAS LISTING /tmp/cceI9NM3.s page 26 1320 00aa 00 .byte 0 1321 00ab 00 .byte 0 1322 00ac 00 .byte 0 1323 00ad 00 .byte 0 1324 00ae 00 .byte 0 1325 00af 00 .byte 0 1326 00b0 00 .byte 0 1327 00b1 00 .byte 0 1328 00b2 00 .byte 0 1329 00b3 00 .byte 0 1330 00b4 00 .byte 0 1331 00b5 00 .byte 0 1332 00b6 00 .byte 0 1333 00b7 00 .byte 0 1334 00b8 00 .byte 0 1335 00b9 00 .byte 0 1336 00ba 00 .byte 0 1337 00bb 00 .byte 0 1338 00bc 00 .byte 0 1339 00bd 00 .byte 0 1340 00be 00 .byte 0 1341 00bf 00 .byte 0 1342 00c0 00 .byte 0 1343 00c1 00 .byte 0 1344 00c2 00 .byte 0 1345 00c3 00 .byte 0 1346 00c4 00 .byte 0 1347 00c5 00 .byte 0 1348 00c6 00 .byte 0 1349 00c7 00 .byte 0 1350 00c8 00 .byte 0 1351 00c9 00 .byte 0 1352 00ca 00 .byte 0 1353 00cb 00 .byte 0 1354 00cc 00 .byte 0 1355 00cd 00 .byte 0 1356 00ce 00 .byte 0 1357 00cf 00 .byte 0 1358 00d0 00 .byte 0 1359 00d1 00 .byte 0 1360 00d2 00 .byte 0 1361 00d3 00 .byte 0 1362 00d4 00 .byte 0 1363 00d5 00 .byte 0 1364 00d6 00 .byte 0 1365 00d7 00 .byte 0 1366 00d8 00 .byte 0 1367 00d9 00 .byte 0 1368 00da 00 .byte 0 1369 00db 00 .byte 0 1370 00dc 00 .byte 0 1371 00dd 00 .byte 0 1372 00de 00 .byte 0 1373 00df 00 .byte 0 1374 00e0 00 .byte 0 1375 00e1 00 .byte 0 1376 00e2 00 .byte 0 GAS LISTING /tmp/cceI9NM3.s page 27 1377 00e3 00 .byte 0 1378 00e4 00 .byte 0 1379 00e5 00 .byte 0 1380 00e6 00 .byte 0 1381 00e7 00 .byte 0 1382 00e8 00 .byte 0 1383 00e9 00 .byte 0 1384 00ea 00 .byte 0 1385 00eb 00 .byte 0 1386 00ec 00 .byte 0 1387 00ed 00 .byte 0 1388 00ee 00 .byte 0 1389 00ef 00 .byte 0 1390 00f0 00 .byte 0 1391 00f1 00 .byte 0 1392 00f2 00 .byte 0 1393 00f3 00 .byte 0 1394 00f4 00 .byte 0 1395 00f5 00 .byte 0 1396 00f6 00 .byte 0 1397 00f7 00 .byte 0 1398 00f8 00 .byte 0 1399 00f9 00 .byte 0 1400 00fa 00 .byte 0 1401 00fb 00 .byte 0 1402 00fc 00 .byte 0 1403 00fd 00 .byte 0 1404 00fe 00 .byte 0 1405 00ff 00 .byte 0 1415 .text 1417 .Letext0: 1418 .ident "GCC: (GNU) 4.8.1" 1419 .global __do_copy_data 1420 .global __do_clear_bss GAS LISTING /tmp/cceI9NM3.s page 28 DEFINED SYMBOLS *ABS*:0000000000000000 test.c /tmp/cceI9NM3.s:2 *ABS*:000000000000003e __SP_H__ /tmp/cceI9NM3.s:3 *ABS*:000000000000003d __SP_L__ /tmp/cceI9NM3.s:4 *ABS*:000000000000003f __SREG__ /tmp/cceI9NM3.s:5 *ABS*:0000000000000000 __tmp_reg__ /tmp/cceI9NM3.s:6 *ABS*:0000000000000001 __zero_reg__ /tmp/cceI9NM3.s:113 .text:0000000000000000 delay_ms /tmp/cceI9NM3.s:177 .text:0000000000000030 __vector_2 /tmp/cceI9NM3.s:201 .text:0000000000000032 __vector_3 /tmp/cceI9NM3.s:225 .text:0000000000000034 __vector_7 *COM*:0000000000000002 overflow /tmp/cceI9NM3.s:265 .text:000000000000005c ReadTouch /tmp/cceI9NM3.s:1127 .data:0000000000000024 tMask /tmp/cceI9NM3.s:1107 .data:000000000000000c tMASKs /tmp/cceI9NM3.s:1137 .data:000000000000002a tDDRs *COM*:000000000000000c tBaselines /tmp/cceI9NM3.s:419 .text:000000000000010e InitPin /tmp/cceI9NM3.s:532 .text:0000000000000182 InitPins /tmp/cceI9NM3.s:1097 .data:0000000000000000 tPUEs /tmp/cceI9NM3.s:629 .text.startup:0000000000000000 main *COM*:000000000000000c tPins /tmp/cceI9NM3.s:1117 .data:0000000000000018 tPORTs /tmp/cceI9NM3.s:1149 .progmem.data:0000000000000000 huetable UNDEFINED SYMBOLS setup_spi __do_copy_data __do_clear_bss GAS LISTING /tmp/cceI9NM3.s page 1 1 .file "avr_print.c" 2 __SP_H__ = 0x3e 3 __SP_L__ = 0x3d 4 __SREG__ = 0x3f 5 __tmp_reg__ = 0 6 __zero_reg__ = 1 9 .text 10 .Ltext0: 114 .global sendchr 116 sendchr: 117 .stabd 46,0,0 1:avr_print.c **** /* AVR PRINTING (C) 2011 <>< Charles Lohr - This file may be licensed under the MIT/x11 or New BSD 2:avr_print.c **** //Use tinyispterm to use this: https://github.com/cnlohr/tinyispterm 3:avr_print.c **** 4:avr_print.c **** #include 5:avr_print.c **** #include 6:avr_print.c **** #include 7:avr_print.c **** #include 8:avr_print.c **** #include 9:avr_print.c **** 10:avr_print.c **** #ifndef MUTE_PRINTF 11:avr_print.c **** 12:avr_print.c **** #if defined (__AVR_ATtiny2313__) || defined (__AVR_ATtiny2313A__) 13:avr_print.c **** #define SPI_DDR_SET {DDRB&=0x1F;DDRB|=0x40;} 14:avr_print.c **** #define SPI_TINY 15:avr_print.c **** #define SPI_USI 16:avr_print.c **** 17:avr_print.c **** #elif defined (__AVR_ATtiny261__) || defined (__AVR_ATtiny261A__) 18:avr_print.c **** #define SPI_DDR_SET {DDRA&=0xFA;DDRA|=0x02;} 19:avr_print.c **** #define SPI_TINY 20:avr_print.c **** 21:avr_print.c **** #elif defined (__AVR_ATtiny44__) || defined (__AVR_ATtiny44A__) || \ 22:avr_print.c **** defined (__AVR_ATtiny24__) || defined (__AVR_ATtiny24A__) || \ 23:avr_print.c **** defined (__AVR_ATtiny84__) || defined (__AVR_ATtiny84A__) 24:avr_print.c **** #define SPI_DDR_SET { DDRA&=0xAF;DDRA|=0x20; } 25:avr_print.c **** #define SPI_TINY 26:avr_print.c **** #define SPI_USI 27:avr_print.c **** 28:avr_print.c **** #elif defined (__AVR_ATmega32U2__) || defined( __AVR_ATmega8U2__ ) 29:avr_print.c **** #define SPI_MEGA 30:avr_print.c **** #define SPI_DDR_SET { DDRB |= _BV(3); DDRB &= ~(_BV(0)|_BV(1)|_BV(2)); } 31:avr_print.c **** 32:avr_print.c **** 33:avr_print.c **** #elif defined (__AVR_ATmega168__) || defined( __AVR_ATmega328__) 34:avr_print.c **** #define SPI_DDR_SET {DDRB&=0xD3;DDRB|=0x10;} 35:avr_print.c **** #define SPI_MEGA 36:avr_print.c **** 37:avr_print.c **** 38:avr_print.c **** #elif defined (__AVR_ATtiny441__) || defined (__AVR_ATtiny441A__) 39:avr_print.c **** #define SPI_DDR_SET {DDRA&=0xAF;DDRA|=0x20;} 40:avr_print.c **** #define SPI_MEGA 41:avr_print.c **** #define CUSTOM_VECTOR SPI_vect 42:avr_print.c **** 43:avr_print.c **** #else 44:avr_print.c **** #error UNDEFINED PIN ASSIGNMENTS 45:avr_print.c **** 46:avr_print.c **** #endif GAS LISTING /tmp/cceI9NM3.s page 2 47:avr_print.c **** 48:avr_print.c **** //OPTIONAL!!! 49:avr_print.c **** //#ifdef SPI_TINY 50:avr_print.c **** //#define USE_SPI_INTERRUPT 51:avr_print.c **** //#endif 52:avr_print.c **** 53:avr_print.c **** 54:avr_print.c **** #ifdef USE_SPI_INTERRUPT 55:avr_print.c **** 56:avr_print.c **** volatile unsigned char ThisCharToSend = 0; 57:avr_print.c **** volatile unsigned char BackChar = 0; 58:avr_print.c **** #ifdef SPI_MEGA 59:avr_print.c **** 60:avr_print.c **** #ifndef CUSTOM_VECTOR 61:avr_print.c **** ISR( SPI_STC_vect ) 62:avr_print.c **** #else 63:avr_print.c **** ISR( CUSTOM_VECTOR ) 64:avr_print.c **** #endif 65:avr_print.c **** { 66:avr_print.c **** BackChar = SPDR; 67:avr_print.c **** SPDR = ThisCharToSend; 68:avr_print.c **** ThisCharToSend = 0; 69:avr_print.c **** } 70:avr_print.c **** #elif defined( SPI_TINY ) 71:avr_print.c **** ISR( USI_OVF_vect ) 72:avr_print.c **** { 73:avr_print.c **** USIBR = ThisCharToSend; 74:avr_print.c **** ThisCharToSend = 0; 75:avr_print.c **** USISR |= (1<>4 ); 113:avr_print.c **** sendhex1( i&0x0f ); 114:avr_print.c **** } 115:avr_print.c **** void sendhex4( unsigned int i ) 116:avr_print.c **** { 117:avr_print.c **** sendhex2( i>>8 ); 118:avr_print.c **** sendhex2( i&0xFF); 119:avr_print.c **** } 120:avr_print.c **** 121:avr_print.c **** 122:avr_print.c **** static int SPIPutCharInternal(char c, FILE *stream) 123:avr_print.c **** { 149 .LM4: 150 .LFBB2: 151 /* prologue: function */ 152 /* frame size = 0 */ 153 /* stack size = 0 */ 154 .L__stack_usage = 0 124:avr_print.c **** sendchr( c ); 156 .LM5: 157 000e 00D0 rcall sendchr 125:avr_print.c **** return 0; 126:avr_print.c **** } 159 .LM6: 160 0010 80E0 ldi r24,0 161 0012 90E0 ldi r25,0 162 0014 0895 ret 164 .Lscope2: 166 .stabd 78,0,0 GAS LISTING /tmp/cceI9NM3.s page 4 169 .global sendhex1 171 sendhex1: 172 .stabd 46,0,0 107:avr_print.c **** sendchr( (i<10)?(i+'0'):(i+'A'-10) ); 174 .LM7: 175 .LFBB3: 176 /* prologue: function */ 177 /* frame size = 0 */ 178 /* stack size = 0 */ 179 .L__stack_usage = 0 108:avr_print.c **** } 181 .LM8: 182 0016 8A30 cpi r24,lo8(10) 183 0018 00F4 brsh .L7 108:avr_print.c **** } 185 .LM9: 186 001a 805D subi r24,lo8(-(48)) 187 001c 00C0 rjmp .L8 188 .L7: 108:avr_print.c **** } 190 .LM10: 191 001e 895C subi r24,lo8(-(55)) 192 .L8: 108:avr_print.c **** } 194 .LM11: 195 0020 00C0 rjmp sendchr 197 .Lscope3: 199 .stabd 78,0,0 202 .global sendhex2 204 sendhex2: 205 .stabd 46,0,0 111:avr_print.c **** sendhex1( i>>4 ); 207 .LM12: 208 .LFBB4: 209 0022 CF93 push r28 210 /* prologue: function */ 211 /* frame size = 0 */ 212 /* stack size = 1 */ 213 .L__stack_usage = 1 214 0024 C82F mov r28,r24 112:avr_print.c **** sendhex1( i&0x0f ); 216 .LM13: 217 0026 8295 swap r24 218 0028 8F70 andi r24,lo8(15) 219 002a 00D0 rcall sendhex1 113:avr_print.c **** } 221 .LM14: 222 002c 8C2F mov r24,r28 223 002e 8F70 andi r24,lo8(15) 224 /* epilogue start */ 114:avr_print.c **** void sendhex4( unsigned int i ) 226 .LM15: 227 0030 CF91 pop r28 113:avr_print.c **** } 229 .LM16: 230 0032 00C0 rjmp sendhex1 232 .Lscope4: GAS LISTING /tmp/cceI9NM3.s page 5 234 .stabd 78,0,0 236 .global sendhex4 238 sendhex4: 239 .stabd 46,0,0 116:avr_print.c **** sendhex2( i>>8 ); 241 .LM17: 242 .LFBB5: 243 0034 CF93 push r28 244 /* prologue: function */ 245 /* frame size = 0 */ 246 /* stack size = 1 */ 247 .L__stack_usage = 1 248 0036 C82F mov r28,r24 117:avr_print.c **** sendhex2( i&0xFF); 250 .LM18: 251 0038 892F mov r24,r25 252 003a 00D0 rcall sendhex2 118:avr_print.c **** } 254 .LM19: 255 003c 8C2F mov r24,r28 256 /* epilogue start */ 119:avr_print.c **** 258 .LM20: 259 003e CF91 pop r28 118:avr_print.c **** } 261 .LM21: 262 0040 00C0 rjmp sendhex2 264 .Lscope5: 266 .stabd 78,0,0 268 .global setup_spi 270 setup_spi: 271 .stabd 46,0,0 127:avr_print.c **** 128:avr_print.c **** static FILE mystdout = FDEV_SETUP_STREAM( SPIPutCharInternal, NULL, _FDEV_SETUP_WRITE ); 129:avr_print.c **** 130:avr_print.c **** 131:avr_print.c **** void setup_spi( void ) 132:avr_print.c **** { 273 .LM22: 274 .LFBB6: 275 /* prologue: function */ 276 /* frame size = 0 */ 277 /* stack size = 0 */ 278 .L__stack_usage = 0 133:avr_print.c **** SPI_DDR_SET; 280 .LM23: 281 0042 8AB3 in r24,0x1a 282 0044 8F7A andi r24,lo8(-81) 283 0046 8ABB out 0x1a,r24 284 0048 D59A sbi 0x1a,5 134:avr_print.c **** 135:avr_print.c **** #ifdef SPI_TINY 136:avr_print.c **** USICR = (1<