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

📄 fm24c04a_drv.asm

📁 TC35i收发短信的源代码
💻 ASM
📖 第 1 页 / 共 3 页
字号:
$DGL	0,34
	mov	a,[hl+7]	; i 				;[INF] 2, 8
	inc	a						;[INF] 1, 2
	mov	[hl+7],a	; i 				;[INF] 2, 8
	br	$?L0035						;[INF] 2, 6
?L0036:
; line   253
$DGL	0,36
	movw	bc,#00H	; 0 					;[INF] 3, 6
?L0030:
; line   254
$DGL	0,37
??ef_FMRead:
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	hl						;[INF] 1, 4
	ret							;[INF] 1, 6
??ee_FMRead:
; line   271
_FMWriteBytes:
$DGL	1,111
	push	hl						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	movw	ax,sp						;[INF] 2, 8
	movw	hl,ax						;[INF] 1, 4
??bf_FMWriteBytes:
; line   275
$DGL	0,5
	mov	a,#01H	; 1 					;[INF] 2, 4
	cmp	a,[hl+10]	; page 				;[INF] 2, 8
	bnc	$?L0042						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0041						;[INF] 2, 6
?L0042:
; line   277
$DGL	0,7
	mov	a,[hl+10]	; page 				;[INF] 2, 8
	add	a,a						;[INF] 2, 4
	add	a,#0A0H	; 160 					;[INF] 2, 4
	mov	[hl+3],a	; p 				;[INF] 2, 8
; line   279
$DGL	0,9
	clr1	PM4.0						;[INF] 3, 8
; line   280
$DGL	0,10
	clr1	PM4.1						;[INF] 3, 8
; line   282
$DGL	0,12
	nop							;[INF] 1, 2
; line   284
$DGL	0,14
	call	!_StartBit					;[INF] 3, 7
; line   286
$DGL	0,16
	mov	a,[hl+3]	; p 				;[INF] 2, 8
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0044						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0041						;[INF] 2, 6
?L0044:
; line   288
$DGL	0,18
	mov	a,[hl+12]	; inpage 			;[INF] 2, 8
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0046						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0041						;[INF] 2, 6
?L0046:
; line   291
$DGL	0,21
	mov	a,#00H	; 0 					;[INF] 2, 4
	mov	[hl+1],a	; i 				;[INF] 2, 8
	mov	[hl+2],a	; i 				;[INF] 2, 8
?L0048:
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	cmp	a,[hl+15]	; bytes 			;[INF] 2, 8
	bnz	$?L0051						;[INF] 2, 6
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	cmp	a,[hl+14]	; bytes 			;[INF] 2, 8
?L0051:
	bnc	$?L0049						;[INF] 2, 6
; line   292
$DGL	0,22
??bb00_FMWriteBytes:
; line   293
$DGL	0,23
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	add	a,[hl+4]	; buff 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	addc	a,[hl+5]	; buff 				;[INF] 2, 8
	movw	de,ax						;[INF] 1, 4
	mov	a,[de]						;[INF] 1, 4
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0052						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0041						;[INF] 2, 6
?L0052:
??eb00_FMWriteBytes:
; line   294
$DGL	0,24
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	incw	ax						;[INF] 1, 4
	mov	[hl+2],a	; i 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	[hl+1],a	; i 				;[INF] 2, 8
	br	$?L0048						;[INF] 2, 6
?L0049:
; line   296
$DGL	0,26
	call	!_StopBit					;[INF] 3, 7
; line   298
$DGL	0,28
	movw	bc,#00H	; 0 					;[INF] 3, 6
?L0041:
; line   300
$DGL	0,30
??ef_FMWriteBytes:
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	hl						;[INF] 1, 4
	ret							;[INF] 1, 6
??ee_FMWriteBytes:
; line   317
_FMReadBytes:
$DGL	1,127
	push	hl						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	push	ax						;[INF] 1, 4
	movw	ax,sp						;[INF] 2, 8
	movw	hl,ax						;[INF] 1, 4
??bf_FMReadBytes:
; line   321
$DGL	0,5
	clr1	PM4.1						;[INF] 3, 8
; line   322
$DGL	0,6
	clr1	PM4.0						;[INF] 3, 8
; line   323
$DGL	0,7
	nop							;[INF] 1, 2
; line   325
$DGL	0,9
	mov	a,#01H	; 1 					;[INF] 2, 4
	cmp	a,[hl+10]	; page 				;[INF] 2, 8
	bnc	$?L0056						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	!?L0055						;[INF] 3, 6
?L0056:
; line   327
$DGL	0,11
	mov	a,[hl+10]	; page 				;[INF] 2, 8
	add	a,a						;[INF] 2, 4
	add	a,#0A0H	; 160 					;[INF] 2, 4
	mov	[hl+3],a	; p 				;[INF] 2, 8
; line   329
$DGL	0,13
	call	!_StartBit					;[INF] 3, 7
; line   331
$DGL	0,15
	mov	a,[hl+3]	; p 				;[INF] 2, 8
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0058						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0055						;[INF] 2, 6
?L0058:
; line   333
$DGL	0,17
	mov	a,[hl+12]	; inpage 			;[INF] 2, 8
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0060						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0055						;[INF] 2, 6
?L0060:
; line   335
$DGL	0,19
	call	!_StartBit					;[INF] 3, 7
; line   337
$DGL	0,21
	mov	a,[hl+3]	; p 				;[INF] 2, 8
	inc	a						;[INF] 1, 2
	mov	x,#00H	; 0 					;[INF] 2, 4
	xch	a,x						;[INF] 1, 2
	call	!_SendAByte					;[INF] 3, 7
	inc	c						;[INF] 1, 2
	dec	c						;[INF] 1, 2
	bz	$?L0062						;[INF] 2, 6
	movw	bc,#0FFH	; 255 				;[INF] 3, 6
	br	$?L0055						;[INF] 2, 6
?L0062:
; line   340
$DGL	0,24
	mov	a,#00H	; 0 					;[INF] 2, 4
	mov	[hl+1],a	; i 				;[INF] 2, 8
	mov	[hl+2],a	; i 				;[INF] 2, 8
?L0064:
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	cmp	a,[hl+15]	; bytes 			;[INF] 2, 8
	bnz	$?L0067						;[INF] 2, 6
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	cmp	a,[hl+14]	; bytes 			;[INF] 2, 8
?L0067:
	bnc	$?L0065						;[INF] 2, 6
; line   341
$DGL	0,25
??bb00_FMReadBytes:
; line   342
$DGL	0,26
	call	!_ReceiveAByte					;[INF] 3, 7
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	add	a,[hl+4]	; buff 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	addc	a,[hl+5]	; buff 				;[INF] 2, 8
	movw	de,ax						;[INF] 1, 4
	mov	a,c						;[INF] 1, 2
	mov	[de],a						;[INF] 1, 4
; line   344
$DGL	0,28
	mov	a,[hl+14]	; bytes 			;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	a,[hl+15]	; bytes 			;[INF] 2, 8
	decw	ax						;[INF] 1, 4
	cmp	a,[hl+2]	; i 				;[INF] 2, 8
	bnz	$?L0070						;[INF] 2, 6
	xch	a,x						;[INF] 1, 2
	cmp	a,[hl+1]	; i 				;[INF] 2, 8
?L0070:
	bnz	$?L0068						;[INF] 2, 6
	set1	P4.1						;[INF] 2, 4
	br	$?L0069						;[INF] 2, 6
?L0068:
; line   345
$DGL	0,29
	clr1	P4.1						;[INF] 2, 4
?L0069:
; line   347
$DGL	0,31
	nop							;[INF] 1, 2
; line   348
$DGL	0,32
	nop							;[INF] 1, 2
; line   349
$DGL	0,33
	set1	P4.0						;[INF] 2, 4
; line   350
$DGL	0,34
	nop							;[INF] 1, 2
; line   351
$DGL	0,35
	nop							;[INF] 1, 2
; line   352
$DGL	0,36
	clr1	P4.0						;[INF] 2, 4
; line   353
$DGL	0,37
	set1	P4.1						;[INF] 2, 4
??eb00_FMReadBytes:
; line   354
$DGL	0,38
	mov	a,[hl+1]	; i 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	a,[hl+2]	; i 				;[INF] 2, 8
	incw	ax						;[INF] 1, 4
	mov	[hl+2],a	; i 				;[INF] 2, 8
	xch	a,x						;[INF] 1, 2
	mov	[hl+1],a	; i 				;[INF] 2, 8
	br	$?L0064						;[INF] 2, 6
?L0065:
; line   357
$DGL	0,41
	call	!_StopBit					;[INF] 3, 7
; line   359
$DGL	0,43
	movw	bc,#00H	; 0 					;[INF] 3, 6
?L0055:
; line   360
$DGL	0,44
??ef_FMReadBytes:
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	ax						;[INF] 1, 4
	pop	hl						;[INF] 1, 4
	ret							;[INF] 1, 6
??ee_FMReadBytes:

@@CALF	CSEG	FIXED
	END


; *** Code Information ***
;
; $FILE E:\0513\0513\FM24c04a_drv.c
;
; $FUNC StartBit(26)
;	void=(void)
;	CODE SIZE= 8 bytes, CLOCK_SIZE= 20 clocks, STACK_SIZE= 0 bytes
;
; $FUNC StopBit(43)
;	void=(void)
;	CODE SIZE= 9 bytes, CLOCK_SIZE= 22 clocks, STACK_SIZE= 0 bytes
;
; $FUNC SendAByte(61)
;	bc=(unsigned char I_data:x)
;	CODE SIZE= 104 bytes, CLOCK_SIZE= 303 clocks, STACK_SIZE= 8 bytes
;
; $FUNC ReceiveAByte(121)
;	bc=(void)
;	CODE SIZE= 48 bytes, CLOCK_SIZE= 112 clocks, STACK_SIZE= 2 bytes
;
; $FUNC FMWrite(164)
;	bc=(pointer buff:ax, unsigned int addr:[sp+2], 
;	    unsigned int wlen:[sp+4])
;	CODE SIZE= 211 bytes, CLOCK_SIZE= 662 clocks, STACK_SIZE= 22 bytes
;
; $CALL FMWriteBytes(195)
;	bc=(pointer:ax, int:[sp+2], int:[sp+4], unsigned int:[sp+6])
;
; $FUNC FMRead(218)
;	bc=(pointer buff:ax, unsigned int addr:[sp+2], 
;	    unsigned int rlen:[sp+4])
;	CODE SIZE= 209 bytes, CLOCK_SIZE= 660 clocks, STACK_SIZE= 20 bytes
;
; $CALL FMReadBytes(248)
;	bc=(pointer:ax, int:[sp+2], int:[sp+4], unsigned int:[sp+6])
;
; $FUNC FMWriteBytes(271)
;	bc=(pointer buff:ax, unsigned char page:[sp+2], 
;	    unsigned char inpage:[sp+4], unsigned int bytes:[sp+6])
;	CODE SIZE= 138 bytes, CLOCK_SIZE= 415 clocks, STACK_SIZE= 10 bytes
;
; $CALL StartBit(284)
;	void=(void)
;
; $CALL SendAByte(286)
;	bc=(int:ax)
;
; $CALL SendAByte(288)
;	bc=(int:ax)
;
; $CALL SendAByte(293)
;	bc=(int:ax)
;
; $CALL StopBit(296)
;	void=(void)
;
; $FUNC FMReadBytes(317)
;	bc=(pointer buff:ax, unsigned char page:[sp+2], 
;	    unsigned char inpage:[sp+4], unsigned int bytes:[sp+6])
;	CODE SIZE= 180 bytes, CLOCK_SIZE= 527 clocks, STACK_SIZE= 10 bytes
;
; $CALL StartBit(329)
;	void=(void)
;
; $CALL SendAByte(331)
;	bc=(int:ax)
;
; $CALL SendAByte(333)
;	bc=(int:ax)
;
; $CALL StartBit(335)
;	void=(void)
;
; $CALL SendAByte(337)
;	bc=(int:ax)
;
; $CALL ReceiveAByte(342)
;	bc=(void)
;
; $CALL StopBit(357)
;	void=(void)

; Target chip : uPD78F0513_44
; Device file : V2.10 

⌨️ 快捷键说明

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