📄 remote_car.s
字号:
ldi R24,100
ldi R25,0
sts _delay_time1+1,R25
sts _delay_time1,R24
.dbline 271
.dbline 272
; }
rjmp L48
L59:
.dbline 274
; }
; }
lds R24,_delay_time2
lds R25,_delay_time2+1
adiw R24,50
sts _delay_time2+1,R25
sts _delay_time2,R24
.dbline 275
; }
cpi R24,2
ldi R30,8
cpc R25,R30
brne L48
.dbline 276
; }
.dbline 276
ldi R24,2000
ldi R25,7
sts _delay_time2+1,R25
sts _delay_time2,R24
.dbline 276
.dbline 277
; }
.dbline 279
; }
; }
L47:
L48:
.dbline -2
.dbline 281
; }
; }
L46:
.dbline 0 ; func end
ret
.dbend
.area lit(rom, con, rel)
_TONETABLE::
.word 64580
.word 64684
.word 64777
.word 64820
.word 64898
.word 64968
.word 65030
.word 65058
.word 65110
.word 65157
.word 65178
.word 65217
.word 65252
.word 65283
.word 65297
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbsym e TONETABLE _TONETABLE A[30:15]ki
.area data(ram, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
_sound_add::
.blkb 2
.area idata
.word 0
.area data(ram, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbsym e sound_add _sound_add i
_led_delayms::
.blkb 2
.area idata
.word 600
.area data(ram, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbsym e led_delayms _led_delayms i
.area lit(rom, con, rel)
_led_data::
.byte 254,253
.byte 251,247
.byte 239,223
.byte 191,127
.byte 191,223
.byte 239,247
.byte 251,253
.byte 254,253
.byte 251,247
.byte 239,223
.byte 191,127
.byte 191,223
.byte 239,247
.byte 251,253
.byte 0,24
.byte 60,126
.byte 255,126
.byte 60,24
.byte 0,24
.byte 60,126
.byte 255,126
.byte 60,24
.byte 248,241
.byte 227,199
.byte 143,31
.byte 143,199
.byte 227,241
.byte 248,241
.byte 227,199
.byte 143,31
.byte 143,199
.byte 227,241
.byte 254,252
.byte 248,240
.byte 224,192
.byte 128,0
.byte 128,192
.byte 224,240
.byte 248,252
.byte 254,252
.byte 248,240
.byte 224,192
.byte 128,0
.byte 128,192
.byte 224,240
.byte 248,252
.byte 255,231
.byte 219,189
.byte 126,189
.byte 219,231
.byte 255,231
.byte 219,189
.byte 126,189
.byte 219,231
.byte 255,0
.byte 255,0
.byte 255,0
.byte 255,0
.byte 10,10
.dbsym e led_data _led_data A[118:118]kc
_sound_none::
.byte 40,39
.byte 54,22
.byte 'E,'G
.byte 'F,'F
.byte 'F,35
.byte 37,'F
.byte 'J,57
.byte 24,39
.byte 40,'H
.byte 'H,40
.byte 39,54
.byte 22,'E
.byte 39,38
.byte 'F,'F
.byte 'F,'F
.byte 'F,'F
.byte 0,0
.dbsym e sound_none _sound_none A[34:34]kc
_sound_right::
.byte 35,37
.byte 'F,'J
.byte 57,24
.byte 39,40
.byte 'H,'H
.byte 'H,40
.byte 39,54
.byte 22,'E
.byte 'G,'F
.byte 'F,'F
.byte 0,0
.dbsym e sound_right _sound_right A[22:22]kc
_sound_back::
.byte 42,44
.byte 'M,'M
.byte 'M,42
.byte 44,'I
.byte 'I,'I
.byte 42,44
.byte 45,'O
.byte 45,'L
.byte 29,24
.byte 42,'I
.byte 'I,'I
.byte 0,0
.dbsym e sound_back _sound_back A[24:24]kc
_sound_stop::
.byte 35,36
.byte 37,'D
.byte 'E,36
.byte 35,34
.byte 'B,64
.byte 64,35
.byte 34,33
.byte 'A,40
.byte 'H,35
.byte 37,'E
.byte 64,64
.byte 0,0
.dbsym e sound_stop _sound_stop A[24:24]kc
_sound_left::
.byte 'h,38
.byte 37,35
.byte 34,19
.byte 18,'A
.byte 'A,'A
.byte 35,37
.byte 40,'H
.byte 40,41
.byte 42,41
.byte 38,'E
.byte 'E,'E
.byte 0,0
.dbsym e sound_left _sound_left A[24:24]kc
.area text(rom, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbfunc e timer0_init _timer0_init fV
.even
_timer0_init::
.dbline -1
.dbline 59
.dbline 60
clr R2
out 0x33,R2
.dbline 61
ldi R24,61
out 0x32,R24
.dbline 62
ldi R24,5
out 0x33,R24
.dbline -2
.dbline 63
L63:
.dbline 0 ; func end
ret
.dbend
.area vector(rom, abs)
.org 14
rjmp _timer0_ovf_isr
.area text(rom, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbfunc e timer0_ovf_isr _timer0_ovf_isr fV
.even
_timer0_ovf_isr::
rcall push_lset
rcall push_gset1
.dbline -1
.dbline 67
.dbline 68
ldi R24,61
out 0x32,R24
.dbline 69
lds R24,_t0_times
subi R24,255 ; addi 1
sts _t0_times,R24
.dbline 70
lds R24,_gzsl
cpi R24,136
brne L65
.dbline 71
.dbline 72
lds R24,_t0_times
cpi R24,10
brne L67
.dbline 73
.dbline 74
lds R24,_timers
subi R24,255 ; addi 1
sts _timers,R24
.dbline 75
clr R2
sts _t0_times,R2
.dbline 76
ldi R24,<_led_data
ldi R25,>_led_data
lds R2,_timers
clr R3
add R2,R24
adc R3,R25
mov R30,R2
mov R31,R3
lpm
sts _pa,R0
.dbline 77
mov R24,R0
cpi R24,10
brne L69
.dbline 77
.dbline 77
clr R2
sts _timers,R2
.dbline 77
L69:
.dbline 78
lds R2,_pa
out 0x1b,R2
.dbline 79
L67:
.dbline 80
L65:
.dbline 81
lds R24,_gzsl
cpi R24,51
breq X9
rjmp L71
X9:
.dbline 82
.dbline 83
rcall _sw_touch
.dbline 84
lds R24,_t0_times
cpi R24,8
breq X10
rjmp L73
X10:
.dbline 85
.dbline 86
clr R2
sts _t0_times,R2
.dbline 87
in R24,0x16
andi R24,15
sts _remote_in,R24
.dbline 88
mov R2,R24
sts _sound_1,R2
.dbline 89
lds R3,_sound_2
cp R3,R24
breq L75
.dbline 90
.dbline 90
clr R2
clr R3
sts _sound_add+1,R3
sts _sound_add,R2
.dbline 90
mov R2,R24
sts _sound_2,R2
.dbline 90
L75:
.dbline 91
lds R20,_remote_in
clr R21
cpi R20,0
cpc R20,R21
breq L80
X7:
cpi R20,1
ldi R30,0
cpc R21,R30
brne X11
rjmp L84
X11:
cpi R20,2
ldi R30,0
cpc R21,R30
breq L82
cpi R20,4
ldi R30,0
cpc R21,R30
breq L81
cpi R20,8
ldi R30,0
cpc R21,R30
brne X12
rjmp L83
X12:
rjmp L77
X8:
.dbline 92
L80:
.dbline 94
rcall _forward
.dbline 95
clr R2
sts _rst_time,R2
.dbline 96
clr R3
sts _sound_add+1,R3
sts _sound_add,R2
.dbline 97
sts _temp1,R2
.dbline 98
rjmp L78
L81:
.dbline 100
rcall _turn_right
.dbline 101
clr R2
sts _rst_time,R2
.dbline 102
ldi R24,<_sound_right
ldi R25,>_sound_right
lds R2,_sound_add
lds R3,_sound_add+1
add R2,R24
adc R3,R25
mov R30,R2
mov R31,R3
lpm
sts _temp1,R0
.dbline 103
rjmp L78
L82:
.dbline 105
rcall _backward
.dbline 106
clr R2
sts _rst_time,R2
.dbline 107
ldi R24,<_sound_back
ldi R25,>_sound_back
lds R2,_sound_add
lds R3,_sound_add+1
add R2,R24
adc R3,R25
mov R30,R2
mov R31,R3
lpm
sts _temp1,R0
.dbline 108
rjmp L78
L83:
.dbline 110
rcall _stop
.dbline 111
lds R24,_rst_time
subi R24,255 ; addi 1
sts _rst_time,R24
.dbline 112
ldi R24,<_sound_stop
ldi R25,>_sound_stop
lds R2,_sound_add
lds R3,_sound_add+1
add R2,R24
adc R3,R25
mov R30,R2
mov R31,R3
lpm
sts _temp1,R0
.dbline 113
rjmp L78
L84:
.dbline 115
rcall _turn_left
.dbline 116
clr R2
sts _rst_time,R2
.dbline 117
ldi R24,<_sound_left
ldi R25,>_sound_left
lds R2,_sound_add
lds R3,_sound_add+1
add R2,R24
adc R3,R25
mov R30,R2
mov R31,R3
lpm
sts _temp1,R0
.dbline 118
L77:
L78:
.dbline 120
L73:
.dbline 121
L71:
.dbline -2
.dbline 122
L64:
rcall pop_gset1
rcall pop_lset
.dbline 0 ; func end
reti
.dbend
.dbfunc e stop_timer0 _stop_timer0 fV
.even
_stop_timer0::
.dbline -1
.dbline 125
.dbline 126
cli
.dbline 127
clr R2
out 0x33,R2
.dbline 128
out 0x35,R2
.dbline 129
out 0x3b,R2
.dbline 130
out 0x39,R2
.dbline 131
sei
.dbline -2
.dbline 132
L85:
.dbline 0 ; func end
ret
.dbend
.area vector(rom, abs)
.org 12
rjmp _timer1_ovf_isr
.area text(rom, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbfunc e timer1_ovf_isr _timer1_ovf_isr fV
.even
_timer1_ovf_isr::
st -y,R2
st -y,R3
st -y,R24
in R2,0x3f
st -y,R2
.dbline -1
.dbline 136
.dbline 137
.dbline 138
lds R2,_toneconst
lds R3,_toneconst+1
out 0x2d,R3
out 0x2c,R2
.dbline 139
ldi R24,1
in R2,0x15
eor R2,R24
out 0x15,R2
.dbline 140
.dbline -2
.dbline 141
L86:
ld R2,y+
out 0x3f,R2
ld R24,y+
ld R3,y+
ld R2,y+
.dbline 0 ; func end
reti
.dbend
.dbfunc e remote_car _remote_car fV
.even
_remote_car::
.dbline -1
.dbline 144
.dbline 146
rcall _port_init
.dbline 148
ldi R24,96
sts _work_status,R24
L88:
.dbline 151
ldi R24,15
out 0x1b,R24
.dbline 153
ldi R24,136
sts _gzsl,R24
.dbline 153
clr R2
sts _timers,R2
.dbline 153
sts _t0_times,R2
.dbline 154
cli
.dbline 155
rcall _timer0_init
.dbline 157
clr R2
out 0x35,R2
.dbline 158
out 0x3b,R2
.dbline 159
in R24,0x39
ori R24,2
out 0x39,R24
.dbline 160
sei
.dbline 162
rcall _mic_startup
.dbline 164
ldi R24,51
sts _gzsl,R24
.dbline 164
clr R2
sts _t0_times,R2
.dbline 165
out 0x2f,R2
.dbline 166
ldi R24,2
out 0x2e,R24
L89:
.dbline 168
clr R2
sts _temp1,R2
sts _temp,R2
.dbline 169
clr R3
sts _sound_add+1,R3
sts _sound_add,R2
rjmp L91
L90:
.dbline 171
.dbline 172
lds R2,_temp1
sts _temp,R2
.dbline 173
mov R24,R2
andi R24,15
sts _temp,R24
.dbline 174
mov R2,R24
tst R24
breq L93
.dbline 175
.dbline 176
in R24,0x39
ori R24,128
out 0x39,R24
.dbline 177
mov R24,R2
subi R24,1
sts _temp,R24
.dbline 178
ldi R24,<_TONETABLE
ldi R25,>_TONETABLE
lds R16,_temp
clr R17
lsl R16
rol R17
add R16,R24
adc R17,R25
rcall lpm16
sts _toneconst+1,R17
sts _toneconst,R16
.dbline 179
out 0x2d,R17
out 0x2c,R16
.dbline 180
L93:
.dbline 181
lds R2,_temp1
sts _temp,R2
.dbline 182
mov R24,R2
swap R24
andi R24,#0x0F
sts _temp,R24
.dbline 183
andi R24,15
sts _temp,R24
.dbline 184
mov R18,R24
clr R19
ldi R16,129
ldi R17,0
rcall mpy16s
rcall _delay_ms
.dbline 185
in R24,0x39
andi R24,127
out 0x39,R24
.dbline 186
lds R24,_sound_add
lds R25,_sound_add+1
adiw R24,1
sts _sound_add+1,R25
sts _sound_add,R24
.dbline 188
ldi R24,40
lds R2,_rst_time
cp R24,R2
brsh L95
.dbline 189
.dbline 190
clr R2
sts _rst_time,R2
.dbline 191
rcall _stop_timer0
.dbline 192
ldi R24,15
out 0x1b,R24
.dbline 193
ldi R16,1000
ldi R17,3
rcall _delay_ms
.dbline 194
rjmp L88
L95:
.dbline 196
L91:
.dbline 170
lds R2,_temp1
tst R2
breq X14
rjmp L90
X14:
.dbline 197
rjmp L89
X13:
.dbline -2
L87:
.dbline 0 ; func end
ret
.dbend
.dbfunc e main _main fV
.even
_main::
.dbline -1
.dbline 201
.dbline 202
.dbline -2
.dbline 203
L97:
.dbline 0 ; func end
rjmp _remote_car
.dbend
.area bss(ram, con, rel)
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
_sound_2::
.blkb 1
.dbsym e sound_2 _sound_2 c
_sound_1::
.blkb 1
.dbsym e sound_1 _sound_1 c
_t0_times::
.blkb 1
.dbsym e t0_times _t0_times c
_gzsl::
.blkb 1
.dbsym e gzsl _gzsl c
_remote_select::
.blkb 1
.dbsym e remote_select _remote_select c
_pd_select::
.blkb 1
.dbsym e pd_select _pd_select c
_cds::
.blkb 1
.dbsym e cds _cds c
_rst_time::
.blkb 1
.dbsym e rst_time _rst_time c
_cny_times::
.blkb 1
.dbsym e cny_times _cny_times c
_cny_in::
.blkb 1
.dbsym e cny_in _cny_in c
_timers::
.blkb 1
.dbsym e timers _timers c
_pd::
.blkb 1
.dbsym e pd _pd c
_pc::
.blkb 1
.dbsym e pc _pc c
_pb::
.blkb 1
.dbsym e pb _pb c
_pa::
.blkb 1
.dbsym e pa _pa c
_temp1::
.blkb 1
.dbsym e temp1 _temp1 c
_temp::
.blkb 1
.dbsym e temp _temp c
_toneconst::
.blkb 2
.dbsym e toneconst _toneconst i
_delay_time2::
.blkb 2
.dbsym e delay_time2 _delay_time2 i
_delay_time1::
.blkb 2
.dbsym e delay_time1 _delay_time1 i
_mic_in::
.blkb 1
.dbfile e:/ICC/include/sl3010.c
.dbsym e mic_in _mic_in c
_remote_in::
.blkb 1
.dbfile E:\icc\iccavr\sl3010\remote_car\remote_car.c
.dbsym e remote_in _remote_in c
_sw_in::
.blkb 1
.dbfile e:/ICC/include/sl3010.c
.dbsym e sw_in _sw_in c
_work_status::
.blkb 1
.dbsym e work_status _work_status c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -