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

📄 test.lst

📁 protues仿真
💻 LST
📖 第 1 页 / 共 2 页
字号:
   1               		.file	"test.c"
   2               		.arch atmega128
   3               	__SREG__ = 0x3f
   4               	__SP_H__ = 0x3e
   5               	__SP_L__ = 0x3d
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               		.global __do_copy_data
   9               		.global __do_clear_bss
  11               		.text
  12               	.Ltext0:
  80               	.global	strbuf
  81               		.data
  84               	strbuf:
  85 0000 6865 6C6C 		.ascii	"hello , This is a FAT16 File System Writed by JiaoJ"
  85      6F20 2C20 
  85      5468 6973 
  85      2069 7320 
  85      6120 4641 
  86 0033 696E 5869 		.string	"inXing,\n Copyright (c) 2006 by JiaoJinXing, All rights reserved."
  86      6E67 2C0A 
  86      2043 6F70 
  86      7972 6967 
  86      6874 2028 
  87               		.text
  89               	.global	_Z10UART1_Initv
  91               	_Z10UART1_Initv:
   1:test.c        **** /*
   2:test.c        **** ;**************************************************************************************************
   3:test.c        **** ;*									Copyright (c) 2006 by JiaoJinXing. 
   4:test.c        **** ;*											All rights reserved.
   5:test.c        **** ;*
   6:test.c        **** ;*---- 文件信息 -----------------------------------------------------------------------------------
   7:test.c        **** ;* 文   件   名 : Test.c
   8:test.c        **** ;* 创   建   人 : 焦进星
   9:test.c        **** ;* 描        述 : 主文件
  10:test.c        **** ;*
  11:test.c        **** ;*---- 历史版本信息 -------------------------------------------------------------------------------
  12:test.c        **** ;* 日   期  : 2008年 12 月 15 日
  13:test.c        **** ;* 创 建 人  : 焦进星
  14:test.c        **** ;* 描   述  : 建立版本 V1.0.0
  15:test.c        **** ;*
  16:test.c        **** ;*---- 联系方式 -----------------------------------------------------------------------------------
  17:test.c        **** ;* Email    : wyoujtg@163.com
  18:test.c        **** ;* Web      : http://wyoujtg.blog.163.com  
  19:test.c        **** ;**************************************************************************************************
  20:test.c        **** ;*/
  21:test.c        **** 
  22:test.c        **** #include "minifs.h"
  23:test.c        **** 
  24:test.c        **** /*
  25:test.c        **** ;**************************************************************************************************
  26:test.c        **** ;* 函数名称 : UART1_Init
  27:test.c        **** ;* 描    述 : 串口1初始化
  28:test.c        **** ;* 输 	 入 : 无
  29:test.c        **** ;*        
  30:test.c        **** ;* 输 	 出 : 无
  31:test.c        **** ;**************************************************************************************************
  32:test.c        **** ;*/
  33:test.c        **** void UART1_Init(void)
  34:test.c        **** {
  93               	.LM1:
  94               	/* prologue: frame size=0 */
  95               	/* prologue end (size=0) */
  96               	.LBB2:
  35:test.c        **** 	// 晶振频率 : 16.0MHz
  36:test.c        **** 	// 通信参数: 8 Data, 1 Stop, No Parity 
  37:test.c        **** 	// 波特率:   19200
  38:test.c        **** 	 UCSR1B = 0x00; //disable while setting baud rate
  98               	.LM2:
  99 0000 1092 9A00 		sts 154,__zero_reg__
  39:test.c        **** 	 UCSR1A = 0x00;
 101               	.LM3:
 102 0004 1092 9B00 		sts 155,__zero_reg__
  40:test.c        **** 	 UCSR1C = 0x06;
 104               	.LM4:
 105 0008 86E0      		ldi r24,lo8(6)
 106 000a 8093 9D00 		sts 157,r24
  41:test.c        **** 	 UBRR1L = 0x33; //set baud rate lo
 108               	.LM5:
 109 000e 83E3      		ldi r24,lo8(51)
 110 0010 8093 9900 		sts 153,r24
  42:test.c        **** 	 UBRR1H = 0x00; //set baud rate hi
 112               	.LM6:
 113 0014 1092 9800 		sts 152,__zero_reg__
  43:test.c        **** 	 UCSR1B = 0x18;
 115               	.LM7:
 116 0018 88E1      		ldi r24,lo8(24)
 117 001a 8093 9A00 		sts 154,r24
 118               	.LBE2:
 119               	/* epilogue: frame size=0 */
 120 001e 0895      		ret
 121               	/* epilogue end (size=1) */
 122               	/* function void UART1_Init() size 16 (15) */
 126               	.global	_Z11UART1_Putchh
 128               	_Z11UART1_Putchh:
  44:test.c        **** }
  45:test.c        **** 
  46:test.c        **** /*
  47:test.c        **** ;**************************************************************************************************
  48:test.c        **** ;* 函数名称 : UART1_Putch
  49:test.c        **** ;* 描    述 : 串口1发送数据
  50:test.c        **** ;* 输 	 入 : data: 要发送的数据
  51:test.c        **** ;*        
  52:test.c        **** ;* 输 	 出 : 无
  53:test.c        **** ;**************************************************************************************************
  54:test.c        **** ;*/
  55:test.c        **** void UART1_Putch(uint8 data)
  56:test.c        **** {
 130               	.LM8:
 131               	/* prologue: frame size=0 */
 132               	/* prologue end (size=0) */
 133 0020 482F      		mov r20,r24
 134 0022 21E0      		ldi r18,lo8(1)
 135 0024 30E0      		ldi r19,hi8(1)
 136               	.L3:
 137               	.LBB3:
  57:test.c        **** 	// 检测是否可以发送, UDRE = 1 寄存器为空
  58:test.c        ****     while ( !( UCSR1A & (1 << UDRE1)) )
 139               	.LM9:
 140 0026 8091 9B00 		lds r24,155
 141 002a 9927      		clr r25
 142 002c 55E0      		ldi r21,5
 143 002e 9695      	1:	lsr r25
 144 0030 8795      		ror r24
 145 0032 5A95      		dec r21
 146 0034 E1F7      		brne 1b
 147 0036 8227      		eor r24,r18
 148 0038 9327      		eor r25,r19
 149 003a 80FD      		sbrc r24,0
 150 003c F4CF      		rjmp .L3
  59:test.c        ****            ;
  60:test.c        ****     UDR1 = data;
 152               	.LM10:
 153 003e 4093 9C00 		sts 156,r20
 154               	.LBE3:
 155               	/* epilogue: frame size=0 */
 156 0042 0895      		ret
 157               	/* epilogue end (size=1) */
 158               	/* function void UART1_Putch(uint8) size 18 (17) */
 161               	.global	_Z11UART1_Getchv
 163               	_Z11UART1_Getchv:
  61:test.c        **** }
  62:test.c        **** 
  63:test.c        **** /*
  64:test.c        **** ;**************************************************************************************************
  65:test.c        **** ;* 函数名称 : UART1_Getch
  66:test.c        **** ;* 描    述 : 串口0接收数据
  67:test.c        **** ;* 输 	 入 : 无
  68:test.c        **** ;*        
  69:test.c        **** ;* 输 	 出 : 接收到的数据
  70:test.c        **** ;**************************************************************************************************
  71:test.c        **** ;*/
  72:test.c        **** uint8 UART1_Getch(void)
  73:test.c        **** {
 165               	.LM11:
 166               	/* prologue: frame size=0 */
 167               	/* prologue end (size=0) */
 168               	.L7:
 169               	.LBB4:
  74:test.c        **** 	// 检测是否接收完成
  75:test.c        ****     while ( !(UCSR1A & (1 << RXC1)) )
 171               	.LM12:
 172 0044 8091 9B00 		lds r24,155
 173 0048 8823      		tst r24
 174 004a E4F7      		brge .L7
  76:test.c        ****           ;
  77:test.c        **** 	// 返回接收到的数据
  78:test.c        ****     return UDR1;                      
 176               	.LM13:
 177 004c 8091 9C00 		lds r24,156
 178               	.LBE4:
  79:test.c        **** }
 180               	.LM14:
 181 0050 9927      		clr r25
 182               	/* epilogue: frame size=0 */
 183 0052 0895      		ret
 184               	/* epilogue end (size=1) */
 185               	/* function uint8 UART1_Getch() size 9 (8) */
 189               	.global	_Z10UART1_PutsPc
 191               	_Z10UART1_PutsPc:
  80:test.c        **** 
  81:test.c        **** /*
  82:test.c        **** ;**************************************************************************************************
  83:test.c        **** ;* 函数名称 : UART1_Puts
  84:test.c        **** ;* 描    述 : 串口发送字符串
  85:test.c        **** ;* 输 	 入 : *Str: 字符串
  86:test.c        **** ;*        
  87:test.c        **** ;* 输 	 出 : 无
  88:test.c        **** ;**************************************************************************************************
  89:test.c        **** ;*/
  90:test.c        **** void UART1_Puts(char *Str)
  91:test.c        **** {
 193               	.LM15:
 194               	/* prologue: frame size=0 */
 195 0054 CF93      		push r28
 196 0056 DF93      		push r29
 197               	/* prologue end (size=2) */
 198 0058 EC01      		movw r28,r24
 199               	.LBB5:
 200               	.LBB6:
  92:test.c        **** 	char ch;
  93:test.c        **** 	
  94:test.c        ****     while ((ch = *Str++) != '\0')
  95:test.c        ****     {  		
  96:test.c        **** 		if (ch == '\n')
  97:test.c        **** 		{

⌨️ 快捷键说明

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