Add lss file for cpp_obj program master
authorKevin Rosenberg <kevin@rosenberg.net>
Sun, 13 Jun 2010 19:30:23 +0000 (13:30 -0600)
committerKevin Rosenberg <kevin@rosenberg.net>
Sun, 13 Jun 2010 19:30:23 +0000 (13:30 -0600)
gcc_cpp_obj/serial_lcd_obj.lss [new file with mode: 0644]

diff --git a/gcc_cpp_obj/serial_lcd_obj.lss b/gcc_cpp_obj/serial_lcd_obj.lss
new file mode 100644 (file)
index 0000000..219b771
--- /dev/null
@@ -0,0 +1,1343 @@
+
+serial_lcd_obj.elf:     file format elf32-avr
+
+Sections:
+Idx Name          Size      VMA       LMA       File off  Algn
+  0 .text         00000636  00000000  00000000  00000094  2**1
+                  CONTENTS, ALLOC, LOAD, READONLY, CODE
+  1 .data         0000000c  00800060  00000636  000006ca  2**0
+                  CONTENTS, ALLOC, LOAD, DATA
+  2 .bss          00000048  0080006c  0080006c  000006d6  2**0
+                  ALLOC
+  3 .stab         0000069c  00000000  00000000  000006d8  2**2
+                  CONTENTS, READONLY, DEBUGGING
+  4 .stabstr      00000082  00000000  00000000  00000d74  2**0
+                  CONTENTS, READONLY, DEBUGGING
+  5 .debug_aranges 00000020  00000000  00000000  00000df6  2**0
+                  CONTENTS, READONLY, DEBUGGING
+  6 .debug_pubnames 000000bb  00000000  00000000  00000e16  2**0
+                  CONTENTS, READONLY, DEBUGGING
+  7 .debug_info   00001272  00000000  00000000  00000ed1  2**0
+                  CONTENTS, READONLY, DEBUGGING
+  8 .debug_abbrev 000003db  00000000  00000000  00002143  2**0
+                  CONTENTS, READONLY, DEBUGGING
+  9 .debug_line   00000767  00000000  00000000  0000251e  2**0
+                  CONTENTS, READONLY, DEBUGGING
+ 10 .debug_frame  00000080  00000000  00000000  00002c88  2**2
+                  CONTENTS, READONLY, DEBUGGING
+ 11 .debug_str    00000940  00000000  00000000  00002d08  2**0
+                  CONTENTS, READONLY, DEBUGGING
+ 12 .debug_loc    000001fd  00000000  00000000  00003648  2**0
+                  CONTENTS, READONLY, DEBUGGING
+ 13 .debug_ranges 00000078  00000000  00000000  00003845  2**0
+                  CONTENTS, READONLY, DEBUGGING
+
+Disassembly of section .text:
+
+00000000 <__vectors>:
+   0:  12 c0           rjmp    .+36            ; 0x26 <__ctors_end>
+   2:  2a c0           rjmp    .+84            ; 0x58 <__bad_interrupt>
+   4:  29 c0           rjmp    .+82            ; 0x58 <__bad_interrupt>
+   6:  28 c0           rjmp    .+80            ; 0x58 <__bad_interrupt>
+   8:  27 c0           rjmp    .+78            ; 0x58 <__bad_interrupt>
+   a:  26 c0           rjmp    .+76            ; 0x58 <__bad_interrupt>
+   c:  25 c0           rjmp    .+74            ; 0x58 <__bad_interrupt>
+   e:  8b c2           rjmp    .+1302          ; 0x526 <__vector_7>
+  10:  23 c0           rjmp    .+70            ; 0x58 <__bad_interrupt>
+  12:  22 c0           rjmp    .+68            ; 0x58 <__bad_interrupt>
+  14:  21 c0           rjmp    .+66            ; 0x58 <__bad_interrupt>
+  16:  20 c0           rjmp    .+64            ; 0x58 <__bad_interrupt>
+  18:  1f c0           rjmp    .+62            ; 0x58 <__bad_interrupt>
+  1a:  a9 c2           rjmp    .+1362          ; 0x56e <__vector_13>
+  1c:  1d c0           rjmp    .+58            ; 0x58 <__bad_interrupt>
+  1e:  1c c0           rjmp    .+56            ; 0x58 <__bad_interrupt>
+  20:  1b c0           rjmp    .+54            ; 0x58 <__bad_interrupt>
+  22:  1a c0           rjmp    .+52            ; 0x58 <__bad_interrupt>
+  24:  19 c0           rjmp    .+50            ; 0x58 <__bad_interrupt>
+
+00000026 <__ctors_end>:
+  26:  11 24           eor     r1, r1
+  28:  1f be           out     0x3f, r1        ; 63
+  2a:  cf ed           ldi     r28, 0xDF       ; 223
+  2c:  cd bf           out     0x3d, r28       ; 61
+
+0000002e <__do_copy_data>:
+  2e:  10 e0           ldi     r17, 0x00       ; 0
+  30:  a0 e6           ldi     r26, 0x60       ; 96
+  32:  b0 e0           ldi     r27, 0x00       ; 0
+  34:  e6 e3           ldi     r30, 0x36       ; 54
+  36:  f6 e0           ldi     r31, 0x06       ; 6
+  38:  02 c0           rjmp    .+4             ; 0x3e <.do_copy_data_start>
+
+0000003a <.do_copy_data_loop>:
+  3a:  05 90           lpm     r0, Z+
+  3c:  0d 92           st      X+, r0
+
+0000003e <.do_copy_data_start>:
+  3e:  ac 36           cpi     r26, 0x6C       ; 108
+  40:  b1 07           cpc     r27, r17
+  42:  d9 f7           brne    .-10            ; 0x3a <.do_copy_data_loop>
+
+00000044 <__do_clear_bss>:
+  44:  10 e0           ldi     r17, 0x00       ; 0
+  46:  ac e6           ldi     r26, 0x6C       ; 108
+  48:  b0 e0           ldi     r27, 0x00       ; 0
+  4a:  01 c0           rjmp    .+2             ; 0x4e <.do_clear_bss_start>
+
+0000004c <.do_clear_bss_loop>:
+  4c:  1d 92           st      X+, r1
+
+0000004e <.do_clear_bss_start>:
+  4e:  a4 3b           cpi     r26, 0xB4       ; 180
+  50:  b1 07           cpc     r27, r17
+  52:  e1 f7           brne    .-8             ; 0x4c <.do_clear_bss_loop>
+  54:  1e d1           rcall   .+572           ; 0x292 <main>
+  56:  ed c2           rjmp    .+1498          ; 0x632 <_exit>
+
+00000058 <__bad_interrupt>:
+  58:  d3 cf           rjmp    .-90            ; 0x0 <__vectors>
+
+0000005a <_ZN3Lcd8busyWaitEv>:
+  *m_ctrlPort |= (1<<m_ePin);
+  ENABLE_WAIT();
+  *m_ctrlPort &= ~(1<<m_ePin);
+}
+
+unsigned char Lcd::busyWait (void) {
+  5a:  dc 01           movw    r26, r24
+  unsigned char LCDStatus; 
+  *m_dataDir = 0x00; // Set LCD data port to inputs
+  5c:  16 96           adiw    r26, 0x06       ; 6
+  5e:  ed 91           ld      r30, X+
+  60:  fc 91           ld      r31, X
+  62:  17 97           sbiw    r26, 0x07       ; 7
+  64:  10 82           st      Z, r1
+  *m_ctrlPort |= (1<<m_rwPin);
+  66:  ed 91           ld      r30, X+
+  68:  fc 91           ld      r31, X
+  6a:  11 97           sbiw    r26, 0x01       ; 1
+  6c:  20 81           ld      r18, Z
+  6e:  81 e0           ldi     r24, 0x01       ; 1
+  70:  90 e0           ldi     r25, 0x00       ; 0
+  72:  1b 96           adiw    r26, 0x0b       ; 11
+  74:  0c 90           ld      r0, X
+  76:  1b 97           sbiw    r26, 0x0b       ; 11
+  78:  02 c0           rjmp    .+4             ; 0x7e <_ZN3Lcd8busyWaitEv+0x24>
+  7a:  88 0f           add     r24, r24
+  7c:  99 1f           adc     r25, r25
+  7e:  0a 94           dec     r0
+  80:  e2 f7           brpl    .-8             ; 0x7a <_ZN3Lcd8busyWaitEv+0x20>
+  82:  28 2b           or      r18, r24
+  84:  20 83           st      Z, r18
+  NOP();
+  86:  00 00           nop
+  do {
+    Watchdog::reset();
+    *m_ctrlPort |= (1<<m_ePin);        
+  88:  61 e0           ldi     r22, 0x01       ; 1
+  8a:  70 e0           ldi     r23, 0x00       ; 0
+    WDTCSR &= ~(1<<WDCE);
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void reset(void)) { 
+    wdt_reset(); 
+  8c:  a8 95           wdr
+  *m_dataDir = 0x00; // Set LCD data port to inputs
+  *m_ctrlPort |= (1<<m_rwPin);
+  NOP();
+  do {
+    Watchdog::reset();
+    *m_ctrlPort |= (1<<m_ePin);        
+  8e:  ed 91           ld      r30, X+
+  90:  fc 91           ld      r31, X
+  92:  11 97           sbiw    r26, 0x01       ; 1
+  94:  20 81           ld      r18, Z
+  96:  41 e0           ldi     r20, 0x01       ; 1
+  98:  50 e0           ldi     r21, 0x00       ; 0
+  9a:  cb 01           movw    r24, r22
+  9c:  1c 96           adiw    r26, 0x0c       ; 12
+  9e:  0c 90           ld      r0, X
+  a0:  1c 97           sbiw    r26, 0x0c       ; 12
+  a2:  02 c0           rjmp    .+4             ; 0xa8 <_ZN3Lcd8busyWaitEv+0x4e>
+  a4:  88 0f           add     r24, r24
+  a6:  99 1f           adc     r25, r25
+  a8:  0a 94           dec     r0
+  aa:  e2 f7           brpl    .-8             ; 0xa4 <_ZN3Lcd8busyWaitEv+0x4a>
+  ac:  28 2b           or      r18, r24
+  ae:  20 83           st      Z, r18
+  #else
+    #define ENABLE_WAIT() __delay_cycles(4);
+  #endif
+#elif defined(__GNUC__)
+  static __inline__ void _NOP1 (void) { __asm__ volatile ( "nop    " "\n\t" ); }
+  static __inline__ void _NOP2 (void) { __asm__ volatile ( "rjmp 1f" "\n\t"  "1:" "\n\t" ); }
+  b0:  00 c0           rjmp    .+0             ; 0xb2 <_ZN3Lcd8busyWaitEv+0x58>
+    ENABLE_WAIT();
+    LCDStatus = *m_dataPinReg;
+  b2:  00 c0           rjmp    .+0             ; 0xb4 <_ZN3Lcd8busyWaitEv+0x5a>
+  b4:  18 96           adiw    r26, 0x08       ; 8
+  b6:  ed 91           ld      r30, X+
+  b8:  fc 91           ld      r31, X
+  ba:  19 97           sbiw    r26, 0x09       ; 9
+  bc:  30 81           ld      r19, Z
+    *m_ctrlPort &= ~(1<<m_ePin);
+  be:  ed 91           ld      r30, X+
+  c0:  fc 91           ld      r31, X
+  c2:  11 97           sbiw    r26, 0x01       ; 1
+  c4:  20 81           ld      r18, Z
+  c6:  cb 01           movw    r24, r22
+  c8:  1c 96           adiw    r26, 0x0c       ; 12
+  ca:  0c 90           ld      r0, X
+  cc:  1c 97           sbiw    r26, 0x0c       ; 12
+  ce:  02 c0           rjmp    .+4             ; 0xd4 <_ZN3Lcd8busyWaitEv+0x7a>
+  d0:  88 0f           add     r24, r24
+  d2:  99 1f           adc     r25, r25
+  d4:  0a 94           dec     r0
+  d6:  e2 f7           brpl    .-8             ; 0xd0 <_ZN3Lcd8busyWaitEv+0x76>
+  d8:  80 95           com     r24
+  da:  82 23           and     r24, r18
+  dc:  80 83           st      Z, r24
+unsigned char Lcd::busyWait (void) {
+  unsigned char LCDStatus; 
+  *m_dataDir = 0x00; // Set LCD data port to inputs
+  *m_ctrlPort |= (1<<m_rwPin);
+  NOP();
+  do {
+  de:  37 fd           sbrc    r19, 7
+  e0:  d5 cf           rjmp    .-86            ; 0x8c <_ZN3Lcd8busyWaitEv+0x32>
+    *m_ctrlPort |= (1<<m_ePin);        
+    ENABLE_WAIT();
+    LCDStatus = *m_dataPinReg;
+    *m_ctrlPort &= ~(1<<m_ePin);
+  } while (LCDStatus & (1<<LCD_BUSY));
+  *m_ctrlPort &= ~(1<<m_rwPin);        
+  e2:  ed 91           ld      r30, X+
+  e4:  fc 91           ld      r31, X
+  e6:  11 97           sbiw    r26, 0x01       ; 1
+  e8:  90 81           ld      r25, Z
+  ea:  1b 96           adiw    r26, 0x0b       ; 11
+  ec:  0c 90           ld      r0, X
+  ee:  1b 97           sbiw    r26, 0x0b       ; 11
+  f0:  02 c0           rjmp    .+4             ; 0xf6 <__stack+0x17>
+  f2:  44 0f           add     r20, r20
+  f4:  55 1f           adc     r21, r21
+  f6:  0a 94           dec     r0
+  f8:  e2 f7           brpl    .-8             ; 0xf2 <__stack+0x13>
+  fa:  84 2f           mov     r24, r20
+  fc:  80 95           com     r24
+  fe:  89 23           and     r24, r25
+ 100:  80 83           st      Z, r24
+  *m_dataDir = 0xFF; // Set LCD data port to default output state
+ 102:  16 96           adiw    r26, 0x06       ; 6
+ 104:  ed 91           ld      r30, X+
+ 106:  fc 91           ld      r31, X
+ 108:  17 97           sbiw    r26, 0x07       ; 7
+ 10a:  8f ef           ldi     r24, 0xFF       ; 255
+ 10c:  80 83           st      Z, r24
+  return (LCDStatus);
+}               
+ 10e:  83 2f           mov     r24, r19
+ 110:  08 95           ret
+
+00000112 <_ZN3Lcd7putCharEh>:
+  *m_ctrlPort &= ~(1<<m_ePin);
+  NOP();
+  *m_ctrlPort |= (1<<m_rsPin);
+}
+
+void Lcd::putChar (unsigned char c) {
+ 112:  df 92           push    r13
+ 114:  ef 92           push    r14
+ 116:  ff 92           push    r15
+ 118:  0f 93           push    r16
+ 11a:  1f 93           push    r17
+ 11c:  7c 01           movw    r14, r24
+ 11e:  d6 2e           mov     r13, r22
+  *m_ctrlPort &= ~(1<<m_rsPin);
+ 120:  dc 01           movw    r26, r24
+ 122:  ed 91           ld      r30, X+
+ 124:  fc 91           ld      r31, X
+ 126:  11 97           sbiw    r26, 0x01       ; 1
+ 128:  20 81           ld      r18, Z
+ 12a:  01 e0           ldi     r16, 0x01       ; 1
+ 12c:  10 e0           ldi     r17, 0x00       ; 0
+ 12e:  c8 01           movw    r24, r16
+ 130:  1a 96           adiw    r26, 0x0a       ; 10
+ 132:  0c 90           ld      r0, X
+ 134:  02 c0           rjmp    .+4             ; 0x13a <_ZN3Lcd7putCharEh+0x28>
+ 136:  88 0f           add     r24, r24
+ 138:  99 1f           adc     r25, r25
+ 13a:  0a 94           dec     r0
+ 13c:  e2 f7           brpl    .-8             ; 0x136 <_ZN3Lcd7putCharEh+0x24>
+ 13e:  80 95           com     r24
+ 140:  82 23           and     r24, r18
+ 142:  80 83           st      Z, r24
+  busyWait();
+ 144:  c7 01           movw    r24, r14
+ 146:  89 df           rcall   .-238           ; 0x5a <_ZN3Lcd8busyWaitEv>
+  *m_ctrlPort |= (1<<m_rsPin);
+ 148:  d7 01           movw    r26, r14
+ 14a:  ed 91           ld      r30, X+
+ 14c:  fc 91           ld      r31, X
+ 14e:  11 97           sbiw    r26, 0x01       ; 1
+ 150:  20 81           ld      r18, Z
+ 152:  c8 01           movw    r24, r16
+ 154:  1a 96           adiw    r26, 0x0a       ; 10
+ 156:  0c 90           ld      r0, X
+ 158:  1a 97           sbiw    r26, 0x0a       ; 10
+ 15a:  02 c0           rjmp    .+4             ; 0x160 <_ZN3Lcd7putCharEh+0x4e>
+ 15c:  88 0f           add     r24, r24
+ 15e:  99 1f           adc     r25, r25
+ 160:  0a 94           dec     r0
+ 162:  e2 f7           brpl    .-8             ; 0x15c <_ZN3Lcd7putCharEh+0x4a>
+ 164:  28 2b           or      r18, r24
+ 166:  20 83           st      Z, r18
+  *m_dataPort = c;
+ 168:  14 96           adiw    r26, 0x04       ; 4
+ 16a:  ed 91           ld      r30, X+
+ 16c:  fc 91           ld      r31, X
+ 16e:  15 97           sbiw    r26, 0x05       ; 5
+ 170:  d0 82           st      Z, r13
+  NOP();
+ 172:  00 00           nop
+  *m_ctrlPort |= (1<<m_ePin);
+ 174:  ed 91           ld      r30, X+
+ 176:  fc 91           ld      r31, X
+ 178:  11 97           sbiw    r26, 0x01       ; 1
+ 17a:  20 81           ld      r18, Z
+ 17c:  c8 01           movw    r24, r16
+ 17e:  1c 96           adiw    r26, 0x0c       ; 12
+ 180:  0c 90           ld      r0, X
+ 182:  1c 97           sbiw    r26, 0x0c       ; 12
+ 184:  02 c0           rjmp    .+4             ; 0x18a <_ZN3Lcd7putCharEh+0x78>
+ 186:  88 0f           add     r24, r24
+ 188:  99 1f           adc     r25, r25
+ 18a:  0a 94           dec     r0
+ 18c:  e2 f7           brpl    .-8             ; 0x186 <_ZN3Lcd7putCharEh+0x74>
+ 18e:  28 2b           or      r18, r24
+ 190:  20 83           st      Z, r18
+ 192:  00 c0           rjmp    .+0             ; 0x194 <_ZN3Lcd7putCharEh+0x82>
+  ENABLE_WAIT();
+  *m_ctrlPort &= ~(1<<m_ePin);
+ 194:  00 c0           rjmp    .+0             ; 0x196 <_ZN3Lcd7putCharEh+0x84>
+ 196:  ed 91           ld      r30, X+
+ 198:  fc 91           ld      r31, X
+ 19a:  11 97           sbiw    r26, 0x01       ; 1
+ 19c:  80 81           ld      r24, Z
+ 19e:  1c 96           adiw    r26, 0x0c       ; 12
+ 1a0:  0c 90           ld      r0, X
+ 1a2:  02 c0           rjmp    .+4             ; 0x1a8 <_ZN3Lcd7putCharEh+0x96>
+ 1a4:  00 0f           add     r16, r16
+ 1a6:  11 1f           adc     r17, r17
+ 1a8:  0a 94           dec     r0
+ 1aa:  e2 f7           brpl    .-8             ; 0x1a4 <_ZN3Lcd7putCharEh+0x92>
+ 1ac:  00 95           com     r16
+ 1ae:  08 23           and     r16, r24
+ 1b0:  00 83           st      Z, r16
+}
+ 1b2:  1f 91           pop     r17
+ 1b4:  0f 91           pop     r16
+ 1b6:  ff 90           pop     r15
+ 1b8:  ef 90           pop     r14
+ 1ba:  df 90           pop     r13
+ 1bc:  08 95           ret
+
+000001be <_ZN3Lcd6putCmdEh>:
+  void putChar(unsigned char ch);
+  void putCmd(unsigned char ch);
+
+};
+
+void Lcd::putCmd (unsigned char Cmd) {
+ 1be:  df 92           push    r13
+ 1c0:  ef 92           push    r14
+ 1c2:  ff 92           push    r15
+ 1c4:  0f 93           push    r16
+ 1c6:  1f 93           push    r17
+ 1c8:  8c 01           movw    r16, r24
+ 1ca:  d6 2e           mov     r13, r22
+  *m_ctrlPort &= ~(1<<m_rsPin);
+ 1cc:  dc 01           movw    r26, r24
+ 1ce:  ed 91           ld      r30, X+
+ 1d0:  fc 91           ld      r31, X
+ 1d2:  11 97           sbiw    r26, 0x01       ; 1
+ 1d4:  20 81           ld      r18, Z
+ 1d6:  81 e0           ldi     r24, 0x01       ; 1
+ 1d8:  e8 2e           mov     r14, r24
+ 1da:  f1 2c           mov     r15, r1
+ 1dc:  c7 01           movw    r24, r14
+ 1de:  1a 96           adiw    r26, 0x0a       ; 10
+ 1e0:  0c 90           ld      r0, X
+ 1e2:  02 c0           rjmp    .+4             ; 0x1e8 <_ZN3Lcd6putCmdEh+0x2a>
+ 1e4:  88 0f           add     r24, r24
+ 1e6:  99 1f           adc     r25, r25
+ 1e8:  0a 94           dec     r0
+ 1ea:  e2 f7           brpl    .-8             ; 0x1e4 <_ZN3Lcd6putCmdEh+0x26>
+ 1ec:  80 95           com     r24
+ 1ee:  82 23           and     r24, r18
+ 1f0:  80 83           st      Z, r24
+  busyWait();
+ 1f2:  c8 01           movw    r24, r16
+ 1f4:  32 df           rcall   .-412           ; 0x5a <_ZN3Lcd8busyWaitEv>
+  *m_dataPort = Cmd;   
+ 1f6:  d8 01           movw    r26, r16
+ 1f8:  14 96           adiw    r26, 0x04       ; 4
+ 1fa:  ed 91           ld      r30, X+
+ 1fc:  fc 91           ld      r31, X
+ 1fe:  15 97           sbiw    r26, 0x05       ; 5
+ 200:  d0 82           st      Z, r13
+  NOP();
+ 202:  00 00           nop
+  *m_ctrlPort |= (1<<m_ePin);
+ 204:  ed 91           ld      r30, X+
+ 206:  fc 91           ld      r31, X
+ 208:  11 97           sbiw    r26, 0x01       ; 1
+ 20a:  20 81           ld      r18, Z
+ 20c:  c7 01           movw    r24, r14
+ 20e:  1c 96           adiw    r26, 0x0c       ; 12
+ 210:  0c 90           ld      r0, X
+ 212:  1c 97           sbiw    r26, 0x0c       ; 12
+ 214:  02 c0           rjmp    .+4             ; 0x21a <_ZN3Lcd6putCmdEh+0x5c>
+ 216:  88 0f           add     r24, r24
+ 218:  99 1f           adc     r25, r25
+ 21a:  0a 94           dec     r0
+ 21c:  e2 f7           brpl    .-8             ; 0x216 <_ZN3Lcd6putCmdEh+0x58>
+ 21e:  28 2b           or      r18, r24
+ 220:  20 83           st      Z, r18
+ 222:  00 c0           rjmp    .+0             ; 0x224 <_ZN3Lcd6putCmdEh+0x66>
+  ENABLE_WAIT();
+  *m_ctrlPort &= ~(1<<m_ePin);
+ 224:  00 c0           rjmp    .+0             ; 0x226 <_ZN3Lcd6putCmdEh+0x68>
+ 226:  ed 91           ld      r30, X+
+ 228:  fc 91           ld      r31, X
+ 22a:  11 97           sbiw    r26, 0x01       ; 1
+ 22c:  20 81           ld      r18, Z
+ 22e:  c7 01           movw    r24, r14
+ 230:  1c 96           adiw    r26, 0x0c       ; 12
+ 232:  0c 90           ld      r0, X
+ 234:  1c 97           sbiw    r26, 0x0c       ; 12
+ 236:  02 c0           rjmp    .+4             ; 0x23c <_ZN3Lcd6putCmdEh+0x7e>
+ 238:  88 0f           add     r24, r24
+ 23a:  99 1f           adc     r25, r25
+ 23c:  0a 94           dec     r0
+ 23e:  e2 f7           brpl    .-8             ; 0x238 <_ZN3Lcd6putCmdEh+0x7a>
+ 240:  80 95           com     r24
+ 242:  82 23           and     r24, r18
+ 244:  80 83           st      Z, r24
+  NOP();
+ 246:  00 00           nop
+  *m_ctrlPort |= (1<<m_rsPin);
+ 248:  ed 91           ld      r30, X+
+ 24a:  fc 91           ld      r31, X
+ 24c:  11 97           sbiw    r26, 0x01       ; 1
+ 24e:  80 81           ld      r24, Z
+ 250:  1a 96           adiw    r26, 0x0a       ; 10
+ 252:  0c 90           ld      r0, X
+ 254:  02 c0           rjmp    .+4             ; 0x25a <_ZN3Lcd6putCmdEh+0x9c>
+ 256:  ee 0c           add     r14, r14
+ 258:  ff 1c           adc     r15, r15
+ 25a:  0a 94           dec     r0
+ 25c:  e2 f7           brpl    .-8             ; 0x256 <_ZN3Lcd6putCmdEh+0x98>
+ 25e:  8e 29           or      r24, r14
+ 260:  80 83           st      Z, r24
+}
+ 262:  1f 91           pop     r17
+ 264:  0f 91           pop     r16
+ 266:  ff 90           pop     r15
+ 268:  ef 90           pop     r14
+ 26a:  df 90           pop     r13
+ 26c:  08 95           ret
+
+0000026e <_ZN4Uart10waitRxCharEv>:
+  }
+
+  unsigned char waitRxChar (void);
+};
+  
+unsigned char Uart::waitRxChar (void) {
+ 26e:  fc 01           movw    r30, r24
+  // waits for next RX character, then return it
+  unsigned char tail;
+  do {
+    tail = m_UartRxTail; // explicitly set order of volatile variable access
+ 270:  91 a9           ldd     r25, Z+49       ; 0x31
+    WDTCSR &= ~(1<<WDCE);
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void reset(void)) { 
+    wdt_reset(); 
+ 272:  a8 95           wdr
+};
+  
+unsigned char Uart::waitRxChar (void) {
+  // waits for next RX character, then return it
+  unsigned char tail;
+  do {
+ 274:  80 a9           ldd     r24, Z+48       ; 0x30
+ 276:  89 17           cp      r24, r25
+ 278:  d9 f3           breq    .-10            ; 0x270 <_ZN4Uart10waitRxCharEv+0x2>
+  //  CTS inactive if byte fills buffer after we remove current byte
+  cli();
+#endif
+
+  // increment tail position 
+  if (tail == UART_RX_BUFFER_SIZE-1)
+ 27a:  9f 32           cpi     r25, 0x2F       ; 47
+ 27c:  11 f4           brne    .+4             ; 0x282 <_ZN4Uart10waitRxCharEv+0x14>
+    m_UartRxTail = 0;
+ 27e:  11 aa           std     Z+49, r1        ; 0x31
+ 280:  03 c0           rjmp    .+6             ; 0x288 <_ZN4Uart10waitRxCharEv+0x1a>
+  else
+    m_UartRxTail++;
+ 282:  81 a9           ldd     r24, Z+49       ; 0x31
+ 284:  8f 5f           subi    r24, 0xFF       ; 255
+ 286:  81 ab           std     Z+49, r24       ; 0x31
+#if USE_CTS
+  CTS_PORT |= (1<<CTS_PIN); // Ensure CTS is active since just removed a byte
+  sei();   // Allow UART ISR to read character and change potentially change CTS
+#endif
+
+  return m_UartRxBuf[m_UartRxTail];
+ 288:  81 a9           ldd     r24, Z+49       ; 0x31
+ 28a:  e8 0f           add     r30, r24
+ 28c:  f1 1d           adc     r31, r1
+ 28e:  80 81           ld      r24, Z
+}
+ 290:  08 95           ret
+
+00000292 <main>:
+  }
+};
+
+
+MAIN_FUNC() {
+  MCUSR = 0; // clear all reset flags
+ 292:  14 be           out     0x34, r1        ; 52
+    WDTCSR &= ~(1<<WDCE);
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void reset(void)) { 
+    wdt_reset(); 
+ 294:  a8 95           wdr
+
+class Watchdog {
+public:
+  INLINE_FUNC_DECLARE(static void init(void)) {
+    reset();
+    WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
+ 296:  81 b5           in      r24, 0x21       ; 33
+ 298:  88 61           ori     r24, 0x18       ; 24
+ 29a:  81 bd           out     0x21, r24       ; 33
+    WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
+ 29c:  89 e2           ldi     r24, 0x29       ; 41
+ 29e:  81 bd           out     0x21, r24       ; 33
+
+
+class SleepMode {
+public:
+  INLINE_FUNC_DECLARE(static void initIdleMode(void)) {
+    MCUCR &= ~((1<<SM1)|(1<<SM0)); // use idle sleep mode
+ 2a0:  85 b7           in      r24, 0x35       ; 53
+ 2a2:  8f 7a           andi    r24, 0xAF       ; 175
+ 2a4:  85 bf           out     0x35, r24       ; 53
+  static const unsigned char UART_PARITY_EVEN = 1;
+  static const unsigned char UART_PARITY_ODD = 2;
+  
+  INLINE_FUNC_DECLARE(void init(void)) {
+    // Default initialization is 8-bit, parity none
+    UCSRB = 0;
+ 2a6:  1a b8           out     0x0a, r1        ; 10
+    UCSRA = 0;
+ 2a8:  1b b8           out     0x0b, r1        ; 11
+    UCSRC = (1<<UCSZ1) | (1<<UCSZ0); // 8 bit data
+ 2aa:  76 e0           ldi     r23, 0x06       ; 6
+ 2ac:  73 b9           out     0x03, r23       ; 3
+
+    // Init circular buffer pointers
+    m_UartRxHead = 0;
+ 2ae:  10 92 b2 00     sts     0x00B2, r1
+    m_UartRxTail = 0;
+ 2b2:  10 92 b3 00     sts     0x00B3, r1
+
+
+INLINE_FUNC_DECLARE(static unsigned char GetBaudDivisor());
+static inline unsigned char GetBaudDivisor() {
+  // Set LCD_control BAUD_J2:BAUD_J1 to inputs 
+  BAUD_DIR &= ~((1<<BAUD_J2) | (1<<BAUD_J1));
+ 2b6:  87 b3           in      r24, 0x17       ; 23
+ 2b8:  83 7f           andi    r24, 0xF3       ; 243
+ 2ba:  87 bb           out     0x17, r24       ; 23
+  // Set BAUD_J2:BAUD_J1 PULL-UPS active
+  BAUD_PORT |= (1<<BAUD_J2) | (1<<BAUD_J1);
+ 2bc:  42 e3           ldi     r20, 0x32       ; 50
+ 2be:  50 e0           ldi     r21, 0x00       ; 0
+ 2c0:  82 b3           in      r24, 0x12       ; 18
+ 2c2:  8c 60           ori     r24, 0x0C       ; 12
+ 2c4:  82 bb           out     0x12, r24       ; 18
+
+  // Get BAUD rate jumper settings        
+  unsigned char BaudSelectJumpersValue  = BAUD_PIN_REG;
+ 2c6:  e0 b3           in      r30, 0x10       ; 16
+  BaudSelectJumpersValue &= (1<<BAUD_J2) | (1<<BAUD_J1);
+  // BAUD_J2 = PD.3, BAUD_J1 = PD.2
+  // This is two bits too far to the left and the array index will
+  // increment by 4, instead of 1.
+  // Shift BAUD_J2 & BAUD_J1 right by two bit positions for proper array indexing
+  BaudSelectJumpersValue = (BaudSelectJumpersValue >> BAUD_J1);
+ 2c8:  ec 70           andi    r30, 0x0C       ; 12
+  
+  return PGM_READ_BYTE (&BaudLookupTable[BaudSelectJumpersValue]);
+ 2ca:  e6 95           lsr     r30
+ 2cc:  e6 95           lsr     r30
+ 2ce:  f0 e0           ldi     r31, 0x00       ; 0
+ 2d0:  e8 59           subi    r30, 0x98       ; 152
+ 2d2:  ff 4f           sbci    r31, 0xFF       ; 255
+ 2d4:  e4 91           lpm     r30, Z+
+  CTS_DIR |= (1<<CTS_PIN);   // CTS is active low
+#endif
+  }
+
+  INLINE_FUNC_DECLARE(void setBaudDivisor(unsigned int baud_divisor)) {
+    UBRRL = baud_divisor & 0xFF;
+ 2d6:  e9 b9           out     0x09, r30       ; 9
+    UBRRH = baud_divisor >> 8;
+ 2d8:  12 b8           out     0x02, r1        ; 2
+  }
+
+  INLINE_FUNC_DECLARE(void rxEnable(void)) {
+    UCSRB |= (1<<RXEN);
+ 2da:  54 9a           sbi     0x0a, 4 ; 10
+  }
+
+  INLINE_FUNC_DECLARE(void rxInterruptEnable(void)) {
+    UCSRB |= (1<<RXCIE);
+ 2dc:  57 9a           sbi     0x0a, 7 ; 10
+
+public:
+  INLINE_FUNC_DECLARE(void init(volatile unsigned char* port, 
+                                volatile unsigned char* dir, 
+                                unsigned char pin)) {
+    m_LedPort = port;
+ 2de:  50 93 7e 00     sts     0x007E, r21
+ 2e2:  40 93 7d 00     sts     0x007D, r20
+    m_LedDir = dir;
+ 2e6:  21 e3           ldi     r18, 0x31       ; 49
+ 2e8:  30 e0           ldi     r19, 0x00       ; 0
+ 2ea:  30 93 80 00     sts     0x0080, r19
+ 2ee:  20 93 7f 00     sts     0x007F, r18
+    m_LedPin = pin;
+ 2f2:  91 e0           ldi     r25, 0x01       ; 1
+ 2f4:  90 93 81 00     sts     0x0081, r25
+
+    // setup PWM to run at 1.25ms per interrupt. 
+    // This allows 8 levels of brightness at minimum of 100Hz flicker rate.
+    TCCR0A = (1<<WGM01); // CTC mode
+ 2f8:  82 e0           ldi     r24, 0x02       ; 2
+ 2fa:  80 bf           out     0x30, r24       ; 48
+    TCCR0B = 0; // timer off
+ 2fc:  13 be           out     0x33, r1        ; 51
+    OCR0A = 72; // 1.25ms with CLK/256 prescaler @ 14.7456MHz
+ 2fe:  88 e4           ldi     r24, 0x48       ; 72
+ 300:  86 bf           out     0x36, r24       ; 54
+    TIMSK = (1<<OCIE0A); // Turn on timer0 COMPA intr (all other timer intr off)
+ 302:  99 bf           out     0x39, r25       ; 57
+    *m_LedPort &= ~(1<<m_LedPin); // Ensure LED is off during initialization
+ 304:  91 98           cbi     0x12, 1 ; 18
+    *m_LedDir |= (1<<m_LedPin); // Ensure LED is output port
+ 306:  89 9a           sbi     0x11, 1 ; 17
+    m_BIT_led_on = 0;  // note that LED is off
+ 308:  10 92 7c 00     sts     0x007C, r1
+    m_ledPwmPattern = 0xFF;  // maximum brightness
+ 30c:  6f ef           ldi     r22, 0xFF       ; 255
+ 30e:  60 93 7b 00     sts     0x007B, r22
+                                volatile unsigned char* dataDir,
+                                volatile unsigned char* dataPinReg,
+                                unsigned char rsPin,
+                                unsigned char rwPin,
+                                unsigned char ePin)) {
+    m_ctrlPort = ctrlPort;
+ 312:  50 93 6d 00     sts     0x006D, r21
+ 316:  40 93 6c 00     sts     0x006C, r20
+    m_ctrlDir = ctrlDir;
+ 31a:  30 93 6f 00     sts     0x006F, r19
+ 31e:  20 93 6e 00     sts     0x006E, r18
+    m_dataPort = dataPort;
+ 322:  88 e3           ldi     r24, 0x38       ; 56
+ 324:  90 e0           ldi     r25, 0x00       ; 0
+ 326:  90 93 71 00     sts     0x0071, r25
+ 32a:  80 93 70 00     sts     0x0070, r24
+    m_dataDir = dataDir;
+ 32e:  87 e3           ldi     r24, 0x37       ; 55
+ 330:  90 e0           ldi     r25, 0x00       ; 0
+ 332:  90 93 73 00     sts     0x0073, r25
+ 336:  80 93 72 00     sts     0x0072, r24
+    m_dataPinReg = dataPinReg;
+ 33a:  86 e3           ldi     r24, 0x36       ; 54
+ 33c:  90 e0           ldi     r25, 0x00       ; 0
+ 33e:  90 93 75 00     sts     0x0075, r25
+ 342:  80 93 74 00     sts     0x0074, r24
+    m_rsPin = rsPin;
+ 346:  85 e0           ldi     r24, 0x05       ; 5
+ 348:  80 93 76 00     sts     0x0076, r24
+    m_rwPin = rwPin;
+ 34c:  84 e0           ldi     r24, 0x04       ; 4
+ 34e:  80 93 77 00     sts     0x0077, r24
+    m_ePin = ePin;
+ 352:  70 93 78 00     sts     0x0078, r23
+
+    *m_ctrlPort &= ~((1<<m_rsPin)|(1<<m_rwPin)|(1<<m_ePin)); // set low
+ 356:  82 b3           in      r24, 0x12       ; 18
+ 358:  8f 78           andi    r24, 0x8F       ; 143
+ 35a:  82 bb           out     0x12, r24       ; 18
+    *m_ctrlDir |= ((1<<m_rsPin)|(1<<m_rwPin)|(1<<m_ePin)); // set as output
+ 35c:  81 b3           in      r24, 0x11       ; 17
+ 35e:  80 67           ori     r24, 0x70       ; 112
+ 360:  81 bb           out     0x11, r24       ; 17
+       __asm__ volatile (
+               "1: sbiw %0,1" "\n\t"
+               "brne 1b"
+               : "=w" (__count)
+               : "0" (__count)
+       );
+ 362:  80 e0           ldi     r24, 0x00       ; 0
+ 364:  98 ed           ldi     r25, 0xD8       ; 216
+ 366:  01 97           sbiw    r24, 0x01       ; 1
+ 368:  f1 f7           brne    .-4             ; 0x366 <main+0xd4>
+                   
+    Delay::millisec(15);
+    
+    *m_ctrlPort |= (1<<LCD_RS); // Set LCD_RS HIGH
+ 36a:  95 9a           sbi     0x12, 5 ; 18
+    
+    // Initialize the AVR controller I/O
+    *m_dataDir = 0xFF; // Set LCD_DATA_OUT as all outputs
+ 36c:  67 bb           out     0x17, r22       ; 23
+    *m_dataPort = 0x00; // Set LCD_DATA_OUT to logic low
+ 36e:  18 ba           out     0x18, r1        ; 24
+    
+    // Initialize the LCD controller
+    *m_ctrlPort &= ~(1<<LCD_RS);
+ 370:  95 98           cbi     0x12, 5 ; 18
+    
+    putChar (m_DATA_8); 
+ 372:  8c e6           ldi     r24, 0x6C       ; 108
+ 374:  90 e0           ldi     r25, 0x00       ; 0
+ 376:  60 e3           ldi     r22, 0x30       ; 48
+ 378:  cc de           rcall   .-616           ; 0x112 <_ZN3Lcd7putCharEh>
+ 37a:  8a e0           ldi     r24, 0x0A       ; 10
+ 37c:  9b e3           ldi     r25, 0x3B       ; 59
+ 37e:  01 97           sbiw    r24, 0x01       ; 1
+ 380:  f1 f7           brne    .-4             ; 0x37e <main+0xec>
+    Delay::millisec(4.1);
+    
+    putChar (m_DATA_8);
+ 382:  8c e6           ldi     r24, 0x6C       ; 108
+ 384:  90 e0           ldi     r25, 0x00       ; 0
+ 386:  60 e3           ldi     r22, 0x30       ; 48
+ 388:  c4 de           rcall   .-632           ; 0x112 <_ZN3Lcd7putCharEh>
+ 38a:  80 e7           ldi     r24, 0x70       ; 112
+ 38c:  91 e0           ldi     r25, 0x01       ; 1
+ 38e:  01 97           sbiw    r24, 0x01       ; 1
+ 390:  f1 f7           brne    .-4             ; 0x38e <main+0xfc>
+    Delay::microsec(100);
+    
+    putChar (m_DATA_8);
+ 392:  8c e6           ldi     r24, 0x6C       ; 108
+ 394:  90 e0           ldi     r25, 0x00       ; 0
+ 396:  60 e3           ldi     r22, 0x30       ; 48
+ 398:  bc de           rcall   .-648           ; 0x112 <_ZN3Lcd7putCharEh>
+    *m_ctrlPort |= (1<<LCD_RS);
+ 39a:  e0 91 6c 00     lds     r30, 0x006C
+ 39e:  f0 91 6d 00     lds     r31, 0x006D
+ 3a2:  80 81           ld      r24, Z
+ 3a4:  80 62           ori     r24, 0x20       ; 32
+ 3a6:  80 83           st      Z, r24
+    
+    // The display will be out into 8 bit data mode here
+    putCmd (m_LINE_8x4); // Set 8 bit data, 4 display lines
+ 3a8:  8c e6           ldi     r24, 0x6C       ; 108
+ 3aa:  90 e0           ldi     r25, 0x00       ; 0
+ 3ac:  68 e3           ldi     r22, 0x38       ; 56
+ 3ae:  07 df           rcall   .-498           ; 0x1be <_ZN3Lcd6putCmdEh>
+    putCmd (m_PWR_ON); // Power up the display
+ 3b0:  8c e6           ldi     r24, 0x6C       ; 108
+ 3b2:  90 e0           ldi     r25, 0x00       ; 0
+ 3b4:  6c e0           ldi     r22, 0x0C       ; 12
+ 3b6:  03 df           rcall   .-506           ; 0x1be <_ZN3Lcd6putCmdEh>
+    putCmd (m_CLR_DSP); // Power up the display
+ 3b8:  8c e6           ldi     r24, 0x6C       ; 108
+ 3ba:  90 e0           ldi     r25, 0x00       ; 0
+ 3bc:  61 e0           ldi     r22, 0x01       ; 1
+ 3be:  ff de           rcall   .-514           ; 0x1be <_ZN3Lcd6putCmdEh>
+  gUart.rxInterruptEnable();
+  gLed.init(&LED_PORT, &LED_DIR, LED_PIN);
+  gLcd.init(&LCD_CONTROL_PORT, &LCD_CONTROL_DIR, &LCD_DATA_PORT,
+            &LCD_DATA_DIR, &LCD_DATA_PIN_REG, LCD_RS, LCD_RW, LCD_E);
+
+  sei();
+ 3c0:  78 94           sei
+
+  INLINE_FUNC_DECLARE(void stop(void)) {
+    TCCR0B = 0;
+  }
+  INLINE_FUNC_DECLARE(void start(void)) {
+    TCCR0B = (1<<CS02);
+ 3c2:  14 e0           ldi     r17, 0x04       ; 4
+      m_ledPwmCycling >>= 1;
+    }
+  }
+
+  INLINE_FUNC_DECLARE(void lampOn(void)) {
+    *m_LedPort |= (1<<m_LedPin);
+ 3c4:  c1 e0           ldi     r28, 0x01       ; 1
+ 3c6:  d0 e0           ldi     r29, 0x00       ; 0
+    m_BIT_led_on = 0;
+    stop();
+  }
+
+  INLINE_FUNC_DECLARE(void switchOn(void)) {
+    m_BIT_led_on = 1;
+ 3c8:  01 e0           ldi     r16, 0x01       ; 1
+#endif 
+    return 1;
+  }
+
+  INLINE_FUNC_DECLARE(unsigned char charAvail(void)) {
+    unsigned char tail = m_UartRxTail; // explicitly set order of volatile access
+ 3ca:  90 91 b3 00     lds     r25, 0x00B3
+    return (tail != m_UartRxHead) ? 1 : 0;
+ 3ce:  80 91 b2 00     lds     r24, 0x00B2
+ 3d2:  98 17           cp      r25, r24
+ 3d4:  09 f4           brne    .+2             ; 0x3d8 <main+0x146>
+ 3d6:  8a c0           rjmp    .+276           ; 0x4ec <main+0x25a>
+            &LCD_DATA_DIR, &LCD_DATA_PIN_REG, LCD_RS, LCD_RW, LCD_E);
+
+  sei();
+  while (1) {
+    if (gUart.charAvail()) {
+      SerialCommandProcessor::processChar (gUart.waitRxChar());
+ 3d8:  82 e8           ldi     r24, 0x82       ; 130
+ 3da:  90 e0           ldi     r25, 0x00       ; 0
+ 3dc:  48 df           rcall   .-368           ; 0x26e <_ZN4Uart10waitRxCharEv>
+ 3de:  68 2f           mov     r22, r24
+
+public:
+  INLINE_FUNC_DECLARE(static void processChar(unsigned char ch)) {
+    // avoid use of switch statement as ImageCraft and GCC produce signifcantly
+    // more code for a switch statement than a sequence of if/else if
+    if (ch == m_LED_SW_OFF) {
+ 3e0:  8d 3f           cpi     r24, 0xFD       ; 253
+ 3e2:  a1 f4           brne    .+40            ; 0x40c <main+0x17a>
+  INLINE_FUNC_DECLARE(void lampOn(void)) {
+    *m_LedPort |= (1<<m_LedPin);
+  };
+
+  INLINE_FUNC_DECLARE(void lampOff(void)) {
+    *m_LedPort &= ~(1<<m_LedPin);;
+ 3e4:  e0 91 7d 00     lds     r30, 0x007D
+ 3e8:  f0 91 7e 00     lds     r31, 0x007E
+ 3ec:  20 81           ld      r18, Z
+ 3ee:  ce 01           movw    r24, r28
+ 3f0:  00 90 81 00     lds     r0, 0x0081
+ 3f4:  02 c0           rjmp    .+4             ; 0x3fa <main+0x168>
+ 3f6:  88 0f           add     r24, r24
+ 3f8:  99 1f           adc     r25, r25
+ 3fa:  0a 94           dec     r0
+ 3fc:  e2 f7           brpl    .-8             ; 0x3f6 <main+0x164>
+ 3fe:  80 95           com     r24
+ 400:  82 23           and     r24, r18
+ 402:  80 83           st      Z, r24
+    TCCR0B = (1<<CS02);
+  }
+
+  INLINE_FUNC_DECLARE(void switchOff(void)) {
+    lampOff();
+    m_BIT_led_on = 0;
+ 404:  10 92 7c 00     sts     0x007C, r1
+    m_BIT_led_on = 0;  // note that LED is off
+    m_ledPwmPattern = 0xFF;  // maximum brightness
+  }
+
+  INLINE_FUNC_DECLARE(void stop(void)) {
+    TCCR0B = 0;
+ 408:  13 be           out     0x33, r1        ; 51
+ 40a:  df cf           rjmp    .-66            ; 0x3ca <main+0x138>
+  INLINE_FUNC_DECLARE(static void processChar(unsigned char ch)) {
+    // avoid use of switch statement as ImageCraft and GCC produce signifcantly
+    // more code for a switch statement than a sequence of if/else if
+    if (ch == m_LED_SW_OFF) {
+      gLed.switchOff();
+    } else if (ch == m_LED_SW_ON) {
+ 40c:  8c 3f           cpi     r24, 0xFC       ; 252
+ 40e:  41 f4           brne    .+16            ; 0x420 <main+0x18e>
+    m_BIT_led_on = 0;
+    stop();
+  }
+
+  INLINE_FUNC_DECLARE(void switchOn(void)) {
+    m_BIT_led_on = 1;
+ 410:  00 93 7c 00     sts     0x007C, r16
+    if (m_ledPwmPattern == 0xFF) { // maximum brightness, no need for PWM
+ 414:  80 91 7b 00     lds     r24, 0x007B
+ 418:  8f 3f           cpi     r24, 0xFF       ; 255
+ 41a:  09 f0           breq    .+2             ; 0x41e <main+0x18c>
+ 41c:  57 c0           rjmp    .+174           ; 0x4cc <main+0x23a>
+ 41e:  40 c0           rjmp    .+128           ; 0x4a0 <main+0x20e>
+    // more code for a switch statement than a sequence of if/else if
+    if (ch == m_LED_SW_OFF) {
+      gLed.switchOff();
+    } else if (ch == m_LED_SW_ON) {
+      gLed.switchOn();
+    } else if (ch == m_LED_SET_BRIGHTNESS) {
+ 420:  8b 3f           cpi     r24, 0xFB       ; 251
+ 422:  09 f0           breq    .+2             ; 0x426 <main+0x194>
+ 424:  55 c0           rjmp    .+170           ; 0x4d0 <main+0x23e>
+      // read next byte which will be brightness
+      gLed.setBrightness(gUart.waitRxChar());
+ 426:  82 e8           ldi     r24, 0x82       ; 130
+ 428:  90 e0           ldi     r25, 0x00       ; 0
+ 42a:  21 df           rcall   .-446           ; 0x26e <_ZN4Uart10waitRxCharEv>
+      start();
+    }
+  }
+
+  INLINE_FUNC_DECLARE(void setBrightness(unsigned char brightness)) {
+    if (brightness == 0) { // turn backlight off for 0 brightness
+ 42c:  88 23           and     r24, r24
+ 42e:  d1 f4           brne    .+52            ; 0x464 <main+0x1d2>
+      if (m_BIT_led_on) {
+ 430:  80 91 7c 00     lds     r24, 0x007C
+ 434:  88 23           and     r24, r24
+ 436:  49 f2           breq    .-110           ; 0x3ca <main+0x138>
+    m_BIT_led_on = 0;  // note that LED is off
+    m_ledPwmPattern = 0xFF;  // maximum brightness
+  }
+
+  INLINE_FUNC_DECLARE(void stop(void)) {
+    TCCR0B = 0;
+ 438:  13 be           out     0x33, r1        ; 51
+
+  INLINE_FUNC_DECLARE(void setBrightness(unsigned char brightness)) {
+    if (brightness == 0) { // turn backlight off for 0 brightness
+      if (m_BIT_led_on) {
+        stop();
+        m_ledPwmPattern = 0;
+ 43a:  10 92 7b 00     sts     0x007B, r1
+        m_ledPwmCycling = 0;
+ 43e:  10 92 7a 00     sts     0x007A, r1
+  INLINE_FUNC_DECLARE(void lampOn(void)) {
+    *m_LedPort |= (1<<m_LedPin);
+  };
+
+  INLINE_FUNC_DECLARE(void lampOff(void)) {
+    *m_LedPort &= ~(1<<m_LedPin);;
+ 442:  e0 91 7d 00     lds     r30, 0x007D
+ 446:  f0 91 7e 00     lds     r31, 0x007E
+ 44a:  20 81           ld      r18, Z
+ 44c:  ce 01           movw    r24, r28
+ 44e:  00 90 81 00     lds     r0, 0x0081
+ 452:  02 c0           rjmp    .+4             ; 0x458 <main+0x1c6>
+ 454:  88 0f           add     r24, r24
+ 456:  99 1f           adc     r25, r25
+ 458:  0a 94           dec     r0
+ 45a:  e2 f7           brpl    .-8             ; 0x454 <main+0x1c2>
+ 45c:  80 95           com     r24
+ 45e:  82 23           and     r24, r18
+ 460:  80 83           st      Z, r24
+ 462:  b3 cf           rjmp    .-154           ; 0x3ca <main+0x138>
+        lampOff();
+      }
+      return;
+    }
+
+    unsigned char ledPwmPos = (brightness * (m_LED_BRIGHTNESS_LEVELS-1) + 127) >> 8; 
+ 464:  90 e0           ldi     r25, 0x00       ; 0
+ 466:  67 e0           ldi     r22, 0x07       ; 7
+ 468:  70 e0           ldi     r23, 0x00       ; 0
+ 46a:  d1 d0           rcall   .+418           ; 0x60e <__mulhi3>
+ 46c:  81 58           subi    r24, 0x81       ; 129
+ 46e:  9f 4f           sbci    r25, 0xFF       ; 255
+ 470:  89 2f           mov     r24, r25
+ 472:  99 0f           add     r25, r25
+ 474:  99 0b           sbc     r25, r25
+ 476:  88 30           cpi     r24, 0x08       ; 8
+ 478:  08 f0           brcs    .+2             ; 0x47c <main+0x1ea>
+ 47a:  87 e0           ldi     r24, 0x07       ; 7
+  INLINE_FUNC_DECLARE(void lampOff(void)) {
+    *m_LedPort &= ~(1<<m_LedPin);;
+  }
+
+  INLINE_FUNC_DECLARE(unsigned char pwmPattern(unsigned char pos)) {
+    return PGM_READ_BYTE (&m_ledPwmPatterns[pos]);
+ 47c:  e8 2f           mov     r30, r24
+ 47e:  f0 e0           ldi     r31, 0x00       ; 0
+ 480:  e0 5a           subi    r30, 0xA0       ; 160
+ 482:  ff 4f           sbci    r31, 0xFF       ; 255
+ 484:  e4 91           lpm     r30, Z+
+
+    unsigned char ledPwmPos = (brightness * (m_LED_BRIGHTNESS_LEVELS-1) + 127) >> 8; 
+    // Below is probably not required, but ensures we don't exceed array
+    if (ledPwmPos > m_LED_BRIGHTNESS_LEVELS - 1)
+      ledPwmPos = m_LED_BRIGHTNESS_LEVELS - 1;
+    m_ledPwmPattern = pwmPattern(ledPwmPos);
+ 486:  e0 93 7b 00     sts     0x007B, r30
+    m_ledPwmCount = 0;
+ 48a:  10 92 79 00     sts     0x0079, r1
+    m_ledPwmCycling = m_ledPwmPattern;
+ 48e:  e0 93 7a 00     sts     0x007A, r30
+    if (ledPwmPos >= m_LED_BRIGHTNESS_LEVELS-1) { // maximum brightness
+ 492:  87 30           cpi     r24, 0x07       ; 7
+ 494:  b1 f4           brne    .+44            ; 0x4c2 <main+0x230>
+      // don't need PWM to continuously on
+      if (m_BIT_led_on) {
+ 496:  80 91 7c 00     lds     r24, 0x007C
+ 49a:  88 23           and     r24, r24
+ 49c:  09 f4           brne    .+2             ; 0x4a0 <main+0x20e>
+ 49e:  95 cf           rjmp    .-214           ; 0x3ca <main+0x138>
+    m_BIT_led_on = 0;  // note that LED is off
+    m_ledPwmPattern = 0xFF;  // maximum brightness
+  }
+
+  INLINE_FUNC_DECLARE(void stop(void)) {
+    TCCR0B = 0;
+ 4a0:  13 be           out     0x33, r1        ; 51
+      m_ledPwmCycling >>= 1;
+    }
+  }
+
+  INLINE_FUNC_DECLARE(void lampOn(void)) {
+    *m_LedPort |= (1<<m_LedPin);
+ 4a2:  e0 91 7d 00     lds     r30, 0x007D
+ 4a6:  f0 91 7e 00     lds     r31, 0x007E
+ 4aa:  20 81           ld      r18, Z
+ 4ac:  ce 01           movw    r24, r28
+ 4ae:  00 90 81 00     lds     r0, 0x0081
+ 4b2:  02 c0           rjmp    .+4             ; 0x4b8 <main+0x226>
+ 4b4:  88 0f           add     r24, r24
+ 4b6:  99 1f           adc     r25, r25
+ 4b8:  0a 94           dec     r0
+ 4ba:  e2 f7           brpl    .-8             ; 0x4b4 <main+0x222>
+ 4bc:  28 2b           or      r18, r24
+ 4be:  20 83           st      Z, r18
+ 4c0:  84 cf           rjmp    .-248           ; 0x3ca <main+0x138>
+      if (m_BIT_led_on) {
+        stop();
+        lampOn();
+      }
+    } else {
+      if (m_BIT_led_on) {
+ 4c2:  80 91 7c 00     lds     r24, 0x007C
+ 4c6:  88 23           and     r24, r24
+ 4c8:  09 f4           brne    .+2             ; 0x4cc <main+0x23a>
+ 4ca:  7f cf           rjmp    .-258           ; 0x3ca <main+0x138>
+
+  INLINE_FUNC_DECLARE(void stop(void)) {
+    TCCR0B = 0;
+  }
+  INLINE_FUNC_DECLARE(void start(void)) {
+    TCCR0B = (1<<CS02);
+ 4cc:  13 bf           out     0x33, r17       ; 51
+ 4ce:  7d cf           rjmp    .-262           ; 0x3ca <main+0x138>
+    } else if (ch == m_LED_SW_ON) {
+      gLed.switchOn();
+    } else if (ch == m_LED_SET_BRIGHTNESS) {
+      // read next byte which will be brightness
+      gLed.setBrightness(gUart.waitRxChar());
+    } else if (ch == m_REG_MODE) {
+ 4d0:  8e 3f           cpi     r24, 0xFE       ; 254
+ 4d2:  41 f4           brne    .+16            ; 0x4e4 <main+0x252>
+      gLcd.putCmd (gUart.waitRxChar()); // Send LCD command character
+ 4d4:  82 e8           ldi     r24, 0x82       ; 130
+ 4d6:  90 e0           ldi     r25, 0x00       ; 0
+ 4d8:  ca de           rcall   .-620           ; 0x26e <_ZN4Uart10waitRxCharEv>
+ 4da:  68 2f           mov     r22, r24
+ 4dc:  8c e6           ldi     r24, 0x6C       ; 108
+ 4de:  90 e0           ldi     r25, 0x00       ; 0
+ 4e0:  6e de           rcall   .-804           ; 0x1be <_ZN3Lcd6putCmdEh>
+ 4e2:  73 cf           rjmp    .-282           ; 0x3ca <main+0x138>
+    } else {
+      gLcd.putChar (ch); // Send LCD data character
+ 4e4:  8c e6           ldi     r24, 0x6C       ; 108
+ 4e6:  90 e0           ldi     r25, 0x00       ; 0
+ 4e8:  14 de           rcall   .-984           ; 0x112 <_ZN3Lcd7putCharEh>
+ 4ea:  6f cf           rjmp    .-290           ; 0x3ca <main+0x138>
+    reset();
+    WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
+    WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
+  }
+  INLINE_FUNC_DECLARE(static void off(void)) {
+    cli();
+ 4ec:  f8 94           cli
+    WDTCSR &= ~(1<<WDCE);
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void reset(void)) { 
+    wdt_reset(); 
+ 4ee:  a8 95           wdr
+    WDTCSR = (1<<WDE)|(1<<WDP3)|(1<<WDP0); // 1024K cycles, 8.0sec
+  }
+  INLINE_FUNC_DECLARE(static void off(void)) {
+    cli();
+    reset();
+    MCUSR &= ~(1<<WDRF); // clear any watchdog interrupt flags
+ 4f0:  84 b7           in      r24, 0x34       ; 52
+ 4f2:  87 7f           andi    r24, 0xF7       ; 247
+ 4f4:  84 bf           out     0x34, r24       ; 52
+    WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
+ 4f6:  81 b5           in      r24, 0x21       ; 33
+ 4f8:  88 61           ori     r24, 0x18       ; 24
+ 4fa:  81 bd           out     0x21, r24       ; 33
+    WDTCSR &= ~(1<<WDE); // watchdog timer off
+ 4fc:  81 b5           in      r24, 0x21       ; 33
+ 4fe:  87 7f           andi    r24, 0xF7       ; 247
+ 500:  81 bd           out     0x21, r24       ; 33
+    sei();
+ 502:  78 94           sei
+public:
+  INLINE_FUNC_DECLARE(static void initIdleMode(void)) {
+    MCUCR &= ~((1<<SM1)|(1<<SM0)); // use idle sleep mode
+  }
+  INLINE_FUNC_DECLARE(static void enterSleep()) {
+    sleep_enable();
+ 504:  85 b7           in      r24, 0x35       ; 53
+ 506:  80 62           ori     r24, 0x20       ; 32
+ 508:  85 bf           out     0x35, r24       ; 53
+    sleep_cpu();
+ 50a:  88 95           sleep
+    sleep_disable();
+ 50c:  85 b7           in      r24, 0x35       ; 53
+ 50e:  8f 7d           andi    r24, 0xDF       ; 223
+ 510:  85 bf           out     0x35, r24       ; 53
+    WDTCSR &= ~(1<<WDE); // watchdog timer off
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void on(void)) {
+    cli();
+ 512:  f8 94           cli
+    WDTCSR &= ~(1<<WDCE);
+    sei();
+  }
+  
+  INLINE_FUNC_DECLARE(static void reset(void)) { 
+    wdt_reset(); 
+ 514:  a8 95           wdr
+  }
+  
+  INLINE_FUNC_DECLARE(static void on(void)) {
+    cli();
+    reset();
+    WDTCSR |= (1<<WDCE)|(1<<WDE); // start timed sequence (keep old prescaler)
+ 516:  81 b5           in      r24, 0x21       ; 33
+ 518:  88 61           ori     r24, 0x18       ; 24
+ 51a:  81 bd           out     0x21, r24       ; 33
+    WDTCSR &= ~(1<<WDCE);
+ 51c:  81 b5           in      r24, 0x21       ; 33
+ 51e:  8f 7e           andi    r24, 0xEF       ; 239
+ 520:  81 bd           out     0x21, r24       ; 33
+    sei();
+ 522:  78 94           sei
+ 524:  52 cf           rjmp    .-348           ; 0x3ca <main+0x138>
+
+00000526 <__vector_7>:
+  }
+  MAIN_FUNC_LAST();
+}
+
+
+ISR(USART_RX_vect) {
+ 526:  1f 92           push    r1
+ 528:  0f 92           push    r0
+ 52a:  0f b6           in      r0, 0x3f        ; 63
+ 52c:  0f 92           push    r0
+ 52e:  11 24           eor     r1, r1
+ 530:  8f 93           push    r24
+ 532:  9f 93           push    r25
+ 534:  ef 93           push    r30
+ 536:  ff 93           push    r31
+  gUart.storeChar(UDR);
+ 538:  9c b1           in      r25, 0x0c       ; 12
+    UCSRC = reg;
+  }
+
+  INLINE_FUNC_DECLARE(unsigned char storeChar(unsigned char rx)) {
+    // Calculate next buffer position.
+    unsigned char tmphead = m_UartRxHead;
+ 53a:  e0 91 b2 00     lds     r30, 0x00B2
+    if (tmphead == UART_RX_BUFFER_SIZE-1)
+ 53e:  ef 32           cpi     r30, 0x2F       ; 47
+ 540:  11 f4           brne    .+4             ; 0x546 <__vector_7+0x20>
+ 542:  e0 e0           ldi     r30, 0x00       ; 0
+ 544:  01 c0           rjmp    .+2             ; 0x548 <__vector_7+0x22>
+      tmphead = 0;
+    else
+      tmphead++;
+ 546:  ef 5f           subi    r30, 0xFF       ; 255
+    
+    // store in buffer if there is room
+    if (tmphead != m_UartRxTail) {
+ 548:  80 91 b3 00     lds     r24, 0x00B3
+ 54c:  e8 17           cp      r30, r24
+ 54e:  31 f0           breq    .+12            ; 0x55c <__vector_7+0x36>
+      m_UartRxHead = tmphead;         // Store new index.
+ 550:  e0 93 b2 00     sts     0x00B2, r30
+      m_UartRxBuf[tmphead] = rx;
+ 554:  f0 e0           ldi     r31, 0x00       ; 0
+ 556:  ee 57           subi    r30, 0x7E       ; 126
+ 558:  ff 4f           sbci    r31, 0xFF       ; 255
+ 55a:  90 83           st      Z, r25
+}
+
+
+ISR(USART_RX_vect) {
+  gUart.storeChar(UDR);
+}
+ 55c:  ff 91           pop     r31
+ 55e:  ef 91           pop     r30
+ 560:  9f 91           pop     r25
+ 562:  8f 91           pop     r24
+ 564:  0f 90           pop     r0
+ 566:  0f be           out     0x3f, r0        ; 63
+ 568:  0f 90           pop     r0
+ 56a:  1f 90           pop     r1
+ 56c:  18 95           reti
+
+0000056e <__vector_13>:
+
+ISR(TIMER0_COMPA_vect) {
+ 56e:  1f 92           push    r1
+ 570:  0f 92           push    r0
+ 572:  0f b6           in      r0, 0x3f        ; 63
+ 574:  0f 92           push    r0
+ 576:  11 24           eor     r1, r1
+ 578:  2f 93           push    r18
+ 57a:  8f 93           push    r24
+ 57c:  9f 93           push    r25
+ 57e:  ef 93           push    r30
+ 580:  ff 93           push    r31
+  sei(); // Okay to allow USART interrupts while controlling LED PWM
+ 582:  78 94           sei
+      }
+    }
+  }
+
+  INLINE_FUNC_DECLARE(void cyclePwm(void)) {
+    if (m_ledPwmCycling & 0x01) {   // Set current LED state based on cycling variable
+ 584:  80 91 7a 00     lds     r24, 0x007A
+ 588:  80 ff           sbrs    r24, 0
+ 58a:  11 c0           rjmp    .+34            ; 0x5ae <__vector_13+0x40>
+      m_ledPwmCycling >>= 1;
+    }
+  }
+
+  INLINE_FUNC_DECLARE(void lampOn(void)) {
+    *m_LedPort |= (1<<m_LedPin);
+ 58c:  e0 91 7d 00     lds     r30, 0x007D
+ 590:  f0 91 7e 00     lds     r31, 0x007E
+ 594:  20 81           ld      r18, Z
+ 596:  81 e0           ldi     r24, 0x01       ; 1
+ 598:  90 e0           ldi     r25, 0x00       ; 0
+ 59a:  00 90 81 00     lds     r0, 0x0081
+ 59e:  02 c0           rjmp    .+4             ; 0x5a4 <__vector_13+0x36>
+ 5a0:  88 0f           add     r24, r24
+ 5a2:  99 1f           adc     r25, r25
+ 5a4:  0a 94           dec     r0
+ 5a6:  e2 f7           brpl    .-8             ; 0x5a0 <__vector_13+0x32>
+ 5a8:  28 2b           or      r18, r24
+ 5aa:  20 83           st      Z, r18
+ 5ac:  11 c0           rjmp    .+34            ; 0x5d0 <__vector_13+0x62>
+  };
+
+  INLINE_FUNC_DECLARE(void lampOff(void)) {
+    *m_LedPort &= ~(1<<m_LedPin);;
+ 5ae:  e0 91 7d 00     lds     r30, 0x007D
+ 5b2:  f0 91 7e 00     lds     r31, 0x007E
+ 5b6:  20 81           ld      r18, Z
+ 5b8:  81 e0           ldi     r24, 0x01       ; 1
+ 5ba:  90 e0           ldi     r25, 0x00       ; 0
+ 5bc:  00 90 81 00     lds     r0, 0x0081
+ 5c0:  02 c0           rjmp    .+4             ; 0x5c6 <__vector_13+0x58>
+ 5c2:  88 0f           add     r24, r24
+ 5c4:  99 1f           adc     r25, r25
+ 5c6:  0a 94           dec     r0
+ 5c8:  e2 f7           brpl    .-8             ; 0x5c2 <__vector_13+0x54>
+ 5ca:  80 95           com     r24
+ 5cc:  82 23           and     r24, r18
+ 5ce:  80 83           st      Z, r24
+    } else {
+      lampOff();
+    }
+
+    // Update cycling variable for next interrupt
+    if (m_ledPwmCount >= m_LED_BRIGHTNESS_LEVELS-1) {
+ 5d0:  80 91 79 00     lds     r24, 0x0079
+ 5d4:  87 30           cpi     r24, 0x07       ; 7
+ 5d6:  28 f0           brcs    .+10            ; 0x5e2 <__vector_13+0x74>
+      m_ledPwmCount = 0;
+ 5d8:  10 92 79 00     sts     0x0079, r1
+      m_ledPwmCycling = m_ledPwmPattern;
+ 5dc:  80 91 7b 00     lds     r24, 0x007B
+ 5e0:  0a c0           rjmp    .+20            ; 0x5f6 <__vector_13+0x88>
+    } else {
+      m_ledPwmCount++;
+ 5e2:  80 91 79 00     lds     r24, 0x0079
+ 5e6:  8f 5f           subi    r24, 0xFF       ; 255
+ 5e8:  80 93 79 00     sts     0x0079, r24
+      m_ledPwmCycling >>= 1;
+ 5ec:  80 91 7a 00     lds     r24, 0x007A
+ 5f0:  90 e0           ldi     r25, 0x00       ; 0
+ 5f2:  95 95           asr     r25
+ 5f4:  87 95           ror     r24
+ 5f6:  80 93 7a 00     sts     0x007A, r24
+}
+
+ISR(TIMER0_COMPA_vect) {
+  sei(); // Okay to allow USART interrupts while controlling LED PWM
+  gLed.cyclePwm();
+}
+ 5fa:  ff 91           pop     r31
+ 5fc:  ef 91           pop     r30
+ 5fe:  9f 91           pop     r25
+ 600:  8f 91           pop     r24
+ 602:  2f 91           pop     r18
+ 604:  0f 90           pop     r0
+ 606:  0f be           out     0x3f, r0        ; 63
+ 608:  0f 90           pop     r0
+ 60a:  1f 90           pop     r1
+ 60c:  18 95           reti
+
+0000060e <__mulhi3>:
+ 60e:  55 27           eor     r21, r21
+ 610:  00 24           eor     r0, r0
+
+00000612 <__mulhi3_loop>:
+ 612:  80 ff           sbrs    r24, 0
+ 614:  02 c0           rjmp    .+4             ; 0x61a <__mulhi3_skip1>
+ 616:  06 0e           add     r0, r22
+ 618:  57 1f           adc     r21, r23
+
+0000061a <__mulhi3_skip1>:
+ 61a:  66 0f           add     r22, r22
+ 61c:  77 1f           adc     r23, r23
+ 61e:  61 15           cp      r22, r1
+ 620:  71 05           cpc     r23, r1
+ 622:  21 f0           breq    .+8             ; 0x62c <__mulhi3_exit>
+ 624:  96 95           lsr     r25
+ 626:  87 95           ror     r24
+ 628:  00 97           sbiw    r24, 0x00       ; 0
+ 62a:  99 f7           brne    .-26            ; 0x612 <__mulhi3_loop>
+
+0000062c <__mulhi3_exit>:
+ 62c:  95 2f           mov     r25, r21
+ 62e:  80 2d           mov     r24, r0
+ 630:  08 95           ret
+
+00000632 <_exit>:
+ 632:  f8 94           cli
+
+00000634 <__stop_program>:
+ 634:  ff cf           rjmp    .-2             ; 0x634 <__stop_program>