⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 h.asm

📁 M62446的源代码
💻 ASM
📖 第 1 页 / 共 5 页
字号:
bdisp   
           movwf offset
           addwf offset,0
           addwf offset,1
u1         movlw HIGH tablealps
           movwf pclath
           movf offset,w
           call tablealps 
           bcf pclath,3
           movwf y 
           btfsc flag,4
           goto ff1
           btfsc flag,5
           goto ff2
           btfsc flag,6
           goto f3
           btfsc flag,7
           goto f4 
           return

ff1        movf count2,0
           xorlw 2
           btfss _z 
           goto dd1
           movf y,0
           movwf sreg1  
           goto dd2
dd1        movf y,0
           movwf sreg2 
           goto dd2  

ff2         movf count2,0
           xorlw 2
           btfss _z 
           goto dd3
           movf y,0
           movwf sreg3  
           goto dd2
dd3        movf y,0
           movwf sreg4 
           goto dd2

f3         movf count2,0
           xorlw 2
           btfss _z 
           goto dd4
           movf y,0
           movwf sreg9  
           goto dd2
dd4        movf y,0
           movwf sreg10
           goto dd2

f4         movf count2,0
           xorlw 2
           btfss _z 
           goto dd5
           movf y,0
           movwf sreg11 
           goto dd2
dd5        movf y,0
           movwf sreg12
           goto dd2


 
dd2        incf offset,1
           decfsz count2,1
           goto u1 
           return ;;;;;
                
ceter      btfsc inflag,5
           goto ct 
           movf pinflag1,0
           xorlw 0
           btfss _z
           goto ct

           btfsc pinflag2,1
           return
           btfsc pinflag2,0
           return
ct         clrf vflag
           bsf vflag,2
           bsf pclath,3
           call cendisp
           bcf pclath,3
           goto cen1
           return

bass       btfsc pinflag2,1
           return
           clrf vflag
           bsf vflag,5
           bsf pclath,3
           call bassdisp
           bsf pclath,3  
           goto c1
           return  


swooe      btfsc inflag,5
           goto so
           movf pinflag1,0
           xorlw 0
           btfss _z
           goto so

           btfsc pinflag2,1
           return
           btfsc pinflag2,0
           return
           btfsc pinflag2,2
           return
so         clrf vflag
           bsf vflag,4
           bsf pclath,3
           call swdisp
           bcf pclath,3
           goto sw1
         
surr       btfsc inflag,5
           goto  sr 
           movf pinflag1,0
           xorlw 0
           btfss _z
           goto sr
           btfsc pinflag2,1
           return
           btfsc pinflag2,0
           return
           btfsc pinflag2,2
           return   

sr         clrf vflag
           bsf vflag,3
           bsf pclath,3
           call sdisp 
           bcf pclath,3 
           goto y2
           return


cen_mode  btfsc inflag,5
          return
          btfsc dbflag,0
          return 
          btfsc dbflag,3                
          return 
          call delay20                    
          call delay20
          btfsc dbflag,4  
          goto mod2
          btfsc dbflag,5
          goto mod1
          btfsc dbflag,6
          goto mod3
          
mod1      movlw 2
          movwf cenmodecount
          bcf dbflag,4
          bcf dbflag,5
          bsf dbflag,6
          goto mod
mod2      movlw 3
          movwf cenmodecount
          bcf dbflag,4
          bcf dbflag,6
          bsf dbflag,5
          goto mod
mod3      movlw 1
          movwf cenmodecount
          bcf dbflag,5
          bcf dbflag,6
          bsf dbflag,4
          
mod       
          movf cenmodecount,0
          xorlw 1
          btfsc _z
          call normal
          movf cenmodecount,0
          xorlw 2
          btfsc _z
          call wide
          movf cenmodecount,0
          xorlw 3
          btfsc _z
          call phanton
          movf cenmodecount,0
          return
                      

        ORG 0x800     

son           
          movlw b'00000000'       ;9702
          movwf  txbuf1
          movlw b'00110000'   ; ID CODE
          movwf txbuf2
          bcf pclath,3
          call njw1102 
          return

pro_logic  btfsc inflag,5
           goto ppp  
           call son 
          ; bsf pclath,3
           call cson
        ;   bcf muteflag,5 
        ;   movf muteflag,0
        ;   movwf txbuf
        ;   movlw 8
        ;   movwf tcount 
        ;   call output595
           movlw b'00000000'
           movwf txbuf1
           movlw b'00100000'
           movwf txbuf2
           call njw1102
           movlw b'00000101'
           movwf txbuf1
           movlw b'00100000'
           movwf txbuf2
           call njw1102 
           clrf dbflag  
           clrf pinflag2 
           bsf pinflag2,3
           bsf dbflag,2 
           bsf dbflag,4 
           bsf pclath,3  
           bcf reg6,2
           bcf reg14,2
           call clrd 
           clrf pinflag1
           call checkdisp
           bsf pclath,3 
           call normaldisp 
           call prodisp 
ppp        bcf pclath,3
           return   
mute       incf mutecount,1 
           movf mutecount,0
           xorlw 1
           btfsc _z
           goto muteon
           movf mutecount,0
           xorlw 2
           btfsc _z 
           goto  muteoff
           return

muteon    bsf pclath,3
          call mutedisp
muteall   bcf pclath,3         
          bsf muteflag,4
          bsf muteflag,5
          movf muteflag,0
          movwf txbuf
          movlw 8
          movwf tcount 
          call output595 
          clrf 0x71  
          return     


muteoff   bcf pclath,3
          bcf muteflag,4
          movf muteflag,0 
          movwf txbuf
          movlw 8
          movwf tcount 
          call output595
          clrf mutecount 
          bsf pclath,3
          call checkdisp
          bcf pclath,3 
          call orderen1
          movlw b'01010011'
          call output1
          movlw 0xc0
          call output1 
          clrf 0x71
          return 
          

 
balance    clrf vflag
           bsf vflag,7
           call baladisp
           bcf pclath,3 
           goto H1
          
balance_r
           call baladisp 
           movf balan2count,0
           xorlw 0
           btfss _z
           goto laan5
           incf lcount,1
           incf balancount,1 

           movf balancount,0
           xorlw 31
           btfsc _z               ;z=1; =81 
           goto laan1
           
           movf lcount,0  
           xorlw 81             ;count=0?
           btfsc _z 
           decf lcount,1  
           bcf pclath,3 
           goto H1   
laan5      decf balan2count,1
           decf rrcount,1 
           bcf pclath,3  
           goto H1
   

laan1     decf lcount,1
          decf balancount,1
          bcf pclath,3 
          goto H1
                
balance_l 
        
          call baladisp 
          movf balancount,0
          xorlw 0
          btfss _z
          goto laan2
          incf rrcount,1
          incf balan2count,1 
          movf balan2count,0
          xorlw 31
          btfsc _z               ;z=1; =81 
          goto laan3
          movf rrcount,0  
          xorlw 0x00             ;count=0?
          btfsc _z 
          incf lcount,1 
          bcf pclath,3 
          goto H1
laan2     decf balancount,1
          decf lcount,1  
          bcf pclath,3 
          goto H1
laan3     decf rrcount,1
          decf balan2count,1 
          bcf pclath,3 
          goto H1    
display   call delayfa 
        ;   call delayfa
           incf dispcount,1
           movf dispcount,0
           xorlw 1
           btfsc _z
           bsf xsflag,7
           movf dispcount,0
           xorlw 2
           btfsc _z
           goto gdisp
           bcf pclath,3
           return
gdisp
           bcf xsflag,7
           clrf dispcount 
           bcf pclath,3
           return
   
loudness   btfsc pinflag2,1   
           goto yloud
           
           call delayfa
           call delayfa
           incf loudcount,1
           movf loudcount,0
           xorlw 1
           btfsc _z
           goto loudon 
           movf loudcount,0
           xorlw 2
           btfsc _z
           goto loudoff 
           bcf pclath,3
           return       
yloud     bcf pclath,3
          return

loudon     bcf pclath,3
           movlw b'00110000'
           movwf txbuf1
           movlw b'00011000'
           movwf txbuf2
           movlw b'00000000'
           movwf txbuf3
           call m62446
           bsf pclath,3
           call louddisp
           bcf pclath,3 
           return      

loudoff    call loudoffdisp
           bcf pclath,3  
           clrf loudcount
           goto tonet 
           return


bassu      btfsc pinflag2,1
           goto bs
            
           call delayfa 
           call bassdisp
           incf basscount,1
           incf basscount,1
           movf basscount,0
           xorlw 22
           btfss _z           ;z=1,=22
           goto c1
           decf basscount,1
           decf basscount,1  
           goto c1
c1               
           movf basscount,0
           xorlw 0
           btfsc _z
           goto bs1 
           movf basscount,0
           xorlw 2
           btfsc _z
           goto bs2
           movf basscount,0
           xorlw 4
           btfsc _z
           goto bs3
           movf basscount,0
           xorlw 6
           btfsc _z
           goto bs4
           movf basscount,0
           xorlw 8
           btfsc _z
           goto bs5
           movf basscount,0
           xorlw 10
           btfsc _z
           goto bs6
           movf basscount,0
           xorlw 12
           btfsc _z
           goto bs7
           movf basscount,0
           xorlw 14
           btfsc _z
           goto bs8
           movf basscount,0
           xorlw 16
           btfsc _z
           goto bs9
           movf basscount,0
           xorlw 18
           btfsc _z
           goto bs10
           movf basscount,0
           xorlw 20
           btfsc _z
           goto bs11
           return
bs1        bcf pclath,3 
           movlw b'11100000'
           movwf basscount1 
           call tonet
           movlw 1
           call disps  
           call n_disp
           movlw 0
           call dispg 
             
           return 
bs2        bcf pclath,3 
           movlw b'11000000'
           movwf basscount1 
           call tonet
           call n_disp 
           movlw 8
           call dispg 
           
           return
bs3        bcf pclath,3 
           movlw b'10110000'
           movwf basscount1 
           call tonet        ;+ 
           call n_disp
           movlw 6
           call dispg 
             
           return
bs4        bcf pclath,3 
           movlw b'10100000'
           movwf basscount1 
           call tonet
           call n_disp
           movlw 4
           call dispg 
             
           return
bs5        bcf pclath,3 
           movlw b'10010000'
           movwf basscount1 
           call tonet 
           call n_disp
           movlw 2
           call dispg 
             
           return
bs6        bcf pclath,3 
           movlw b'00000000'
           movwf basscount1 
           call tonet
           movlw 0
           call dispg
          ; bsf pclath,3
          ; call delayfa 
bs         bcf pclath,3
           return
bs7        bcf pclath,3 
            movlw b'00010000'
           movwf basscount1
           call tonet 
           call p_disp
           movlw 2
           call dispg 
             
           return
bs8        bcf pclath,3 
           movlw b'00100000'
           movwf basscount1 
           call tonet
           call p_disp
           movlw 4
           call dispg 
             
           return
bs9        bcf pclath,3
           movlw b'00110000'
           movwf basscount1 
           call tonet 
            call p_disp 
           movlw 6
         

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -