📄 main.s
字号:
.dbline -2
L39:
.dbline 0 ; func end
ret
.dbend
.dbfunc e uart0_init _uart0_init fV
.even
_uart0_init::
xcall push_gset2
.dbline -1
.dbline 21
.dbline 23
clr R2
out 0xa,R2
.dbline 24
out 0xb,R2
.dbline 25
ldi R24,134
out 0x20,R24
.dbline 26
ldi R18,13
ldi R19,0
ldi R20,0
ldi R21,9
ldi R22,61
ldi R23,0
movw R16,R20
xcall lsr16
movw R24,R16
sbiw R24,1
mov R24,R25
clr R25
out 0x20,R24
.dbline 27
ldi R18,13
ldi R19,0
ldi R20,0
ldi R21,9
ldi R22,61
ldi R23,0
movw R16,R20
xcall lsr16
movw R24,R16
sbiw R24,1
out 0x9,R24
.dbline 28
ldi R24,216
out 0xa,R24
.dbline -2
L40:
xcall pop_gset2
.dbline 0 ; func end
ret
.dbend
.dbfunc e init_devices _init_devices fV
.even
_init_devices::
.dbline -1
.dbline 32
.dbline 34
cli
.dbline 35
xcall _port_init
.dbline 36
xcall _uart0_init
.dbline 38
clr R2
out 0x35,R2
.dbline 39
out 0x3b,R2
.dbline 40
out 0x39,R2
.dbline 41
sei
.dbline -2
L41:
.dbline 0 ; func end
ret
.dbend
.area lit(rom, con, rel)
L43:
.byte 56,54
.byte 49,53
.byte 57,54
.byte 49,49
.byte 53,50
.byte 49,51
.byte 55
L44:
.byte 'H,'E
.byte 'L,'L
.byte 'O,33
.area text(rom, con, rel)
.dbfile C:\DOCUME~1\Administrator\桌面\sim340_e\main.c
.dbfunc e main _main fV
; n_tx0_length -> R10,R11
; data_Len -> R20,R21
; pBuf -> y+473
; nPhone -> R22,R23
; PhoneNumber -> y+460
; pOut1 -> y+420
; nLen1 -> y+418
; nSend -> R10
; pOut2 -> y+218
; nLen2 -> y+216
; UART0_RX_Temp -> y+16
; i -> R12,R13
.even
_main::
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,63
sbiw R28,38 ; offset = 479
.dbline -1
.dbline 45
.dbline 50
ldi R24,<L43
ldi R25,>L43
movw R30,R28
subi R30,52 ; offset = 460
sbci R31,254
ldi R16,13
ldi R17,0
st -y,R31
st -y,R30
st -y,R25
st -y,R24
xcall asgncblk
.dbline 52
ldi R24,<L44
ldi R25,>L44
movw R30,R28
subi R30,39 ; offset = 473
sbci R31,254
ldi R16,6
ldi R17,0
st -y,R31
st -y,R30
st -y,R25
st -y,R24
xcall asgncblk
.dbline 58
ldi R22,13
ldi R23,0
.dbline 59
ldi R20,6
ldi R21,0
.dbline 64
xcall _init_devices
.dbline 65
sbi 0x17,5
.dbline 66
sbi 0x18,5
.dbline 67
sbi 0x1a,2
.dbline 68
sbi 0x1b,2
.dbline 69
sbi 0x1a,4
.dbline 70
cbi 0x1b,4
.dbline 71
ldi R16,<_uart0_tx_buf
ldi R17,>_uart0_tx_buf
xcall _readcsca
movw R10,R16
.dbline 72
movw R18,R10
ldi R16,<_uart0_tx_buf
ldi R17,>_uart0_tx_buf
xcall _putstring
.dbline 73
movw R16,R28
subi R16,240 ; offset = 16
sbci R17,255
xcall _getstring
.dbline 74
ldi R18,<_sca
ldi R19,>_sca
movw R16,R28
subi R16,240 ; offset = 16
sbci R17,255
xcall _GetPhone
sts _sca_len+1,R17
sts _sca_len,R16
.dbline 75
ldi R24,<_sca
ldi R25,>_sca
movw R30,R16
add R30,R24
adc R31,R25
ldi R24,70
std z+0,R24
.dbline 76
ldi R16,<_uart0_tx_buf
ldi R17,>_uart0_tx_buf
xcall _setCmgf
movw R10,R16
.dbline 77
movw R18,R10
ldi R16,<_uart0_tx_buf
ldi R17,>_uart0_tx_buf
xcall _putstring
.dbline 79
L45:
.dbline 80
.dbline 82
lds R2,_sca_len
lds R3,_sca_len+1
std y+15,R3
std y+14,R2
ldi R24,<_sca
ldi R25,>_sca
std y+13,R25
std y+12,R24
movw R24,R28
subi R24,38 ; offset = 218
sbci R25,255
std y+11,R25
std y+10,R24
movw R24,R28
subi R24,92 ; offset = 420
sbci R25,254
std y+9,R25
std y+8,R24
movw R24,R28
subi R24,40 ; offset = 216
sbci R25,255
std y+7,R25
std y+6,R24
movw R24,R28
subi R24,94 ; offset = 418
sbci R25,254
std y+5,R25
std y+4,R24
std y+3,R21
std y+2,R20
movw R24,R28
subi R24,39 ; offset = 473
sbci R25,254
std y+1,R25
std y+0,R24
movw R18,R22
movw R16,R28
subi R16,52 ; offset = 460
sbci R17,254
xcall _SendMsm
.dbline 83
movw R30,R28
subi R30,94 ; addi 418
sbci R31,254
ldd R18,z+0
ldd R19,z+1
movw R16,R28
subi R16,92 ; offset = 420
sbci R17,254
xcall _putstring
.dbline 85
L49:
.dbline 86
.dbline 87
lds R24,_Uart_RecvFlag
cpi R24,1
brne L49
.dbline 88
.dbline 89
clr R2
sts _Uart_RecvFlag,R2
.dbline 90
clr R12
clr R13
xjmp L58
L55:
.dbline 91
.dbline 92
ldi R24,<_rx_buffer
ldi R25,>_rx_buffer
movw R30,R12
add R30,R24
adc R31,R25
ldd R2,z+0
movw R24,R28
adiw R24,16
movw R30,R12
add R30,R24
adc R31,R25
std z+0,R2
.dbline 93
L56:
.dbline 90
movw R24,R12
adiw R24,1
movw R12,R24
L58:
.dbline 90
lds R2,_nRX0_Len
clr R3
cp R12,R2
cpc R13,R3
brlt L55
.dbline 94
mov R24,R2
cpi R24,2
brlo L59
.dbline 95
.dbline 96
ldd R24,y+16
cpi R24,62
brne L49
ldd R24,y+17
cpi R24,32
brne L49
.dbline 98
.dbline 99
movw R30,R28
subi R30,40 ; addi 216
sbci R31,255
ldd R18,z+0
ldd R19,z+1
movw R16,R28
subi R16,38 ; offset = 218
sbci R17,255
xcall _putstring
.dbline 100
clr R10
inc R10
.dbline 101
xjmp L51
X1:
.dbline 103
L59:
.dbline 105
.dbline 106
clr R10
.dbline 107
.dbline 110
.dbline 112
.dbline 85
.dbline 85
L51:
.dbline 113
clr R12
clr R13
xjmp L67
L64:
.dbline 114
.dbline 115
movw R24,R28
subi R24,38 ; offset = 218
sbci R25,255
movw R30,R12
add R30,R24
adc R31,R25
ldd R16,z+0
xcall _putchar
.dbline 116
L65:
.dbline 113
movw R24,R12
adiw R24,1
movw R12,R24
L67:
.dbline 113
movw R30,R28
subi R30,40 ; addi 216
sbci R31,255
ldd R2,z+0
ldd R3,z+1
cp R12,R2
cpc R13,R3
brlt L64
.dbline 117
ldi R16,10000
ldi R17,39
xcall _delay_nms
.dbline 118
.dbline 79
.dbline 79
xjmp L45
X2:
.dbline -2
L42:
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,63
adiw R28,38 ; offset = 479
.dbline 0 ; func end
ret
.dbsym r n_tx0_length 10 I
.dbsym r data_Len 20 I
.dbsym l pBuf 473 A[6:6]c
.dbsym r nPhone 22 I
.dbsym l PhoneNumber 460 A[13:13]c
.dbsym l pOut1 420 A[40:40]c
.dbsym l nLen1 418 I
.dbsym r nSend 10 c
.dbsym l pOut2 218 A[200:200]c
.dbsym l nLen2 216 I
.dbsym l UART0_RX_Temp 16 A[200:200]c
.dbsym r i 12 I
.dbend
.area bss(ram, con, rel)
.dbfile C:\DOCUME~1\Administrator\桌面\sim340_e\main.c
_sca_len::
.blkb 2
.dbfile C:\DOCUME~1\Administrator\桌面\sim340_e/globle_temp.h
.dbsym e sca_len _sca_len I
_sca:
.blkb 20
.dbsym s sca _sca A[20:20]c
_nRX0_Len::
.blkb 1
.dbsym e nRX0_Len _nRX0_Len c
_Uart_RecvFlag::
.blkb 1
.dbsym e Uart_RecvFlag _Uart_RecvFlag c
_rx_buffer_overflow::
.blkb 1
.dbsym e rx_buffer_overflow _rx_buffer_overflow c
_rx_rd_index::
.blkb 1
.dbsym e rx_rd_index _rx_rd_index c
_rx_wr_index::
.blkb 1
.dbsym e rx_wr_index _rx_wr_index c
_rx_counter::
.blkb 1
.dbsym e rx_counter _rx_counter c
_rx_buffer::
.blkb 200
.dbsym e rx_buffer _rx_buffer A[200:200]c
_uart0_tx_buf::
.blkb 200
.dbsym e uart0_tx_buf _uart0_tx_buf A[200:200]c
_n_tx0_length::
.blkb 1
.dbsym e n_tx0_length _n_tx0_length c
_tx_counter::
.blkb 1
.dbsym e tx_counter _tx_counter c
_tx_rd_index::
.blkb 1
.dbsym e tx_rd_index _tx_rd_index c
_tx_wr_index::
.blkb 1
.dbsym e tx_wr_index _tx_wr_index c
_tx_buffer::
.blkb 200
.dbsym e tx_buffer _tx_buffer A[200:200]c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -