leds.elf: file format elf32-msp430 SYMBOL TABLE: 0000e000 l d .text 00000000 00000200 l d .data 00000000 00000c00 l d .bootloader 00000000 00001000 l d .infomem 00000000 00001000 l d .infomemnobits 00000000 00000204 l d .bss 00000000 00000204 l d .noinit 00000000 0000ffe0 l d .vectors 00000000 00000000 l d .stab 00000000 00000000 l d .stabstr 00000000 00000000 l d *ABS* 00000000 00000000 l d *ABS* 00000000 00000000 l d *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 gcrt0.S 00000000 l df *ABS* 00000000 gcrt0.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 gcrt0.S 00000070 l *ABS* 00000000 U0CTL 00000071 l *ABS* 00000000 U0TCTL 00000072 l *ABS* 00000000 U0RCTL 00000073 l *ABS* 00000000 U0MCTL 00000074 l *ABS* 00000000 U0BR0 00000075 l *ABS* 00000000 U0BR1 00000076 l *ABS* 00000000 U0RXBUF 00000077 l *ABS* 00000000 U0TXBUF 00000070 l *ABS* 00000000 UCTL 00000071 l *ABS* 00000000 UTCTL 00000072 l *ABS* 00000000 URCTL 00000073 l *ABS* 00000000 UMCTL 00000074 l *ABS* 00000000 UBR0 00000075 l *ABS* 00000000 UBR1 00000076 l *ABS* 00000000 RXBUF 00000077 l *ABS* 00000000 TXBUF 00000070 l *ABS* 00000000 UCTL0 00000071 l *ABS* 00000000 UTCTL0 00000072 l *ABS* 00000000 URCTL0 00000073 l *ABS* 00000000 UMCTL0 00000074 l *ABS* 00000000 UBR00 00000075 l *ABS* 00000000 UBR10 00000076 l *ABS* 00000000 RXBUF0 00000077 l *ABS* 00000000 TXBUF0 00000070 l *ABS* 00000000 UCTL_0 00000071 l *ABS* 00000000 UTCTL_0 00000072 l *ABS* 00000000 URCTL_0 00000073 l *ABS* 00000000 UMCTL_0 00000074 l *ABS* 00000000 UBR0_0 00000075 l *ABS* 00000000 UBR1_0 00000076 l *ABS* 00000000 RXBUF_0 00000077 l *ABS* 00000000 TXBUF_0 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 00000018 l *ABS* 00000000 P3IN 00000019 l *ABS* 00000000 P3OUT 0000001a l *ABS* 00000000 P3DIR 0000001b l *ABS* 00000000 P3SEL 0000012e l *ABS* 00000000 TAIV 00000160 l *ABS* 00000000 TACTL 00000162 l *ABS* 00000000 TACCTL0 00000164 l *ABS* 00000000 TACCTL1 00000166 l *ABS* 00000000 TACCTL2 00000170 l *ABS* 00000000 TAR 00000172 l *ABS* 00000000 TACCR0 00000174 l *ABS* 00000000 TACCR1 00000176 l *ABS* 00000000 TACCR2 00000162 l *ABS* 00000000 CCTL0 00000164 l *ABS* 00000000 CCTL1 00000166 l *ABS* 00000000 CCTL2 00000172 l *ABS* 00000000 CCR0 00000174 l *ABS* 00000000 CCR1 00000176 l *ABS* 00000000 CCR2 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 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 00000001 l *ABS* 00000000 IE2 00000003 l *ABS* 00000000 IFG2 00000005 l *ABS* 00000000 ME2 00000000 l df *ABS* 00000000 main.c 0000e496 l .text 00000000 Letext 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 00000000 l df *ABS* 00000000 config/msp430/libgcc.S 0000e4b0 g .text 00000000 __divmodqi4 0000e0e8 g F .text 0000022a out_leds 0000e538 g .text 00000000 __udivmodhi4 0000e554 g .text 00000000 _etext 0000e496 w .text 00000000 __stop_progExec__ 0000e03a g .text 00000000 _unexpected_1_ 0000e03a w .text 00000000 vector_ffe0 0000e08a g F .text 0000005e sys_init 0000e03a w .text 00000000 vector_ffec 0000e040 g .text 00000000 vector_fff0 0000e03a g .text 00000000 __dtors_end 00000204 g .bss 00000000 __bss_end 0000e03a w .text 00000000 vector_fffc 0000e49a g .text 00000000 __mulhi3 0000e03a w .text 00000000 vector_ffe4 0000ffe0 g O .vectors 00000020 InterruptVectors 0000e3bc g F .text 00000012 clear_leds 0000e040 g F .text 0000001c TA1_VEC 0000e06e g F .text 0000001c pow 0000e03a w .text 00000000 vector_ffe2 0000e03a w .text 00000000 vector_ffe8 0000e03e w .text 00000000 _unexpected_ 0000e4e6 g .text 00000000 __divmodhi4 0000e03a w .text 00000000 vector_fffa 0000e000 g .text 00000000 _reset_vector__ 0000e03a g .text 00000000 __ctors_start 00000204 g .bss 00000000 __bss_start 0000e03a w .text 00000000 vector_ffee 0000e03a w .text 00000000 vector_fff4 0000e3ce g F .text 000000c8 main 0000e03a w .text 00000000 vector_fff8 0000e03a w .text 00000000 vector_fff2 0000e312 g F .text 000000aa shutter 00000202 g O .data 00000002 seconds 00010000 g .vectors 00000000 _vectors_end 0000e03a w .text 00000000 vector_ffe6 0000e05c g F .text 00000012 delay 0000e51c g .text 00000000 __udivmodqi4 0000e03a g .text 00000000 __dtors_start 0000e03a g .text 00000000 __ctors_end 00000300 g *ABS* 00000000 __stack 00000204 g .data 00000000 _edata 00000204 g .noinit 00000000 _end 0000e03a w .text 00000000 vector_fff6 00000200 g O .data 00000002 minutes 00000200 g .data 00000000 __data_start 0000e03a w .text 00000000 vector_ffea Disassembly of section .text: 0000e000 <_reset_vector__>: e000: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 e004: 20 01 e006: 3f 40 54 e5 mov #-6828, r15 ;#0xe554 e00a: 3e 40 00 02 mov #512, r14 ;#0x0200 e00e: 3d 40 04 02 mov #516, r13 ;#0x0204 e012: 0d 9e cmp r14, r13 ; e014: 05 24 jz $+12 ;abs 0xe020 e016: fe 4f 00 00 mov.b @r15+, 0(r14) ; e01a: 1e 53 inc r14 ; e01c: 0e 9d cmp r13, r14 ; e01e: fb 2b jnc $-8 ;abs 0xe016 e020: 3f 40 04 02 mov #516, r15 ;#0x0204 e024: 3d 40 04 02 mov #516, r13 ;#0x0204 e028: 0d 9f cmp r15, r13 ; e02a: 05 24 jz $+12 ;abs 0xe036 e02c: cf 43 00 00 mov.b #0, 0(r15) ;r3 As==00 e030: 1f 53 inc r15 ; e032: 0f 9d cmp r13, r15 ; e034: fb 2b jnc $-8 ;abs 0xe02c e036: 30 40 ce e3 br #0xe3ce ; 0000e03a <__ctors_end>: e03a: 30 40 3e e0 br #0xe03e ; 0000e03e <_unexpected_>: e03e: 00 13 reti 0000e040 : int seconds=0; interrupt (TIMERA1_VECTOR) TA1_VEC(void) { e040: 0f 12 push r15 ; if((TAIV == 0x0A) && (seconds > 0)) e042: b2 90 0a 00 cmp #10, &0x012e ;#0x000a e046: 2e 01 e048: 07 20 jnz $+16 ;abs 0xe058 e04a: 1f 42 02 02 mov &0x0202,r15 ;0x0202 e04e: 1f 93 cmp #1, r15 ;r3 As==01 e050: 03 38 jl $+8 ;abs 0xe058 { seconds--; e052: 3f 53 add #-1, r15 ;r3 As==11 e054: 82 4f 02 02 mov r15, &0x0202 ; } } e058: 3f 41 pop r15 ; e05a: 00 13 reti 0000e05c : /** Delay function. */ void delay(unsigned int d) { int i; for (i = 0; i: int pow(int x, int y) { e06e: 0a 12 push r10 ; int z,t=1; e070: 1a 43 mov #1, r10 ;r3 As==01 for(z=0; z < y; z++) e072: 1e 93 cmp #1, r14 ;r3 As==01 e074: 07 38 jl $+16 ;abs 0xe084 e076: 0d 4e mov r14, r13 ; { t*=x; e078: 0c 4f mov r15, r12 ; e07a: b0 12 9a e4 call #-7014 ;#0xe49a e07e: 0a 4e mov r14, r10 ; e080: 3d 53 add #-1, r13 ;r3 As==11 e082: fa 23 jnz $-10 ;abs 0xe078 } return t; } e084: 0f 4a mov r10, r15 ; e086: 3a 41 pop r10 ; e088: 30 41 ret 0000e08a : void sys_init() { //FLL_CTL0 |= XCAP10PF; //FLL_CTL0 &= ~XTS_FLL; //LF crystal //while((FLL_CTL0 & XT2OF) == XT2OF); //IFG1 &= ~OFIFG; //while((FLL_CTL0 & XT2OF) == XT2OF); //while((FLL_CTL0 & LFOF) == LFOF) // delay(0xaf); //while((FLL_CTL0 & DCOF) == DCOF) // delay(0xaf); //while((FLL_CTL0 & XT1OF) == XT1OF); //IFG1 &= ~OFIFG; //FLL_CTL1 &= ~SELM_XT1 WDTCTL = WDTCTL_INIT; //Init watchdog timer e08a: b2 40 80 5a mov #23168, &0x0120 ;#0x5a80 e08e: 20 01 P1OUT = P1OUT_INIT; //Init output data of port1 e090: f2 43 21 00 mov.b #-1, &0x0021 ;r3 As==11 P2OUT = P2OUT_INIT; //Init output data of port2 e094: f2 40 18 00 mov.b #24, &0x0029 ;#0x0018 e098: 29 00 P3OUT = P3OUT_INIT; e09a: f2 40 f0 ff mov.b #-16, &0x0019 ;#0xfff0 e09e: 19 00 P1SEL = P1SEL_INIT; //Select port or module -function on port1 e0a0: c2 43 26 00 mov.b #0, &0x0026 ;r3 As==00 P2SEL = P2SEL_INIT; //Select port or module -function on port2 e0a4: d2 43 2e 00 mov.b #1, &0x002e ;r3 As==01 P3SEL = P3SEL_INIT; e0a8: c2 43 1b 00 mov.b #0, &0x001b ;r3 As==00 P1DIR = P1DIR_INIT; //Init port direction register of port1 e0ac: f2 43 22 00 mov.b #-1, &0x0022 ;r3 As==11 P2DIR = P2DIR_INIT; //Init port direction register of port2 e0b0: f2 43 2a 00 mov.b #-1, &0x002a ;r3 As==11 P3DIR = P3DIR_INIT; e0b4: f2 40 f0 ff mov.b #-16, &0x001a ;#0xfff0 e0b8: 1a 00 P1IES = P1IES_INIT; //init port interrupts e0ba: c2 43 24 00 mov.b #0, &0x0024 ;r3 As==00 P2IES = P2IES_INIT; e0be: c2 43 2c 00 mov.b #0, &0x002c ;r3 As==00 P1IE = P1IE_INIT; e0c2: c2 43 25 00 mov.b #0, &0x0025 ;r3 As==00 P2IE = P2IE_INIT; e0c6: c2 43 2d 00 mov.b #0, &0x002d ;r3 As==00 TACTL = TASSEL0; e0ca: b2 40 00 01 mov #256, &0x0160 ;#0x0100 e0ce: 60 01 TACCR0 = 32768; //one second intervals e0d0: b2 40 00 80 mov #-32768,&0x0172 ;#0x8000 e0d4: 72 01 TAR = 0; e0d6: 82 43 70 01 mov #0, &0x0170 ;r3 As==00 delay(0xffff); e0da: 3f 43 mov #-1, r15 ;r3 As==11 e0dc: b0 12 5c e0 call #-8100 ;#0xe05c delay(0xffff); e0e0: 3f 43 mov #-1, r15 ;r3 As==11 e0e2: b0 12 5c e0 call #-8100 ;#0xe05c } e0e6: 30 41 ret 0000e0e8 : void out_leds(char c) { e0e8: 0b 12 push r11 ; e0ea: 0a 12 push r10 ; e0ec: 09 12 push r9 ; e0ee: 49 4f mov.b r15, r9 ; int ones; switch(c/10) e0f0: 4c 4f mov.b r15, r12 ; e0f2: 7a 40 0a 00 mov.b #10, r10 ;#0x000a e0f6: b0 12 b0 e4 call #-6992 ;#0xe4b0 e0fa: 4f 4c mov.b r12, r15 ; e0fc: 8f 11 sxt r15 ; e0fe: 3f 90 0a 00 cmp #10, r15 ;#0x000a e102: 1c 2c jc $+58 ;abs 0xe13c e104: 0f 5f rla r15 ; e106: 10 4f 0a e1 br -7926(r15) ; e10a: 1e e1 5c e2 xor -7588(r1),r14 ; e10e: 68 e2 xor.b #4, r8 ;r2 As==10 e110: 82 e2 9c e2 xor r2, &0xe29c ; e114: ac e2 b8 e2 xor #4, -7496(r12);r2 As==10 e118: cc e2 d4 e2 xor.b r2, -7468(r12); e11c: f4 e2 f2 f0 xor.b #8, -3854(r4);r2 As==11 { case 0: b0b; e120: df ff 21 00 and.b 33(r15),-3854(r15); e124: f2 f0 e126: bf ff 21 00 and @r15+, 33(r15) ; e12a: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e12e: d2 c3 21 00 bic.b #1, &0x0021 ;r3 As==01 e132: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e136: f2 f0 7f 00 and.b #127, &0x0021 ;#0x007f e13a: 21 00 break; case 1: b1b; break; case 2: b2b; break; case 3: b3b; break; case 4: b4b; break; case 5: b5b; break; case 6: b6b; break; case 7: b7b; break; case 8: b8b; break; case 9: b9b; break; } //ones = c; for(ones = c; ones >= 10; ones -= 10); e13c: 4c 49 mov.b r9, r12 ; e13e: 8c 11 sxt r12 ; e140: 3c 90 0a 00 cmp #10, r12 ;#0x000a e144: 05 38 jl $+12 ;abs 0xe150 e146: 3c 50 f6 ff add #-10, r12 ;#0xfff6 e14a: 3c 90 0a 00 cmp #10, r12 ;#0x000a e14e: fb 37 jge $-8 ;abs 0xe146 switch(ones) e150: 3c 90 0a 00 cmp #10, r12 ;#0x000a e154: da 2c jc $+438 ;abs 0xe30a e156: 0f 4c mov r12, r15 ; e158: 0f 5f rla r15 ; e15a: 10 4f 5e e1 br -7842(r15) ; e15e: 72 e1 xor.b @r1+, r2 ; e160: 96 e1 a2 e1 xor -7774(r1),-7742(r6); e164: c2 e1 e166: e0 e1 f2 e1 xor.b @r1, 0xe1f2 ; PC rel. 0xc35a e16a: 00 e2 xor r2, r0 ; e16c: 18 e2 20 e2 xor &0xe220,r8 ;0xe220 e170: 44 e2 xor.b r2, r4 ; { case 0: a0a; e172: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e176: 21 00 e178: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e17c: 19 00 e17e: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e182: 19 00 e184: f2 f0 ef ff and.b #-17, &0x0029 ;#0xffef e188: 29 00 e18a: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e18e: f2 f0 ef ff and.b #-17, &0x0019 ;#0xffef e192: 19 00 break; case 1: a1a; break; case 2: a2a; break; case 3: a3a; break; case 4: a4a; break; case 5: a5a; break; case 6: a6a; break; e194: ba 3c jmp $+374 ;abs 0xe30a e196: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e19a: 19 00 e19c: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 case 7: a7a; break; e1a0: b4 3c jmp $+362 ;abs 0xe30a e1a2: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e1a6: 21 00 e1a8: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e1ac: 19 00 e1ae: f2 f0 bf ff and.b #-65, &0x0019 ;#0xffbf e1b2: 19 00 e1b4: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e1b8: 19 00 e1ba: f2 f0 ef ff and.b #-17, &0x0029 ;#0xffef e1be: 29 00 e1c0: a4 3c jmp $+330 ;abs 0xe30a e1c2: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e1c6: 21 00 e1c8: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e1cc: 19 00 e1ce: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e1d2: 19 00 e1d4: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e1d8: f2 f0 bf ff and.b #-65, &0x0019 ;#0xffbf e1dc: 19 00 e1de: 95 3c jmp $+300 ;abs 0xe30a e1e0: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e1e4: 19 00 e1e6: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e1ea: f2 f0 bf ff and.b #-65, &0x0019 ;#0xffbf e1ee: 19 00 e1f0: ce 3f jmp $-98 ;abs 0xe18e e1f2: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e1f6: 21 00 e1f8: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e1fc: 19 00 e1fe: f3 3f jmp $-24 ;abs 0xe1e6 e200: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e204: 21 00 e206: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e20a: 19 00 e20c: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e210: f2 f0 ef ff and.b #-17, &0x0029 ;#0xffef e214: 29 00 e216: e9 3f jmp $-44 ;abs 0xe1ea e218: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e21c: 21 00 e21e: bb 3f jmp $-136 ;abs 0xe196 case 8: a8a; e220: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e224: 21 00 e226: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e22a: 19 00 e22c: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e230: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e234: 19 00 e236: f2 f0 ef ff and.b #-17, &0x0029 ;#0xffef e23a: 29 00 e23c: f2 f0 ef ff and.b #-17, &0x0019 ;#0xffef e240: 19 00 e242: ca 3f jmp $-106 ;abs 0xe1d8 break; case 9: a9a; e244: f2 f0 ef ff and.b #-17, &0x0021 ;#0xffef e248: 21 00 e24a: f2 f0 df ff and.b #-33, &0x0019 ;#0xffdf e24e: 19 00 e250: f2 c2 29 00 bic.b #8, &0x0029 ;r2 As==11 e254: f2 f0 7f 00 and.b #127, &0x0019 ;#0x007f e258: 19 00 e25a: f0 3f jmp $-30 ;abs 0xe23c e25c: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e260: 21 00 e262: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e266: 6a 3f jmp $-298 ;abs 0xe13c e268: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e26c: 21 00 e26e: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e272: 21 00 e274: f2 c2 21 00 bic.b #8, &0x0021 ;r2 As==11 e278: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e27c: d2 c3 21 00 bic.b #1, &0x0021 ;r3 As==01 e280: 5d 3f jmp $-324 ;abs 0xe13c e282: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e286: 21 00 e288: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e28c: 21 00 e28e: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e292: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e296: f2 c2 21 00 bic.b #8, &0x0021 ;r2 As==11 e29a: 50 3f jmp $-350 ;abs 0xe13c e29c: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e2a0: 21 00 e2a2: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e2a6: f2 c2 21 00 bic.b #8, &0x0021 ;r2 As==11 e2aa: 45 3f jmp $-372 ;abs 0xe136 e2ac: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e2b0: 21 00 e2b2: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e2b6: f5 3f jmp $-20 ;abs 0xe2a2 e2b8: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e2bc: 21 00 e2be: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e2c2: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e2c6: d2 c3 21 00 bic.b #1, &0x0021 ;r3 As==01 e2ca: ed 3f jmp $-36 ;abs 0xe2a6 e2cc: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e2d0: 21 00 e2d2: c4 3f jmp $-118 ;abs 0xe25c e2d4: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e2d8: 21 00 e2da: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e2de: 21 00 e2e0: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e2e4: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e2e8: d2 c3 21 00 bic.b #1, &0x0021 ;r3 As==01 e2ec: f2 f0 7f 00 and.b #127, &0x0021 ;#0x007f e2f0: 21 00 e2f2: d1 3f jmp $-92 ;abs 0xe296 e2f4: f2 f0 df ff and.b #-33, &0x0021 ;#0xffdf e2f8: 21 00 e2fa: f2 f0 bf ff and.b #-65, &0x0021 ;#0xffbf e2fe: 21 00 e300: e2 c3 21 00 bic.b #2, &0x0021 ;r3 As==10 e304: e2 c2 21 00 bic.b #4, &0x0021 ;r2 As==10 e308: f1 3f jmp $-28 ;abs 0xe2ec break; } } e30a: 39 41 pop r9 ; e30c: 3a 41 pop r10 ; e30e: 3b 41 pop r11 ; e310: 30 41 ret 0000e312 : void shutter(int time, int m) { e312: 0b 12 push r11 ; e314: 0a 12 push r10 ; e316: 09 12 push r9 ; e318: 0d 4f mov r15, r13 ; e31a: 09 4e mov r14, r9 ; TACTL &= ~TAIFG; //clear interrupt e31c: 92 c3 60 01 bic #1, &0x0160 ;r3 As==01 TACCR0 = 32768; e320: b2 40 00 80 mov #-32768,&0x0172 ;#0x8000 e324: 72 01 TAR = 0; e326: 82 43 70 01 mov #0, &0x0170 ;r3 As==00 if(m == 1) e32a: 1e 93 cmp #1, r14 ;r3 As==01 e32c: 2c 24 jz $+90 ;abs 0xe386 seconds = time*60; else seconds = time; e32e: 82 4f 02 02 mov r15, &0x0202 ; eint(); e332: 32 d2 eint TACTL |= MC0 | TAIE;//set up the timer for one interrupt every second e334: b2 d0 12 00 bis #18, &0x0160 ;#0x0012 e338: 60 01 P2OUT |= 4; e33a: e2 d2 29 00 bis.b #4, &0x0029 ;r2 As==10 while(seconds > 0) e33e: 92 93 02 02 cmp #1, &0x0202 ;r3 As==01 e342: 2e 38 jl $+94 ;abs 0xe3a0 { if(((P3IN & 4) == 4) && ((P3IN & 8) == 8)) e344: e2 b2 18 00 bit.b #4, &0x0018 ;r2 As==10 e348: 03 24 jz $+8 ;abs 0xe350 e34a: f2 b2 18 00 bit.b #8, &0x0018 ;r2 As==11 e34e: 28 20 jnz $+82 ;abs 0xe3a0 break; clear_leds(); e350: b0 12 bc e3 call #-7236 ;#0xe3bc if(m == 1 && seconds >= 60) e354: 19 93 cmp #1, r9 ;r3 As==01 e356: 0c 24 jz $+26 ;abs 0xe370 out_leds(seconds/60); //else if(m==1 && seconds < 60) // out_leds(seconds); else out_leds(seconds); e358: 5f 42 02 02 mov.b &0x0202,r15 ;0x0202 e35c: b0 12 e8 e0 call #-7960 ;#0xe0e8 delay(0xFFF); e360: 3f 40 ff 0f mov #4095, r15 ;#0x0fff e364: b0 12 5c e0 call #-8100 ;#0xe05c e368: 92 93 02 02 cmp #1, &0x0202 ;r3 As==01 e36c: eb 37 jge $-40 ;abs 0xe344 e36e: 18 3c jmp $+50 ;abs 0xe3a0 e370: 1c 42 02 02 mov &0x0202,r12 ;0x0202 e374: 3c 90 3c 00 cmp #60, r12 ;#0x003c e378: ef 3b jl $-32 ;abs 0xe358 e37a: 3a 40 3c 00 mov #60, r10 ;#0x003c e37e: b0 12 e6 e4 call #-6938 ;#0xe4e6 e382: 0f 4c mov r12, r15 ; e384: eb 3f jmp $-40 ;abs 0xe35c e386: 0f 5f rla r15 ; e388: 0f 5f rla r15 ; e38a: 0f 5f rla r15 ; e38c: 0f 5f rla r15 ; e38e: 0f 5f rla r15 ; e390: 0f 5f rla r15 ; e392: 0e 4d mov r13, r14 ; e394: 0e 5e rla r14 ; e396: 0e 5e rla r14 ; e398: 0f 8e sub r14, r15 ; e39a: 82 4f 02 02 mov r15, &0x0202 ; e39e: c9 3f jmp $-108 ;abs 0xe332 //clear_leds(); //delay(0xFFF); } P2OUT &= ~4; e3a0: e2 c2 29 00 bic.b #4, &0x0029 ;r2 As==10 dint(); e3a4: 32 c2 dint TACTL &= ~(MC1 | TAIE); e3a6: b2 f0 dd ff and #-35, &0x0160 ;#0xffdd e3aa: 60 01 TAR = 0; e3ac: 82 43 70 01 mov #0, &0x0170 ;r3 As==00 clear_leds(); e3b0: b0 12 bc e3 call #-7236 ;#0xe3bc } e3b4: 39 41 pop r9 ; e3b6: 3a 41 pop r10 ; e3b8: 3b 41 pop r11 ; e3ba: 30 41 ret 0000e3bc : void clear_leds() { P1OUT = 0xff; e3bc: f2 43 21 00 mov.b #-1, &0x0021 ;r3 As==11 P2OUT |= 8 | 16; e3c0: f2 d0 18 00 bis.b #24, &0x0029 ;#0x0018 e3c4: 29 00 P3OUT = 16 | 32 | 64 | 128; e3c6: f2 40 f0 ff mov.b #-16, &0x0019 ;#0xfff0 e3ca: 19 00 } e3cc: 30 41 ret 0000e3ce
: /* Main function with some blinking leds */ int main(void) { e3ce: 31 40 00 03 mov #768, r1 ;#0x0300 int tens=0, ones=0, clear=0; e3d2: 0a 43 clr r10 ; e3d4: 09 43 clr r9 ; sys_init(); e3d6: b0 12 8a e0 call #-8054 ;#0xe08a out_leds(0); e3da: 4f 43 clr.b r15 ; e3dc: b0 12 e8 e0 call #-7960 ;#0xe0e8 while (1) //main loop, never ends... { /* for (i=0; i<8; i++, o++) { P1OUT = ~((1<>(o&7))); P2OUT = ((1<>(o&7))); P3OUT = ((1<>(o&7))); delay(0x1fff); } */ /* for(i=0; i < 8; i++) { P1OUT = ~pow(2,i); delay(0xffff); } P1OUT=0xff; for(i=0; i < 8; i++) { P2OUT = ~pow(2,i); delay(0xffff); } P2OUT=0xff; for(i=0; i < 8; i++) { P3OUT = ~pow(2,i); delay(0xffff); } P3OUT=0xff;*/ /* 9b; //9 delay(0xffff); clear_leds(); 8b //8 delay(0xffff); P1OUT = 0xff; 7b //7 delay(0xffff); P1OUT = 0xff; 6b delay(0xffff); P1OUT = 0xff; 5b delay(0xffff); P1OUT = 0xff; b2; c2; g2; f2; //4 delay(0xffff); P1OUT = 0xff; a2; b2; d2; c2; g2; //3 delay(0xffff); P1OUT = 0xff; a2; b2; g2; d2; e2; //2 delay(0xffff); P1OUT = 0xff; b2; c2; //1 delay(0xffff); P1OUT = 0xff; a2; b2; d2; e2; c2; f2; //0 delay(0xffff); P1OUT = 0xff; a1; b1; c1; d1; f1; g1; //9 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; b1; c1; d1; e1; f1; g1; //8 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; b1; c1; //7 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; d1; c1; e1; g1; f1; //6 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; d1; c1; g1; f1; //5 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; b1; c1; g1; f1; //4 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; b1; d1; c1; g1; //3 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; b1; g1; d1; e1; //2 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; b1; c1; //1 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff; a1; b1; d1; e1; c1; f1; //0 delay(0xffff); P1OUT = 0xff; P2OUT = 0xff; P3OUT = 0xff;*/ /*for(i=0; i < 60; i++) { out_leds(i); delay(0x9fff); clear_leds(); }*/ if((P3IN & 8) == 8) e3e0: f2 b2 18 00 bit.b #8, &0x0018 ;r2 As==11 e3e4: 16 24 jz $+46 ;abs 0xe412 { ones++; e3e6: 19 53 inc r9 ; if(ones > 9) e3e8: 39 90 0a 00 cmp #10, r9 ;#0x000a e3ec: 01 38 jl $+4 ;abs 0xe3f0 ones=0; e3ee: 09 43 clr r9 ; clear_leds(); e3f0: b0 12 bc e3 call #-7236 ;#0xe3bc out_leds(ones+10*tens); e3f4: 0f 4a mov r10, r15 ; e3f6: 0f 5f rla r15 ; e3f8: 0f 5f rla r15 ; e3fa: 0e 4a mov r10, r14 ; e3fc: 0e 5e rla r14 ; e3fe: 0f 5e add r14, r15 ; e400: 0f 5e add r14, r15 ; e402: 0f 5e add r14, r15 ; e404: 4f 59 add.b r9, r15 ; e406: b0 12 e8 e0 call #-7960 ;#0xe0e8 delay(0x4fff); e40a: 3f 40 ff 4f mov #20479, r15 ;#0x4fff e40e: b0 12 5c e0 call #-8100 ;#0xe05c } if((P3IN & 4) == 4) e412: e2 b2 18 00 bit.b #4, &0x0018 ;r2 As==10 e416: 16 24 jz $+46 ;abs 0xe444 { tens++; e418: 1a 53 inc r10 ; if(tens > 5) e41a: 3a 90 06 00 cmp #6, r10 ;#0x0006 e41e: 01 38 jl $+4 ;abs 0xe422 tens=0; e420: 0a 43 clr r10 ; clear_leds(); e422: b0 12 bc e3 call #-7236 ;#0xe3bc out_leds(ones+10*tens); e426: 0f 4a mov r10, r15 ; e428: 0f 5f rla r15 ; e42a: 0f 5f rla r15 ; e42c: 0e 4a mov r10, r14 ; e42e: 0e 5e rla r14 ; e430: 0f 5e add r14, r15 ; e432: 0f 5e add r14, r15 ; e434: 0f 5e add r14, r15 ; e436: 4f 59 add.b r9, r15 ; e438: b0 12 e8 e0 call #-7960 ;#0xe0e8 delay(0x4fff); e43c: 3f 40 ff 4f mov #20479, r15 ;#0x4fff e440: b0 12 5c e0 call #-8100 ;#0xe05c } if((P3IN & 1) == 1) e444: d2 b3 18 00 bit.b #1, &0x0018 ;r3 As==01 e448: cb 27 jz $-104 ;abs 0xe3e0 { if((P3IN & 2) == 2) e44a: e2 b3 18 00 bit.b #2, &0x0018 ;r3 As==10 e44e: 15 24 jz $+44 ;abs 0xe47a { shutter(ones+(10*tens), 1); //min e450: 0b 4a mov r10, r11 ; e452: 0b 5b rla r11 ; e454: 0b 5b rla r11 ; e456: 0f 4a mov r10, r15 ; e458: 0f 5f rla r15 ; e45a: 0b 5f add r15, r11 ; e45c: 0b 5f add r15, r11 ; e45e: 0b 5f add r15, r11 ; e460: 0f 49 mov r9, r15 ; e462: 0f 5b add r11, r15 ; e464: 1e 43 mov #1, r14 ;r3 As==01 e466: b0 12 12 e3 call #-7406 ;#0xe312 out_leds(ones+10*tens); delay(0xffff); } else { shutter(ones+(10*tens), 0); //sec out_leds(ones+10*tens); e46a: 4f 49 mov.b r9, r15 ; e46c: 4f 5b add.b r11, r15 ; e46e: b0 12 e8 e0 call #-7960 ;#0xe0e8 delay(0xffff); e472: 3f 43 mov #-1, r15 ;r3 As==11 e474: b0 12 5c e0 call #-8100 ;#0xe05c e478: b3 3f jmp $-152 ;abs 0xe3e0 e47a: 0b 4a mov r10, r11 ; e47c: 0b 5b rla r11 ; e47e: 0b 5b rla r11 ; e480: 0f 4a mov r10, r15 ; e482: 0f 5f rla r15 ; e484: 0b 5f add r15, r11 ; e486: 0b 5f add r15, r11 ; e488: 0b 5f add r15, r11 ; e48a: 0f 49 mov r9, r15 ; e48c: 0f 5b add r11, r15 ; e48e: 0e 43 clr r14 ; e490: ea 3f jmp $-42 ;abs 0xe466 } } } } e492: 30 40 96 e4 br #0xe496 ; 0000e496 <__stop_progExec__>: e496: 02 df bis r15, r2 ; e498: fe 3f jmp $-2 ;abs 0xe496 0000e49a <__mulhi3>: e49a: 0e 43 clr r14 ; e49c: 0a 93 cmp #0, r10 ;r3 As==00 e49e: 07 24 jz $+16 ;abs 0xe4ae e4a0: 12 c3 clrc e4a2: 0c 10 rrc r12 ; e4a4: 01 28 jnc $+4 ;abs 0xe4a8 e4a6: 0e 5a add r10, r14 ; e4a8: 0a 5a rla r10 ; e4aa: 0c 93 cmp #0, r12 ;r3 As==00 e4ac: f7 23 jnz $-16 ;abs 0xe49c e4ae: 30 41 ret 0000e4b0 <__divmodqi4>: e4b0: 0d 43 clr r13 ; e4b2: 3c b0 80 00 bit #128, r12 ;#0x0080 e4b6: 03 28 jnc $+8 ;abs 0xe4be e4b8: 7c e3 xor.b #-1, r12 ;r3 As==11 e4ba: 5c 53 inc.b r12 ; e4bc: 2d d2 bis #4, r13 ;r2 As==10 e4be: 3a b0 80 00 bit #128, r10 ;#0x0080 e4c2: 03 28 jnc $+8 ;abs 0xe4ca e4c4: 7a e3 xor.b #-1, r10 ;r3 As==11 e4c6: 5a 53 inc.b r10 ; e4c8: 3d d2 bis #8, r13 ;r2 As==11 e4ca: b0 12 1c e5 call #-6884 ;#0xe51c e4ce: 0d 10 rrc r13 ; e4d0: 2d b2 bit #4, r13 ;r2 As==10 e4d2: 04 28 jnc $+10 ;abs 0xe4dc e4d4: 7e e3 xor.b #-1, r14 ;r3 As==11 e4d6: 5e 53 inc.b r14 ; e4d8: 7c e3 xor.b #-1, r12 ;r3 As==11 e4da: 5c 53 inc.b r12 ; e4dc: 3d b2 bit #8, r13 ;r2 As==11 e4de: 02 28 jnc $+6 ;abs 0xe4e4 e4e0: 7c e3 xor.b #-1, r12 ;r3 As==11 e4e2: 5c 53 inc.b r12 ; e4e4: 30 41 ret 0000e4e6 <__divmodhi4>: e4e6: 0d 43 clr r13 ; e4e8: 3c b0 00 80 bit #-32768,r12 ;#0x8000 e4ec: 03 28 jnc $+8 ;abs 0xe4f4 e4ee: 3c e3 inv r12 ; e4f0: 1c 53 inc r12 ; e4f2: 2d d2 bis #4, r13 ;r2 As==10 e4f4: 3a b0 00 80 bit #-32768,r10 ;#0x8000 e4f8: 03 28 jnc $+8 ;abs 0xe500 e4fa: 3a e3 inv r10 ; e4fc: 1a 53 inc r10 ; e4fe: 3d d2 bis #8, r13 ;r2 As==11 e500: b0 12 38 e5 call #-6856 ;#0xe538 e504: 0d 10 rrc r13 ; e506: 2d b2 bit #4, r13 ;r2 As==10 e508: 04 28 jnc $+10 ;abs 0xe512 e50a: 3e e3 inv r14 ; e50c: 1e 53 inc r14 ; e50e: 3c e3 inv r12 ; e510: 1c 53 inc r12 ; e512: 3d b2 bit #8, r13 ;r2 As==11 e514: 02 28 jnc $+6 ;abs 0xe51a e516: 3c e3 inv r12 ; e518: 1c 53 inc r12 ; e51a: 30 41 ret 0000e51c <__udivmodqi4>: e51c: 4e ee xor.b r14, r14 ; e51e: 7b 40 09 00 mov.b #9, r11 ;#0x0009 e522: 05 3c jmp $+12 ;abs 0xe52e e524: 0d 10 rrc r13 ; e526: 4e 6e rlc.b r14 ; e528: 4e 9a cmp.b r10, r14 ; e52a: 01 28 jnc $+4 ;abs 0xe52e e52c: 4e 8a sub.b r10, r14 ; e52e: 4c 6c rlc.b r12 ; e530: 0d 6d rlc r13 ; e532: 5b 83 dec.b r11 ; e534: f7 23 jnz $-16 ;abs 0xe524 e536: 30 41 ret 0000e538 <__udivmodhi4>: e538: 0e ee xor r14, r14 ; e53a: 3b 40 11 00 mov #17, r11 ;#0x0011 e53e: 05 3c jmp $+12 ;abs 0xe54a e540: 0d 10 rrc r13 ; e542: 0e 6e rlc r14 ; e544: 0e 9a cmp r10, r14 ; e546: 01 28 jnc $+4 ;abs 0xe54a e548: 0e 8a sub r10, r14 ; e54a: 0c 6c rlc r12 ; e54c: 0d 6d rlc r13 ; e54e: 1b 83 dec r11 ; e550: f7 23 jnz $-16 ;abs 0xe540 e552: 30 41 ret Disassembly of section .vectors: 0000ffe0 : ffe0: 3a e0 3a e0 3a e0 3a e0 3a e0 3a e0 3a e0 3a e0 :.:.:.:.:.:.:.:. fff0: 40 e0 3a e0 3a e0 3a e0 3a e0 3a e0 3a e0 00 e0 @.:.:.:.:.:.:...