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

📄 ht83f60_tpl_adpcm_new.lst

📁 use Holtek HT83F60 flash voice MCU edit,function:Play PCM12 Voice ,sentence ,VOL control,Stop voice
💻 LST
📖 第 1 页 / 共 4 页
字号:
 664  0000            C ENDIF
 665  0000            C 
 666  0000            C 
 667  0000            C 
 668  0000            C 
 669  0000            C 
 670  0000            C IFDEF _HOLTEK_C_
 671  0000            C 
 672  0000            C ENDIF

   8  0000              #include STDMACRO.INC

   1  0000            C ;=============================
   2  0000            C ;JBS   R_RAM,D_BIT,L_LABLE
   3  0000            C ;JBC   R_RAM,D_BIT,L_LABLE
   4  0000            C ;SEC
   5  0000            C ;CLC
   6  0000            C ;BEQ   L_LABLE
   7  0000            C ;BNE   L_LABLE
   8  0000            C ;BCS   L_LABLE
   9  0000            C ;BCC   L_LABLE
  10  0000            C ;BLE   L_LABLE
  11  0000            C ;PUSH          (MUST DEFINE RAM: ACC_BK,STATU_BK,,MP1_BK,BP_BK,TBLP_BK,TBHP_BK
  12  0000            C ;POP           (MUST DEFINE RAM: ACC_BK,STATU_BK,,MP1_BK,BP_BK,TBLP_BK,TBHP_BK
  13  0000            C ;XMOV  MEM1,MEM2
  14  0000            C ;XMOVB MEMB1,MEMB2
  15  0000            C ;SEZ
  16  0000            C ;CLZ
  17  0000            C ;JE    LABLE
  18  0000            C ;JLG   LABLE
  19  0000            C ;JLE   LABLE
  20  0000            C ;JGE   LABLE
  21  0000            C ;_SNZ  MEM
  22  0000            C ;_SDNZ MEM
  23  0000            C ;_SINZ MEM                
  24  0000            C ;jz    lable  
  25  0000            C ;jnz   lable  
  26  0000            C 
  27  0000            C 
  28  0000            C 
  29  0000            C 
  30  0000            C 
  31  0000            C #DEFINE D_C 0
  32  0000            C #DEFINE D_Z 2
  33  0000            C #DEFINE R_STATUS [0AH]
  34  0000            C 
  35  0000            C JBS	MACRO	R_RAM,D_BIT,L_LABLE
  36  0000            C 	SZ	R_RAM.D_BIT
"File: STDMACRO.INC  Holtek Cross-Assembler  Version 2.86      Page 13

  37  0000            C 	JMP	L_LABLE
  38  0000            C ENDM
  39  0000            C 
  40  0000            C ;//------------------------------------
  41  0000            C JBC	MACRO	R_RAM,D_BIT,L_LABLE
  42  0000            C 	SNZ	R_RAM.D_BIT
  43  0000            C 	JMP	L_LABLE
  44  0000            C ENDM
  45  0000            C 
  46  0000            C ;//------------------------------------
  47  0000            C SEC	MACRO
  48  0000            C 	SET	R_STATUS.D_C
  49  0000            C ENDM
  50  0000            C 
  51  0000            C ;//------------------------------------
  52  0000            C CLC	MACRO
  53  0000            C 	CLR	R_STATUS.D_C
  54  0000            C ENDM
  55  0000            C 
  56  0000            C ;//------------------------------------
  57  0000            C SEZ		MACRO
  58  0000            C 	CLR	R_STATUS.2
  59  0000            C ENDM
  60  0000            C ;//------------------------------------
  61  0000            C CLZ		MACRO
  62  0000            C 	CLR	R_STATUS.2
  63  0000            C ENDM
  64  0000            C 
  65  0000            C ;//------------------------------------
  66  0000            C BEQ	MACRO	L_LABLE
  67  0000            C 	SZ	R_STATUS.D_Z
  68  0000            C 	JMP	L_LABLE
  69  0000            C ENDM
  70  0000            C 
  71  0000            C ;//------------------------------------
  72  0000            C BNE	MACRO	L_LABLE
  73  0000            C 	SNZ	R_STATUS.D_Z
  74  0000            C 	JMP	L_LABLE
  75  0000            C ENDM
  76  0000            C 
  77  0000            C ;//------------------------------------
  78  0000            C BCS	MACRO	L_LABLE
  79  0000            C 	SZ	R_STATUS.D_C
  80  0000            C 	JMP	L_LABLE
  81  0000            C ENDM
  82  0000            C 
  83  0000            C ;//------------------------------------
  84  0000            C BCC	MACRO	L_LABLE
  85  0000            C 	SNZ	R_STATUS.D_C
  86  0000            C 	JMP	L_LABLE
  87  0000            C ENDM
  88  0000            C 
  89  0000            C ;//------------------------------------
  90  0000            C ;if <= then goto Address
  91  0000            C BLE	MACRO	L_LABLE
  92  0000            C 	SZ	R_STATUS.D_Z
  93  0000            C 	SNZ	R_STATUS.D_C
  94  0000            C 	JMP	L_LABLE
  95  0000            C ENDM
  96  0000            C ;//------------------------------------
"File: STDMACRO.INC  Holtek Cross-Assembler  Version 2.86      Page 14

  97  0000            C PUSH    MACRO
  98  0000            C       MOV       ACC_BK,A      ;ACC
  99  0000            C       MOV       A,[0AH]
 100  0000            C       MOV       STATUS_BK,A   ;STATU
 101  0000            C       MOV       A,MP1
 102  0000            C       MOV       MP1_BK,A      ;MP1
 103  0000            C       MOV       A,BP
 104  0000            C       MOV       BP_BK,A       ;BP
 105  0000            C       MOV       A,TBLP
 106  0000            C       MOV       TBLP_BK,A     ;TBLP
 107  0000            C       MOV       A,TBHP
 108  0000            C       MOV       TBHP_BK,A     ;TBHP
 109  0000            C       ENDM
 110  0000            C ;//------------------------------------      
 111  0000            C POP     MACRO
 112  0000            C       MOV       A,TBLP_BK    ;TBLP
 113  0000            C       MOV       TBLP,A
 114  0000            C       MOV       A,TBHP_BK    ;TBHP
 115  0000            C       MOV       TBHP,A
 116  0000            C       MOV       A,MP1_BK     ;MP1
 117  0000            C       MOV       MP1,A
 118  0000            C       MOV       A,BP_BK      ;BP
 119  0000            C       MOV       BP,A
 120  0000            C       MOV       A,STATUS_BK  ;STATU
 121  0000            C       MOV       [0AH],A
 122  0000            C       MOV       A,ACC_BK     ;ACC
 123  0000            C       ENDM
 124  0000            C ;//------------------------------------
 125  0000            C XMOV  MACRO     MEM1,MEM2
 126  0000            C 		MOV A,MEM2
 127  0000            C 		MOV MEM1,A
 128  0000            C ENDM
 129  0000            C ;//------------------------------------
 130  0000            C XMOVB MACRO     MEMB1,MEMB2
 131  0000            C                 CLR MEMB1
 132  0000            C                 SZ  MEMB2
 133  0000            C                 SET MEMB2
 134  0000            C ENDM
 135  0000            C 
 136  0000            C ;//------------------------------------
 137  0000            C ;IF A==[M] LABLE
 138  0000            C JE     MACRO  LABLE
 139  0000            C        SZ  R_STATUS.2
 140  0000            C        JMP LABLE
 141  0000            C        ENDM
 142  0000            C ;//------------------------------------
 143  0000            C ;IF A<>[M] LABLE
 144  0000            C JLG     MACRO  LABLE
 145  0000            C         SNZ R_STATUS.2
 146  0000            C         JMP LABLE
 147  0000            C         ENDM       
 148  0000            C ;//------------------------------------        
 149  0000            C ;IF A<=[M] LABLE       
 150  0000            C JLE    MACRO LABLE
 151  0000            C        SNZ  R_STATUS.2
 152  0000            C        SNZ  R_STATUS.0       
 153  0000            C        JMP LABLE 
 154  0000            C        ENDM
 155  0000            C ;//------------------------------------       
 156  0000            C ;IF A>=[M] LABLE
"File: STDMACRO.INC  Holtek Cross-Assembler  Version 2.86      Page 15

 157  0000            C JGE    MACRO LABLE
 158  0000            C        SNZ R_STATUS.2
 159  0000            C        SZ R_STATUS.0
 160  0000            C        JMP LABLE
 161  0000            C        ENDM 
 162  0000            C 
 163  0000            C ;//------------------------------------       
 164  0000            C _SNZ	MACRO	mem   
 165  0000            C 	sz	mem   
 166  0000            C 	jmp	$+2   
 167  0000            C ENDM                  
 168  0000            C ;//------------------------------------       
 169  0000            C _SDNZ	MACRO	mem   
 170  0000            C 	sdz	mem   
 171  0000            C 	jmp	$+2   
 172  0000            C ENDM                  
 173  0000            C ;//------------------------------------       
 174  0000            C _SINZ	MACRO	mem   
 175  0000            C 	siz	mem   
 176  0000            C 	jmp	$+2   
 177  0000            C ENDM
 178  0000            C ;//------------------------------------       
 179  0000            C  jz		macro lable  
 180  0000            C  	sz	Rstatus.2    
 181  0000            C  	jmp lable            
 182  0000            C  endm                        
 183  0000            C ;//------------------------------------                                    
 184  0000            C  jnz		macro lable  
 185  0000            C  	snz Rstatus.2        
 186  0000            C  	jmp lable            
 187  0000            C  endm                        
 188  0000            C  
 189  0000            C ;//===================================================
 190  0000            C 
 191  0000            C ;
 192  0000            C ;	A - B
 193  0000            C ;				C			Z
 194  0000            C ;	A < B		0			0
 195  0000            C ;	A = B		1			1
 196  0000            C ;	A > B		1			1
 197  0000            C ;
 198  0000            C ;	A - B = A + B's 2's complement 
 199  0000            C ;
 200  0000            C 
 201  0000            C SKP_Z 	MACRO 
 202  0000            C 		SNZ	Z
 203  0000            C     	ENDM
 204  0000            C 
 205  0000            C SKP_NZ macro
 206  0000            C 		SZ	Z
 207  0000            C 		endm
 208  0000            C 
 209  0000            C SKP_C	macro
 210  0000            C 		SNZ	C
 211  0000            C 		endm
 212  0000            C 
 213  0000            C SKP_NC	macro
 214  0000            C 		SZ	C
 215  0000            C 		endm
 216  0000            C 
"File: STDMACRO.INC  Holtek Cross-Assembler  Version 2.86      Page 16

 217  0000            C jmp_Z	macro	where
 218  0000            C 		SKP_NZ
 219  0000            C 		jmp		where
 220  0000            C 		endm
 221  0000            C 
 222  0000            C jmp_NZ	macro	where
 223  0000            C 		SKP_Z
 224  0000            C 		jmp		where
 225  0000            C 		endm
 226  0000            C 
 227  0000            C jmp_E	macro	where		; the same as JMP_Z
 228  0000            C 		skp_NZ
 229  0000            C 		jmp		where
 230  0000            C 		endm
 231  0000            C 
 232  0000            C jmp_NE	macro	where		; teh same as JMP_NZ
 233  0000            C 		skp_Z
 234  0000            C 		jmp		where
 235  0000            C 		endm
 236  0000            C 
 237  0000            C jmp_NC	macro	where
 238  0000            C 		SKP_C
 239  0000            C 		jmp		where
 240  0000            C 		endm
 241  0000            C 
 242  0000            C jmp_C	macro	where
 243  0000            C 		SKP_NC
 244  0000            C 		jmp		where
 245  0000            C 		endm
 246  0000            C 
 247  0000            C skp_GE	macro				; skip if greater and equal
 248  0000            C 		skp_C
 249  0000            C 		endm
 250  0000            C 
 251  0000            C skp_L	macro				; skip if smaller 
 252  0000            C 		skp_NC				
 253  0000            C 		endm
 254  0000            C 
 255  0000            C jmp_L	macro	where		; jmp if less 	
 256  0000            C 		skp_GE
 257  0000            C 		jmp		where
 258  0000            C 		endm
 259  0000            C 
 260  0000            C jmp_GE	macro	where		; jmp if greater and equal
 261  0000            C 		skp_L
 262  0000            C 		jmp		where
 263  0000            C 		endm
 264  0000            C 
 265  0000            C Save_ACC_STS	macro
 266  0000            C 		mov		tempAcc,A
 267  0000            C 		mov		A,Status
 268  0000            C 		mov		tempSTS,A
 269  0000            C 		endm
 270  0000            C 
 271  0000            C Restore_Acc_Sts	macro
 272  0000            C 		mov		A,tempSTS
 273  0000            C 		mov		STatus,A
 274  0000            C 		mov		A,tempAcc
 275  0000            C 		endm
 276  0000            C 
"File: STDMACRO.INC  Holtek Cross-Assembler  Version 2.86      Page 17

 277  0000            C Define_Acc_Sts_storage	macro
 278  0000            C tempAcc		db	?
 279  0000            C tempSTS		db	?
 280  0000            C 		endm
 281  0000            C 
 282  0000            C   
 283  0000            C 
 284  0000            C Xmov1	macro	Destination, Source
 285  0000            C 		mov		tempAcc,A
 286  0000            C 		mov		A,source
 287  0000            C 		mov		Destination, A
 288  0000            C 		mov		A,tempAcc
 289  0000            C 		endm
 290  0000            C 
 291  0000            C Load_A_With_B	macro	A,B
 292  0000            C 		xmov1	A,B
 293  0000            C 		endm
 294  0000            C 		
 295  0000            C ;//=====================================================		

   9  0000              ;************************************************************
  10  0000              ;;In HT83F IDE
  11  0000              ;;S1: up     S2: down
  12  0000              ;demo function explain:
  13  0000              ;PA0->GND : play current voice
  14  0000              ;PA1->GND : play next voice
  15  0000              ;PA2->GND : play current sentence
  16  0000              ;PA3->GND : play next sentence
  17  0000              ;PA4->GND : volume up
  18  0000              ;PA5->GND : volume down
  19  0000              ;PA6->GND : stop playing
  20  0000              ;
  21  0000              ;define variable
  22  0000              MAINDATA	.SECTION	'DATA'
  23  0000  00          	R_CURRENT_TRACKH	DB	?
  24  0001  00          	R_CURRENT_TRACKL	DB	?
  25  0002  00          	R_CURRENT_SENTENCEH	DB	?
  26  0003  00          	R_CURRENT_SENTENCEL	DB	?
  27  0004  00          	R_MAIN_VOLUME		DB	?
  28  0005  00          	R_DEBOUNCE_TIME		DB	?
  29  0006  00          	R_KEYSBAK		DB	?
  30  0007  00          	B_ENABLE_KEY		DBIT
  31  0008              	
  32  0007              	TimeBase_Flag		DBIT
  33  0008              #DEFINE	C_40MS	(40*HT86SYSTEMFREQUENCY)/(1024*4*1000)
  34  0008              ;
  35  0008              ;define vector
  36  0000              MAINCODE	.SECTION	AT	00H	'CODE'
  37  0000              	ORG	0000H
  38  0000  280D        	JMP	BEGIN

⌨️ 快捷键说明

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