📄 h.asm
字号:
goto w5
movlw 0x07
goto pinpu
w5 movlw 0x38
goto pinpu
b4 btfsc xsflag,7
goto w7
movlw 0x0f
goto pinpu
w7 movlw 0x3c
goto pinpu
b5 btfsc xsflag,7
goto w9
movlw 0x1f
goto pinpu
w9 movlw 0x3e
goto pinpu
b6 btfsc xsflag,7
goto w11
movlw 0x3f
goto pinpu
w11 movlw 0x7e
goto pinpu
b7 btfsc xsflag,7
goto w13
movlw 0x7f
goto pinpu
w13 movlw 0x7f
goto pinpu
b8 btfsc xsflag,7
goto w15
movlw 0xff
goto pinpu
w15 movlw 0xff
goto pinpu
pinpu call output1
call dispon1
return
k11 goto k11
okdisp bsf portc,6
call orderen1
movlw b'01010011'
call output1
movf testcount,0
xorlw 1
btfsc _z
goto ko1
movf mutecount,0
xorlw 1
btfsc _z
goto ok3
movlw 0xc8
goto ok4
ok3 movlw 0xca
ok4 call output1
call dispon1
return
ko1
movlw 0x08
goto ok4
okdispoff bcf portc,6;;;;;;;;;;;
call orderen1
movlw b'01010011'
call output1
movf testcount,0
xorlw 1
btfsc _z
goto ko2
movf mutecount,0
xorlw 1
btfsc _z
goto ok1
movlw 0xc0
goto ok2
ok1 movlw 0xc2
ok2 call output1
call dispon1
return
ko2
movlw 0x00
goto ok4
okok call okdisp
goto okk
chlia clrf intcount
movlw 28
goto chx
chli movlw 27
chx movwf intcountt
clrf intintcount
return
iintser btfsc _adif
call adintser
bcf intcon,7
bsf _rp0
movlw b'00000111'
movwf adcon1
call alps
bcf _rp0
bcf portc,1
bcf dyflag,2
btfsc intcon,1
call intser
movf mutecount,0
xorlw 1
btfsc _z
goto mu
btfsc portc,0
goto okok
call okdispoff
okk
movlw b'01010000'
movwf intcon
btfss pir1,0 ;tmr1if=0
goto qq
call myser
bcf _rp0
incf intcount,1
movf testcount,0
xorlw 1
btfsc _z
goto xz
btfsc dyflag,3 ;;;;;;;;;;;;;;;;;
call chli
btfsc dyflag,2 ;;;;;;;;;;;;;;;;;
call chli
xz movf intcount,0
xorlw 100
btfsc _z ;z=1
call ddd
qq movlw 0xff
movwf tmr1h ;set high 8bit
movlw 0xf0
movwf tmr1l
bcf pir1,0
ss bsf _rp0
movlw b'00000000'
movwf adcon1
bcf _rp0
retfie
tete call chlia
bsf pclath,3
call teston
bcf pclath,3
; call chlia
goto qq
ddd incf intintcount,1
incf intcountt,1
movf intcountt,0
xorlw 30
btfsc _z
goto f1
movf intintcount,0
xorlw 100
btfss _z
goto ff4
bsf pclath,3
call nintdisp
bcf pclath,3
return
ff4 movf intintcount,0
xorlw 102
btfss _z
goto f2
bsf pclath,3
call av3disp
bcf pclath,3
call chli
return
f1
movf testcount,0
xorlw 1
btfsc _z
goto tete
bsf pclath,3
call checkdisp
; movlw 0x25 ;;;;;;;
; movwf intcountt
f2 bcf pclath,3
clrf intcount
bsf _rp0
bsf pie1,6
return
mu
bsf pclath,3
call muteon
retfie
keypress
movlw 3 ;
movwf count4 ;
call orderen1
movlw B'01000010' ;;扫描键盘
call output1
nop ;delay 1us
nop
nop
bcf _rp0
movlw 0x50
movwf fsr
clrf indf
bcf sspcon,4
M5 movlw 0x00
call output1
clrf indf
movf rxdata,0
movwf indf
incf fsr,1
decfsz count4,1
goto M5
bsf sspcon,4
return
myser
bcf dyflag,3
call keypress ;;读取键盘数据
movf 0x50,0
xorlw 0
btfss _z
bsf dyflag,3
movf 0x51,0
xorlw 0
btfss _z
bsf dyflag,3
movf 0x52,0
xorlw 0
btfss _z
bsf dyflag,3
movf testcount,0
xorlw 1
btfsc _z
goto closekey
cc1 btfsc 0x50,0
goto stereo ;stereo
btfsc 0x50,1
goto key17 ;dvd-2ch
btfsc 0x50,2
goto treble ;treble
btfsc 0x50,3
goto key6 ;LD
btfsc 0x50,4
goto key3 ;test
btfsc 0x50,5
goto direct ;direct
btfsc 0x50,6
goto keyd ; balance
btfsc 0x50,7
goto key8 ;vcd
btfsc 0x51,0
goto keyp
;pro-logic ;;;
btfsc 0x51,1
goto cen_mode ; cen-mode
btfsc 0x51,2
goto ceter ;ceter_vol
btfsc 0x51,3
goto key16 ;tape
btfsc 0x51,4
goto d3_stereo ;3d-stereo
btfsc 0x51,5
goto key4 ;loudness
btfsc 0x51,6
goto bass ;bass
btfsc 0x51,7
goto key7 ;cd
btfsc 0x52,0
return;goto keyh ;st
btfsc 0x52,1
goto down ;down
btfsc 0x52,2
goto swooe ;swooe-vol
btfsc 0x52,3
goto key14 ;dvd-6ch
btfsc 0x52,4
goto keye ;dsp
btfsc 0x52,5
goto up ;up
btfsc 0x52,6
goto surr ;surrnd-vol
btfsc 0x52,7
goto key15 ;aux
return
closekey btfss 0x50,4
return
goto cc1
remo
bcf _rp0
bcf flag,0
movlw 4
movwf count2
movlw 0x6f
movwf fsr
clrf intcon
bsf intcon,6
bcf _rp0
clrf tmr1l
clrf tmr1h
ext btfss portb,0 ;9ms
goto ext
clrf tmr1l
clrf tmr1h
n5 movf tmr1h,0
sublw 0xf0
btfss _c ;c=1 bit=0
goto haha
btfsc portb,0 ; 4.5ms
goto n5
movf tmr1h,0
sublw 0x0f ;A
btfsc _c ;A<0F, ;contiue?
goto nn4 ;yes
nn5
movf tmr1h,0
sublw 0x03
btfsc _c ;contiue?
clrf 0x71 ;yes
n4 ; clrf rcvreg
movlw 8
movwf rcount
clrf tmr1l
clrf tmr1h
;check low voltage time <1ms is 0
r_next btfss portb,0 ;wait high
goto r_next
clrf tmr1l
clrf tmr1h
n1 movf tmr1h,0
sublw 0xf0
btfss _c ;c=1 bit=0
; goto haha1
return
btfsc portb,0 ;wait low
goto n1
movf tmr1h,0
sublw 3
btfss _c ;c=1 bit=0
goto n2
bcf rcvreg,0
goto n3
n2 bsf rcvreg,0 ;yes, bit is 1
n3 rrf rcvreg,1 ;no ,bit is 0
decfsz rcount,1
goto r_next
movf rcvreg,0
movwf indf
incf fsr,1
decfsz count2,1
goto n4
nop
return
nn4
movf 0x71,0
movwf dlycnt
bsf flag,0
goto nn5
haha clrf 0x6f
return
intser
call remo
movf testcount,0
xorlw 1
btfsc _z
goto closekeyb
bcf dyflag,2
movf mutecount,0
xorlw 1
btfsc _z
goto closekeybb
pp1 movf 0x6f,0
xorlw 0xf8
btfss _z
return
movf 0x70,0
xorlw 0x07
btfss _z
return
bsf dyflag,2
movf 0x71,0
iorwf 0x72,0
xorlw 0xff ;
btfss _z
return
btfss flag,0
goto xxx
movf dlycnt,0
movwf 0x71
;decf 0x71,1
xxx movf 0x71,0
xorlw 0xff
btfsc _z
goto key1
movf 0x71,0
xorlw 0xfd
btfsc _z
goto key3
movf 0x71,0
xorlw 0xee
btfsc _z
goto key4
movf 0x71,0
xorlw 0xfb
btfsc _z
goto keyp;dolby
movf 0x71,0
xorlw 0xf9
btfsc _z
goto key7
movf 0x71,0
xorlw 0xfa
btfsc _z
goto key6
movf 0x71,0
xorlw 0xf8
btfsc _z
goto key8
movf 0x71,0
xorlw 0xf7
btfsc _z
goto key9
movf 0x71,0
xorlw 0xf6
btfsc _z
goto key10
movf 0x71,0
xorlw 0xf5
btfsc _z
goto key11
movf 0x71,0
xorlw 0xf4
btfsc _z
goto key12
movf 0x71,0
xorlw 0xf3
btfsc _z
goto key13
movf 0x71,0
xorlw 0xf2
btfsc _z
goto key14
movf 0x71,0
xorlw 0xf1
btfsc _z
goto key15
movf 0x71,0
xorlw 0xf0
btfsc _z
goto key16
movf 0x71,0
xorlw 0xef
btfsc _z
goto key17
movf 0x71,0
xorlw 0xfc
btfsc _z
goto key18
movf 0x71,0
xorlw 0xed
btfsc _z
goto cen_volu
movf 0x71,0
xorlw 0xec
btfsc _z
goto surr_volu
movf 0x71,0
xorlw 0xeb
btfsc _z
goto sw_volu
movf 0x71,0
xorlw 0xea
btfsc _z
goto key22
movf 0x71,0
xorlw 0xe9
btfsc _z
goto key23
movf 0x71,0
xorlw 0xe8
btfsc _z
goto cen_vold
movf 0x71,0
xorlw 0xe7
btfsc _z
goto d3_stereo
movf 0x71,0
xorlw 0xe6
btfsc _z
goto stereo
movf 0x71,0
xorlw 0xe5
btfsc _z
goto direct
movf 0x71,0
xorlw 0xe4
btfsc _z
goto key28
movf 0x71,0
xorlw 0xe3
btfsc _z
goto surr_vold
movf 0x71,0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -