charlcd.elf: file format elf32-msp430 SYMBOL TABLE: 0000f000 l d .text 00000000 .text 00000200 l d .data 00000000 .data 00000202 l d .bss 00000000 .bss 0000ffe0 l d .vectors 00000000 .vectors 00000000 l d .stab 00000000 .stab 00000000 l d .stabstr 00000000 .stabstr 00000000 l d *ABS* 00000000 .shstrtab 00000000 l d *ABS* 00000000 .symtab 00000000 l d *ABS* 00000000 .strtab 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 gcrt0.S 00000056 l *ABS* 00000000 DCOCTL 00000057 l *ABS* 00000000 BCSCTL1 00000058 l *ABS* 00000000 BCSCTL2 00000128 l *ABS* 00000000 FCTL1 0000012a l *ABS* 00000000 FCTL2 0000012c l *ABS* 00000000 FCTL3 00000054 l *ABS* 00000000 EPCTL 0000012e l *ABS* 00000000 TA0IV 00000160 l *ABS* 00000000 TA0CTL 00000170 l *ABS* 00000000 TA0R 00000162 l *ABS* 00000000 TA0CCTL0 00000164 l *ABS* 00000000 TA0CCTL1 00000172 l *ABS* 00000000 TA0CCR0 00000174 l *ABS* 00000000 TA0CCR1 00000166 l *ABS* 00000000 TA0CCTL2 00000176 l *ABS* 00000000 TA0CCR2 00000020 l *ABS* 00000000 P1IN 00000021 l *ABS* 00000000 P1OUT 00000022 l *ABS* 00000000 P1DIR 00000023 l *ABS* 00000000 P1IFG 00000024 l *ABS* 00000000 P1IES 00000025 l *ABS* 00000000 P1IE 00000026 l *ABS* 00000000 P1SEL 00000028 l *ABS* 00000000 P2IN 00000029 l *ABS* 00000000 P2OUT 0000002a l *ABS* 00000000 P2DIR 0000002b l *ABS* 00000000 P2IFG 0000002c l *ABS* 00000000 P2IES 0000002d l *ABS* 00000000 P2IE 0000002e l *ABS* 00000000 P2SEL 00000059 l *ABS* 00000000 CACTL1 0000005a l *ABS* 00000000 CACTL2 0000005b l *ABS* 00000000 CAPD 00000120 l *ABS* 00000000 WDTCTL 00000000 l *ABS* 00000000 IE1 00000002 l *ABS* 00000000 IFG1 00000000 l df *ABS* 00000000 main.c 0000f168 l .text 00000000 Letext 00000000 l df *ABS* 00000000 font.c 0000f1a8 l .text 00000000 Letext 00000000 l df *ABS* 00000000 lcd.c 0000f2ea l .text 00000000 lcdloop 0000f346 l .text 00000000 Letext 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 printf.c 0000f358 l .text 00000000 Letext 00000000 l df *ABS* 00000000 vuprintf.c 00000200 l O .data 00000002 total_len 0000f358 l F .text 00000030 PRINT 00000202 l O .bss 00000002 __write_char 0000f388 l F .text 00000034 __write_pad 0000f97c l .text 00000000 Letext 00000000 l df *ABS* 00000000 puts.c 0000f9aa l .text 00000000 Letext 00000000 l df *ABS* 00000000 memchr.c 0000f9ce l .text 00000000 Letext 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 0000f040 g F .text 00000008 putchar 0000f1a8 g F .text 0000002e lcdBusy 0000f346 g F .text 00000012 printf 0000f168 g O .text 00000040 lcdfont 0000f30e g F .text 00000038 lcdDownloadFont 0000f9fc g .text 00000000 _etext 0000f9ce w .text 00000000 __stop_progExec__ 0000f03a g .text 00000000 _unexpected_1_ 0000f03a w .text 00000000 vector_ffe0 0000f97c g F .text 0000002e puts 0000f292 g F .text 00000040 lcdGetchar 0000f232 g F .text 0000002c lcdInstr 0000f03a w .text 00000000 vector_ffec 0000f03a w .text 00000000 vector_fff0 0000f03a g .text 00000000 __dtors_end 0000020a g .bss 00000000 __bss_end 0000f03a w .text 00000000 vector_fffc 0000f25e g F .text 00000034 lcdPutc 0000f03a w .text 00000000 vector_ffe4 0000ffe0 g O .vectors 00000020 InterruptVectors 0000f9aa g F .text 00000024 memchr 0000f2d2 g F .text 00000018 lcdInit 0000f03a w .text 00000000 vector_ffe2 0000f03a w .text 00000000 vector_ffe8 0000f03e w .text 00000000 _unexpected_ 0000f03a w .text 00000000 vector_fffa 0000f3bc g F .text 000005c0 vuprintf 0000f000 g .text 00000000 _reset_vector__ 0000f03a g .text 00000000 __ctors_start 0000f048 g F .text 0000003e INT_TimerA_CCR0 00000202 g .bss 00000000 __bss_start 0000f03a w .text 00000000 vector_ffee 0000f03a w .text 00000000 vector_fff4 0000f0a6 g F .text 000000c2 main 0000f03a w .text 00000000 vector_fff8 0000f048 g .text 00000000 vector_fff2 00010000 g .vectors 00000000 _vectors_end 0000f03a w .text 00000000 vector_ffe6 00000204 g O .bss 00000002 s 00000206 g O .bss 00000002 h 0000f2f0 g F .text 0000001e lcdPuts 0000f03a g .text 00000000 __dtors_start 0000f03a g .text 00000000 __ctors_end 00000300 g *ABS* 00000000 __stack 00000202 g .data 00000000 _edata 0000020a g .bss 00000000 _end 0000f9d2 g .text 00000000 __udivmodsi4 0000f03a w .text 00000000 vector_fff6 00000208 g O .bss 00000002 m 0000f1d6 g F .text 0000005c lcdOn 00000200 g .data 00000000 __data_start 0000f03a w .text 00000000 vector_ffea 0000f2ea g F .text 00000006 lcdDelay Disassembly of section .text: 0000f000 <_reset_vector__>: f000: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 f004: 20 01 f006: 3f 40 fc f9 mov #-1540, r15 ;#0xf9fc f00a: 3e 40 00 02 mov #512, r14 ;#0x0200 f00e: 3d 40 02 02 mov #514, r13 ;#0x0202 f012: 0d 9e cmp r14, r13 ; f014: 05 24 jz $+12 ;abs 0xf020 f016: fe 4f 00 00 mov.b @r15+, 0(r14) ; f01a: 1e 53 inc r14 ; f01c: 0e 9d cmp r13, r14 ; f01e: fb 2b jnc $-8 ;abs 0xf016 f020: 3f 40 02 02 mov #514, r15 ;#0x0202 f024: 3d 40 0a 02 mov #522, r13 ;#0x020a f028: 0d 9f cmp r15, r13 ; f02a: 05 24 jz $+12 ;abs 0xf036 f02c: cf 43 00 00 mov.b #0, 0(r15) ;r3 As==00 f030: 1f 53 inc r15 ; f032: 0f 9d cmp r13, r15 ; f034: fb 2b jnc $-8 ;abs 0xf02c f036: 30 40 a6 f0 br #0xf0a6 ; 0000f03a <__ctors_end>: f03a: 30 40 3e f0 br #0xf03e ; 0000f03e <_unexpected_>: f03e: 00 13 reti 0000f040 : extern const char lcdfont[64]; //redirect stdio to LCD int putchar(int c) { lcdPutc(c); f040: b0 12 5e f2 call #-3490 ;#0xf25e return 1; } f044: 1f 43 mov #1, r15 ;r3 As==01 f046: 30 41 ret 0000f048 : //global vars to store the time int h, m, s; /** This one is executed once a second. it counts seconds, minutes, hours - hey it should be a clock ;-) it does not count days, but i think you'll get the idea :-) */ wakeup interrupt (TIMERA0_VECTOR) INT_TimerA_CCR0(void) { CCR0 += ONESECOND; //setup next irq f048: b2 50 00 02 add #512, &0x0172 ;#0x0200 f04c: 72 01 if (++s > 59) { //count seconds, up to one minute f04e: 92 53 04 02 inc &0x0204 ; f052: b2 90 3c 00 cmp #60, &0x0204 ;#0x003c f056: 04 02 f058: 12 38 jl $+38 ;abs 0xf07e s = 0; //reset seconds and ... f05a: 82 43 04 02 mov #0, &0x0204 ;r3 As==00 if (++m > 59) { //count miutes, up to one hour f05e: 92 53 08 02 inc &0x0208 ; f062: b2 90 3c 00 cmp #60, &0x0208 ;#0x003c f066: 08 02 f068: 0a 38 jl $+22 ;abs 0xf07e m = 0; //reset minutes and ... f06a: 82 43 08 02 mov #0, &0x0208 ;r3 As==00 if (++h > 23) { //cound hours, up to one day f06e: 92 53 06 02 inc &0x0206 ; f072: b2 90 18 00 cmp #24, &0x0206 ;#0x0018 f076: 06 02 f078: 02 38 jl $+6 ;abs 0xf07e h = 0; //reset hours and ... f07a: 82 43 06 02 mov #0, &0x0206 ;r3 As==00 //++day ... //don't do anything, could count days here } } } } f07e: b1 c0 f0 00 bic #240, 0(r1) ;#0x00f0 f082: 00 00 f084: 00 13 reti f086: 48 69 addc.b r9, r8 ; f088: 2c 20 jnz $+90 ;abs 0xf0e2 f08a: 49 27 jz $-364 ;abs 0xef1e f08c: 6d 20 jnz $+220 ;abs 0xf168 f08e: 61 20 jnz $+196 ;abs 0xf152 f090: 63 6c .word 0x6c63; ???? f092: 6f 63 addc.b #2, r15 ;r3 As==10 f094: 6b 00 .word 0x006b; ???? f096: 25 30 jn $+76 ;abs 0xf0e2 f098: 32 64 addc @r4+, r2 ; f09a: 3a 25 jz $+630 ;abs 0xf310 f09c: 30 32 jn $-926 ;abs 0xecfe f09e: 64 3a jl $-822 ;abs 0xed68 f0a0: 25 30 jn $+76 ;abs 0xf0ec f0a2: 32 64 addc @r4+, r2 ; ... 0000f0a6
: /** Main function with init an an endless loop that is synced with the interrupts trough the lowpower mode. */ int main(void) { f0a6: 31 40 00 03 mov #768, r1 ;#0x0300 int i = 0; f0aa: 0b 43 clr r11 ; WDTCTL = WDTCTL_INIT; //Init watchdog timer f0ac: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 f0b0: 20 01 P1OUT = P1OUT_INIT; //Init output data of port1 f0b2: c2 43 21 00 mov.b #0, &0x0021 ;r3 As==00 P2OUT = P2OUT_INIT; //Init output data of port2 f0b6: c2 43 29 00 mov.b #0, &0x0029 ;r3 As==00 P1SEL = P1SEL_INIT; //Select port or module -function on port1 f0ba: c2 43 26 00 mov.b #0, &0x0026 ;r3 As==00 P2SEL = P2SEL_INIT; //Select port or module -function on port2 f0be: c2 43 2e 00 mov.b #0, &0x002e ;r3 As==00 P1DIR = P1DIR_INIT; //Init port direction register of port1 f0c2: d2 43 22 00 mov.b #1, &0x0022 ;r3 As==01 P2DIR = P2DIR_INIT; //Init port direction register of port2 f0c6: c2 43 2a 00 mov.b #0, &0x002a ;r3 As==00 P6DIR = P6DIR_INIT; //Init port direction register of port2 f0ca: f2 43 36 00 mov.b #-1, &0x0036 ;r3 As==11 P1IES = P1IES_INIT; //init port interrupts f0ce: c2 43 24 00 mov.b #0, &0x0024 ;r3 As==00 P2IES = P2IES_INIT; f0d2: c2 43 2c 00 mov.b #0, &0x002c ;r3 As==00 P1IE = P1IE_INIT; f0d6: c2 43 25 00 mov.b #0, &0x0025 ;r3 As==00 P2IE = P2IE_INIT; f0da: c2 43 2d 00 mov.b #0, &0x002d ;r3 As==00 BCSCTL1 |= DIVA0 | DIVA1; //setup divider for RTC f0de: f2 d0 30 00 bis.b #48, &0x0057 ;#0x0030 f0e2: 57 00 TACTL = TACTL_INIT; //setup timer (still stopped) f0e4: b2 40 c4 01 mov #452, &0x0160 ;#0x01c4 f0e8: 60 01 CCR0 = ONESECOND; //setup first RTC irq f0ea: b2 40 00 02 mov #512, &0x0172 ;#0x0200 f0ee: 72 01 CCTL0 = CCIE; //enable compare interrupts f0f0: b2 40 10 00 mov #16, &0x0162 ;#0x0010 f0f4: 62 01 CCTL1 = 0; //the other modules are not used f0f6: 82 43 64 01 mov #0, &0x0164 ;r3 As==00 CCTL2 = 0; //... f0fa: 82 43 66 01 mov #0, &0x0166 ;r3 As==00 TACTL |= MC1; //start timer f0fe: b2 d0 20 00 bis #32, &0x0160 ;#0x0020 f102: 60 01 eint(); //enable interrupts f104: 32 d2 eint P1OUT |= LED; //light LED during init f106: d2 d3 21 00 bis.b #1, &0x0021 ;r3 As==01 lcdOn(); //reset sequence f10a: b0 12 d6 f1 call #-3626 ;#0xf1d6 lcdInit(); //setup LCD modes f10e: b0 12 d2 f2 call #-3374 ;#0xf2d2 lcdDownloadFont(lcdfont, sizeof(lcdfont)); f112: 3e 40 40 00 mov #64, r14 ;#0x0040 f116: 3f 40 68 f1 mov #-3736, r15 ;#0xf168 f11a: b0 12 0e f3 call #-3314 ;#0xf30e P1OUT &= ~LED; //switch off LED f11e: d2 c3 21 00 bic.b #1, &0x0021 ;r3 As==01 puts("Hi, I'm a clock"); //say hello f122: 3f 40 86 f0 mov #-3962, r15 ;#0xf086 f126: b0 12 7c f9 call #-1668 ;#0xf97c while (1) { //main loop, never ends... lcdInstr(LCD_LINE2); f12a: 7f 40 c0 ff mov.b #-64, r15 ;#0xffc0 f12e: b0 12 32 f2 call #-3534 ;#0xf232 //show the clock //as we are synced with the interrupt, its save to read h,m,s //otherwise a dint..eint around the following line would be //very helpful to prevent bogus values printf("%02d:%02d:%02d", h, m, s); f132: 12 12 04 02 push &0x0204 ; f136: 12 12 08 02 push &0x0208 ; f13a: 12 12 06 02 push &0x0206 ; f13e: 30 12 96 f0 push #-3946 ;#0xf096 f142: b0 12 46 f3 call #-3258 ;#0xf346 //now show the bargraph. it hasn't to do much with a clock //but we want to show the feature here... lcdInstr(LCD_LINE2+15); f146: 7f 40 cf ff mov.b #-49, r15 ;#0xffcf f14a: b0 12 32 f2 call #-3534 ;#0xf232 putchar(i); f14e: 0f 4b mov r11, r15 ; f150: b0 12 40 f0 call #-4032 ;#0xf040 if (++i >= 8) i = 0; //lets show all 8 downloadable chars f154: 1b 53 inc r11 ; f156: 31 52 add #8, r1 ;r2 As==11 f158: 3b 92 cmp #8, r11 ;r2 As==11 f15a: 01 38 jl $+4 ;abs 0xf15e f15c: 0b 43 clr r11 ; LPM0; //sync, wakeup by irq f15e: 32 d0 10 00 bis #16, r2 ;#0x0010 f162: e3 3f jmp $-56 ;abs 0xf12a } } f164: 30 40 ce f9 br #0xf9ce ; 0000f168 : ... f174: 00 00 00 1f 00 00 00 00 00 00 1f 1f 00 00 00 00 ................ f184: 00 1f 1f 1f 00 00 00 00 1f 1f 1f 1f 00 00 00 1f ................ f194: 1f 1f 1f 1f 00 00 1f 1f 1f 1f 1f 1f 00 1f 1f 1f ................ f1a4: 1f 1f 1f 1f .... 0000f1a8 : */ void lcdBusy(void) { char busy; LCDDIR = (char)~(LCD_D4|LCD_D5|LCD_D6|LCD_D7); // f1a8: f2 40 87 ff mov.b #-121, &0x0036 ;#0xff87 f1ac: 36 00 LCDOUT = LCD_RW; //read out satus f1ae: e2 43 35 00 mov.b #2, &0x0035 ;r3 As==10 do { //read out the high nibble with the BF flag LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f1b2: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 nop(); f1b6: 03 43 nop busy = LCDIN & LCD_D7; //poll buy flag f1b8: 5f 42 34 00 mov.b &0x0034,r15 ;0x0034 f1bc: 7f f0 40 00 and.b #64, r15 ;#0x0040 LCDOUT &= ~LCD_E; //back to inactive position f1c0: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 //read out the low nibble, ignore it LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f1c4: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f1c8: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 } while (busy); f1cc: f2 23 jnz $-26 ;abs 0xf1b2 LCDDIR = LCD_D4|LCD_D5|LCD_D6|LCD_D7|LCD_E|LCD_RW|LCD_RS; f1ce: f2 40 7f 00 mov.b #127, &0x0036 ;#0x007f f1d2: 36 00 } f1d4: 30 41 ret 0000f1d6 : /** Turn on the LCD and initialize it to 4 bit interface. */ void lcdOn( void ) { LCDOUT = 0; //reset pins f1d6: c2 43 35 00 mov.b #0, &0x0035 ;r3 As==00 lcdDelay(LCDDELAY1MS*30); //wait more than 30ms f1da: 3f 40 78 69 mov #27000, r15 ;#0x6978 f1de: b0 12 ea f2 call #-3350 ;#0xf2ea //send the reset sequece (3 times the same pattern) LCDOUT = LCD_8BITS; //set 8 bit interface f1e2: f2 40 30 00 mov.b #48, &0x0035 ;#0x0030 f1e6: 35 00 LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f1e8: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f1ec: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdDelay(LCDDELAY1MS*5); //wait a bit f1f0: 3f 40 94 11 mov #4500, r15 ;#0x1194 f1f4: b0 12 ea f2 call #-3350 ;#0xf2ea LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f1f8: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f1fc: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdDelay(LCDDELAY1MS*5); //wait a bit f200: 3f 40 94 11 mov #4500, r15 ;#0x1194 f204: b0 12 ea f2 call #-3350 ;#0xf2ea LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f208: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f20c: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdDelay(LCDDELAY1MS*5); //wait until instr is finished f210: 3f 40 94 11 mov #4500, r15 ;#0x1194 f214: b0 12 ea f2 call #-3350 ;#0xf2ea LCDOUT = LCD_4BITS; //now set up the 4 bit interface f218: f2 40 20 00 mov.b #32, &0x0035 ;#0x0020 f21c: 35 00 LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f21e: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f222: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdBusy(); //wait until instr is finished f226: b0 12 a8 f1 call #-3672 ;#0xf1a8 LCDOUT &= LCD_DATA_OFF; //reset data lines f22a: f2 f0 05 00 and.b #5, &0x0035 ;#0x0005 f22e: 35 00 } f230: 30 41 ret 0000f232 : /** Write an instruction to the LCD. There is a short delay after the instruction. This is because the display controller needs some time execute it. The databook says that 40us are needed (exceptions, see below). This function makes a delay of approx. 70us @ MCLK=1.5MHz. Some instructions are defined in the header file. See there for details. IMPORTANT: Some instructions use much more time execution time on the display controller. If such an instruction is used, the user of this function MUST call lcdDelay(LCDDELAY2) after calling this function! The instructions where this is needed are: LCDON LCDCLEAR */ void lcdInstr( char cmd ) { LCDOUT = cmd & 0xF0; //output upper nibble f232: 4e 4f mov.b r15, r14 ; f234: 7e f0 f0 ff and.b #-16, r14 ;#0xfff0 f238: c2 4e 35 00 mov.b r14, &0x0035 ; LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f23c: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f240: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 LCDOUT = (cmd << 4) & 0xF0;//and then the lower nibble f244: 4f 5f rla.b r15 ; f246: 4f 5f rla.b r15 ; f248: 4f 5f rla.b r15 ; f24a: 4f 5f rla.b r15 ; f24c: c2 4f 35 00 mov.b r15, &0x0035 ; LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f250: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f254: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdBusy(); //wait until instr is finished f258: b0 12 a8 f1 call #-3672 ;#0xf1a8 } f25c: 30 41 ret 0000f25e : /** Write a single character in CGRAM or DDRAM of display controller. When the memory pointer is set to DDRAM (which is the same as the cursor position), the character is written to the display. The lower 127 charcters are the well-known ASCII symbols. The charachters 0 to 7 are the user defined characters. The upper 127 characters contain some symbols and mostly japanese characters. Look at a display manual for a complete table of usable characters. See lcdInstr() on how to set the cursor position. If the memory pointer is set to CGRAM, user defined bitmaps can be downloaded. Please note that this is better done by lcdDownloadFont(). */ void lcdPutc( char c ) { f25e: 4e 4f mov.b r15, r14 ; LCDOUT = (c & 0xF0) | LCD_RS;//output upper nibble f260: 7f f0 f0 ff and.b #-16, r15 ;#0xfff0 f264: 6f d2 bis.b #4, r15 ;r2 As==10 f266: c2 4f 35 00 mov.b r15, &0x0035 ; LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f26a: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f26e: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 LCDOUT = ((c << 4) & 0xF0) | LCD_RS; //and then the lower nibble f272: 4f 4e mov.b r14, r15 ; f274: 8f 11 sxt r15 ; f276: 0f 5f rla r15 ; f278: 0f 5f rla r15 ; f27a: 0f 5f rla r15 ; f27c: 0f 5f rla r15 ; f27e: 6f d2 bis.b #4, r15 ;r2 As==10 f280: c2 4f 35 00 mov.b r15, &0x0035 ; LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f284: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 LCDOUT &= ~LCD_E; //back to inactive position f288: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 lcdBusy(); //wait until instr is finished f28c: b0 12 a8 f1 call #-3672 ;#0xf1a8 } f290: 30 41 ret 0000f292 : /** Read one character from the LCD */ unsigned char lcdGetchar(void) { unsigned char c ; LCDDIR = (char)~(LCD_D4|LCD_D5|LCD_D6|LCD_D7); // f292: f2 40 87 ff mov.b #-121, &0x0036 ;#0xff87 f296: 36 00 LCDOUT = LCD_RW|LCD_RS; //read out data f298: f2 40 06 00 mov.b #6, &0x0035 ;#0x0006 f29c: 35 00 //read out the high nibble with the BF flag LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f29e: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 nop(); f2a2: 03 43 nop c = (LCDIN & 0xf0); f2a4: 5f 42 34 00 mov.b &0x0034,r15 ;0x0034 f2a8: 7f f0 f0 ff and.b #-16, r15 ;#0xfff0 LCDOUT &= ~LCD_E; //back to inactive position f2ac: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 //read out the low nibble, ignore it LCDOUT |= LCD_E; //toggle LCD_E, the enable pin f2b0: d2 d3 35 00 bis.b #1, &0x0035 ;r3 As==01 c |= (LCDIN & 0xf0) >> 4; f2b4: 5e 42 34 00 mov.b &0x0034,r14 ;0x0034 f2b8: 12 c3 clrc f2ba: 4e 10 rrc.b r14 ; f2bc: 4e 11 rra.b r14 ; f2be: 4e 11 rra.b r14 ; f2c0: 4e 11 rra.b r14 ; f2c2: 4f de bis.b r14, r15 ; LCDOUT &= ~LCD_E; //back to inactive position f2c4: d2 c3 35 00 bic.b #1, &0x0035 ;r3 As==01 LCDDIR = LCD_D4|LCD_D5|LCD_D6|LCD_D7|LCD_E|LCD_RW|LCD_RS; f2c8: f2 40 7f 00 mov.b #127, &0x0036 ;#0x007f f2cc: 36 00 return c; f2ce: 7f f3 and.b #-1, r15 ;r3 As==11 } f2d0: 30 41 ret 0000f2d2 : /** Initialize the display with two lines, cursor hidden and clear display. The user might want to call lcdDownloadFont() after this function to complete the display setup. */ void lcdInit( void ) { #ifdef LCD_4LINETYPE // select the extension register (set RE bit) lcdInstr(LCD_FUNCTIONSET | LCD_RE_BIT); // set the 4-line display mode lcdInstr(LCD_EXT_FUNCTIONSET | LCD_4LINES); // clear RE bit lcdInstr(LCD_FUNCTIONSET); #else // set the 2-line display mode lcdInstr(LCD_FUNCTIONSET | LCD_2LINES); f2d2: 7f 40 28 00 mov.b #40, r15 ;#0x0028 f2d6: b0 12 32 f2 call #-3534 ;#0xf232 #endif lcdInstr(LCD_CURSOROFF); //hide cursor f2da: 7f 40 0c 00 mov.b #12, r15 ;#0x000c f2de: b0 12 32 f2 call #-3534 ;#0xf232 lcdInstr(LCD_CLEAR); //clear display f2e2: 5f 43 mov.b #1, r15 ;r3 As==01 f2e4: b0 12 32 f2 call #-3534 ;#0xf232 } f2e8: 30 41 ret 0000f2ea : /** Unspecific delay function (busy wait type). this small assembler bit does not need any C init etc. so we can use the attribute "naked" */ __attribute__ ((naked)) void lcdDelay(unsigned int n) { //first arg comes in register R15 //the loop uses 3 cycles per round //the eight cycles come from the call overhead and ret // //delay_time = (1/MCLK)*(8+(3*n)) asm("lcdloop: dec %0\n jnz lcdloop\n ret" :: "r" (n)); f2ea: 1f 83 dec r15 ; f2ec: fe 23 jnz $-2 ;abs 0xf2ea f2ee: 30 41 ret 0000f2f0 : } #ifdef LCD_EXTRA /** Write a string in CGRAM or DDRAM of display controller. It uses NULL terminated strings, whitch is usual in C code. As this function is based on lcdPutchar(), you may want to have a look at its documentation about the details. Writing a character to the display needs ~60us. Including setting the cursor on a specific position (lcdInstr(LCDLINEy + x)) */ void lcdPuts( char * str ) { f2f0: 0b 12 push r11 ; f2f2: 0b 4f mov r15, r11 ; while (*str != 0) { f2f4: 6e 4f mov.b @r15, r14 ; f2f6: 4e 93 cmp.b #0, r14 ;r3 As==00 f2f8: 08 24 jz $+18 ;abs 0xf30a lcdPutc(*str++); //write char and increment pointer f2fa: 1b 53 inc r11 ; f2fc: 4f 4e mov.b r14, r15 ; f2fe: b0 12 5e f2 call #-3490 ;#0xf25e f302: 6f 4b mov.b @r11, r15 ; f304: 4e 4f mov.b r15, r14 ; f306: 4f 93 cmp.b #0, r15 ;r3 As==00 f308: f8 23 jnz $-14 ;abs 0xf2fa } } f30a: 3b 41 pop r11 ; f30c: 30 41 ret 0000f30e : /** Write font data in CGRAM. This function is intended to download the user definable characters to the display. These are 8 bytes per characte and our display has eight free programmable characters. This makes a maximum of 64 bytes (the function has a limit of ~32000 bytes, but the display controller is limited). This function always starts with downloading the user charcter 0. If you want to replace some characters during program the following procedure is recomended: - Download all eight characters. The ones that never change are located at the end of this font definition. - To replace some charactters, e.g. two. you use this function to download 16 bytes from an other font, which overwrite the first two character bitmaps. - Switching back to the original charachters is done by downloading 16 bytes (or all 64 bytes) from the same pointer as in point 1. Charcter data is specified in the following way: //Font const unsigned char lcdfont[] = { //Charchter 0 0x0a, //00001010 0x15, //00010101 0x0a, //00001010 0x15, //00010101 0x0a, //00001010 0x15, //00010101 0x0a, //00001010 0x15, //00010101 //Charchter 1 0x00, //00000000 . . . . . . //Charchter 7 0x00, //00000000 0x1f, //00011111 0x1f, //00011111 0x1f, //00011111 0x1f, //00011111 0x1f, //00011111 0x1f, //00011111 0x1f, //00011111 }; As you see only 5x8 pixels are used by the display controller. The 5 pixels in the with are located toward the LSB. */ void lcdDownloadFont(const void * fontdata, int size) { f30e: 0b 12 push r11 ; f310: 0a 12 push r10 ; f312: 09 12 push r9 ; f314: 09 4f mov r15, r9 ; f316: 0a 4e mov r14, r10 ; int i; lcdInstr(LCD_CGRAM); f318: 7f 40 40 00 mov.b #64, r15 ;#0x0040 f31c: b0 12 32 f2 call #-3534 ;#0xf232 for (i = 0; i: f346: 2f 43 mov #2, r15 ;r3 As==10 f348: 0f 51 add r1, r15 ; f34a: 3e 4f mov @r15+, r14 ; f34c: 0d 4f mov r15, r13 ; f34e: 3f 40 40 f0 mov #-4032, r15 ;#0xf040 f352: b0 12 bc f3 call #-3140 ;#0xf3bc f356: 30 41 ret 0000f358 : f358: 0b 12 push r11 ; f35a: 0a 12 push r10 ; f35c: 0a 4f mov r15, r10 ; f35e: 0b 4e mov r14, r11 ; f360: 0e 93 cmp #0, r14 ;r3 As==00 f362: 02 20 jnz $+6 ;abs 0xf368 f364: 1f 43 mov #1, r15 ;r3 As==01 f366: 0d 3c jmp $+28 ;abs 0xf382 f368: 6f 4a mov.b @r10, r15 ; f36a: 8f 11 sxt r15 ; f36c: 1a 53 inc r10 ; f36e: 92 12 02 02 call &0x0202 ; f372: 0f 93 cmp #0, r15 ;r3 As==00 f374: 05 38 jl $+12 ;abs 0xf380 f376: 92 53 00 02 inc &0x0200 ; f37a: 3b 53 add #-1, r11 ;r3 As==11 f37c: f5 23 jnz $-20 ;abs 0xf368 f37e: f2 3f jmp $-26 ;abs 0xf364 f380: 3f 43 mov #-1, r15 ;r3 As==11 f382: 3a 41 pop r10 ; f384: 3b 41 pop r11 ; f386: 30 41 ret 0000f388 <__write_pad>: f388: 0b 12 push r11 ; f38a: 0a 12 push r10 ; f38c: 09 12 push r9 ; f38e: 49 4f mov.b r15, r9 ; f390: 4b 4e mov.b r14, r11 ; f392: 5e 93 cmp.b #1, r14 ;r3 As==01 f394: 0c 38 jl $+26 ;abs 0xf3ae f396: 4a 4f mov.b r15, r10 ; f398: 8a 11 sxt r10 ; f39a: 0f 4a mov r10, r15 ; f39c: 92 12 02 02 call &0x0202 ; f3a0: 0f 93 cmp #0, r15 ;r3 As==00 f3a2: 07 38 jl $+16 ;abs 0xf3b2 f3a4: 92 53 00 02 inc &0x0200 ; f3a8: 7b 53 add.b #-1, r11 ;r3 As==11 f3aa: 5b 93 cmp.b #1, r11 ;r3 As==01 f3ac: f6 37 jge $-18 ;abs 0xf39a f3ae: 4f 49 mov.b r9, r15 ; f3b0: 01 3c jmp $+4 ;abs 0xf3b4 f3b2: 3f 43 mov #-1, r15 ;r3 As==11 f3b4: 39 41 pop r9 ; f3b6: 3a 41 pop r10 ; f3b8: 3b 41 pop r11 ; f3ba: 30 41 ret 0000f3bc : f3bc: 0b 12 push r11 ; f3be: 0a 12 push r10 ; f3c0: 09 12 push r9 ; f3c2: 08 12 push r8 ; f3c4: 07 12 push r7 ; f3c6: 06 12 push r6 ; f3c8: 05 12 push r5 ; f3ca: 04 12 push r4 ; f3cc: 31 80 3c 00 sub #60, r1 ;#0x003c f3d0: 05 4d mov r13, r5 ; f3d2: 81 43 30 00 mov #0, 48(r1) ;r3 As==00 f3d6: 81 43 32 00 mov #0, 50(r1) ;r3 As==00 f3da: 82 43 00 02 mov #0, &0x0200 ;r3 As==00 f3de: 82 4f 02 02 mov r15, &0x0202 ; f3e2: 06 4e mov r14, r6 ; f3e4: 0f 46 mov r6, r15 ; f3e6: 67 46 mov.b @r6, r7 ; f3e8: 47 93 cmp.b #0, r7 ;r3 As==00 f3ea: 0a 24 jz $+22 ;abs 0xf400 f3ec: 77 90 25 00 cmp.b #37, r7 ;#0x0025 f3f0: 07 24 jz $+16 ;abs 0xf400 f3f2: 16 53 inc r6 ; f3f4: 67 46 mov.b @r6, r7 ; f3f6: 47 93 cmp.b #0, r7 ;r3 As==00 f3f8: 03 24 jz $+8 ;abs 0xf400 f3fa: 77 90 25 00 cmp.b #37, r7 ;#0x0025 f3fe: f9 23 jnz $-12 ;abs 0xf3f2 f400: 0d 46 mov r6, r13 ; f402: 0d 8f sub r15, r13 ; f404: 02 24 jz $+6 ;abs 0xf40a f406: 30 40 54 f9 br #0xf954 ; f40a: 47 93 cmp.b #0, r7 ;r3 As==00 f40c: 02 20 jnz $+6 ;abs 0xf412 f40e: 30 40 62 f9 br #0xf962 ; f412: 16 53 inc r6 ; f414: c1 43 2e 00 mov.b #0, 46(r1) ;r3 As==00 f418: c1 43 35 00 mov.b #0, 53(r1) ;r3 As==00 f41c: c1 43 2f 00 mov.b #0, 47(r1) ;r3 As==00 f420: 7b 43 mov.b #-1, r11 ;r3 As==11 f422: c1 43 28 00 mov.b #0, 40(r1) ;r3 As==00 f426: 67 46 mov.b @r6, r7 ; f428: 16 53 inc r6 ; f42a: 77 90 75 00 cmp.b #117, r7 ;#0x0075 f42e: 02 20 jnz $+6 ;abs 0xf434 f430: 30 40 2e f9 br #0xf92e ; f434: 4f 47 mov.b r7, r15 ; f436: 7f d0 20 00 bis.b #32, r15 ;#0x0020 f43a: 7f 90 78 00 cmp.b #120, r15 ;#0x0078 f43e: 02 20 jnz $+6 ;abs 0xf444 f440: 30 40 2e f9 br #0xf92e ; f444: 77 90 20 00 cmp.b #32, r7 ;#0x0020 f448: 02 20 jnz $+6 ;abs 0xf44e f44a: 30 40 1a f9 br #0xf91a ; f44e: 77 90 23 00 cmp.b #35, r7 ;#0x0023 f452: 02 20 jnz $+6 ;abs 0xf458 f454: 30 40 12 f9 br #0xf912 ; f458: 77 90 2a 00 cmp.b #42, r7 ;#0x002a f45c: 02 20 jnz $+6 ;abs 0xf462 f45e: 30 40 f6 f8 br #0xf8f6 ; f462: 77 90 2d 00 cmp.b #45, r7 ;#0x002d f466: 02 20 jnz $+6 ;abs 0xf46c f468: 30 40 e6 f8 br #0xf8e6 ; f46c: 77 90 2b 00 cmp.b #43, r7 ;#0x002b f470: 02 20 jnz $+6 ;abs 0xf476 f472: 30 40 dc f8 br #0xf8dc ; f476: 77 90 2e 00 cmp.b #46, r7 ;#0x002e f47a: 02 20 jnz $+6 ;abs 0xf480 f47c: 30 40 76 f8 br #0xf876 ; f480: 77 90 30 00 cmp.b #48, r7 ;#0x0030 f484: 02 20 jnz $+6 ;abs 0xf48a f486: 30 40 60 f8 br #0xf860 ; f48a: 4f 47 mov.b r7, r15 ; f48c: 7f 50 cf ff add.b #-49, r15 ;#0xffcf f490: 7f 90 09 00 cmp.b #9, r15 ;#0x0009 f494: 1a 2c jc $+54 ;abs 0xf4ca f496: 0d 43 clr r13 ; f498: 0f 4d mov r13, r15 ; f49a: 0f 5f rla r15 ; f49c: 0f 5f rla r15 ; f49e: 0e 4d mov r13, r14 ; f4a0: 0e 5e rla r14 ; f4a2: 0d 4f mov r15, r13 ; f4a4: 0d 5e add r14, r13 ; f4a6: 0d 5e add r14, r13 ; f4a8: 0d 5e add r14, r13 ; f4aa: 4f 47 mov.b r7, r15 ; f4ac: 8f 11 sxt r15 ; f4ae: 0d 5f add r15, r13 ; f4b0: 3d 50 d0 ff add #-48, r13 ;#0xffd0 f4b4: 67 46 mov.b @r6, r7 ; f4b6: 16 53 inc r6 ; f4b8: 4f 47 mov.b r7, r15 ; f4ba: 7f 50 d0 ff add.b #-48, r15 ;#0xffd0 f4be: 7f 90 0a 00 cmp.b #10, r15 ;#0x000a f4c2: ea 2b jnc $-42 ;abs 0xf498 f4c4: c1 4d 2f 00 mov.b r13, 47(r1) ; f4c8: b0 3f jmp $-158 ;abs 0xf42a f4ca: 77 90 68 00 cmp.b #104, r7 ;#0x0068 f4ce: c4 25 jz $+906 ;abs 0xf858 f4d0: 77 90 6c 00 cmp.b #108, r7 ;#0x006c f4d4: 03 20 jnz $+8 ;abs 0xf4dc f4d6: d1 d3 2e 00 bis.b #1, 46(r1) ;r3 As==01 f4da: a5 3f jmp $-180 ;abs 0xf426 f4dc: 77 90 63 00 cmp.b #99, r7 ;#0x0063 f4e0: b4 25 jz $+874 ;abs 0xf84a f4e2: 77 90 44 00 cmp.b #68, r7 ;#0x0044 f4e6: ae 25 jz $+862 ;abs 0xf844 f4e8: 77 90 64 00 cmp.b #100, r7 ;#0x0064 f4ec: 7f 25 jz $+768 ;abs 0xf7ec f4ee: 77 90 69 00 cmp.b #105, r7 ;#0x0069 f4f2: 7c 25 jz $+762 ;abs 0xf7ec f4f4: 77 90 4f 00 cmp.b #79, r7 ;#0x004f f4f8: 76 25 jz $+750 ;abs 0xf7e6 f4fa: 77 90 6f 00 cmp.b #111, r7 ;#0x006f f4fe: 70 25 jz $+738 ;abs 0xf7e0 f500: 77 90 70 00 cmp.b #112, r7 ;#0x0070 f504: 5e 25 jz $+702 ;abs 0xf7c2 f506: 77 90 73 00 cmp.b #115, r7 ;#0x0073 f50a: 1f 25 jz $+576 ;abs 0xf74a f50c: 77 90 55 00 cmp.b #85, r7 ;#0x0055 f510: 19 25 jz $+564 ;abs 0xf744 f512: 77 90 75 00 cmp.b #117, r7 ;#0x0075 f516: 12 25 jz $+550 ;abs 0xf73c f518: 77 90 58 00 cmp.b #88, r7 ;#0x0058 f51c: 8f 24 jz $+288 ;abs 0xf63c f51e: 77 90 78 00 cmp.b #120, r7 ;#0x0078 f522: 8c 24 jz $+282 ;abs 0xf63c f524: 47 93 cmp.b #0, r7 ;r3 As==00 f526: 02 20 jnz $+6 ;abs 0xf52c f528: 30 40 62 f9 br #0xf962 ; f52c: 81 41 2c 00 mov r1, 44(r1) ; f530: c1 47 00 00 mov.b r7, 0(r1) ; f534: 59 43 mov.b #1, r9 ;r3 As==01 f536: c1 43 28 00 mov.b #0, 40(r1) ;r3 As==00 f53a: 4b 49 mov.b r9, r11 ; f53c: 5a 41 35 00 mov.b 53(r1), r10 ; f540: 4a 89 sub.b r9, r10 ; f542: 7a 30 jn $+246 ;abs 0xf638 f544: 5e 41 28 00 mov.b 40(r1), r14 ; f548: 4e 93 cmp.b #0, r14 ;r3 As==00 f54a: 70 24 jz $+226 ;abs 0xf62c f54c: 5b 53 inc.b r11 ; f54e: 4b 5a add.b r10, r11 ; f550: 58 41 2e 00 mov.b 46(r1), r8 ; f554: 78 f0 30 00 and.b #48, r8 ;#0x0030 f558: 13 20 jnz $+40 ;abs 0xf580 f55a: 5d 41 2f 00 mov.b 47(r1), r13 ; f55e: 8d 11 sxt r13 ; f560: 4f 4b mov.b r11, r15 ; f562: 8f 11 sxt r15 ; f564: 0d 8f sub r15, r13 ; f566: 1d 93 cmp #1, r13 ;r3 As==01 f568: 0b 38 jl $+24 ;abs 0xf580 f56a: 4e 4d mov.b r13, r14 ; f56c: 7f 40 20 00 mov.b #32, r15 ;#0x0020 f570: b0 12 88 f3 call #-3192 ;#0xf388 f574: 0f 93 cmp #0, r15 ;r3 As==00 f576: 02 34 jge $+6 ;abs 0xf57c f578: 30 40 62 f9 br #0xf962 ; f57c: 5e 41 28 00 mov.b 40(r1), r14 ; f580: 4e 93 cmp.b #0, r14 ;r3 As==00 f582: 4f 20 jnz $+160 ;abs 0xf622 f584: f1 b0 40 00 bit.b #64, 46(r1) ;#0x0040 f588: 2e 00 f58a: 14 24 jz $+42 ;abs 0xf5b4 f58c: 1f 41 2a 00 mov 42(r1), r15 ; f590: 3f f0 00 ff and #-256, r15 ;#0xff00 f594: 3f d0 30 00 bis #48, r15 ;#0x0030 f598: 81 4f 2a 00 mov r15, 42(r1) ; f59c: c1 47 2b 00 mov.b r7, 43(r1) ; f5a0: 2e 43 mov #2, r14 ;r3 As==10 f5a2: 0f 41 mov r1, r15 ; f5a4: 3f 50 2a 00 add #42, r15 ;#0x002a f5a8: b0 12 58 f3 call #-3240 ;#0xf358 f5ac: 0f 93 cmp #0, r15 ;r3 As==00 f5ae: 02 34 jge $+6 ;abs 0xf5b4 f5b0: 30 40 62 f9 br #0xf962 ; f5b4: 78 90 20 00 cmp.b #32, r8 ;#0x0020 f5b8: 24 24 jz $+74 ;abs 0xf602 f5ba: 4e 4a mov.b r10, r14 ; f5bc: 7f 40 30 00 mov.b #48, r15 ;#0x0030 f5c0: b0 12 88 f3 call #-3192 ;#0xf388 f5c4: 0f 93 cmp #0, r15 ;r3 As==00 f5c6: cd 39 jl $+924 ;abs 0xf962 f5c8: 4f 49 mov.b r9, r15 ; f5ca: 8f 11 sxt r15 ; f5cc: 0e 4f mov r15, r14 ; f5ce: 1f 41 2c 00 mov 44(r1), r15 ; f5d2: b0 12 58 f3 call #-3240 ;#0xf358 f5d6: 0f 93 cmp #0, r15 ;r3 As==00 f5d8: c4 39 jl $+906 ;abs 0xf962 f5da: f1 b0 10 00 bit.b #16, 46(r1) ;#0x0010 f5de: 2e 00 f5e0: 01 27 jz $-508 ;abs 0xf3e4 f5e2: 5d 41 2f 00 mov.b 47(r1), r13 ; f5e6: 8d 11 sxt r13 ; f5e8: 4f 4b mov.b r11, r15 ; f5ea: 8f 11 sxt r15 ; f5ec: 0d 8f sub r15, r13 ; f5ee: 1d 93 cmp #1, r13 ;r3 As==01 f5f0: f9 3a jl $-524 ;abs 0xf3e4 f5f2: 4e 4d mov.b r13, r14 ; f5f4: 7f 40 20 00 mov.b #32, r15 ;#0x0020 f5f8: b0 12 88 f3 call #-3192 ;#0xf388 f5fc: 0f 93 cmp #0, r15 ;r3 As==00 f5fe: f2 36 jge $-538 ;abs 0xf3e4 f600: b0 3d jmp $+866 ;abs 0xf962 f602: 5d 41 2f 00 mov.b 47(r1), r13 ; f606: 8d 11 sxt r13 ; f608: 4f 4b mov.b r11, r15 ; f60a: 8f 11 sxt r15 ; f60c: 0d 8f sub r15, r13 ; f60e: 1d 93 cmp #1, r13 ;r3 As==01 f610: d4 3b jl $-86 ;abs 0xf5ba f612: 4e 4d mov.b r13, r14 ; f614: 7f 40 30 00 mov.b #48, r15 ;#0x0030 f618: b0 12 88 f3 call #-3192 ;#0xf388 f61c: 0f 93 cmp #0, r15 ;r3 As==00 f61e: cd 37 jge $-100 ;abs 0xf5ba f620: a0 3d jmp $+834 ;abs 0xf962 f622: 1e 43 mov #1, r14 ;r3 As==01 f624: 0f 41 mov r1, r15 ; f626: 3f 50 28 00 add #40, r15 ;#0x0028 f62a: be 3f jmp $-130 ;abs 0xf5a8 f62c: f1 b0 40 00 bit.b #64, 46(r1) ;#0x0040 f630: 2e 00 f632: 8d 27 jz $-228 ;abs 0xf54e f634: 6b 53 incd.b r11 ; f636: 8b 3f jmp $-232 ;abs 0xf54e f638: 4a 43 clr.b r10 ; f63a: 84 3f jmp $-246 ;abs 0xf544 f63c: f1 40 10 00 mov.b #16, 52(r1) ;#0x0010 f640: 34 00 f642: f1 b2 2e 00 bit.b #8, 46(r1) ;r2 As==11 f646: 09 24 jz $+20 ;abs 0xf65a f648: 81 93 30 00 cmp #0, 48(r1) ;r3 As==00 f64c: 03 20 jnz $+8 ;abs 0xf654 f64e: 81 93 32 00 cmp #0, 50(r1) ;r3 As==00 f652: 03 24 jz $+8 ;abs 0xf65a f654: f1 d0 40 00 bis.b #64, 46(r1) ;#0x0040 f658: 2e 00 f65a: c1 43 28 00 mov.b #0, 40(r1) ;r3 As==00 f65e: c1 4b 35 00 mov.b r11, 53(r1) ; f662: 4b 93 cmp.b #0, r11 ;r3 As==00 f664: 03 38 jl $+8 ;abs 0xf66c f666: f1 f0 df ff and.b #-33, 46(r1) ;#0xffdf f66a: 2e 00 f66c: 0f 41 mov r1, r15 ; f66e: 3f 50 28 00 add #40, r15 ;#0x0028 f672: 81 4f 2c 00 mov r15, 44(r1) ; f676: 81 93 30 00 cmp #0, 48(r1) ;r3 As==00 f67a: 06 20 jnz $+14 ;abs 0xf688 f67c: 81 93 32 00 cmp #0, 50(r1) ;r3 As==00 f680: 03 20 jnz $+8 ;abs 0xf688 f682: c1 93 35 00 cmp.b #0, 53(r1) ;r3 As==00 f686: 3e 24 jz $+126 ;abs 0xf704 f688: d1 41 34 00 mov.b 52(r1), 56(r1) ; f68c: 38 00 f68e: c1 43 39 00 mov.b #0, 57(r1) ;r3 As==00 f692: 81 43 3a 00 mov #0, 58(r1) ;r3 As==00 f696: c1 43 36 00 mov.b #0, 54(r1) ;r3 As==00 f69a: 1e 41 30 00 mov 48(r1), r14 ; f69e: 1f 41 32 00 mov 50(r1), r15 ; f6a2: 1e 81 38 00 sub 56(r1), r14 ; f6a6: 1f 71 3a 00 subc 58(r1), r15 ; f6aa: 02 28 jnc $+6 ;abs 0xf6b0 f6ac: d1 43 36 00 mov.b #1, 54(r1) ;r3 As==01 f6b0: 1c 41 30 00 mov 48(r1), r12 ; f6b4: 1d 41 32 00 mov 50(r1), r13 ; f6b8: 1a 41 38 00 mov 56(r1), r10 ; f6bc: 1b 41 3a 00 mov 58(r1), r11 ; f6c0: b0 12 d2 f9 call #-1582 ;#0xf9d2 f6c4: 44 4e mov.b r14, r4 ; f6c6: 7e 90 0a 00 cmp.b #10, r14 ;#0x000a f6ca: 30 2c jc $+98 ;abs 0xf72c f6cc: 74 50 30 00 add.b #48, r4 ;#0x0030 f6d0: b1 53 2c 00 add #-1, 44(r1) ;r3 As==11 f6d4: 1f 41 2c 00 mov 44(r1), r15 ; f6d8: cf 44 00 00 mov.b r4, 0(r15) ; f6dc: 1c 41 30 00 mov 48(r1), r12 ; f6e0: 1d 41 32 00 mov 50(r1), r13 ; f6e4: 1a 41 38 00 mov 56(r1), r10 ; f6e8: 1b 41 3a 00 mov 58(r1), r11 ; f6ec: b0 12 d2 f9 call #-1582 ;#0xf9d2 f6f0: 81 4c 30 00 mov r12, 48(r1) ; f6f4: 81 4d 32 00 mov r13, 50(r1) ; f6f8: c1 93 36 00 cmp.b #0, 54(r1) ;r3 As==00 f6fc: cc 23 jnz $-102 ;abs 0xf696 f6fe: f1 92 34 00 cmp.b #8, 52(r1) ;r2 As==11 f702: 06 24 jz $+14 ;abs 0xf710 f704: 49 41 mov.b r1, r9 ; f706: 59 81 2c 00 sub.b 44(r1), r9 ; f70a: 79 50 28 00 add.b #40, r9 ;#0x0028 f70e: 15 3f jmp $-468 ;abs 0xf53a f710: f1 b2 2e 00 bit.b #8, 46(r1) ;r2 As==11 f714: f7 27 jz $-16 ;abs 0xf704 f716: 74 90 30 00 cmp.b #48, r4 ;#0x0030 f71a: f4 27 jz $-22 ;abs 0xf704 f71c: b1 53 2c 00 add #-1, 44(r1) ;r3 As==11 f720: 1f 41 2c 00 mov 44(r1), r15 ; f724: ff 40 30 00 mov.b #48, 0(r15) ;#0x0030 f728: 00 00 f72a: ec 3f jmp $-38 ;abs 0xf704 f72c: 74 50 57 00 add.b #87, r4 ;#0x0057 f730: 77 90 58 00 cmp.b #88, r7 ;#0x0058 f734: cd 23 jnz $-100 ;abs 0xf6d0 f736: 74 f0 df ff and.b #-33, r4 ;#0xffdf f73a: ca 3f jmp $-106 ;abs 0xf6d0 f73c: f1 40 0a 00 mov.b #10, 52(r1) ;#0x000a f740: 34 00 f742: 8b 3f jmp $-232 ;abs 0xf65a f744: d1 d3 2e 00 bis.b #1, 46(r1) ;r3 As==01 f748: f9 3f jmp $-12 ;abs 0xf73c f74a: 0f 45 mov r5, r15 ; f74c: 25 53 incd r5 ; f74e: a1 4f 2c 00 mov @r15, 44(r1) ; f752: 81 93 2c 00 cmp #0, 44(r1) ;r3 As==00 f756: 1e 24 jz $+62 ;abs 0xf794 f758: 4b 93 cmp.b #0, r11 ;r3 As==00 f75a: 11 38 jl $+36 ;abs 0xf77e f75c: 4f 4b mov.b r11, r15 ; f75e: 8f 11 sxt r15 ; f760: 0d 4f mov r15, r13 ; f762: 0e 43 clr r14 ; f764: 1f 41 2c 00 mov 44(r1), r15 ; f768: b0 12 aa f9 call #-1622 ;#0xf9aa f76c: 0f 93 cmp #0, r15 ;r3 As==00 f76e: 05 24 jz $+12 ;abs 0xf77a f770: 49 4f mov.b r15, r9 ; f772: 59 81 2c 00 sub.b 44(r1), r9 ; f776: 4b 99 cmp.b r9, r11 ; f778: de 36 jge $-578 ;abs 0xf536 f77a: 49 4b mov.b r11, r9 ; f77c: dc 3e jmp $-582 ;abs 0xf536 f77e: 1f 41 2c 00 mov 44(r1), r15 ; f782: 1f 83 dec r15 ; f784: 1f 53 inc r15 ; f786: cf 93 00 00 cmp.b #0, 0(r15) ;r3 As==00 f78a: fc 23 jnz $-6 ;abs 0xf784 f78c: 49 4f mov.b r15, r9 ; f78e: 59 81 2c 00 sub.b 44(r1), r9 ; f792: d1 3e jmp $-604 ;abs 0xf536 f794: 81 41 2c 00 mov r1, 44(r1) ; f798: f1 40 28 00 mov.b #40, 0(r1) ;#0x0028 f79c: 00 00 f79e: f1 40 6e 00 mov.b #110, 1(r1) ;#0x006e f7a2: 01 00 f7a4: f1 40 75 00 mov.b #117, 2(r1) ;#0x0075 f7a8: 02 00 f7aa: f1 40 6c 00 mov.b #108, 3(r1) ;#0x006c f7ae: 03 00 f7b0: f1 40 6c 00 mov.b #108, 4(r1) ;#0x006c f7b4: 04 00 f7b6: f1 40 29 00 mov.b #41, 5(r1) ;#0x0029 f7ba: 05 00 f7bc: c1 43 06 00 mov.b #0, 6(r1) ;r3 As==00 f7c0: cb 3f jmp $-104 ;abs 0xf758 f7c2: 0f 45 mov r5, r15 ; f7c4: 25 53 incd r5 ; f7c6: a1 4f 30 00 mov @r15, 48(r1) ; f7ca: 81 43 32 00 mov #0, 50(r1) ;r3 As==00 f7ce: f1 40 10 00 mov.b #16, 52(r1) ;#0x0010 f7d2: 34 00 f7d4: f1 d0 40 00 bis.b #64, 46(r1) ;#0x0040 f7d8: 2e 00 f7da: 77 40 78 00 mov.b #120, r7 ;#0x0078 f7de: 3d 3f jmp $-388 ;abs 0xf65a f7e0: f1 42 34 00 mov.b #8, 52(r1) ;r2 As==11 f7e4: 3a 3f jmp $-394 ;abs 0xf65a f7e6: d1 d3 2e 00 bis.b #1, 46(r1) ;r3 As==01 f7ea: fa 3f jmp $-10 ;abs 0xf7e0 f7ec: d1 b3 2e 00 bit.b #1, 46(r1) ;r3 As==01 f7f0: 19 24 jz $+52 ;abs 0xf824 f7f2: 0f 45 mov r5, r15 ; f7f4: 25 52 add #4, r5 ;r2 As==10 f7f6: b1 4f 30 00 mov @r15+, 48(r1) ; f7fa: b1 4f 32 00 mov @r15+, 50(r1) ; f7fe: 81 93 32 00 cmp #0, 50(r1) ;r3 As==00 f802: 04 38 jl $+10 ;abs 0xf80c f804: f1 40 0a 00 mov.b #10, 52(r1) ;#0x000a f808: 34 00 f80a: 29 3f jmp $-428 ;abs 0xf65e f80c: b1 e3 30 00 xor #-1, 48(r1) ;r3 As==11 f810: b1 e3 32 00 xor #-1, 50(r1) ;r3 As==11 f814: 91 53 30 00 inc 48(r1) ; f818: 81 63 32 00 adc 50(r1) ; f81c: f1 40 2d 00 mov.b #45, 40(r1) ;#0x002d f820: 28 00 f822: f0 3f jmp $-30 ;abs 0xf804 f824: 0f 45 mov r5, r15 ; f826: 25 53 incd r5 ; f828: a1 4f 30 00 mov @r15, 48(r1) ; f82c: 91 41 30 00 mov 48(r1), 50(r1) ; f830: 32 00 f832: 91 51 32 00 rla 50(r1) ; f836: 32 00 f838: 91 71 32 00 subc 50(r1), 50(r1) ; f83c: 32 00 f83e: b1 e3 32 00 xor #-1, 50(r1) ;r3 As==11 f842: dd 3f jmp $-68 ;abs 0xf7fe f844: d1 d3 2e 00 bis.b #1, 46(r1) ;r3 As==01 f848: d1 3f jmp $-92 ;abs 0xf7ec f84a: 81 41 2c 00 mov r1, 44(r1) ; f84e: 0f 45 mov r5, r15 ; f850: 25 53 incd r5 ; f852: e1 4f 00 00 mov.b @r15, 0(r1) ; f856: 6e 3e jmp $-802 ;abs 0xf534 f858: e1 d2 2e 00 bis.b #4, 46(r1) ;r2 As==10 f85c: 30 40 26 f4 br #0xf426 ; f860: f1 b0 10 00 bit.b #16, 46(r1) ;#0x0010 f864: 2e 00 f866: 02 24 jz $+6 ;abs 0xf86c f868: 30 40 26 f4 br #0xf426 ; f86c: f1 d0 20 00 bis.b #32, 46(r1) ;#0x0020 f870: 2e 00 f872: 30 40 26 f4 br #0xf426 ; f876: 67 46 mov.b @r6, r7 ; f878: 16 53 inc r6 ; f87a: 77 90 2a 00 cmp.b #42, r7 ;#0x002a f87e: 24 24 jz $+74 ;abs 0xf8c8 f880: 0d 43 clr r13 ; f882: 4f 47 mov.b r7, r15 ; f884: 7f 50 d0 ff add.b #-48, r15 ;#0xffd0 f888: 7f 90 0a 00 cmp.b #10, r15 ;#0x000a f88c: 16 2c jc $+46 ;abs 0xf8ba f88e: 0f 4d mov r13, r15 ; f890: 0f 5f rla r15 ; f892: 0f 5f rla r15 ; f894: 0e 4d mov r13, r14 ; f896: 0e 5e rla r14 ; f898: 0d 4f mov r15, r13 ; f89a: 0d 5e add r14, r13 ; f89c: 0d 5e add r14, r13 ; f89e: 0d 5e add r14, r13 ; f8a0: 4f 47 mov.b r7, r15 ; f8a2: 8f 11 sxt r15 ; f8a4: 0d 5f add r15, r13 ; f8a6: 3d 50 d0 ff add #-48, r13 ;#0xffd0 f8aa: 67 46 mov.b @r6, r7 ; f8ac: 16 53 inc r6 ; f8ae: 4f 47 mov.b r7, r15 ; f8b0: 7f 50 d0 ff add.b #-48, r15 ;#0xffd0 f8b4: 7f 90 0a 00 cmp.b #10, r15 ;#0x000a f8b8: ea 2b jnc $-42 ;abs 0xf88e f8ba: 0f 4d mov r13, r15 ; f8bc: 3d 93 cmp #-1, r13 ;r3 As==11 f8be: 01 34 jge $+4 ;abs 0xf8c2 f8c0: 3f 43 mov #-1, r15 ;r3 As==11 f8c2: 4b 4f mov.b r15, r11 ; f8c4: 30 40 2a f4 br #0xf42a ; f8c8: 0f 45 mov r5, r15 ; f8ca: 25 53 incd r5 ; f8cc: 2d 4f mov @r15, r13 ; f8ce: 0f 4d mov r13, r15 ; f8d0: 3d 93 cmp #-1, r13 ;r3 As==11 f8d2: 01 34 jge $+4 ;abs 0xf8d6 f8d4: 3f 43 mov #-1, r15 ;r3 As==11 f8d6: 4b 4f mov.b r15, r11 ; f8d8: 30 40 26 f4 br #0xf426 ; f8dc: f1 40 2b 00 mov.b #43, 40(r1) ;#0x002b f8e0: 28 00 f8e2: 30 40 26 f4 br #0xf426 ; f8e6: f1 d0 10 00 bis.b #16, 46(r1) ;#0x0010 f8ea: 2e 00 f8ec: f1 f0 df ff and.b #-33, 46(r1) ;#0xffdf f8f0: 2e 00 f8f2: 30 40 26 f4 br #0xf426 ; f8f6: 0f 45 mov r5, r15 ; f8f8: 25 53 incd r5 ; f8fa: e1 4f 2f 00 mov.b @r15, 47(r1) ; f8fe: c1 93 2f 00 cmp.b #0, 47(r1) ;r3 As==00 f902: 02 38 jl $+6 ;abs 0xf908 f904: 30 40 26 f4 br #0xf426 ; f908: f1 e3 2f 00 xor.b #-1, 47(r1) ;r3 As==11 f90c: d1 53 2f 00 inc.b 47(r1) ; f910: ea 3f jmp $-42 ;abs 0xf8e6 f912: f1 d2 2e 00 bis.b #8, 46(r1) ;r2 As==11 f916: 30 40 26 f4 br #0xf426 ; f91a: c1 93 28 00 cmp.b #0, 40(r1) ;r3 As==00 f91e: 02 24 jz $+6 ;abs 0xf924 f920: 30 40 26 f4 br #0xf426 ; f924: f1 40 20 00 mov.b #32, 40(r1) ;#0x0020 f928: 28 00 f92a: 30 40 26 f4 br #0xf426 ; f92e: d1 b3 2e 00 bit.b #1, 46(r1) ;r3 As==01 f932: 08 24 jz $+18 ;abs 0xf944 f934: 0f 45 mov r5, r15 ; f936: 25 52 add #4, r5 ;r2 As==10 f938: b1 4f 30 00 mov @r15+, 48(r1) ; f93c: b1 4f 32 00 mov @r15+, 50(r1) ; f940: 30 40 44 f4 br #0xf444 ; f944: 0f 45 mov r5, r15 ; f946: 25 53 incd r5 ; f948: a1 4f 30 00 mov @r15, 48(r1) ; f94c: 81 43 32 00 mov #0, 50(r1) ;r3 As==00 f950: 30 40 44 f4 br #0xf444 ; f954: 0e 4d mov r13, r14 ; f956: b0 12 58 f3 call #-3240 ;#0xf358 f95a: 0f 93 cmp #0, r15 ;r3 As==00 f95c: 02 38 jl $+6 ;abs 0xf962 f95e: 30 40 0a f4 br #0xf40a ; f962: 1f 42 00 02 mov &0x0200,r15 ;0x0200 f966: 31 50 3c 00 add #60, r1 ;#0x003c f96a: 34 41 pop r4 ; f96c: 35 41 pop r5 ; f96e: 36 41 pop r6 ; f970: 37 41 pop r7 ; f972: 38 41 pop r8 ; f974: 39 41 pop r9 ; f976: 3a 41 pop r10 ; f978: 3b 41 pop r11 ; f97a: 30 41 ret 0000f97c : f97c: 0b 12 push r11 ; f97e: 0b 4f mov r15, r11 ; f980: 0e 43 clr r14 ; f982: 6f 4b mov.b @r11, r15 ; f984: 4f 93 cmp.b #0, r15 ;r3 As==00 f986: 09 24 jz $+20 ;abs 0xf99a f988: 8f 11 sxt r15 ; f98a: 1b 53 inc r11 ; f98c: b0 12 40 f0 call #-4032 ;#0xf040 f990: 0e 4f mov r15, r14 ; f992: 0f 93 cmp #0, r15 ;r3 As==00 f994: f6 37 jge $-18 ;abs 0xf982 f996: 0f 4e mov r14, r15 ; f998: 06 3c jmp $+14 ;abs 0xf9a6 f99a: 0e 93 cmp #0, r14 ;r3 As==00 f99c: fc 3b jl $-6 ;abs 0xf996 f99e: 3f 40 0a 00 mov #10, r15 ;#0x000a f9a2: b0 12 40 f0 call #-4032 ;#0xf040 f9a6: 3b 41 pop r11 ; f9a8: 30 41 ret 0000f9aa : f9aa: 0b 12 push r11 ; f9ac: 0b 4f mov r15, r11 ; f9ae: 4c 4e mov.b r14, r12 ; f9b0: 0d 93 cmp #0, r13 ;r3 As==00 f9b2: 07 24 jz $+16 ;abs 0xf9c2 f9b4: 0e 4b mov r11, r14 ; f9b6: 6f 4e mov.b @r14, r15 ; f9b8: 1e 53 inc r14 ; f9ba: 4f 9c cmp.b r12, r15 ; f9bc: 04 24 jz $+10 ;abs 0xf9c6 f9be: 3d 53 add #-1, r13 ;r3 As==11 f9c0: fa 23 jnz $-10 ;abs 0xf9b6 f9c2: 0f 43 clr r15 ; f9c4: 02 3c jmp $+6 ;abs 0xf9ca f9c6: 0f 4e mov r14, r15 ; f9c8: 3f 53 add #-1, r15 ;r3 As==11 f9ca: 3b 41 pop r11 ; f9cc: 30 41 ret 0000f9ce <__stop_progExec__>: f9ce: 02 df bis r15, r2 ; f9d0: fe 3f jmp $-2 ;abs 0xf9ce 0000f9d2 <__udivmodsi4>: f9d2: 0f ef xor r15, r15 ; f9d4: 0e ee xor r14, r14 ; f9d6: 39 40 21 00 mov #33, r9 ;#0x0021 f9da: 0a 3c jmp $+22 ;abs 0xf9f0 f9dc: 08 10 rrc r8 ; f9de: 0e 6e rlc r14 ; f9e0: 0f 6f rlc r15 ; f9e2: 0f 9b cmp r11, r15 ; f9e4: 05 28 jnc $+12 ;abs 0xf9f0 f9e6: 02 20 jnz $+6 ;abs 0xf9ec f9e8: 0e 9a cmp r10, r14 ; f9ea: 02 28 jnc $+6 ;abs 0xf9f0 f9ec: 0e 8a sub r10, r14 ; f9ee: 0f 7b subc r11, r15 ; f9f0: 0c 6c rlc r12 ; f9f2: 0d 6d rlc r13 ; f9f4: 08 68 rlc r8 ; f9f6: 19 83 dec r9 ; f9f8: f1 23 jnz $-28 ;abs 0xf9dc f9fa: 30 41 ret Disassembly of section .vectors: 0000ffe0 : ffe0: 3a f0 3a f0 3a f0 3a f0 3a f0 3a f0 3a f0 3a f0 :.:.:.:.:.:.:.:. fff0: 3a f0 48 f0 3a f0 3a f0 3a f0 3a f0 3a f0 00 f0 :.H.:.:.:.:.:...