📄 main.s
字号:
.module main.c
.area text(rom, con, rel)
.dbfile F:\avr\mega128\lcd12864\main.c
.dbfunc e delay _delay fV
; i -> R16,R17
; j -> R18,R19
.even
_delay::
.dbline -1
.dbline 4
; #include "so12864.h"
;
; void delay()
; {
.dbline 5
; int i = 0, j = 0;
clr R16
clr R17
.dbline 5
clr R18
clr R19
.dbline 6
; for(i = 0; i < 5000; i++)
L2:
.dbline 7
; for (j = 0; j < 200; j++)
clr R18
clr R19
L6:
.dbline 8
; {
.dbline 9
; nop();
nop
.dbline 10
; }
L7:
.dbline 7
subi R18,255 ; offset = 1
sbci R19,255
.dbline 7
cpi R18,200
ldi R30,0
cpc R19,R30
brlt L6
X0:
L3:
.dbline 6
subi R16,255 ; offset = 1
sbci R17,255
.dbline 6
cpi R16,136
ldi R30,19
cpc R17,R30
brlt L2
X1:
.dbline -2
L1:
.dbline 0 ; func end
ret
.dbsym r i 16 I
.dbsym r j 18 I
.dbend
.area lit(rom, con, rel)
L11:
.byte 0,126
.byte 17,17
.byte 17,126
.byte 0,0
.byte 0,'A
.byte 127,'I
.byte 'I,54
.byte 0,0
.byte 0,62
.byte 'A,'A
.byte 'A,34
.byte 0,0
.byte 0,'A
.byte 127,'A
.byte 'A,62
.byte 0,0
.byte 0,127
.byte 'I,'I
.byte 'I,'I
.byte 0,0
.byte 0,127
.byte 9,9
.byte 9,1
.byte 0,0
.byte 0,62
.byte 'A,'A
.byte 'I,'z
.byte 0,0
.byte 0,127
.byte 8,8
.byte 8,127
.byte 0,0
.byte 0,0
.byte 'A,127
.byte 'A,0
.byte 0,0
.byte 0,32
.byte 64,'A
.byte 63,1
.byte 0,0
.byte 0,127
.byte 8,20
.byte 34,'A
.byte 0,0
.byte 0,127
.byte 64,64
.byte 64,64
.byte 0,0
.byte 0,127
.byte 2,12
.byte 2,127
.byte 0,0
.byte 0,127
.byte 6,8
.byte 48,127
.byte 0,0
.byte 0,62
.byte 'A,'A
.byte 'A,62
.byte 0,0
.byte 0,127
.byte 9,9
.byte 9,6
.byte 0,0
.byte 0,62
.byte 'A,'Q
.byte 33,94
.byte 0,0
.byte 0,127
.byte 9,25
.byte 41,'F
.byte 0,0
.byte 0,38
.byte 'I,'I
.byte 'I,50
.byte 0,0
.byte 0,1
.byte 1,127
.byte 1,1
.byte 0,0
.byte 0,63
.byte 64,64
.byte 64,63
.byte 0,0
.byte 0,31
.byte 32,64
.byte 32,31
.byte 0,0
.byte 0,127
.byte 32,24
.byte 32,127
.byte 0,0
.byte 0,'c
.byte 20,8
.byte 20,'c
.byte 0,0
.byte 0,7
.byte 8,'p
.byte 8,7
.byte 0,0
.byte 0,'a
.byte 'Q,'I
.byte 'E,'C
.byte 0,0
L12:
.byte 0,0
.byte 0,192
.byte 'p,32
.byte 0,255
.byte 0,16
.byte 32,192
.byte 128,0
.byte 0,0
.byte 4,2
.byte 1,0
.byte 0,64
.byte 128,127
.byte 0,0
.byte 0,0
.byte 1,7
.byte 2,0
.byte 0,64
.byte 'D,'T
.byte 'U,'V
.byte 212,124
.byte 'T,'T
.byte 'V,'U
.byte 'T,'D
.byte 64,0
.byte 0,32
.byte 16,'H
.byte 'D,'K
.byte 'J,126
.byte 'J,'J
.byte 'J,126
.byte 64,64
.byte 64,0
.byte 2,242
.byte 18,18
.byte 30,0
.byte 128,128
.byte 255,160
.byte 144,136
.byte 134,132
.byte 128,0
.byte 1,3
.byte 'A,129
.byte 127,0
.byte 0,64
.byte 255,64
.byte 35,12
.byte 16,96
.byte 32,0
.byte 16,240
.byte 31,16
.byte 240,18
.byte 18,254
.byte 18,254
.byte 0,254
.byte 'b,154
.byte 6,0
.byte 64,33
.byte 26,134
.byte 'I,49
.byte 13,'C
.byte 129,127
.byte 0,255
.byte 8,24
.byte 15,0
.area text(rom, con, rel)
.dbfile F:\avr\mega128\lcd12864\main.c
.dbfunc e main _main fI
; EN_tab -> y+130
; CN_tab -> y+2
.even
_main::
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,23 ; offset = 338
.dbline -1
.dbline 14
; }
;
; int main(void)
; {
.dbline 15
; BYTE EN_tab[][8] = {
ldi R24,<L11
ldi R25,>L11
movw R30,R28
subi R30,126 ; offset = 130
sbci R31,255
ldi R16,208
ldi R17,0
st -y,R31
st -y,R30
st -y,R25
st -y,R24
xcall asgncblkx
.dbline 43
; {0x00,0x7E,0x11,0x11,0x11,0x7E,0x00,0x00}, /*"A"=21h*/
; {0x00,0x41,0x7F,0x49,0x49,0x36,0x00,0x00}, /*"B"=22h*/
; {0x00,0x3E,0x41,0x41,0x41,0x22,0x00,0x00}, /*"C"=23h*/
; {0x00,0x41,0x7F,0x41,0x41,0x3E,0x00,0x00}, /*"D"=24h*/
; {0x00,0x7F,0x49,0x49,0x49,0x49,0x00,0x00}, /*"E"=25h*/
; {0x00,0x7F,0x09,0x09,0x09,0x01,0x00,0x00}, /*"F"=26h*/
; {0x00,0x3E,0x41,0x41,0x49,0x7A,0x00,0x00}, /*"G"=27h*/
; {0x00,0x7F,0x08,0x08,0x08,0x7F,0x00,0x00}, /*"h"=28h*/
; {0x00,0x00,0x41,0x7F,0x41,0x00,0x00,0x00}, /*"I"=29h*/
; {0x00,0x20,0x40,0x41,0x3F,0x01,0x00,0x00}, /*"J"=2Ah*/
; {0x00,0x7F,0x08,0x14,0x22,0x41,0x00,0x00}, /*"K"=2Bh*/
; {0x00,0x7F,0x40,0x40,0x40,0x40,0x00,0x00}, /*"L"=2Ch*/
; {0x00,0x7F,0x02,0x0C,0x02,0x7F,0x00,0x00}, /*"M"=2Dh*/
; {0x00,0x7F,0x06,0x08,0x30,0x7F,0x00,0x00}, /*"N"=2Eh*/
; {0x00,0x3E,0x41,0x41,0x41,0x3E,0x00,0x00}, /*"O"=2Fh*/
; {0x00,0x7F,0x09,0x09,0x09,0x06,0x00,0x00}, /*"P"=30h*/
; {0x00,0x3E,0x41,0x51,0x21,0x5E,0x00,0x00}, /*"Q"=31h*/
; {0x00,0x7F,0x09,0x19,0x29,0x46,0x00,0x00}, /*"R"=32h*/
; {0x00,0x26,0x49,0x49,0x49,0x32,0x00,0x00}, /*"S"=33h*/
; {0x00,0x01,0x01,0x7F,0x01,0x01,0x00,0x00}, /*"T"=34h*/
; {0x00,0x3F,0x40,0x40,0x40,0x3F,0x00,0x00}, /*"U"=35h*/
; {0x00,0x1F,0x20,0x40,0x20,0x1F,0x00,0x00}, /*"V"=36h*/
; {0x00,0x7F,0x20,0x18,0x20,0x7F,0x00,0x00}, /*"W"=37h*/
; {0x00,0x63,0x14,0x08,0x14,0x63,0x00,0x00}, /*"X"=38h*/
; {0x00,0x07,0x08,0x70,0x08,0x07,0x00,0x00}, /*"Y"=39h*/
; {0x00,0x61,0x51,0x49,0x45,0x43,0x00,0x00}
; };
; BYTE CN_tab[][32] ={
ldi R24,<L12
ldi R25,>L12
movw R30,R28
adiw R30,2
ldi R16,128
ldi R17,0
st -y,R31
st -y,R30
st -y,R25
st -y,R24
xcall asgncblkx
.dbline 50
; {0x00,0x00,0x00,0xC0,0x70,0x20,0x00,0xFF,0x00,0x10,0x20,0xC0,0x80,0x00,0x00,0x00,0x04,0x02,0x01,0x00,0x00,0x40,0x80,0x7F,0x00,0x00,0x00,0x00,0x01,0x07,0x02,0x00},
; {0x00,0x40,0x44,0x54,0x55,0x56,0xD4,0x7C,0x54,0x54,0x56,0x55,0x54,0x44,0x40,0x00,0x00,0x20,0x10,0x48,0x44,0x4B,0x4A,0x7E,0x4A,0x4A,0x4A,0x7E,0x40,0x40,0x40,0x00},
; {0x02,0xF2,0x12,0x12,0x1E,0x00,0x80,0x80,0xFF,0xA0,0x90,0x88,0x86,0x84,0x80,0x00,0x01,0x03,0x41,0x81,0x7F,0x00,0x00,0x40,0xFF,0x40,0x23,0x0C,0x10,0x60,0x20,0x00},
; {0x10,0xF0,0x1F,0x10,0xF0,0x12,0x12,0xFE,0x12,0xFE,0x00,0xFE,0x62,0x9A,0x06,0x00,0x40,0x21,0x1A,0x86,0x49,0x31,0x0D,0x43,0x81,0x7F,0x00,0xFF,0x08,0x18,0x0F,0x00}
; };
;
; Init_LCD();
xcall _Init_LCD
xjmp L14
L13:
.dbline 53
;
; while(1)
; {
.dbline 54
; DispCN_LCD(PAGE_3, COLUMN_24, (BYTE *)(CN_tab[0]));
movw R24,R28
adiw R24,2
std y+1,R25
std y+0,R24
ldi R18,4360
ldi R19,17
ldi R16,179
xcall _DispCN_LCD
.dbline 55
; delay();
xcall _delay
.dbline 56
; DispCN_LCD(PAGE_3, COLUMN_40, (BYTE *)(CN_tab[1]));
movw R24,R28
adiw R24,34
std y+1,R25
std y+0,R24
ldi R18,4616
ldi R19,18
ldi R16,179
xcall _DispCN_LCD
.dbline 57
; delay();
xcall _delay
.dbline 58
; DispCN_LCD(PAGE_3, COLUMN_56, (BYTE *)(CN_tab[1]));
movw R24,R28
adiw R24,34
std y+1,R25
std y+0,R24
ldi R18,4872
ldi R19,19
ldi R16,179
xcall _DispCN_LCD
.dbline 59
; delay();
xcall _delay
.dbline 60
; DispCN_LCD(PAGE_3, COLUMN_72, (BYTE *)(CN_tab[2]));
movw R24,R28
subi R24,190 ; offset = 66
sbci R25,255
std y+1,R25
std y+0,R24
ldi R18,5128
ldi R19,20
ldi R16,179
xcall _DispCN_LCD
.dbline 61
; delay();
xcall _delay
.dbline 62
; DispCN_LCD(PAGE_3, COLUMN_86, (BYTE *)(CN_tab[3]));
movw R24,R28
subi R24,158 ; offset = 98
sbci R25,255
std y+1,R25
std y+0,R24
ldi R18,5382
ldi R19,21
ldi R16,179
xcall _DispCN_LCD
.dbline 63
; delay();
xcall _delay
.dbline 64
; Clear_LCD();
xcall _Clear_LCD
.dbline 65
; delay();
xcall _delay
.dbline 66
; }
L14:
.dbline 52
xjmp L13
X2:
.dbline -2
L10:
.dbline 0 ; func end
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,23 ; offset = 338
ret
.dbsym l EN_tab 130 A[208:26:8]c
.dbsym l CN_tab 2 A[128:4:32]c
.dbend
;
; return 0;
; }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -