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

📄 sacmv32.lst

📁 电子词典的设计开发
💻 LST
📖 第 1 页 / 共 5 页
字号:
                            	_SP_InitQueue_S480:
                            	_SP_InitQueue_S240:
                            	_SP_InitQueue_MS01:
                            	_SP_InitQueue_DVR:
                            	
                            	F_SP_InitQueue_A2000:
                            	F_SP_InitQueue_S530:
                            	F_SP_InitQueue_S480:
                            	F_SP_InitQueue_S240:
                            	F_SP_InitQueue_MS01:
                            	F_SP_InitQueue_DVR:
                            	F_SP_InitQueue:
0000BF3D 09 93 AE 07        			R1 = R_Queue
0000BF3F 40 94              			R2 = 0 
                            	?L_ClearQueueLoop:		
0000BF40 D1 D4              			[R1++] = R2
0000BF41 09 43 E0 07        			cmp	R1, R_Queue+C_QueueSize
0000BF43 44 4E              			jne	?L_ClearQueueLoop
                            				
0000BF44 40 92              			R1 = 0
0000BF45 19 D3 E0 07        			[R_ReadIndex] = R1
0000BF47 19 D3 E1 07        			[R_WriteIndex] = R1
                            					
0000BF49 90 9A              			RETF
                            			.ENDP
                            			
                            	//-------------------------------------------------------
                            	// Function: F_SP_ReadQueue_Xnnn
                            	// Description Get a data form Queue
                            	// Output:  R1: Data read
                            	// Destory: R1,R2
                            	//-------------------------------------------------------
                            	F_SP_ReadQueue_A2000:
                            	F_SP_ReadQueue_S530:
                            	F_SP_ReadQueue_S480:
                            	F_SP_ReadQueue_S240:
                            	F_SP_ReadQueue_MS01:
                            	F_SP_ReadQueue_DVR:
                            	F_SP_ReadQueue:
0000BF4A 12 95 E0 07        			R2 = [R_ReadIndex]
0000BF4C 12 45 E1 07        			cmp R2,[R_WriteIndex]
0000BF4E 0C 5E              			je	L_RQ_QueueEmpty
                            	
0000BF4F 0A 05 AE 07        			R2 += R_Queue				// get queue data address
0000BF51 C2 92              			R1 = [R2]
                            			
0000BF52 12 95 E0 07        			R2 = [R_ReadIndex]
0000BF54 41 04              			R2 += 1
0000BF55 72 44              			cmp	R2, C_QueueSize
0000BF56 01 4E              			jne	L_RQ_NotQueueBottom
0000BF57 40 94              			R2 = 0
                            	L_RQ_NotQueueBottom:	
0000BF58 1A D5 E0 07        			[R_ReadIndex] = R2		
                            			//r2 = 0x0000 						// get queue data
0000BF5A 90 9A              			retf 
                            	L_RQ_QueueEmpty:
                            			//r2 = 0x8000 						// queue empty
0000BF5B 90 9A              			retf 
                            	
                            	//-------------------------------------------------------
                            	// Function: F_SP_ReadQueue_NIC_Xnnn
                            	// Description: Get a data from Queue but do 
                            	//			not change queue index
                            	// Output:  R1: Data read
                            	// Destory: R1,R2
                            	//-------------------------------------------------------
                            	F_SP_ReadQueue_NIC:
                            	F_SP_ReadQueue_NIC_A2000:
                            	F_SP_ReadQueue_NIC_S530:
                            	F_SP_ReadQueue_NIC_S480:
                            	F_SP_ReadQueue_NIC_S240:
                            	F_SP_ReadQueue_NIC_MS01:
                            	F_SP_ReadQueue_NIC_DVR:
0000BF5C 12 95 E0 07        			R2 = [R_ReadIndex]
0000BF5E 12 45 E1 07        			cmp R2,[R_WriteIndex]
0000BF60 03 5E              			je	?L_RQ_QueueEmpty
                            	
0000BF61 0A 05 AE 07        			R2 += R_Queue				// get queue data index
0000BF63 C2 92              			R1 = [R2]
                            	?L_RQ_QueueEmpty:
0000BF64 90 9A              			RETF
                            			
                            	//-------------------------------------------------------
                            	// Function: F_SP_WriteQueue_Xnnn
                            	// Description: Put a data to Queue
                            	// Input  :  R1 Data to write 
                            	// Destory: R1,R2
                            	//-------------------------------------------------------
                            	F_SP_WriteQueue_A2000:
                            	F_SP_WriteQueue_S530:
                            	F_SP_WriteQueue_S480:
                            	F_SP_WriteQueue_S240:
                            	F_SP_WriteQueue_MS01:
                            	F_SP_WriteQueue_DVR:
                            	F_SP_WriteQueue:
0000BF65 12 95 E1 07        			R2 = [R_WriteIndex] 			// put data to queue
0000BF67 0A 05 AE 07        			R2 += R_Queue
0000BF69 C2 D2              			[R2] = R1
                            	
0000BF6A 12 95 E1 07        			R2 = [R_WriteIndex]
0000BF6C 41 04              			R2 += 1
0000BF6D 72 44              			cmp	R2, C_QueueSize
0000BF6E 01 4E              			jne	L_WQ_NotQueueBottom
0000BF6F 40 94              			R2 = 0
                            	L_WQ_NotQueueBottom:
0000BF70 1A D5 E1 07        			[R_WriteIndex] = R2
0000BF72 90 9A              			RETF
                            	
                            			
                            	
                            	//-------------------------------------------------------
                            	// Function: F_SP_ReadQueue_NIC_Xnnn
                            	// Description: Test Queue Status
                            	// Output:  R1: queue status
                            	//	            0: not Full, not empty
                            	//              1: full
                            	//              2: empty 
                            	// Destory: R1
                            	//-------------------------------------------------------
                            	F_SP_TestQueue_A2000:
                            	F_SP_TestQueue_S530:
                            	F_SP_TestQueue_S480:
                            	F_SP_TestQueue_S240:
                            	F_SP_TestQueue_MS01:
                            	F_SP_TestQueue_DVR:
                            	F_SP_TestQueue:
                            			//... Test Queue Empty ...
0000BF73 11 93 E0 07        			R1 = [R_ReadIndex] 
0000BF75 11 43 E1 07        			cmp R1,[R_WriteIndex] 
0000BF77 11 5E              			je	L_TQ_QueueEmpty 
                            	
                            			//... Test Queue Full ...
0000BF78 11 93 E0 07        			R1 = [R_ReadIndex] 				// For N Queue Full: 1.R=0 and W=N-1 2. R<>0 and W=R-1 
0000BF7A 04 4E              			jnz	L_TQ_JudgeCond2 
0000BF7B 11 93 E1 07        			R1 = [R_WriteIndex] 
0000BF7D 71 42              			cmp	R1, C_QueueSize-1 			// Cond1
0000BF7E 08 5E              			je	L_TQ_QueueFull 			
                            	L_TQ_JudgeCond2:		
0000BF7F 11 93 E0 07        			R1 = [R_ReadIndex] 
0000BF81 41 22              			R1 -=1 
0000BF82 11 43 E1 07        			cmp R1,[R_WriteIndex] 
0000BF84 02 5E              			je	L_TQ_QueueFull 	
                            	
0000BF85 40 92              			r1 = 0 							// not Full, not empty
0000BF86 90 9A              			retf 
                            	L_TQ_QueueFull:
0000BF87 41 92              			r1 = 1 							// full
0000BF88 90 9A              			retf 
                            	L_TQ_QueueEmpty:
0000BF89 42 92              			r1 = 2 							// empty
0000BF8A 90 9A              			retf 
                            	
                            	
                            	
                            	//////////////////////////////////////////////////////
                            	// SACM_dependent functions 
                            	//////////////////////////////////////////////////////
                            	 
                            	//////////////////////////////////////////////////////////////////  
                            	// Function: _SP_GetResource
                            	// Description: Get data from resource(ROM area)
                            	// Syntax:  int SP_GetResource(int Addr, int Page)
                            	// Output:  R1: data to read
                            	// Destory: R1
                            	//////////////////////////////////////////////////////////////////  
                            	////////////////////////////////////////////////////////////////// 
                            	// Function: Get data from resource(ROM area)
                            	// 	int SP_GetResource(int Addr, int Page)
                            	//////////////////////////////////////////////////////////////////  
                            	_SP_GetResource:	.PROC
0000BF8B 88 DA              			push bp to [sp] 
0000BF8C 08 0B 01 00        			bp = sp + 1 
                            			
0000BF8E 03 92              			r1 = [bp+3] 					// Address
0000BF8F 04 94              			r2 = [bp+4] 					// Page
                            			
0000BF90 5A 95              			r2 = r2 lsl 4 					// Prepare Page for SR
0000BF91 5A 95              			r2 = r2 lsl 4 
0000BF92 4A 95              			r2 = r2 lsl 2 
                            			
0000BF93 7F BC              			sr &= 0x03f 					// Change Page
0000BF94 06 A5              	        r2 |=sr 						//
0000BF95 02 9D              	        sr = r2 						//
                            	  
0000BF96 E1 92              	  		r1 = D:[r1] 					// Get data
                            	       
0000BF97 88 98              			pop	 bp from [sp] 
0000BF98 90 9A              			retf 
                            			.ENDP 
                            	//........................................
                            	F_SP_GetResource:
0000BF99 5A 95              			r2 = r2 lsl 4 					// Prepare Page for SR
0000BF9A 5A 95              			r2 = r2 lsl 4 
0000BF9B 4A 95              			r2 = r2 lsl 2 
                            			
0000BF9C 7F BC              			sr &= 0x03f 					// Change Page
0000BF9D 06 A5              	        r2 |=sr 						//
0000BF9E 02 9D              	        sr = r2 						//
                            	  
0000BF9F E1 92              	  		r1 = D:[r1] 					// Get data
0000BFA0 90 9A              		  	retf
                            	
                            	
                            	////////////////////////////////////////////////////////////////// 
                            	// Function: Delay
                            	// 	void SP_Delay()
                            	//////////////////////////////////////////////////////////////////  
                            	_SP_Delay:	.PROC
                            	F_SP_Delay:
                            			// User define
0000BFA1 90 9A              			retf 
                            			.ENDP
                            	
                            	
                            	

⌨️ 快捷键说明

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