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

📄 sci.ls

📁 该程序是ST7MC驱动三洋压缩机(交流)
💻 LS
📖 第 1 页 / 共 3 页
字号:
2934  0213 b7ff          	ld	_SCI_PutString$L-1,a
2935                     ; 330         temp = SCISR;        
2937  0215 b618          	ld	a,_SCISR
2938  0217 b7fe          	ld	_SCI_PutString$L-2,a
2939                     ; 331         SCIDR = *PtrtoString;        /*Copies the character to be transmitted*/
2941  0219 92c600        	ld	a,[_SCI_PutString$L.w]
2942  021c b719          	ld	_SCIDR,a
2944  021e               L5761:
2945                     ; 332         while(!(SCI_IsTransmitCompleted()));   
2947  021e ada9          	call	_SCI_IsTransmitCompleted
2949  0220 4d            	tnz	a
2950  0221 27fb          	jreq	L5761
2951                     ; 334         PtrtoString++;               /*Moves the pointer to the next location*/
2953  0223 3c01          	inc	_SCI_PutString$L+1
2954  0225 2602          	jrne	L07
2955  0227 3c00          	inc	_SCI_PutString$L
2956  0229               L07:
2957                     ; 327     while (Val != '\0')                        /*Checks for the end of string*/
2959  0229 3dff          	tnz	_SCI_PutString$L-1
2960  022b 26e3          	jrne	L1661
2961                     ; 348 } 
2964  022d 81            	ret	
2998                     ; 357 BOOL SCI_9thBit_TxRx(BOOL Bit9_Val)
2998                     ; 358 {
2999                     	switch	.text
3001                     	xref.b	_SCI_9thBit_TxRx$L
3002  022e               _SCI_9thBit_TxRx:
3005                     ; 359     if (Bit9_Val == TRUE)              /*If 9th bit is to be transmittes as 1*/
3007  022e a101          	cp	a,#1
3008  0230 2606          	jrne	L7171
3009                     ; 361         SCICR1 |= 0x40;
3011  0232 b61b          	ld	a,_SCICR1
3012  0234 aa40          	or	a,#64
3014  0236 2004          	jra	L1271
3015  0238               L7171:
3016                     ; 365         SCICR1 &= 0xBF;
3018  0238 b61b          	ld	a,_SCICR1
3019  023a a4bf          	and	a,#191
3020  023c               L1271:
3021  023c b71b          	ld	_SCICR1,a
3022                     ; 367     if (SCICR1 & 0x80)                      /*If the 9th bit is received as 1*/
3024  023e 0f1b03        	btjf	_SCICR1,#7,L3271
3025                     ; 369         return (TRUE);
3027  0241 a601          	ld	a,#1
3030  0243 81            	ret	
3031  0244               L3271:
3032                     ; 373         return (FALSE);
3034  0244 4f            	clr	a
3037  0245 81            	ret	
3060                     ; 383 unsigned char SCI_GetByte(void)
3060                     ; 384 {  
3061                     	switch	.text
3062  0246               _SCI_GetByte:
3065                     ; 386     return(SCIDR);                     /*Returns the current value of the Data 
3067  0246 b619          	ld	a,_SCIDR
3070  0248 81            	ret	
3187                     ; 407 SCI_RxError_t SCI_GetBuffer(unsigned char *PtrtoBuffer,unsigned char NbOfBytes)
3187                     ; 408 {
3188                     	switch	.text
3190                     	xref.b	_SCI_GetBuffer$L
3191  0249               _SCI_GetBuffer:
3193  0249 b701          	ld	_SCI_GetBuffer$L+1,a
3194  024b bf00          	ld	_SCI_GetBuffer$L,x
3196                     ; 409     unsigned char Temp = 0x00 ;
3198  024d 3fff          	clr	_SCI_GetBuffer$L-1
3200  024f 2024          	jra	L5102
3201  0251               L1102:
3202                     ; 414         Temp |= (unsigned char)(SCISR & SCI_ErrValue);
3204  0251 b618          	ld	a,_SCISR
3205  0253 a40f          	and	a,#15
3206  0255 b7fe          	ld	_SCI_GetBuffer$L-2,a
3207  0257 baff          	or	a,_SCI_GetBuffer$L-1
3208  0259 b7ff          	ld	_SCI_GetBuffer$L-1,a
3210  025b               L3202:
3211                     ; 415         while (!(SCISR & SCISR_RDRF_OR)); 
3213  025b 0b18fd        	btjf	_SCISR,#5,L3202
3214                     ; 416         Temp |= (unsigned char)(SCISR & SCI_ErrValue);
3216  025e b618          	ld	a,_SCISR
3217  0260 a40f          	and	a,#15
3218  0262 b7fe          	ld	_SCI_GetBuffer$L-2,a
3219  0264 baff          	or	a,_SCI_GetBuffer$L-1
3220  0266 b7ff          	ld	_SCI_GetBuffer$L-1,a
3221                     ; 418         *PtrtoBuffer = SCIDR;  
3223  0268 b619          	ld	a,_SCIDR
3224  026a 92c700        	ld	[_SCI_GetBuffer$L.w],a
3225                     ; 420         PtrtoBuffer++;               /*Moves the pointer to the next location*/
3227  026d 3c01          	inc	_SCI_GetBuffer$L+1
3228  026f 2602          	jrne	L001
3229  0271 3c00          	inc	_SCI_GetBuffer$L
3230  0273               L001:
3231                     ; 411     for (;((NbOfBytes > 0)&& (!(Temp))); --NbOfBytes)           
3233  0273 3a02          	dec	_SCI_GetBuffer$L+2
3234  0275               L5102:
3237  0275 3d02          	tnz	_SCI_GetBuffer$L+2
3238  0277 2704          	jreq	L7202
3240  0279 b6ff          	ld	a,_SCI_GetBuffer$L-1
3241  027b 27d4          	jreq	L1102
3242  027d               L7202:
3243                     ; 422     return(Temp);
3245  027d b6ff          	ld	a,_SCI_GetBuffer$L-1
3248  027f 81            	ret	
3303                     ; 434 SCI_RxError_t SCI_GetString(unsigned char *PtrtoString)
3303                     ; 435 {
3304                     	switch	.text
3306                     	xref.b	_SCI_GetString$L
3307  0280               _SCI_GetString:
3309  0280 b701          	ld	_SCI_GetString$L+1,a
3310  0282 bf00          	ld	_SCI_GetString$L,x
3312                     ; 436     unsigned char Temp = 0x00, Val = 0xff; 
3314  0284 3fff          	clr	_SCI_GetString$L-1
3317  0286 a6ff          	ld	a,#255
3318  0288 b7fe          	ld	_SCI_GetString$L-2,a
3320  028a 2024          	jra	L401
3321  028c               L7502:
3322                     ; 440         Temp |= (unsigned char)(SCISR & SCI_ErrValue);   
3324  028c b618          	ld	a,_SCISR
3325  028e a40f          	and	a,#15
3326  0290 b7fd          	ld	_SCI_GetString$L-3,a
3327  0292 baff          	or	a,_SCI_GetString$L-1
3328  0294 b7ff          	ld	_SCI_GetString$L-1,a
3330  0296               L1702:
3331                     ; 441         while (!(SCISR & SCISR_RDRF_OR));                /*waits for the received byte*/
3333  0296 0b18fd        	btjf	_SCISR,#5,L1702
3334                     ; 442         Temp |= (unsigned char)(SCISR & SCI_ErrValue);          
3336  0299 b618          	ld	a,_SCISR
3337  029b a40f          	and	a,#15
3338  029d b7fd          	ld	_SCI_GetString$L-3,a
3339  029f baff          	or	a,_SCI_GetString$L-1
3340  02a1 b7ff          	ld	_SCI_GetString$L-1,a
3341                     ; 444         *PtrtoString = SCIDR; 
3343  02a3 b619          	ld	a,_SCIDR
3344  02a5 92c700        	ld	[_SCI_GetString$L.w],a
3345                     ; 446         Val = *PtrtoString;
3347  02a8 b7fe          	ld	_SCI_GetString$L-2,a
3348                     ; 438     for (;((Val != '\0')&&(Temp == 0));PtrtoString++)
3350  02aa 3c01          	inc	_SCI_GetString$L+1
3351  02ac 2602          	jrne	L401
3352  02ae 3c00          	inc	_SCI_GetString$L
3353  02b0               L401:
3356  02b0 3dfe          	tnz	_SCI_GetString$L-2
3357  02b2 2704          	jreq	L5702
3359  02b4 b6ff          	ld	a,_SCI_GetString$L-1
3360  02b6 27d4          	jreq	L7502
3361  02b8               L5702:
3362                     ; 448     return(Temp);                      /*Returns the error status to the user*/
3364  02b8 b6ff          	ld	a,_SCI_GetString$L-1
3367  02ba 81            	ret	
3392                     ; 494 SCI_RxError_t SCI_IsReceptionCompleted (void)  
3392                     ; 495 {   
3393                     	switch	.text
3394  02bb               _SCI_IsReceptionCompleted:
3397                     ; 523     if(SCISR & SCISR_RDRF_OR) 
3399  02bb 0b1805        	btjf	_SCISR,#5,L7012
3400                     ; 525         return ((unsigned char)(SCISR & SCI_ErrValue)); 
3402  02be b618          	ld	a,_SCISR
3403  02c0 a40f          	and	a,#15
3406  02c2 81            	ret	
3407  02c3               L7012:
3408                     ; 529         return (SCI_RX_DATA_EMPTY);    /*Returns the error status to the user*/
3410  02c3 a6fd          	ld	a,#253
3413  02c5 81            	ret	
3435                     ; 544 void  SCI_IT_Function (void)
3435                     ; 545 {                                                 
3436                     	switch	.text
3437  02c6               _SCI_IT_Function:
3440                     ; 663 }
3443  02c6 81            	ret	
3540                     	xdef	_SCI_GetString
3541                     	xdef	_SCI_GetBuffer
3542                     	switch	.bss
3543  0000               L7601_SCI_Pol_Stat:
3544  0000 00            	ds.b	1
3545  0001               L5601_SCI_Rx_String:
3546  0001 00            	ds.b	1
3547  0002               L3601_SCI_Rx_Buff:
3548  0002 0000          	ds.b	2
3549  0004               L1601_SCI_Tx_String:
3550  0004 00            	ds.b	1
3551  0005               L7501_SCI_Tx_Buff:
3552  0005 00            	ds.b	1
3553  0006               L5501_PtrToSCIBuffRx:
3554  0006 0000          	ds.b	2
3555  0008               L3501_PtrToSCIBuffTx:
3556  0008 0000          	ds.b	2
3557  000a               L1501_SCI_MY_DATA:
3558  000a 00            	ds.b	1
3559  000b               L7401_SCI_Error:
3560  000b 00            	ds.b	1
3561                     	xdef	_SCI_IT_Function
3562                     	xdef	_SCI_IsReceptionCompleted
3563                     	xdef	_SCI_GetByte
3564                     	xdef	_SCI_9thBit_TxRx
3565                     	xdef	_SCI_PutString
3566                     	xdef	_SCI_PutBuffer
3567                     	xdef	_SCI_IsTransmitCompleted
3568                     	xdef	_SCI_PutByte
3569                     	xdef	_SCI_Mode
3570                     	xdef	_SCI_IT_Disable
3571                     	xdef	_SCI_IT_Enable
3572                     	xdef	_SCI_Select_Baudrate
3573                     	xdef	_SCI_Forced_Clear_Flag
3574                     	xdef	_SCI_Init
3575                     	xdef	_PrintSignedChar
3576                     	xdef	_PrintUnsignedChar
3577                     	xdef	_PrintUnsignedInt
3578                     	xref.b	c_x
3579                     	xref.b	c_y
3599                     	xref	c_sdivy
3600                     	xref	c_sdivx
3601                     	xref	c_cdivy
3602                     	xref	c_cdivx
3603                     	xref	c_udiv
3604                     	end

⌨️ 快捷键说明

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