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

📄 ax88796.lst

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


   1               		.file	"ax88796.c"
   2               		.arch atmega323
   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
  10               		.stabs	"C:\\Code\\AVR\\uip-avr/",100,0,0,.Ltext0
  11               		.stabs	"ax88796.c",100,0,0,.Ltext0
  12               		.text
  13               	.Ltext0:
  14               		.stabs	"gcc2_compiled.",60,0,0,0
  15               		.stabs	"int:t(0,1)=r(0,1);-32768;32767;",128,0,0,0
  16               		.stabs	"char:t(0,2)=r(0,2);0;127;",128,0,0,0
  17               		.stabs	"long int:t(0,3)=@s32;r(0,3);0020000000000;0017777777777;",128,0,0,0
  18               		.stabs	"unsigned int:t(0,4)=r(0,4);0000000000000;0000000177777;",128,0,0,0
  19               		.stabs	"long unsigned int:t(0,5)=@s32;r(0,5);0000000000000;0037777777777;",128,0,0,0
  20               		.stabs	"long long int:t(0,6)=@s64;r(0,6);01000000000000000000000;0777777777777777777777;",128,0,0,
  21               		.stabs	"long long unsigned int:t(0,7)=@s64;r(0,7);0000000000000;01777777777777777777777;",128,0,0,
  22               		.stabs	"short int:t(0,8)=r(0,8);-32768;32767;",128,0,0,0
  23               		.stabs	"short unsigned int:t(0,9)=r(0,9);0000000000000;0000000177777;",128,0,0,0
  24               		.stabs	"signed char:t(0,10)=@s8;r(0,10);-128;127;",128,0,0,0
  25               		.stabs	"unsigned char:t(0,11)=@s8;r(0,11);0;255;",128,0,0,0
  26               		.stabs	"float:t(0,12)=r(0,1);4;0;",128,0,0,0
  27               		.stabs	"double:t(0,13)=r(0,1);4;0;",128,0,0,0
  28               		.stabs	"long double:t(0,14)=r(0,1);4;0;",128,0,0,0
  29               		.stabs	"complex int:t(0,15)=s4real:(0,1),0,16;imag:(0,1),16,16;;",128,0,0,0
  30               		.stabs	"complex float:t(0,16)=R3;8;0;",128,0,0,0
  31               		.stabs	"complex double:t(0,17)=R3;8;0;",128,0,0,0
  32               		.stabs	"complex long double:t(0,18)=R3;8;0;",128,0,0,0
  33               		.stabs	"__builtin_va_list:t(0,19)=*(0,20)=(0,20)",128,0,0,0
  34               		.stabs	"_Bool:t(0,21)=@s8;-16;",128,0,0,0
  35               		.stabs	"ax88796.c",130,0,0,0
  36               		.stabs	"global.h",130,0,0,0
  37               		.stabs	"c:/code/avr/avrlib/avrlibdefs.h",130,0,0,0
  38               		.stabn	162,0,0,0
  39               		.stabs	"c:/code/avr/avrlib/avrlibtypes.h",130,0,0,0
  40               		.stabs	"u08:t(4,1)=(0,11)",128,0,32,0
  41               		.stabs	"s08:t(4,2)=(0,10)",128,0,33,0
  42               		.stabs	"u16:t(4,3)=(0,9)",128,0,34,0
  43               		.stabs	"s16:t(4,4)=(0,8)",128,0,35,0
  44               		.stabs	"u32:t(4,5)=(0,5)",128,0,36,0
  45               		.stabs	"s32:t(4,6)=(0,3)",128,0,37,0
  46               		.stabs	"u64:t(4,7)=(0,7)",128,0,38,0
  47               		.stabs	"s64:t(4,8)=(0,6)",128,0,39,0
  48               		.stabs	"BOOL:t(4,9)=(0,11)",128,0,58,0
  49               		.stabs	"BYTE:t(4,10)=(0,11)",128,0,59,0
  50               		.stabs	"WORD:t(4,11)=(0,4)",128,0,60,0
  51               		.stabs	"DWORD:t(4,12)=(0,5)",128,0,61,0
  52               		.stabs	"UCHAR:t(4,13)=(0,11)",128,0,63,0
  53               		.stabs	"UINT:t(4,14)=(0,4)",128,0,64,0
  54               		.stabs	"USHORT:t(4,15)=(0,9)",128,0,65,0
  55               		.stabs	"ULONG:t(4,16)=(0,5)",128,0,66,0
  56               		.stabs	"CHAR:t(4,17)=(0,2)",128,0,68,0
  57               		.stabs	"INT:t(4,18)=(0,1)",128,0,69,0
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/cckxaaaa.s 			page 2


  58               		.stabs	"LONG:t(4,19)=(0,3)",128,0,70,0
  59               		.stabn	162,0,0,0
  60               		.stabn	162,0,0,0
  61               		.stabs	"c:/code/avr/avrlib/rprintf.h",130,0,0,0
  62               		.stabs	"c:/programa/winavr/avr/include/avr/pgmspace.h",130,0,0,0
  63               		.stabs	"c:/programa/winavr/lib/gcc-lib/avr/3.3/include/stddef.h",130,0,0,0
  64               		.stabs	"size_t:t(7,1)=(0,4)",128,0,213,0
  65               		.stabn	162,0,0,0
  66               		.stabs	"prog_void:t(6,1)=(6,2)=(6,2)",128,0,81,0
  67               		.stabs	"prog_char:t(6,3)=(6,4)=@s8;r(6,4);-128;127;",128,0,82,0
  68               		.stabs	"prog_uchar:t(6,5)=(6,6)=@s8;r(6,6);0;255;",128,0,83,0
  69               		.stabs	"prog_int:t(6,7)=(6,8)=r(6,8);-32768;32767;",128,0,84,0
  70               		.stabs	"prog_long:t(6,9)=(6,10)=@s32;r(6,10);0020000000000;0017777777777;",128,0,85,0
  71               		.stabs	"prog_long_long:t(6,11)=(6,12)=@s64;r(6,12);01000000000000000000000;0777777777777777777777;
  72               		.stabn	162,0,0,0
  73               		.stabs	"c:/code/avr/avrlib/rprintfconf.h",130,0,0,0
  74               		.stabn	162,0,0,0
  75               		.stabn	162,0,0,0
  76               		.stabs	"c:/code/avr/avrlib/vt100.h",130,0,0,0
  77               		.stabn	162,0,0,0
  78               		.stabs	"ax88796.h",130,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/winavr/avr/include/sig-avr.h",130,0,0,0
  83               		.stabs	"c:/programa/winavr/avr/include/avr/signal.h",130,0,0,0
  84               		.stabn	162,0,0,0
  85               		.stabn	162,0,0,0
  86               		.stabs	"c:/programa/winavr/avr/include/interrupt.h",130,0,0,0
  87               		.stabs	"c:/programa/winavr/avr/include/avr/interrupt.h",130,0,0,0
  88               		.stabs	"c:/programa/winavr/avr/include/avr/io.h",130,0,0,0
  89               		.stabs	"c:/programa/winavr/avr/include/avr/sfr_defs.h",130,0,0,0
  90               		.stabn	162,0,0,0
  91               		.stabs	"c:/programa/winavr/avr/include/avr/iom323.h",130,0,0,0
  92               		.stabn	162,0,0,0
  93               		.stabn	162,0,0,0
  94               		.stabn	162,0,0,0
  95               		.stabn	162,0,0,0
  96               		.stabs	"c:/programa/winavr/avr/include/io.h",130,0,0,0
  97               		.stabn	162,0,0,0
  98               		.stabn	162,0,0,0
  99               		.stabn	162,0,0,0
 100               		.stabs	"ax88796Init:F(0,20)",36,0,41,ax88796Init
 101               	.global	ax88796Init
 102               		.type	ax88796Init, @function
 103               	ax88796Init:
   1:ax88796.c     **** /*! \file ax88796.c \brief ASIX 88796 L Ethernet Interface Driver. */
   2:ax88796.c     **** //*****************************************************************************
   3:ax88796.c     **** //
   4:ax88796.c     **** // File Name	: 'ax88796.c'
   5:ax88796.c     **** // Title		: ASIX 88796 L Ethernet Interface Driver
   6:ax88796.c     **** // Author		: Pascal Stang
   7:ax88796.c     **** // Created		: 10/22/2002
   8:ax88796.c     **** // Revised		: 10/26/2002
   9:ax88796.c     **** // Version		: 0.1
  10:ax88796.c     **** // Target MCU	: Atmel AVR series
  11:ax88796.c     **** // Editor Tabs	: 4
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/cckxaaaa.s 			page 3


  12:ax88796.c     **** //
  13:ax88796.c     **** //	Description : This include file is designed to contain items useful to all
  14:ax88796.c     **** //					code files and projects.
  15:ax88796.c     **** //
  16:ax88796.c     **** // Based in part on code by Louis Beaudoin (www.embedded-creations.com)
  17:ax88796.c     **** //
  18:ax88796.c     **** // This code is distributed under the GNU Public License
  19:ax88796.c     **** //		which can be found at http://www.gnu.org/licenses/gpl.txt
  20:ax88796.c     **** //
  21:ax88796.c     **** //*****************************************************************************
  22:ax88796.c     **** 
  23:ax88796.c     **** #include "global.h"
  24:ax88796.c     **** #include "rprintf.h"
  25:ax88796.c     **** #include "vt100.h"
  26:ax88796.c     **** 
  27:ax88796.c     **** #include "ax88796.h"
  28:ax88796.c     **** 
  29:ax88796.c     **** // pointers to locations in the ax88796 receive buffer
  30:ax88796.c     **** static unsigned char nextPage;
  31:ax88796.c     **** static unsigned int currentRetreiveAddress;
  32:ax88796.c     **** 
  33:ax88796.c     **** // offsets into ax88796 ethernet packet header
  34:ax88796.c     **** #define  enetpacketstatus     0x00
  35:ax88796.c     **** #define  nextblock_ptr        0x01
  36:ax88796.c     **** #define	 enetpacketLenL		  0x02
  37:ax88796.c     **** #define	 enetpacketLenH		  0x03
  38:ax88796.c     **** 
  39:ax88796.c     **** 
  40:ax88796.c     **** void ax88796Init(void)
  41:ax88796.c     **** {
 104               		.stabn 68,0,41,.LM1-ax88796Init
 105               	.LM1:
 106               	/* prologue: frame size=0 */
 107 0000 CF93      		push r28
 108               	/* prologue end (size=1) */
  42:ax88796.c     **** 	unsigned char tcrFduFlag;
  43:ax88796.c     **** 	ax88796SetupPorts();
 109               		.stabn 68,0,43,.LM2-ax88796Init
 110               	.LM2:
 111               	.LBB2:
 112 0002 0E94 0000 		call ax88796SetupPorts
  44:ax88796.c     **** 	
  45:ax88796.c     **** 	// do a hard reset
  46:ax88796.c     **** 	sbi(AX88796_RESET_PORT, AX88796_RESET_PIN);
 113               		.stabn 68,0,46,.LM3-ax88796Init
 114               	.LM3:
 115 0006 929A      		sbi 50-0x20,2
  47:ax88796.c     **** 	Delay_10ms(1);
 116               		.stabn 68,0,47,.LM4-ax88796Init
 117               	.LM4:
 118 0008 81E0      		ldi r24,lo8(1)
 119 000a 0E94 0000 		call Delay_10ms
  48:ax88796.c     **** 	cbi(AX88796_RESET_PORT, AX88796_RESET_PIN);
 120               		.stabn 68,0,48,.LM5-ax88796Init
 121               	.LM5:
 122 000e 9298      		cbi 50-0x20,2
  49:ax88796.c     **** 
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/cckxaaaa.s 			page 4


  50:ax88796.c     **** 	// do soft reset
  51:ax88796.c     **** 	ax88796Write(ISR, ax88796Read(ISR));
 123               		.stabn 68,0,51,.LM6-ax88796Init
 124               	.LM6:
 125 0010 87E0      		ldi r24,lo8(7)
 126 0012 0E94 0000 		call ax88796Read
 127 0016 682F      		mov r22,r24
 128 0018 87E0      		ldi r24,lo8(7)
 129 001a 0E94 0000 		call ax88796Write
  52:ax88796.c     **** 	Delay_10ms(5);
 130               		.stabn 68,0,52,.LM7-ax88796Init
 131               	.LM7:
 132 001e 85E0      		ldi r24,lo8(5)
 133 0020 0E94 0000 		call Delay_10ms
  53:ax88796.c     **** 
  54:ax88796.c     **** 	// wait for PHY to come out of reset
  55:ax88796.c     **** 	ax88796Read(RSTPORT);
 134               		.stabn 68,0,55,.LM8-ax88796Init
 135               	.LM8:
 136 0024 8FE1      		ldi r24,lo8(31)
 137 0026 0E94 0000 		call ax88796Read
  56:ax88796.c     **** 	while(ax88796Read(TR) & RST_B);
 138               		.stabn 68,0,56,.LM9-ax88796Init
 139               	.LM9:
 140               	.L2:
 141 002a 85E1      		ldi r24,lo8(21)
 142 002c 0E94 0000 		call ax88796Read
 143 0030 81FD      		sbrc r24,1
 144 0032 FBCF      		rjmp .L2
  57:ax88796.c     ****    
  58:ax88796.c     **** 	ax88796WriteMii(0x10,0x00,0x0800);
 145               		.stabn 68,0,58,.LM10-ax88796Init
 146               	.LM10:
 147 0034 40E0      		ldi r20,lo8(2048)
 148 0036 58E0      		ldi r21,hi8(2048)
 149 0038 60E0      		ldi r22,lo8(0)
 150 003a 80E1      		ldi r24,lo8(16)
 151 003c 0E94 0000 		call ax88796WriteMii
  59:ax88796.c     **** 	Delay_10ms(255);
 152               		.stabn 68,0,59,.LM11-ax88796Init
 153               	.LM11:
 154 0040 8FEF      		ldi r24,lo8(-1)
 155 0042 0E94 0000 		call Delay_10ms
  60:ax88796.c     **** 	ax88796WriteMii(0x10,0x00,0x1200);
 156               		.stabn 68,0,60,.LM12-ax88796Init
 157               	.LM12:
 158 0046 40E0      		ldi r20,lo8(4608)
 159 0048 52E1      		ldi r21,hi8(4608)
 160 004a 60E0      		ldi r22,lo8(0)
 161 004c 80E1      		ldi r24,lo8(16)
 162 004e 0E94 0000 		call ax88796WriteMii
  61:ax88796.c     **** 
  62:ax88796.c     **** 	ax88796Write(CR,(RD2|STOP));		// stop the NIC, abort DMA, page 0
 163               		.stabn 68,0,62,.LM13-ax88796Init
 164               	.LM13:
 165 0052 61E2      		ldi r22,lo8(33)
 166 0054 80E0      		ldi r24,lo8(0)
GAS LISTING C:\DOCUME~1\pstang\LOCALS~1\Temp/cckxaaaa.s 			page 5


 167 0056 0E94 0000 		call ax88796Write
  63:ax88796.c     **** 	Delay_1ms(5);						// make sure nothing is coming in or going out
 168               		.stabn 68,0,63,.LM14-ax88796Init
 169               	.LM14:
 170 005a 85E0      		ldi r24,lo8(5)
 171 005c 0E94 0000 		call Delay_1ms
  64:ax88796.c     **** 	ax88796Write(DCR,DCR_INIT);    
 172               		.stabn 68,0,64,.LM15-ax88796Init
 173               	.LM15:
 174 0060 60E0      		ldi r22,lo8(0)
 175 0062 8EE0      		ldi r24,lo8(14)
 176 0064 0E94 0000 		call ax88796Write
  65:ax88796.c     **** 	ax88796Write(RBCR0,0x00);
 177               		.stabn 68,0,65,.LM16-ax88796Init
 178               	.LM16:
 179 0068 60E0      		ldi r22,lo8(0)
 180 006a 8AE0      		ldi r24,lo8(10)
 181 006c 0E94 0000 		call ax88796Write
  66:ax88796.c     **** 	ax88796Write(RBCR1,0x00);
 182               		.stabn 68,0,66,.LM17-ax88796Init
 183               	.LM17:
 184 0070 60E0      		ldi r22,lo8(0)
 185 0072 8BE0      		ldi r24,lo8(11)
 186 0074 0E94 0000 		call ax88796Write
  67:ax88796.c     **** 	ax88796Write(IMR,0x00);
 187               		.stabn 68,0,67,.LM18-ax88796Init
 188               	.LM18:
 189 0078 60E0      		ldi r22,lo8(0)
 190 007a 8FE0      		ldi r24,lo8(15)
 191 007c 0E94 0000 		call ax88796Write
  68:ax88796.c     **** 	ax88796Write(ISR,0xFF);
 192               		.stabn 68,0,68,.LM19-ax88796Init
 193               	.LM19:
 194 0080 6FEF      		ldi r22,lo8(-1)
 195 0082 87E0      		ldi r24,lo8(7)
 196 0084 0E94 0000 		call ax88796Write
  69:ax88796.c     **** 	ax88796Write(RCR,0x20);
 197               		.stabn 68,0,69,.LM20-ax88796Init
 198               	.LM20:
 199 0088 60E2      		ldi r22,lo8(32)
 200 008a 8CE0      		ldi r24,lo8(12)
 201 008c 0E94 0000 		call ax88796Write
  70:ax88796.c     **** 	ax88796Write(BNRY,RXSTART_INIT);
 202               		.stabn 68,0,70,.LM21-ax88796Init
 203               	.LM21:
 204 0090 66E4      		ldi r22,lo8(70)
 205 0092 83E0      		ldi r24,lo8(3)
 206 0094 0E94 0000 		call ax88796Write
  71:ax88796.c     **** 	ax88796Write(PSTART,RXSTART_INIT);

⌨️ 快捷键说明

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