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

📄 cyan_base_driver.asm

📁 使用CYAN单片机的ECOG1开发板连接SIM300C的GSM模块开发的短信收发程序.供UART和AT指令编程者参考
💻 ASM
📖 第 1 页 / 共 5 页
字号:
; generated by Norcroft eCOG C Compiler V1.10 $BuildRevision$
; special options:  -g
;
	MODULE cyan_base_driver___cyan_base_driver
	.CODE
	.LARGE
	; TARGET_MAX_STACK_OVERRUN = 8
;/******************************************************************************
;MODE:		AML--#GPS+accelerator+compass
;MCU:		Cyan eCOG1k
;COMPILER:	CyanIDE v1.41
;FILE NAME:	cyan_base_driver C source code files
;******************************************************************************/
;#define cyan_base_driver_code
;
;/******************************************************************************
;include all head files
;******************************************************************************/
;#include "cyan_base_driver.h"
;
;/******************************************************************************
;Declaration of static functions.
;******************************************************************************/
;void delay_2us(unsigned int us_reg);
;void delay_ms(unsigned int ms_reg);
;
;int putchar(int c);
;void uart_initialization(void);
;void timer_initialization(void);
;int getchar_a(void);
;char *_fcvt_(char *str_save,double float_data);
;
;/******************************************************************************
;FUNCTIONS
;    dilay functions for cyan .
;
;RETURNS
;   The MISO signal that was received.
;******************************************************************************/
;
;//-----------------------------------------------------------------------------
;//delay us @5MHz
;//-----------------------------------------------------------------------------
;void delay_2us(unsigned int us_reg)
;
$delay_2us:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?37.1:
	st	AL,@(-1,Y)
	st	XH,@(-3,Y)
	st	X,@(-2,Y)
Lstab?0c:
;{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?38.1:
Lstab?1c:
;	unsigned int uuu;			//delay time = 1*2us ~ 65535*2us.
;	while(us_reg-- > 0)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?40.1:
	add	Y,#-3
Lstab?2a:
?L5F1:
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?40.1:
	st	AL,@H'ffe7	; %r3
	st	AL,@H'ffe1	; %r0 (us_reg)
	add	AL,#-1
	ld	AH,@H'ffe7	; %r3
	cmp	AH,#1
	bcs	?L6F1
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?41.1:
;		uuu= 5;					//delay time = 2us.
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?42.1:
	ld	AH,#5
;		while(uuu-- >0){}
	st	AH,@H'ffe5	; %r2 (uuu)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?43.1:
?L10F1:
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?43.1:
	ld	AH,@H'ffe5	; %r2 (uuu)
	st	AH,@H'ffe7	; %r3
	add	AH,#-1
	st	AH,@H'ffe5	; %r2 (uuu)
	ld	AH,@H'ffe7	; %r3
	cmp	AH,#1
	bcs	?L11F1
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?43.1:
	bra	?L10F1
?L11F1:
	bra	?L5F1
?L6F1:
Lstab?3c:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?45.1:
?L18F1:
	add	Y,#3
	ld	XH,@(-3,Y)
	bra	@(-2,Y)
Lstab?4c:
;
;	}
;}
;//-----------------------------------------------------------------------------
;//delay ms @5MHz
;//-----------------------------------------------------------------------------
;void delay_ms(unsigned int ms_reg)
;
$delay_ms:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?49.1:
	st	AL,@(-1,Y)
	st	XH,@(-3,Y)
	st	X,@(-2,Y)
Lstab?5c:
;{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?50.1:
Lstab?6c:
;	unsigned int mmm;			//delay time = 1ms ~ 65535ms.
;	while(ms_reg-- > 0)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?52.1:
	add	Y,#-3
Lstab?7a:
?L5F2:
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?52.1:
	st	AL,@H'ffe7	; %r3
	st	AL,@H'ffe1	; %r0 (ms_reg)
	add	AL,#-1
	ld	AH,@H'ffe7	; %r3
	cmp	AH,#1
	bcs	?L6F2
;	{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?53.1:
;		mmm = 2500;				//delay time = 1ms.
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?54.1:
	ld	AH,#2500
;		while(mmm-- >0){}
	st	AH,@H'ffe5	; %r2 (mmm)
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?55.1:
?L10F2:
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?55.1:
	ld	AH,@H'ffe5	; %r2 (mmm)
	st	AH,@H'ffe7	; %r3
	add	AH,#-1
	st	AH,@H'ffe5	; %r2 (mmm)
	ld	AH,@H'ffe7	; %r3
	cmp	AH,#1
	bcs	?L11F2
; ^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?55.1:
	bra	?L10F2
?L11F2:
	bra	?L5F2
?L6F2:
Lstab?8c:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?57.1:
?L18F2:
	add	Y,#3
	ld	XH,@(-3,Y)
	bra	@(-2,Y)
Lstab?9c:
;
;	}
;}
;
;/******************************************************************************
;FUNCTION
;   Implements the ANSI standard character output function. This version
;   outputs a character through the DUART channel B and the LCD.
;
;RETURNS
;   The character.
;******************************************************************************/
;void __irq_entry usrb_tx_handler(void)
;
$usrb_tx_handler??:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?67.1:
	st	flags,@(-37,Y)
	st	XH,@(-36,Y)
	st	X,@(-35,Y)
	st	AH,@(-34,Y)
	st	AL,@(-33,Y)
	ld	AL,@(-37,Y)
	or	AL,#16
	st	AL,@(-37,Y)
Lstab?10c:
;{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?68.1:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?75.1:
	add	Y,#-37
Lstab?11a:
?L6F3:
	add	Y,#37
	ld	AL,@(-33,Y)
	ld	AH,@(-34,Y)
	ld	X,@(-35,Y)
	ld	XH,@(-36,Y)
	rti	@(-37,Y)
Lstab?12c:
;
;//	while (0 == fd.duart.b_sts.tx_rdy)
;//		;
;	//xy_data_transmit();
;	//GPS_data_transmit();
;//	fd.duart.b_int_dis.tx_rdy = 1;
;	//rg.io.gp0_3_out = IO_GP0_3_OUT_CLR1_MASK | IO_GP0_3_OUT_SET1_MASK;
;}
;
;void __irq_entry usra_tx_handler(void)
;
$usra_tx_handler??:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?77.1:
	st	flags,@(-37,Y)
	st	XH,@(-36,Y)
	st	X,@(-35,Y)
	st	AH,@(-34,Y)
	st	AL,@(-33,Y)
	ld	AL,@(-37,Y)
	or	AL,#16
	st	AL,@(-37,Y)
Lstab?13c:
;{
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?78.1:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?81.1:
	add	Y,#-37
Lstab?14a:
?L6F4:
	add	Y,#37
	ld	AL,@(-33,Y)
	ld	AH,@(-34,Y)
	ld	X,@(-35,Y)
	ld	XH,@(-36,Y)
	rti	@(-37,Y)
Lstab?15c:
;
;	//GPS_data_transmit();
;	//fd.duart.a_int_dis.tx_rdy = 1;
;}
;
;int putchar(int c)
;
$putchar:
^cyan_base_driver___cyan_base_driver.'D:\simcom\software\SIM300C\cyan_base_driver.c'.?83.1:
	st	AL,@(-1,Y)
	st	XH,@(-3,Y)
	st	X,@(-2,Y)
	st	AL,@H'ffe5	; %r2 (c)
Lstab?16c:

⌨️ 快捷键说明

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