📄 main.s
字号:
.dbline 243
subi R20,248 ; addi 8
L74:
.dbline 243
cpi R20,9
brsh X3
xjmp L71
X3:
.dbline -2
L70:
xcall pop_gset5
.dbline 0 ; func end
ret
.dbsym r i 20 c
.dbsym r y 12 c
.dbsym r j 10 i
.dbsym r x 14 c
.dbsym r img 22 pkc
.dbend
.dbfunc e DisplayDots _DisplayDots fV
; i -> R20
; j -> R10
; DotByte -> R22
.even
_DisplayDots::
xcall push_gset3
mov R22,R16
.dbline -1
.dbline 260
;
;
;
;
;
;
;
;
;
;
;
;
;
;
;
.dbline 262
;
;
ldi R16,52
xcall _LCD_WriteCmd
.dbline 263
;
ldi R16,54
xcall _LCD_WriteCmd
.dbline 264
;
clr R20
xjmp L87
L84:
.dbline 265
;
.dbline 266
;
mov R16,R20
ori R16,128
xcall _LCD_WriteCmd
.dbline 267
;
ldi R16,128
xcall _LCD_WriteCmd
.dbline 268
;
clr R10
xjmp L91
L88:
.dbline 269
.dbline 270
mov R16,R22
xcall _LCD_WriteData
.dbline 271
L89:
.dbline 268
inc R10
L91:
.dbline 268
mov R24,R10
cpi R24,32
brlo L88
.dbline 272
com R22
.dbline 273
L85:
.dbline 264
inc R20
L87:
.dbline 264
cpi R20,32
brlo L84
.dbline -2
L83:
xcall pop_gset3
.dbline 0 ; func end
ret
.dbsym r i 20 c
.dbsym r j 10 c
.dbsym r DotByte 22 c
.dbend
.area lit(rom, con, rel)
_bmp1::
.byte 0,0
.byte 0,0
.byte 0,0
.byte 'x,0
.byte 0,31
.byte 128,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 13,192
.byte 7,128
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 1,7
.byte 0,0
.byte 0,0
.byte 224,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,224
.byte 0,0
.byte 0,0
.byte 6,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 142,0
.byte 0,0
.byte 0,0
.byte 0,224
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,4
.byte 224,0
.byte 0,0
.byte 0,96
.byte 0,4
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,7
.byte 0,0
.byte 0,0
.byte 0,96
.byte 0,1
.byte 136,0
.byte 0,0
.byte 0,0
.byte 0,24
.byte 0,0
.byte 0,8
.byte 56,224
.byte 0,0
.byte 57,0
.byte 0,0
.byte 0,0
.byte 6,96
.byte 0,0
.byte 0,12
.byte 28,192
.byte 0,0
.byte 4,128
.byte 0,0
.byte 0,0
.byte 9,128
.byte 0,0
.byte 0,12
.byte 48,192
.byte 0,0
.byte 1,176
.byte 0,0
.byte 0,0
.byte 6,0
.byte 0,0
.byte 0,8
.byte 123,128
.byte 8,0
.byte 0,'H
.byte 0,0
.byte 0,0
.byte 'X,0
.byte 1,134
.byte 0,0
.byte 3,128
.byte 12,0
.byte 0,30
.byte 0,0
.byte 0,0
.byte 96,0
.byte 1,134
.byte 0,0
.byte 3,0
.byte 4,0
.byte 0,7
.byte 128,0
.byte 0,0
.byte 128,0
.byte 1,134
.byte 0,0
.byte 3,0
.byte 4,0
.byte 0,7
.byte 192,0
.byte 0,7
.byte 0,0
.byte 0,0
.byte 0,0
.byte 3,0
.byte 0,0
.byte 0,1
.byte 224,0
.byte 0,14
.byte 0,0
.byte 0,0
.byte 0,0
.byte 6,0
.byte 0,0
.byte 0,0
.byte 'x,0
.byte 0,24
.byte 0,0
.byte 0,0
.byte 0,0
.byte 14,0
.byte 0,0
.byte 0,0
.byte 'x,0
.byte 0,'x
.byte 48,0
.byte 0,0
.byte 0,0
.byte 12,0
.byte 0,0
.byte 0,0
.byte 30,0
.byte 0,240
.byte 0,0
.byte 0,0
.byte 0,0
.byte 12,0
.byte 0,0
.byte 7,0
.byte 31,0
.byte 1,224
.byte 0,199
.byte 128,0
.byte 0,0
.byte 24,0
.byte 0,0
.byte 6,0
.byte 7,0
.byte 1,224
.byte 0,25
.byte 192,0
.byte 0,0
.byte 24,0
.byte 0,0
.byte 28,0
.byte 7,0
.byte 3,128
.byte 0,143
.byte 128,0
.byte 0,0
.byte 48,0
.byte 0,0
.byte 12,0
.byte 1,192
.byte 3,128
.byte 0,3
.byte 0,0
.byte 0,0
.byte 48,0
.byte 0,0
.byte 0,0
.byte 1,240
.byte 3,128
.byte 0,0
.byte 0,0
.byte 0,0
.byte 48,0
.byte 0,0
.byte 0,0
.byte 1,240
.byte 7,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 96,0
.byte 0,0
.byte 0,0
.byte 1,240
.byte 14,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 224,0
.byte 0,0
.byte 0,0
.byte 0,248
.byte 30,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 192,0
.byte 0,0
.byte 0,0
.byte 0,'x
.byte 30,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 192,0
.byte 0,0
.byte 0,0
.byte 0,124
.byte 30,0
.byte 0,0
.byte 0,0
.byte 0,1
.byte 192,0
.byte 0,0
.byte 0,0
.byte 0,124
.byte 30,0
.byte 62,0
.byte 0,0
.byte 0,1
.byte 224,0
.byte 0,0
.byte 0,56
.byte 0,124
.byte 30,0
.byte 54,0
.byte 0,0
.byte 0,3
.byte 192,0
.byte 0,0
.byte 0,24
.byte 0,124
.byte 30,0
.byte 30,0
.byte 0,0
.byte 0,3
.byte 128,0
.byte 0,0
.byte 0,28
.byte 0,124
.byte 30,0
.byte 28,0
.byte 0,0
.byte 0,7
.byte 0,0
.byte 0,0
.byte 0,56
.byte 0,'x
.byte 30,0
.byte 0,0
.byte 0,0
.byte 0,14
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,'x
.byte 30,0
.byte 0,0
.byte 0,0
.byte 0,24
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,'x
.byte 14,0
.byte 0,0
.byte 0,0
.byte 0,48
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,'x
.byte 14,0
.byte 0,0
.byte 0,0
.byte 0,224
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,248
.byte 7,0
.byte 0,0
.byte 0,0
.byte 1,192
.byte 0,0
.byte 0,0
.byte 0,0
.byte 1,240
.byte 7,128
.byte 0,0
.byte 0,0
.byte 3,128
.byte 0,0
.byte 0,0
.byte 0,0
.byte 1,240
.byte 7,128
.byte 0,0
.byte 0,0
.byte 7,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 1,224
.byte 7,192
.byte 0,'p
.byte 0,0
.byte 14,0
.byte 0,0
.byte 0,0
.byte 4,0
.byte 7,192
.byte 3,224
.byte 0,248
.byte 0,0
.byte 24,0
.byte 0,0
.byte 0,0
.byte 12,4
.byte 7,192
.byte 1,224
.byte 0,248
.byte 0,0
.byte 48,0
.byte 0,0
.byte 0,0
.byte 62,0
.byte 7,192
.byte 0,240
.byte 8,'x
.byte 0,0
.byte 224,0
.byte 0,0
.byte 0,0
.byte 6,0
.byte 31,128
.byte 0,248
.byte 32,0
.byte 0,1
.byte 192,0
.byte 0,0
.byte 0,0
.byte 0,4
.byte 30,0
.byte 0,60
.byte 0,0
.byte 0,3
.byte 128,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 124,0
.byte 0,62
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 252,0
.byte 0,31
.byte 128,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,1
.byte 248,0
.byte 0,15
.byte 192,0
.byte 0,56
.byte 0,0
.byte 0,0
.byte 28,0
.byte 0,7
.byte 240,0
.byte 0,7
.byte 224,0
.byte 0,48
.byte 0,0
.byte 0,0
.byte 30,0
.byte 0,15
.byte 224,0
.byte 0,1
.byte 248,0
.byte 0,96
.byte 0,0
.byte 0,0
.byte 7,0
.byte 0,31
.byte 128,0
.byte 0,0
.byte 254,0
.byte 0,64
.byte 0,7
.byte 128,0
.byte 30,0
.byte 0,127
.byte 0,0
.byte 0,0
.byte 63,128
.byte 0,0
.byte 0,7
.byte 192,0
.byte 0,0
.byte 3,248
.byte 0,0
.byte 0,0
.byte 15,224
.byte 2,0
.byte 0,6
.byte 192,0
.byte 0,0
.byte 15,224
.byte 0,0
.byte 0,0
.byte 3,248
.byte 0,0
.byte 0,3
.byte 128,0
.byte 8,0
.byte 63,192
.byte 0,0
.byte 0,0
.byte 0,255
.byte 0,0
.byte 0,0
.byte 0,2
.byte 0,1
.byte 254,0
.byte 0,0
.byte 0,0
.byte 0,31
.byte 224,0
.byte 0,0
.byte 0,0
.byte 0,15
.byte 248,0
.byte 0,0
.byte 0,0
.byte 0,3
.byte 254,0
.byte 0,0
.byte 0,0
.byte 0,127
.byte 192,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 127,224
.byte 0,0
.byte 0,0
.byte 15,252
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 7,255
.byte 128,0
.byte 0,1
.byte 255,240
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,127
.byte 255,224
.byte 63,255
.byte 255,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.byte 0,0
.dbsym e bmp1 _bmp1 A[1024:1024]kc
.area data(ram, con, rel)
.dbfile E:\单片机\本人实验\重新实验\adc_vcc/lcd.h
_str::
.blkb 17
.area idata
.byte 181,231,209,185,206,170,32,32,32,32,32,32,186,193,183,252
.byte 0
.area data(ram, con, rel)
.dbfile E:\单片机\本人实验\重新实验\adc_vcc/lcd.h
.dbfile E:\单片机\本人实验\重新实验\adc_vcc\main.c
.dbsym e str _str A[17:17]c
.area text(rom, con, rel)
.dbfile E:\单片机\本人实验\重新实验\adc_vcc\main.c
.dbfunc e delay_ms _delay_ms fV
; a -> R20
; b -> R22
; i -> R16
.even
_delay_ms::
xcall push_gset2
.dbline -1
.dbline 16
.dbline 18
ldi R20,1
xjmp L96
L93:
.dbline 19
ldi R22,1
xjmp L100
L97:
.dbline 20
.dbline 20
.dbline 20
L98:
.dbline 19
inc R22
L100:
.dbline 19
cpi R22,141
brlo L97
L94:
.dbline 18
inc R20
L96:
.dbline 18
cp R20,R16
brlo L93
.dbline -2
L92:
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r a 20 c
.dbsym r b 22 c
.dbsym r i 16 c
.dbend
.dbfunc e change _change fV
; p -> R20,R21
; i -> R22,R23
.even
_change::
xcall push_gset2
movw R20,R18
movw R22,R16
.dbline -1
.dbline 32
.dbline 32
ldi R18,10
ldi R19,0
movw R16,R22
xcall mod16u
movw R24,R16
adiw R24,48
movw R30,R20
std z+3,R24
.dbline 33
ldi R18,10
ldi R19,0
movw R16,R22
xcall div16u
ldi R18,10
ldi R19,0
xcall mod16u
movw R24,R16
adiw R24,48
movw R30,R20
std z+2,R24
.dbline 34
ldi R18,100
ldi R19,0
movw R16,R22
xcall div16u
ldi R18,10
ldi R19,0
xcall mod16u
movw R24,R16
adiw R24,48
movw R30,R20
std z+1,R24
.dbline 35
ldi R18,1000
ldi R19,3
movw R16,R22
xcall div16u
ldi R18,10
ldi R19,0
xcall mod16u
movw R24,R16
adiw R24,48
movw R30,R20
std z+0,R24
.dbline -2
L101:
xcall pop_gset2
.dbline 0 ; func end
ret
.dbsym r p 20 pc
.dbsym r i 22 i
.dbend
.area vector(rom, abs)
.org 56
jmp _adc_end
.area text(rom, con, rel)
.dbfile E:\单片机\本人实验\重新实验\adc_vcc\main.c
.dbfunc e adc_end _adc_end fV
.even
_adc_end::
st -y,R0
st -y,R1
st -y,R2
st -y,R3
st -y,R4
st -y,R5
st -y,R16
st -y,R17
st -y,R18
st -y,R19
st -y,R24
st -y,R25
st -y,R26
st -y,R27
in R0,0x3f
st -y,R0
.dbline -1
.dbline 40
.dbline 41
ldi R18,64
ldi R19,0
in R16,0x4
clr R17
xcall div16s
movw R2,R16
in R4,0x5
ldi R24,4
mul R24,R4
movw R16,R0
add R16,R2
adc R17,R3
xcall int2fp
sts _adc_data+1,R17
sts _adc_data,R16
sts _adc_data+2+1,R19
sts _adc_data+2,R18
.dbline 44
ldi R16,<L105
ldi R17,>L105
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
lds R4,_adc_data+2
lds R5,_adc_data+2+1
lds R2,_adc_data
lds R3,_adc_data+1
st -y,R5
st -y,R4
st -y,R3
st -y,R2
xcall cmp32f
brge L103
.dbline 45
ldi R24,254
out 0x18,R24
xjmp L104
L103:
.dbline 46
lds R4,_adc_data+2
lds R5,_adc_data+2+1
lds R2,_adc_data
lds R3,_adc_data+1
st -y,R5
st -y,R4
st -y,R3
st -y,R2
ldi R16,<L108
ldi R17,>L108
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
xcall cmp32f
brge L106
.dbline 47
ldi R24,253
out 0x18,R24
xjmp L107
L106:
.dbline 49
ldi R24,251
out 0x18,R24
L107:
L104:
.dbline 50
sbi 0x6,6
.dbline -2
L102:
ld R0,y+
out 0x3f,R0
ld R27,y+
ld R26,y+
ld R25,y+
ld R24,y+
ld R19,y+
ld R18,y+
ld R17,y+
ld R16,y+
ld R5,y+
ld R4,y+
ld R3,y+
ld R2,y+
ld R1,y+
ld R0,y+
.dbline 0 ; func end
reti
.dbend
.dbfunc e main _main fV
; i -> R20
.even
_main::
sbiw R28,6
.dbline -1
.dbline 56
.dbline 57
clr R20
.dbline 58
clr R2
out 0x1a,R2
.dbline 59
ldi R24,255
out 0x1b,R24
.dbline 60
out 0x17,R24
.dbline 61
out 0x18,R24
.dbline 62
out 0x14,R2
.dbline 63
out 0x15,R2
.dbline 65
sbi 0x14,6
.dbline 66
cbi 0x15,6
.dbline 67
cbi 0x14,7
.dbline 68
cbi 0x15,7
.dbline 69
cbi 0x11,7
.dbline 70
cbi 0x12,7
.dbline 72
out 0x11,R2
.dbline 73
out 0x12,R24
.dbline 74
xcall _LCD_Init
.dbline 75
ldi R24,97
out 0x7,R24
.dbline 76
ldi R24,203
out 0x6,R24
.dbline 77
sei
xjmp L111
L110:
.dbline 79
.dbline 82
ldi R16,<L115
ldi R17,>L115
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
lds R4,_adc_data+2
lds R5,_adc_data+2+1
lds R2,_adc_data
lds R3,_adc_data+1
st -y,R5
st -y,R4
st -y,R3
st -y,R2
xcall empy32fs
ldi R16,<L116
ldi R17,>L116
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
xcall div32f
movw R30,R28
std z+2,R16
std z+3,R17
std z+4,R18
std z+5,R19
movw R30,R28
ldd R2,z+2
ldd R3,z+3
ldd R4,z+4
ldd R5,z+5
st -y,R5
st -y,R4
st -y,R3
st -y,R2
ldi R16,<L117
ldi R17,>L117
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
xcall cmp32f
brlt L113
movw R30,R28
ldd R2,z+2
ldd R3,z+3
ldd R4,z+4
ldd R5,z+5
st -y,R5
st -y,R4
st -y,R3
st -y,R2
ldi R16,<L117
ldi R17,>L117
xcall lpm32
st -y,R19
st -y,R18
st -y,R17
st -y,R16
xcall sub32f
xcall fp2int
movw R20,R16
subi R20,0 ; offset = 32768
sbci R21,128
xjmp L114
L113:
movw R30,R28
ldd R16,z+2
ldd R17,z+3
ldd R18,z+4
ldd R19,z+5
xcall fp2int
movw R20,R16
L114:
sts _vcc+1,R21
sts _vcc,R20
.dbline 83
ldi R18,<_str2
ldi R19,>_str2
movw R16,R20
xcall _change
.dbline 84
ldi R16,20
xcall _delay_ms
.dbline 86
ldi R24,<_str
ldi R25,>_str
std y+1,R25
std y+0,R24
clr R18
clr R16
xcall _LCD_PutStr
.dbline 87
ldi R24,<_str2
ldi R25,>_str2
std y+1,R25
std y+0,R24
ldi R18,3
clr R16
xcall _LCD_PutStr
.dbline 88
ldi R16,2
xcall _delay_ms
.dbline 93
L111:
.dbline 78
xjmp L110
X4:
.dbline -2
L109:
adiw R28,6
.dbline 0 ; func end
ret
.dbsym r i 20 c
.dbend
.area bss(ram, con, rel)
.dbfile E:\单片机\本人实验\重新实验\adc_vcc\main.c
_vcc::
.blkb 2
.dbsym e vcc _vcc i
_adc_data::
.blkb 4
.dbsym e adc_data _adc_data D
_str2::
.blkb 4
.dbsym e str2 _str2 A[4:4]c
.area lit(rom, con, rel)
L117:
.word 0x0,0x4700
L116:
.word 0x0,0x4480
L115:
.word 0x4000,0x459c
L108:
.word 0xcccd,0x42cc
L105:
.word 0x8000,0x4419
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -