📄 595_1602_example.s
字号:
rcall _refreshVirtualPORT
.dbline 318
.dbline -2
L35:
rcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r Data 20 c
.dbend
.dbfunc e LCDWaitForReady _LCDWaitForReady fV
.even
_LCDWaitForReady::
.dbline -1
.dbline 325
; }
; }
; }
; }
; }
; }
; }
.dbline 326
; }
ldi R16,30
ldi R17,0
rcall _LCDDelayUs
.dbline -2
L36:
.dbline 0 ; func end
ret
.dbend
.dbfunc e LCDSetXY _LCDSetXY fV
; Address -> R20
; Y -> R20
; X -> R22
.even
_LCDSetXY::
rcall push_gset2
mov R20,R18
mov R22,R16
.dbline -1
.dbline 334
; }
; }
; }
; }
; }
; }
; }
; }
.dbline 336
; }
; }
tst R20
brne L38
.dbline 337
; }
.dbline 338
; }
mov R20,R22
subi R20,128 ; addi 128
.dbline 339
; }
rjmp L39
L38:
.dbline 341
; }
; }
.dbline 342
; }
mov R20,R22
subi R20,64 ; addi 192
.dbline 343
; }
L39:
.dbline 345
; }
; }
rcall _LCDWaitForReady
.dbline 346
; }
mov R16,R20
rcall _LCDSendCommand
.dbline -2
L37:
rcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r Address 20 c
.dbsym r Y 20 c
.dbsym r X 22 c
.dbend
.dbfunc e LCDDisplayString _LCDDisplayString fV
; String -> R20,R21
.even
_LCDDisplayString::
rcall push_gset1
movw R20,R16
.dbline -1
.dbline 353
; }
; }
; }
; }
; }
; }
; }
rjmp L42
L41:
.dbline 355
.dbline 356
rcall _LCDWaitForReady
.dbline 357
movw R30,R20
ldd R16,z+0
rcall _LCDSendData
.dbline 358
subi R20,255 ; offset = 1
sbci R21,255
.dbline 359
L42:
.dbline 354
; }
movw R30,R20
ldd R2,z+0
tst R2
brne L41
.dbline -2
L40:
rcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r String 20 pc
.dbend
.dbfunc e LCDDisplayNum _LCDDisplayNum fV
; a -> R20
; BitCount -> y+6
; Num -> y+2
.even
_LCDDisplayNum::
rcall push_arg4
rcall push_gset1
.dbline -1
.dbline 367
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
.dbline 368
; }
clr R20
.dbline 369
; }
ldi R20,8
ldd R0,y+6
sub R20,R0
rjmp L48
L45:
.dbline 370
.dbline 371
mov R2,R20
clr R3
lsl R2
rol R3
lsl R2
rol R3
movw R30,R28
ldd R4,z+2
ldd R5,z+3
ldd R6,z+4
ldd R7,z+5
st -y,R2
movw R16,R4
movw R18,R6
rcall lsl32
ldi R24,28
ldi R25,0
st -y,R24
rcall lsr32
movw R30,R16
ldi R24,<_CHR
ldi R25,>_CHR
add R30,R24
adc R31,R25
lpm R16,Z
rcall _LCDSendData
.dbline 372
L46:
.dbline 369
inc R20
L48:
.dbline 369
cpi R20,8
brlo L45
.dbline -2
L44:
rcall pop_gset1
adiw R28,4
.dbline 0 ; func end
ret
.dbsym r a 20 c
.dbsym l BitCount 6 c
.dbsym l Num 2 l
.dbend
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
L50:
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
L51:
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
.area text(rom, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
.dbfunc e RunString _RunString fV
.dbsym s RunTimeCounter L51 i
.dbsym s StringHead L50 c
; StringLong -> R22
; SCREEN -> y+0
; Point -> R14
; a -> R10
; EndX -> R12
; StartX -> R20
; Y -> y+31
; Direction -> R22
; String -> y+27
.even
_RunString::
rcall push_arg4
rcall push_gset5
mov R22,R18
sbiw R28,17
ldd R20,y+33
ldd R12,y+35
.dbline -1
.dbline 380
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
.dbline 383
; }
; }
; }
clr R10
.dbline 384
; }
lds R14,L50
.dbline 385
; }
ldd R16,y+27
ldd R17,y+28
rcall _StringLength
mov R22,R16
.dbline 388
; }
; }
; }
rjmp L55
L52:
.dbline 389
; }
.dbline 390
; }
mov R30,R14
clr R31
ldd R0,y+27
ldd R1,y+28
add R30,R0
adc R31,R1
ldd R2,z+0
movw R24,R28
mov R30,R10
clr R31
add R30,R24
adc R31,R25
std z+0,R2
.dbline 391
; }
inc R14
.dbline 392
; }
cp R14,R22
brne L56
.dbline 393
; }
.dbline 394
; }
clr R14
.dbline 395
; }
L56:
.dbline 396
L53:
.dbline 388
inc R10
L55:
.dbline 388
mov R24,R12
sub R24,R20
subi R24,255 ; addi 1
cp R10,R24
brlo L52
.dbline 398
; }
; }
; }
rjmp L61
L58:
.dbline 399
.dbline 400
movw R24,R28
mov R30,R10
clr R31
add R30,R24
adc R31,R25
ldi R24,32
std z+0,R24
.dbline 401
L59:
.dbline 398
inc R10
L61:
.dbline 398
mov R24,R10
cpi R24,17
brlo L58
.dbline 403
; }
; }
; }
; }
; }
lds R24,L51
lds R25,L51+1
adiw R24,1
sts L51+1,R25
sts L51,R24
.dbline 404
; }
ldi R24,11
ldi R25,0
lds R2,L51
lds R3,L51+1
cp R24,R2
cpc R25,R3
brsh L62
.dbline 405
; }
.dbline 406
; }
lds R24,L50
subi R24,255 ; addi 1
sts L50,R24
.dbline 407
; }
clr R2
clr R3
sts L51+1,R3
sts L51,R2
.dbline 408
; }
cp R24,R22
brne L64
.dbline 409
; }
.dbline 410
; }
sts L50,R2
.dbline 411
; }
L64:
.dbline 412
; }
L62:
.dbline 414
; }
; }
ldd R18,y+31
subi R18,1
mov R16,R20
subi R16,1
rcall _LCDSetXY
.dbline 415
; }
movw R16,R28
rcall _LCDDisplayString
.dbline -2
L49:
adiw R28,17
rcall pop_gset5
adiw R28,4
.dbline 0 ; func end
ret
.dbsym r StringLong 22 c
.dbsym l SCREEN 0 A[17:17]c
.dbsym r Point 14 c
.dbsym r a 10 c
.dbsym r EndX 12 c
.dbsym r StartX 20 c
.dbsym l Y 31 c
.dbsym r Direction 22 c
.dbsym l String 27 pc
.dbend
.dbfunc e StringLength _StringLength fc
; n -> R20
; String -> R16,R17
.even
_StringLength::
rcall push_gset1
.dbline -1
.dbline 422
; }
; }
; }
; }
; }
; }
; }
.dbline 423
; }
clr R20
rjmp L68
L67:
.dbline 425
.dbline 426
inc R20
.dbline 427
subi R16,255 ; offset = 1
sbci R17,255
.dbline 428
L68:
.dbline 424
; }
movw R30,R16
ldd R2,z+0
tst R2
brne L67
.dbline 430
; }
; }
; }
; }
; }
; }
mov R16,R20
.dbline -2
L66:
rcall pop_gset1
.dbline 0 ; func end
ret
.dbsym r n 20 c
.dbsym r String 16 pc
.dbend
.dbfunc e Flash _Flash fV
; StringLong -> R20
; a -> R22
; Y -> R10
; X -> R12
; Icon -> R14
; String -> y+10
.even
_Flash::
rcall push_arg4
rcall push_gset5
mov R14,R18
ldd R12,y+14
ldd R10,y+16
.dbline -1
.dbline 437
; }
; }
; }
; }
; }
; }
; }
.dbline 438
; }
clr R22
.dbline 439
; }
ldd R16,y+10
ldd R17,y+11
rcall _StringLength
mov R20,R16
.dbline 441
; }
; }
ldi R18,800
ldi R19,3
lds R16,_FlashTimeCounter
lds R17,_FlashTimeCounter+1
rcall mod16u
ldi R24,400
ldi R25,1
cp R24,R16
cpc R25,R17
brsh L71
.dbline 442
; }
.dbline 443
; }
mov R18,R10
subi R18,1
mov R16,R12
subi R16,1
rcall _LCDSetXY
.dbline 444
; }
ldd R16,y+10
ldd R17,y+11
rcall _LCDDisplayString
.dbline 445
; }
rjmp L72
L71:
.dbline 447
; }
; }
.dbline 448
; }
mov R22,R12
rjmp L76
L73:
.dbline 449
.dbline 450
mov R18,R10
subi R18,1
mov R16,R22
subi R16,1
rcall _LCDSetXY
.dbline 451
rcall _LCDWaitForReady
.dbline 452
mov R16,R14
rcall _LCDSendData
.dbline 453
L74:
.dbline 448
inc R22
L76:
.dbline 448
mov R2,R12
add R2,R20
cp R22,R2
brlo L73
.dbline 454
L72:
.dbline -2
L70:
rcall pop_gset5
adiw R28,4
.dbline 0 ; func end
ret
.dbsym r StringLong 20 c
.dbsym r a 22 c
.dbsym r Y 10 c
.dbsym r X 12 c
.dbsym r Icon 14 c
.dbsym l String 10 pc
.dbend
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
L78:
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
L79:
.blkb 1
.area idata
.byte 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
.area text(rom, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
.dbfunc e FlashStringGroup _FlashStringGroup fV
.dbsym s DispState L79 c
.dbsym s Pictures L78 c
; Y -> y+6
; X -> y+4
; StringCounter -> R22
; String -> R20,R21
.even
_FlashStringGroup::
rcall push_gset2
mov R22,R18
movw R20,R16
.dbline -1
.dbline 461
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
; }
.dbline 464
; }
; }
; }
ldi R18,1000
ldi R19,3
lds R16,_FlashGIFStringCounter
lds R17,_FlashGIFStringCounter+1
rcall mod16u
ldi R24,500
ldi R25,1
cp R24,R16
cpc R25,R17
brsh L80
.dbline 465
; }
.dbline 466
; }
lds R2,L79
tst R2
brne L81
.dbline 467
; }
.dbline 468
; }
lds R24,L78
subi R24,255 ; addi 1
sts L78,R24
.dbline 469
; }
cp R24,R22
brne L84
.dbline 470
; }
.dbline 471
; }
clr R2
sts L78,R2
.dbline 472
; }
L84:
.dbline 473
; }
ldi R24,1
sts L79,R24
.dbline 474
; }
.dbline 475
; }
rjmp L81
L80:
.dbline 477
; }
; }
.dbline 478
; }
lds R24,L79
cpi R24,1
brne L86
.dbline 479
; }
.dbline 480
; }
lds R24,L78
subi R24,255 ; addi 1
sts L78,R24
.dbline 481
; }
cp R24,R22
brne L88
.dbline 482
; }
.dbline 483
; }
clr R2
sts L78,R2
.dbline 484
; }
L88:
.dbline 485
; }
clr R2
sts L79,R2
.dbline 486
; }
L86:
.dbline 487
; }
L81:
.dbline 489
; }
; }
ldd R18,y+6
subi R18,1
ldd R16,y+4
subi R16,1
rcall _LCDSetXY
.dbline 489
.dbline 490
; }
lds R2,L78
ldi R24,17
mul R24,R2
movw R16,R0
add R16,R20
adc R17,R21
rcall _LCDDisplayString
.dbline 490
.dbline -2
L77:
rcall pop_gset2
.dbline 0 ; func end
ret
.dbsym l Y 6 c
.dbsym l X 4 c
.dbsym r StringCounter 22 c
.dbsym r String 20 pA[17:17]c
.dbend
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
_FlashGIFStringCounter::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_LCD1602B.h
.dbfile G:\单片机\源程序\串行1602\595_1602_Example\595_1602_Example.c
.dbsym e FlashGIFStringCounter _FlashGIFStringCounter i
_FlashTimeCounter::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example\595_1602_Example.c
.dbsym e FlashTimeCounter _FlashTimeCounter i
.area text(rom, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example\595_1602_Example.c
.dbfunc e PortInit _PortInit fV
.even
_PortInit::
.dbline -1
.dbline 64
.dbline 65
ldi R24,255
out 0x14,R24
.dbline 66
out 0x15,R24
.dbline 68
rcall _PORTDefine
.dbline -2
L90:
.dbline 0 ; func end
ret
.dbend
.dbfunc e Timer0Init _Timer0Init fV
.even
_Timer0Init::
.dbline -1
.dbline 75
.dbline 76
clr R2
out 0x33,R2
.dbline 77
ldi R24,131
out 0x32,R24
.dbline 78
ldi R24,3
out 0x33,R24
.dbline -2
L91:
.dbline 0 ; func end
ret
.dbend
.dbfunc e Timer0OvfIsr _Timer0OvfIsr fV
.even
_Timer0OvfIsr::
st -y,R24
st -y,R25
in R24,0x3f
st -y,R24
.dbline -1
.dbline 85
.dbline 86
ldi R24,131
out 0x32,R24
.dbline 88
lds R24,_FlashGIFStringCounter
lds R25,_FlashGIFStringCounter+1
adiw R24,1
sts _FlashGIFStringCounter+1,R25
sts _FlashGIFStringCounter,R24
.dbline 89
lds R24,_FlashTimeCounter
lds R25,_FlashTimeCounter+1
adiw R24,1
sts _FlashTimeCounter+1,R25
sts _FlashTimeCounter,R24
.dbline -2
L92:
ld R24,y+
out 0x3f,R24
ld R25,y+
ld R24,y+
.dbline 0 ; func end
reti
.dbend
.dbfunc e SystemInit _SystemInit fV
.even
_SystemInit::
.dbline -1
.dbline 97
.dbline 98
cli
.dbline 100
rcall _PortInit
.dbline 101
rcall _Timer0Init
.dbline 102
rcall _LCDInit
.dbline 104
ldi R24,1
out 0x39,R24
sei
.dbline -2
L93:
.dbline 0 ; func end
ret
.dbend
.dbfunc e main _main fV
.even
_main::
sbiw R28,5
.dbline -1
.dbline 111
.dbline 112
rcall _SystemInit
rjmp L96
L95:
.dbline 115
.dbline 116
ldi R24,16
std y+4,R24
ldi R24,1
std y+2,R24
std y+0,R24
ldi R18,1
ldi R16,<L98
ldi R17,>L98
rcall _RunString
.dbline 117
ldi R24,2
std y+2,R24
ldi R24,1
std y+0,R24
ldi R18,32
ldi R16,<L99
ldi R17,>L99
rcall _Flash
.dbline 118
L96:
.dbline 114
rjmp L95
X1:
.dbline -2
L94:
adiw R28,5
.dbline 0 ; func end
ret
.dbend
.area bss(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example\595_1602_Example.c
_DDRD_BIT::
.blkb 2
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_ATMega8L.h
.dbstruct 0 1 PORTBIT
.dbfield 0 Bit0 F[0:1]
.dbfield 0 Bit1 F[1:1]
.dbfield 0 Bit2 F[2:1]
.dbfield 0 Bit3 F[3:1]
.dbfield 0 Bit4 F[4:1]
.dbfield 0 Bit5 F[5:1]
.dbfield 0 Bit6 F[6:1]
.dbfield 0 Bit7 F[7:1]
.dbend
.dbsym e DDRD_BIT _DDRD_BIT pS[PORTBIT]
_DDRC_BIT::
.blkb 2
.dbsym e DDRC_BIT _DDRC_BIT pS[PORTBIT]
_DDRB_BIT::
.blkb 2
.dbsym e DDRB_BIT _DDRB_BIT pS[PORTBIT]
_PORTD_BIT::
.blkb 2
.dbsym e PORTD_BIT _PORTD_BIT pS[PORTBIT]
_PORTC_BIT::
.blkb 2
.dbsym e PORTC_BIT _PORTC_BIT pS[PORTBIT]
_PORTB_BIT::
.blkb 2
.dbsym e PORTB_BIT _PORTB_BIT pS[PORTBIT]
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_ATMega8L.h
L99:
.blkb 17
.area idata
.byte 'H,'e,'l,'l,'o,32,'A,'V,'R,32,'W,'o,'r,'l,'d,33
.byte 0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_ATMega8L.h
L98:
.blkb 55
.area idata
.byte 'I,32,'r,'e,'a,'l,'l,'y,32,'l,'i,'k,'e,32,'t,'h
.byte 'i,'s,32,'g,'a,'m,'e,33,32,32,32,32,32,32,32,32
.byte 32,32,32,32,32,'S,'W,'U,'S,'T,32,'R,'o,'b,'o,'t
.byte 'e,'a,'m,32,32,32,0
.area data(ram, con, rel)
.dbfile G:\单片机\源程序\串行1602\595_1602_Example/RD_ATMega8L.h
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -