.module ac9-2.c
.area lit(rom, con, rel)
0000 _SEG7::
0000 3F06 .byte 63,6
0002 5B4F .byte 91,'O
0004 666D .byte 'f,'m
0006 7D07 .byte 125,7
0008 7F6F .byte 127,'o
000A .dbfile d:\MYDOCU~1\ac9-2\ac9-2.c
000A .dbsym e SEG7 _SEG7 A[10:10]kc
000A _ACT::
000A FEFD .byte 254,253
000C FBF7 .byte 251,247
000E EFDF .byte 239,223
0010 BF7F .byte 191,127
0012 .dbsym e ACT _ACT A[8:8]kc
.area text(rom, con, rel)
0000 .dbfile d:\MYDOCU~1\ac9-2\ac9-2.c
0000 .dbfunc e main _main fV
.even
0000 _main::
0000 .dbline -1
0000 .dbline 10
0000 ; #include
0000 ; #define uchar unsigned char
0000 ; #define uint unsigned int
0000 ; uchar const SEG7[10]={0x3f,0x06,0x5b,
0000 ; 0x4f,0x66, 0x6d,0x7d,0x07,0x7f,0x6f};
0000 ; uchar const ACT[8]={0xfe,0xfd,0xfb,0xf7,
0000 ; 0xef,0xdf,0xbf,0x7f};
0000 ; uchar i;
0000 ; void main(void)
0000 ; {
0000 .dbline 11
0000 ; PORTA = 0x00;
0000 2224 clr R2
0002 2BBA out 0x1b,R2
0004 .dbline 12
0004 ; DDRA = 0xFF;
0004 8FEF ldi R24,255
0006 8ABB out 0x1a,R24
0008 .dbline 13
0008 ; PORTC = 0xFF;
0008 85BB out 0x15,R24
000A .dbline 14
000A ; DDRC = 0xFF;
000A 84BB out 0x14,R24
000C .dbline 15
000C ; TCNT0 = 0x83;
000C 83E8 ldi R24,131
000E 82BF out 0x32,R24
0010 .dbline 16
0010 ; TCCR0 = 0x03;
0010 83E0 ldi R24,3
0012 83BF out 0x33,R24
0014 .dbline 17
0014 ; TIMSK = 0x01;
0014 81E0 ldi R24,1
0016 89BF out 0x39,R24
0018 .dbline 18
0018 ; SREG=0x80;
0018 80E8 ldi R24,128
001A 8FBF out 0x3f,R24
001C L2:
001C .dbline 19
001C L3:
001C .dbline 19
001C FFCF xjmp L2
001E X0:
001E .dbline -2
001E L1:
001E .dbline 0 ; func end
001E 0895 ret
0020 .dbend
.area vector(rom, abs)
.org 36
0024 0C941000 jmp _timer0_ovf_isr
.area text(rom, con, rel)
0020 .dbfile d:\MYDOCU~1\ac9-2\ac9-2.c
0020 .dbfunc e timer0_ovf_isr _timer0_ovf_isr fV
.even
0020 _timer0_ovf_isr::
0020 2A92 st -y,R2
0022 8A93 st -y,R24
0024 9A93 st -y,R25
0026 EA93 st -y,R30
0028 FA93 st -y,R31
002A 2FB6 in R2,0x3f
002C 2A92 st -y,R2
002E .dbline -1
002E .dbline 24
002E ; while(1);
002E ; }
002E ;
002E ; #pragma interrupt_handler timer0_ovf_isr:10
002E ; void timer0_ovf_isr(void)
002E ; {
002E .dbline 25
002E ; TCNT0 = 0x83;
002E 83E8 ldi R24,131
0030 82BF out 0x32,R24
0032 .dbline 26
0032 ; if(++i>7)i=0;
0032 80910000 lds R24,_i
0036 8F5F subi R24,255 ; addi 1
0038 282E mov R2,R24
003A 20920000 sts _i,R2
003E 87E0 ldi R24,7
0040 8215 cp R24,R2
0042 18F4 brsh L6
0044 .dbline 26
0044 2224 clr R2
0046 20920000 sts _i,R2
004A L6:
004A .dbline 27
004A ; PORTA=SEG7[i];
004A 80E0 ldi R24, 004C 90E0 ldi R25,>_SEG7
004E E0910000 lds R30,_i
0052 FF27 clr R31
0054 E80F add R30,R24
0056 F91F adc R31,R25
0058 E491 lpm R30,Z
005A EBBB out 0x1b,R30
005C .dbline 28
005C ; PORTC=ACT[i];
005C 80E0 ldi R24, 005E 90E0 ldi R25,>_ACT
0060 E0910000 lds R30,_i
0064 FF27 clr R31
0066 E80F add R30,R24
0068 F91F adc R31,R25
006A E491 lpm R30,Z
006C E5BB out 0x15,R30
006E .dbline -2
006E L5:
006E 2990 ld R2,y+
0070 2FBE out 0x3f,R2
0072 F991 ld R31,y+
0074 E991 ld R30,y+
0076 9991 ld R25,y+
0078 8991 ld R24,y+
007A 2990 ld R2,y+
007C .dbline 0 ; func end
007C 1895 reti
007E .dbend
.area bss(ram, con, rel)
0000 .dbfile d:\MYDOCU~1\ac9-2\ac9-2.c
0000 _i::
0000 .blkb 1
0001 .dbsym e i _i c