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

📄 main.lst

📁 一个AVR 上的UIP移植程序
💻 LST
📖 第 1 页 / 共 2 页
字号:
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 1


   1               		.file	"main.c"
   2               		.arch atmega323
   3               	__SREG__ = 0x3f
   4               	__SP_H__ = 0x3e
   5               	__SP_L__ = 0x3d
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               	_PC_ = 2
   9               		.global __do_copy_data
  10               		.global __do_clear_bss
  11               		.stabs	"C:\\Code\\AVR\\uip-avr/",100,0,0,.Ltext0
  12               		.stabs	"main.c",100,0,0,.Ltext0
  13               		.text
  14               	.Ltext0:
  15               		.stabs	"gcc2_compiled.",60,0,0,0
  16               		.stabs	"int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
  17               		.stabs	"char:t(0,2)=r(0,2);0;127;",128,0,0,0
  18               		.stabs	"long int:t(0,3)=@s32;r(0,3);0020000000000;0017777777777;",128,0,0,0
  19               		.stabs	"unsigned int:t(0,4)=r(0,4);0000000000000;0000000177777;",128,0,0,0
  20               		.stabs	"long unsigned int:t(0,5)=@s32;r(0,5);0000000000000;0037777777777;",128,0,0,0
  21               		.stabs	"long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
  22               		.stabs	"long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0,
  23               		.stabs	"short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
  24               		.stabs	"short unsigned int:t(0,9)=r(0,9);0000000000000;0000000177777;",128,0,0,0
  25               		.stabs	"signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
  26               		.stabs	"unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
  27               		.stabs	"float:t(0,12)=r(0,1);4;0;",128,0,0,0
  28               		.stabs	"double:t(0,13)=r(0,1);4;0;",128,0,0,0
  29               		.stabs	"long double:t(0,14)=r(0,1);4;0;",128,0,0,0
  30               		.stabs	"complex int:t(0,15)=s4real:(0,1),0,16;imag:(0,1),16,16;;",128,0,0,0
  31               		.stabs	"complex float:t(0,16)=r(0,16);8;0;",128,0,0,0
  32               		.stabs	"complex double:t(0,17)=r(0,17);8;0;",128,0,0,0
  33               		.stabs	"complex long double:t(0,18)=r(0,18);8;0;",128,0,0,0
  34               		.stabs	"__builtin_va_list:t(0,19)=*(0,20)=(0,20)",128,0,0,0
  35               		.stabs	"_Bool:t(0,21)=@s8;-16;",128,0,0,0
  36               		.stabs	"main.c",130,0,0,0
  37               		.stabs	"uip.h",130,0,0,0
  38               		.stabs	"uipopt.h",130,0,0,0
  39               		.stabs	"u8_t:t(3,1)=(0,11)",128,0,52,0
  40               		.stabs	"u16_t:t(3,2)=(0,9)",128,0,53,0
  41               		.stabs	"app.h",130,0,0,0
  42               		.stabs	"uip.h",130,0,0,0
  43               		.stabn	162,0,0,0
  44               		.stabn	162,0,0,0
  45               		.stabn	162,0,0,0
  46               		.stabs	"uip_conn:T(2,1)=s25tcpstateflags:(3,1),0,8;lport:(3,2),8,16;rport:(3,2),24,16;ripaddr:(2,2
  47               		.stabs	"uip_stats:T(2,6)=s44ip:(2,7)=s18drop:(3,2),0,16;recv:(3,2),16,16;sent:(3,2),32,16;vhlerr:(
  48               		.stabs	"uip_tcpip_hdr:t(2,10)=(2,11)=s44vhl:(3,1),0,8;tos:(3,1),8,8;len:(2,12)=ar(2,3);0;1;(3,1),1
  49               		.stabn	162,0,0,0
  50               		.stabs	"ax88796dev.h",130,0,0,0
  51               		.stabs	"ax88796.h",130,0,0,0
  52               		.stabs	"global.h",130,0,0,0
  53               		.stabs	"c:/code/avr/avrlib/avrlibdefs.h",130,0,0,0
  54               		.stabn	162,0,0,0
  55               		.stabs	"c:/code/avr/avrlib/avrlibtypes.h",130,0,0,0
  56               		.stabs	"u08:t(10,1)=(0,11)",128,0,32,0
  57               		.stabs	"s08:t(10,2)=(0,2)",128,0,33,0
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 2


  58               		.stabs	"u16:t(10,3)=(0,9)",128,0,34,0
  59               		.stabs	"s16:t(10,4)=(0,8)",128,0,35,0
  60               		.stabs	"u32:t(10,5)=(0,5)",128,0,36,0
  61               		.stabs	"s32:t(10,6)=(0,3)",128,0,37,0
  62               		.stabs	"u64:t(10,7)=(0,7)",128,0,38,0
  63               		.stabs	"s64:t(10,8)=(0,6)",128,0,39,0
  64               		.stabs	"BOOL:t(10,9)=(0,11)",128,0,58,0
  65               		.stabs	"BYTE:t(10,10)=(0,11)",128,0,59,0
  66               		.stabs	"WORD:t(10,11)=(0,4)",128,0,60,0
  67               		.stabs	"DWORD:t(10,12)=(0,5)",128,0,61,0
  68               		.stabs	"UCHAR:t(10,13)=(0,11)",128,0,63,0
  69               		.stabs	"UINT:t(10,14)=(0,4)",128,0,64,0
  70               		.stabs	"USHORT:t(10,15)=(0,9)",128,0,65,0
  71               		.stabs	"ULONG:t(10,16)=(0,5)",128,0,66,0
  72               		.stabs	"CHAR:t(10,17)=(0,2)",128,0,68,0
  73               		.stabs	"INT:t(10,18)=(0,1)",128,0,69,0
  74               		.stabs	"LONG:t(10,19)=(0,3)",128,0,70,0
  75               		.stabn	162,0,0,0
  76               		.stabn	162,0,0,0
  77               		.stabs	"c:/code/avr/avrlib/port128.h",130,0,0,0
  78               		.stabn	162,0,0,0
  79               		.stabs	"delay.h",130,0,0,0
  80               		.stabn	162,0,0,0
  81               		.stabs	"compiler.h",130,0,0,0
  82               		.stabs	"c:/programa/avrgcc/avr/include/sig-avr.h",130,0,0,0
  83               		.stabn	162,0,0,0
  84               		.stabs	"c:/programa/avrgcc/avr/include/interrupt.h",130,0,0,0
  85               		.stabs	"c:/programa/avrgcc/avr/include/io.h",130,0,0,0
  86               		.stabs	"c:/programa/avrgcc/avr/include/iom323.h",130,0,0,0
  87               		.stabs	"c:/programa/avrgcc/avr/include/sfr_defs.h",130,0,0,0
  88               		.stabn	162,0,0,0
  89               		.stabn	162,0,0,0
  90               		.stabn	162,0,0,0
  91               		.stabn	162,0,0,0
  92               		.stabn	162,0,0,0
  93               		.stabn	162,0,0,0
  94               		.stabn	162,0,0,0
  95               		.stabs	"uip_arp.h",130,0,0,0
  96               		.stabs	"uip_eth_addr:T(19,1)=s6addr:(19,2)=ar(2,3);0;5;(3,1),0,48;;",128,0,0,0
  97               		.stabs	"uip_eth_hdr:T(19,3)=s14dest:(19,1),0,48;src:(19,1),48,48;type:(3,2),96,16;;",128,0,0,0
  98               		.stabn	162,0,0,0
  99               		.stabs	"c:/code/avr/avrlib/uart.h",130,0,0,0
 100               		.stabs	"c:/code/avr/avrlib/buffer.h",130,0,0,0
 101               		.stabs	"struct_cBuffer:T(21,1)=s8dataptr:(21,2)=*(0,11),0,16;size:(0,9),16,16;datalength:(0,9),32,
 102               		.stabs	"cBuffer:t(21,3)=(21,1)",128,0,30,0
 103               		.stabn	162,0,0,0
 104               		.stabn	162,0,0,0
 105               		.stabs	"c:/code/avr/avrlib/rprintf.h",130,0,0,0
 106               		.stabs	"c:/programa/avrgcc/avr/include/progmem.h",130,0,0,0
 107               		.stabs	"c:/programa/avrgcc/avr/include/pgmspace.h",130,0,0,0
 108               		.stabs	"c:/programa/avrgcc/lib/gcc-lib/avr/3.2/include/stddef.h",130,0,0,0
 109               		.stabs	"size_t:t(25,1)=(0,4)",128,0,201,0
 110               		.stabn	162,0,0,0
 111               		.stabs	"prog_void:t(24,1)=(24,2)=(24,2)",128,0,69,0
 112               		.stabs	"prog_char:t(24,3)=(24,4)=@s8;r(24,4);-128;127;",128,0,70,0
 113               		.stabs	"prog_uchar:t(24,5)=(24,6)=@s8;r(24,6);0;255;",128,0,71,0
 114               		.stabs	"prog_int:t(24,7)=(24,8)=r(24,8);-32768;32767;",128,0,72,0
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 3


 115               		.stabs	"prog_long:t(24,9)=(24,10)=@s32;r(24,10);0020000000000;0017777777777;",128,0,73,0
 116               		.stabs	"prog_long_long:t(24,11)=(24,12)=@s64;r(24,12);01000000000000000000000;07777777777777777777
 117               		.stabs	"c:/programa/avrgcc/avr/include/ina90.h",130,0,0,0
 118               		.stabs	"c:/programa/avrgcc/avr/include/eeprom.h",130,0,0,0
 119               		.stabs	"c:/programa/avrgcc/lib/gcc-lib/avr/3.2/include/stddef.h",130,0,0,0
 120               		.stabn	162,0,0,0
 121               		.stabn	162,0,0,0
 122               		.stabn	162,0,0,0
 123               		.stabn	162,0,0,0
 124               		.stabn	162,0,0,0
 125               		.stabs	"c:/code/avr/avrlib/rprintfconf.h",130,0,0,0
 126               		.stabn	162,0,0,0
 127               		.stabn	162,0,0,0
 128               		.stabs	"c:/code/avr/avrlib/vt100.h",130,0,0,0
 129               		.stabn	162,0,0,0
 130               		.stabs	"initTimer:F(0,20)",36,0,42,initTimer
 131               	.global	initTimer
 132               		.type	initTimer,@function
 133               	initTimer:
   1:main.c        **** /*****************************************************************************
   2:main.c        **** *  Module Name:       uIP-AVR Port - main control loop shell
   3:main.c        **** *  
   4:main.c        **** *  Created By:        Louis Beaudoin (www.embedded-creations.com)
   5:main.c        **** *
   6:main.c        **** *  Original Release:  September 21, 2002 
   7:main.c        **** *
   8:main.c        **** *  Module Description:  
   9:main.c        **** *  This main control loop shell provides everything required for a basic uIP
  10:main.c        **** *  application using the RTL8019AS NIC
  11:main.c        **** *
  12:main.c        **** *  September 30, 2002
  13:main.c        **** *    Added support for Imagecraft Compiler
  14:main.c        **** *****************************************************************************/
  15:main.c        **** 
  16:main.c        **** #include "uip.h"
  17:main.c        **** #include "ax88796dev.h"
  18:main.c        **** #include "ax88796.h"
  19:main.c        **** #include "uip_arp.h"
  20:main.c        **** 
  21:main.c        **** #include "compiler.h"
  22:main.c        **** 
  23:main.c        **** #include "uart.h"
  24:main.c        **** #include "rprintf.h"
  25:main.c        **** #include "vt100.h"
  26:main.c        **** 
  27:main.c        **** #define BUF ((struct uip_eth_hdr *)&uip_buf[0])
  28:main.c        **** 
  29:main.c        **** /*****************************************************************************
  30:main.c        **** *  Periodic Timout Functions and variables
  31:main.c        **** *
  32:main.c        **** *  The periodic timeout rate can be changed depeding on your application
  33:main.c        **** *  Modify these functions and variables based on your AVR device and clock
  34:main.c        **** *    rate
  35:main.c        **** *****************************************************************************/
  36:main.c        **** // poll the uIP periodic function every ~0.5 sec
  37:main.c        **** #define TIMERCOUNTER_PERIODIC_TIMEOUT 15
  38:main.c        **** 
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 4


  39:main.c        **** static unsigned char timerCounter;
  40:main.c        **** 
  41:main.c        **** void initTimer(void)
  42:main.c        **** {
 134               		.stabn 68,0,42,.LM1-initTimer
 135               	.LM1:
 136               	/* prologue: frame size=0 */
 137               	/* prologue end (size=0) */
  43:main.c        ****   // timer overflows every 32.8ms (with 8MHz clock)
  44:main.c        ****   outp( 5, TCCR0 ) ;  // timer0 prescale 1/1024 (5)
 138               		.stabn 68,0,44,.LM2-initTimer
 139               	.LM2:
 140 0000 85E0      		ldi r24,lo8(5)
 141 0002 83BF      		out 83-0x20,r24
  45:main.c        **** 
  46:main.c        ****   // interrupt on overflow
  47:main.c        ****   sbi( TIMSK, TOIE0 ) ;
 142               		.stabn 68,0,47,.LM3-initTimer
 143               	.LM3:
 144 0004 89B7      		in r24,89-0x20
 145 0006 8160      		ori r24,lo8(1)
 146 0008 89BF      		out 89-0x20,r24
  48:main.c        **** 	
  49:main.c        ****   timerCounter = 0;
 147               		.stabn 68,0,49,.LM4-initTimer
 148               	.LM4:
 149 000a 1092 0000 		sts timerCounter,__zero_reg__
  50:main.c        **** }
 150               		.stabn 68,0,50,.LM5-initTimer
 151               	.LM5:
 152               	/* epilogue: frame size=0 */
 153 000e 0895      		ret
 154               	/* epilogue end (size=1) */
 155               	/* function initTimer size 8 (7) */
 156               	.Lfe1:
 157               		.size	initTimer,.Lfe1-initTimer
 158               	.Lscope0:
 159               		.stabs	"",36,0,0,.Lscope0-initTimer
 160               		.stabs	"__vector_11:F(0,20)",36,0,53,__vector_11
 161               	.global	__vector_11
 162               		.type	__vector_11,@function
 163               	__vector_11:
  51:main.c        **** 
  52:main.c        **** SIGNAL(SIG_OVERFLOW0)
  53:main.c        **** {
 164               		.stabn 68,0,53,.LM6-__vector_11
 165               	.LM6:
 166               	/* prologue: frame size=0 */
 167 0010 1F92      		push __zero_reg__
 168 0012 0F92      		push __tmp_reg__
 169 0014 0FB6      		in __tmp_reg__,__SREG__
 170 0016 0F92      		push __tmp_reg__
 171 0018 1124      		clr __zero_reg__
 172 001a 8F93      		push r24
 173               	/* prologue end (size=6) */
  54:main.c        ****   timerCounter++;
 174               		.stabn 68,0,54,.LM7-__vector_11
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 5


 175               	.LM7:
 176 001c 8091 0000 		lds r24,timerCounter
 177 0020 8F5F      		subi r24,lo8(-(1))
 178 0022 8093 0000 		sts timerCounter,r24
  55:main.c        **** }
 179               		.stabn 68,0,55,.LM8-__vector_11
 180               	.LM8:
 181               	/* epilogue: frame size=0 */
 182 0026 8F91      		pop r24
 183 0028 0F90      		pop __tmp_reg__
 184 002a 0FBE      		out __SREG__,__tmp_reg__
 185 002c 0F90      		pop __tmp_reg__
 186 002e 1F90      		pop __zero_reg__
 187 0030 1895      		reti
 188               	/* epilogue end (size=6) */
 189               	/* function __vector_11 size 17 (5) */
 190               	.Lfe2:
 191               		.size	__vector_11,.Lfe2-__vector_11
 192               	.Lscope1:
 193               		.stabs	"",36,0,0,.Lscope1-__vector_11
 194               		.section	.progmem.data,"a",@progbits
 195               		.type	__c.0,@object
 196               		.size	__c.0,21
 197               	__c.0:
 198 0000 5765 6C63 		.string	"Welcome to UIP-AVR\r\n"
 198      6F6D 6520 
 198      746F 2055 
 198      4950 2D41 
 198      5652 0D0A 
 199               		.type	__c.1,@object
 200               		.size	__c.1,31
 201               	__c.1:
 202 0015 5374 6172 		.string	"Starting packet receive loop\r\n"
 202      7469 6E67 
 202      2070 6163 
 202      6B65 7420 
 202      7265 6365 
 203               		.type	__c.2,@object
 204               		.size	__c.2,34
 205               	__c.2:
 206 0034 5061 636B 		.string	"Packet Received with length: %d\r\n"
 206      6574 2052 
 206      6563 6569 
 206      7665 6420 
 206      7769 7468 
 207               		.text
 208               		.stabs	"main:F(0,1)",36,0,61,main
 209               	.global	main
 210               		.type	main,@function
 211               	main:
  56:main.c        **** 
  57:main.c        **** /*****************************************************************************
  58:main.c        **** *  Main Control Loop
  59:main.c        **** *****************************************************************************/
  60:main.c        **** int main(void)
  61:main.c        **** {
 212               		.stabn 68,0,61,.LM9-main
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/ccOyaaaa.s 			page 6


 213               	.LM9:
 214               	/* prologue: frame size=0 */
 215 0032 C0E0      		ldi r28,lo8(__stack - 0)
 216 0034 D0E0      		ldi r29,hi8(__stack - 0)
 217 0036 DEBF      		out __SP_H__,r29
 218 0038 CDBF      		out __SP_L__,r28
 219               	/* prologue end (size=4) */
  62:main.c        **** 	unsigned char i;
  63:main.c        **** 
  64:main.c        **** 	uartInit();
 220               		.stabn 68,0,64,.LM10-main
 221               	.LM10:
 222               	.LBB2:
 223 003a 0E94 0000 		call uartInit
  65:main.c        **** 	uartSetBaudRate(115200);
 224               		.stabn 68,0,65,.LM11-main
 225               	.LM11:
 226 003e 60E0      		ldi r22,lo8(115200)
 227 0040 72EC      		ldi r23,hi8(115200)
 228 0042 81E0      		ldi r24,hlo8(115200)
 229 0044 90E0      		ldi r25,hhi8(115200)
 230 0046 0E94 0000 		call uartSetBaudRate
  66:main.c        **** 	rprintfInit(uartSendByte);
 231               		.stabn 68,0,66,.LM12-main
 232               	.LM12:
 233 004a 80E0      		ldi r24,lo8(pm(uartSendByte))
 234 004c 90E0      		ldi r25,hi8(pm(uartSendByte))
 235 004e 0E94 0000 		call rprintfInit
  67:main.c        **** 	vt100ClearScreen();
 236               		.stabn 68,0,67,.LM13-main
 237               	.LM13:
 238 0052 0E94 0000 		call vt100ClearScreen
  68:main.c        **** 	rprintf("Welcome to UIP-AVR\r\n");
 239               		.stabn 68,0,68,.LM14-main
 240               	.LM14:

⌨️ 快捷键说明

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