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

📄 cyan_base_driver.asm

📁 使用CYAN单片机的ECOG1开发板连接SIM300C的GSM模块开发的短信收发程序.供UART和AT指令编程者参考
💻 ASM
📖 第 1 页 / 共 5 页
字号:
	add	X,#4	; str_temp
	ld	AH,#0
	st	AH,@(0,X)	; str_temp
	ld	AL,#27
	bc
	sub	Y,#32
	st	AL,@H'fffe
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?186.1:
	mov	AH,Y
	add	AH,#54
	st	AH,@H'ffe5	; %r2
	ld	X,@H'ffe5	; %r2
	ld	AH,@(3,X)
	st	AH,@(-1,Y)
	ld	AH,@(2,X)
	st	AH,@(-2,Y)
	ld	AH,@(1,X)
	st	AH,@(-3,Y)
	ld	AH,@(0,X)
	st	AH,@(-4,Y)
	ld	AL,@(-3,Y)
	ld	AH,@(-4,Y)
	add	Y,#-2
Lstab?31a:
	bsr	$__dfix
	st	AL,@(51,Y)	; %r24 (u_l_int)
	st	AH,@(50,Y)	; %r24 (u_l_int)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?187.1:
	ld	AL,#0
	st	AL,@(47,Y)	; %r22 (negative_flag)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?188.1:
	ld	AH,#0
	st	AL,@(39,Y)	; %r18 (u_l_temp)
	st	AH,@(38,Y)	; %r18 (u_l_temp)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?189.1:
	st	AL,@(37,Y)	; %r17 (int_count)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?190.1:
	st	AL,@(43,Y)	; %r20 (i)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?191.1:
	st	AL,@(45,Y)	; %r21 (one_int)
	st	AH,@(44,Y)	; %r21 (one_int)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?192.1:
	ld	X,#?lit0002
	ld	AH,@(3,X)
	st	AH,@(5,Y)	; _point_+3
	ld	AH,@(2,X)
	st	AH,@(4,Y)	; _point_+2
	ld	AH,@(1,X)
	st	AH,@(3,Y)	; _point_+1
	ld	AH,@(0,X)
	st	AH,@(2,Y)	; _point_
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?193.1:
	st	AL,@(41,Y)	; %r19 (one_int_p)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?194.1:
	ld	AL,#5
;	char			str_temp[56]	= {0};
;	long			u_l_int			= (long)float_data;
;	int				negative_flag	= 0;
;	long			u_l_temp		= 0;
;	int				int_count		= 0;
;	int				i				= 0;
;	long			one_int			= 0;
;	double			_point_			= 0;
;	int				one_int_p		= 0;
;	unsigned int	point_len		= 5;
;	
;	
;	if(float_data < 0)
	st	AL,@(49,Y)	; %r23 (point_len)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?197.1:
	ld	X,#?lit0002
	ld	AH,@(3,X)
	st	AH,@(1,Y)
	ld	AH,@(2,X)
	st	AH,@(0,Y)
	ld	AH,@(1,X)
	st	AH,@(-1,Y)
	ld	AH,@(0,X)
	st	AH,@(-2,Y)
	mov	AH,Y
	add	AH,#56
	st	AH,@H'ffe5	; %r2
	ld	X,@H'ffe5	; %r2
	ld	AH,@(3,X)
	st	AH,@(-3,Y)
	ld	AH,@(2,X)
	st	AH,@(-4,Y)
	ld	AH,@(1,X)
	st	AH,@(-5,Y)
	ld	AH,@(0,X)
	st	AH,@(-6,Y)
	ld	AL,@(-5,Y)
	ld	AH,@(-6,Y)
	add	Y,#-4
Lstab?32a:
	bsr	$__dls
	add	Y,#6
Lstab?33a:
	cmp	AL,#0
	beq	?L4F9
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?198.1:
;		u_l_temp = -u_l_int;
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?199.1:
	ld	AL,@(49,Y)	; %r24 (u_l_int)
	ld	AH,@(48,Y)	; %r24 (u_l_int)
	xor	AH,#-1
	nadd	AL,#0
	addc	AH,#0
;		negative_flag = 1;
	st	AL,@(37,Y)	; %r18 (u_l_temp)
	st	AH,@(36,Y)	; %r18 (u_l_temp)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?200.1:
	ld	AL,#1
	st	AL,@(45,Y)	; %r22 (negative_flag)
	bra	?L8F9
?L4F9:
;	}
;	else
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?203.1:
;		u_l_temp = u_l_int;
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?204.1:
	ld	AL,@(49,Y)	; %r24 (u_l_int)
	ld	AH,@(48,Y)	; %r24 (u_l_int)
;		negative_flag = 0;
	st	AL,@(37,Y)	; %r18 (u_l_temp)
	st	AH,@(36,Y)	; %r18 (u_l_temp)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?205.1:
	ld	AL,#0
	st	AL,@(45,Y)	; %r22 (negative_flag)
?L8F9:
;	}
;	
;	while (u_l_temp)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?208.1:
?L12F9:
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?208.1:
	ld	AH,@(36,Y)	; %r18 (u_l_temp)
	or	AH,@(37,Y)	; %r18 (u_l_temp)
	beq	?L13F9
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?209.1:
;		one_int = (long)(u_l_temp / 10) * 10;
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?210.1:
	ld	AL,@(37,Y)	; %r18 (u_l_temp)
	ld	AH,@(36,Y)	; %r18 (u_l_temp)
	st	AL,@(-1,Y)
	st	AH,@(-2,Y)
	ld	AH,#0
	ld	AL,#10
	add	Y,#-2
Lstab?34a:
	bsr	$__dw
	st	AL,@(1,Y)
	st	AH,@(0,Y)
	ld	AH,#0
	ld	AL,#10
	bsr	$__mwk
;		one_int = u_l_temp - one_int;
	st	AL,@(45,Y)	; %r21 (one_int)
	st	AH,@(44,Y)	; %r21 (one_int)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?211.1:
	ld	AL,@(39,Y)	; %r18 (u_l_temp)
	ld	AH,@(38,Y)	; %r18 (u_l_temp)
	sub	AL,@(45,Y)	; %r21 (one_int)
	subc	AH,@(44,Y)	; %r21 (one_int)
;		str_temp[int_count++] = (char)(one_int + 0x30);
	st	AL,@(45,Y)	; %r21 (one_int)
	st	AH,@(44,Y)	; %r21 (one_int)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?212.1:
	ld	AL,@(45,Y)	; %r21 (one_int)
	ld	AH,@(44,Y)	; %r21 (one_int)
	add	AL,#48
	addc	AH,#0
	ld	AH,@(37,Y)	; %r17 (int_count)
	st	AH,@H'ffe7	; %r3
	add	AH,#1
	st	AL,@H'ffe5	; %r2
	st	AH,@(37,Y)	; %r17 (int_count)
	ld	AH,@H'ffe7	; %r3
	asr	#16
	st	AL,@H'ffe7	; %r3
	st	AH,@H'ffe6	; %r3
	mov	AL,Y
	add	AL,#6
	ld	AH,#0
	asl	#1
	add	AL,@H'ffe7	; %r3
	addc	AH,@H'ffe6	; %r3
	st	AL,@H'ffe7	; %r3
	st	AH,@H'ffe6	; %r3
	movax
	ld	AH,@H'ffe5	; %r2
	st.b	AH,@(0,X)
;		u_l_temp = u_l_temp / 10;
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?213.1:
	ld	AL,@(39,Y)	; %r18 (u_l_temp)
	ld	AH,@(38,Y)	; %r18 (u_l_temp)
	st	AL,@(1,Y)
	st	AH,@(0,Y)
	ld	AH,#0
	ld	AL,#10
	bsr	$__dw
	add	Y,#2
Lstab?35a:
	st	AL,@(37,Y)	; %r18 (u_l_temp)
	st	AH,@(36,Y)	; %r18 (u_l_temp)
	bra	?L12F9
?L13F9:
;	}
;	
;	if(int_count == 0)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?216.1:
	ld	AH,@(35,Y)	; %r17 (int_count)
	bne	?L17F9
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?217.1:
;		str_temp[int_count++] = '0';
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?218.1:
	ld	AH,#'0'
	ld	AL,@(35,Y)	; %r17 (int_count)
	st	AL,@H'ffe1	; %r0
	add	AL,#1
	st	AL,@(35,Y)	; %r17 (int_count)
	st	AH,@H'ffe5	; %r2
	ld	AH,@H'ffe1	; %r0
	asr	#16
	st	AL,@H'ffe7	; %r3
	st	AH,@H'ffe6	; %r3
	mov	AL,Y
	add	AL,#4
	ld	AH,#0
	asl	#1
	add	AL,@H'ffe7	; %r3
	addc	AH,@H'ffe6	; %r3
	st	AL,@H'ffe7	; %r3
	st	AH,@H'ffe6	; %r3
	movax
	ld	AH,@H'ffe5	; %r2
	st.b	AH,@(0,X)
?L17F9:

⌨️ 快捷键说明

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