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

📄 port.lst

📁 ENC system full - ENC28J60
💻 LST
字号:
   1               		.file	"port.c"
   2               	__SREG__ = 0x3f
   3               	__SP_H__ = 0x3e
   4               	__SP_L__ = 0x3d
   5               	__CCP__  = 0x34
   6               	__tmp_reg__ = 0
   7               	__zero_reg__ = 1
   8               		.global __do_copy_data
   9               		.global __do_clear_bss
  11               		.text
  12               	.Ltext0:
  96               	.global	port_set_portbit
  98               	port_set_portbit:
   1:io/port.c     **** /*
   2:io/port.c     **** ,-----------------------------------------------------------------------------------------.
   3:io/port.c     **** | io/port
   4:io/port.c     **** |-----------------------------------------------------------------------------------------
   5:io/port.c     **** | this file implements a very basic port io lib
   6:io/port.c     **** |
   7:io/port.c     **** | Author   : Simon Schulz / avr{AT}auctionant.de
   8:io/port.c     **** |
   9:io/port.c     **** | 
  10:io/port.c     **** |
  11:io/port.c     **** |-----------------------------------------------------------------------------------------
  12:io/port.c     **** | License:
  13:io/port.c     **** | This program is free software; you can redistribute it and/or modify it under
  14:io/port.c     **** | the terms of the GNU General Public License as published by the Free Software
  15:io/port.c     **** | Foundation; either version 2 of the License, or (at your option) any later
  16:io/port.c     **** | version.
  17:io/port.c     **** | This program is distributed in the hope that it will be useful, but
  18:io/port.c     **** |
  19:io/port.c     **** | WITHOUT ANY WARRANTY;
  20:io/port.c     **** |
  21:io/port.c     **** | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  22:io/port.c     **** | PURPOSE. See the GNU General Public License for more details.
  23:io/port.c     **** |
  24:io/port.c     **** | You should have received a copy of the GNU General Public License along with
  25:io/port.c     **** | this program; if not, write to the Free Software Foundation, Inc., 51
  26:io/port.c     **** | Franklin St, Fifth Floor, Boston, MA 02110, USA
  27:io/port.c     **** |
  28:io/port.c     **** | http://www.gnu.de/gpl-ger.html
  29:io/port.c     **** `-----------------------------------------------------------------------------------------*/
  30:io/port.c     **** #include "port.h"
  31:io/port.c     **** 
  32:io/port.c     **** //ACTIVATE DEBUG by editing this file:
  33:io/port.c     **** #include "debug.h"
  34:io/port.c     **** 
  35:io/port.c     **** void port_set_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  99               	
 103               	.global	port_set_portbit
  36:io/port.c     **** t_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  37:io/port.c     **** 	//volatile char *port;
  38:io/port.c     **** 	unsigned char data;
  39:io/port.c     **** 
  40:io/port.c     **** 	//only allow bit0-bit7
 105               	,0,port_set_portbit
  41:io/port.c     **** //volatile char *port;
  42:io/port.c     **** 	unsigned char data;
 108               	0
  43:io/port.c     ****  pin, unsigned char val){
 112               	prog_uint32_t:t(9,9)=(5,6)",128,0,0,0
 122 0018 00C0      	.global	port_set_portbit
  44:io/port.c     **** t_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  45:io/port.c     **** 	//volatile char *port;
 124               	,0,port_set_portbit
 128 001e 062E      	.global	port_set_portbit
 130 0022 880F      	port_set_portbit:
 132 0026 0A94      	.LM0:
 133 0028 02F4      	.LFBB1:
 134 002a 982F      	/* prologue: function */
 135 002c 9095      	/* frame size = 0 */
 136               		mov r18,r24
  46:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
  47:io/port.c     **** 	//volatile char *port;
  48:io/port.c     **** 	unsigned char data;
 137               	al	port_set_portbit
 139 002e 2334      	port_set_portbit:
 141 0032 2434      	.LM0:
 142 0034 01F0      	.LFBB1:
 143 0036 2134      	/* prologue: function */
 144 0038 01F4      	/* frame size = 0 */
  49:io/port.c     ****  pin, unsigned char val){
  50:io/port.c     **** 	//volatile char *port;
 145               	4,0,0,20
 146               	.global	port_set_portbit
 148 003c 01F0      	port_set_portbit:
  51:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
 149               	
 153 0042 00C0      	.global	port_set_portbit
  52:io/port.c     **** t_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  53:io/port.c     **** 	//volatile char *port;
 155               	,0,port_set_portbit
 159               	.global	port_set_portbit
 161 004a 0895      	port_set_portbit:
  54:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
  55:io/port.c     **** 	//volatile char *port;
  56:io/port.c     **** 	unsigned char data;
 163               	4,0,0,18
 166 004e 01F4      	.global	port_set_portbit
  57:io/port.c     ****  pin, unsigned char val){
  58:io/port.c     **** 	//volatile char *port;
  59:io/port.c     **** 	unsigned char data;
 167               	tabs	"port_set_portbit:F(0,15)",36,0,0,port_set_portbit
  60:io/port.c     ****  pin, unsigned char val){
 171               	,0,0
  61:io/port.c     **** t_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  62:io/port.c     **** 	//volatile char *port;
 177               	,0,0
 183 0060 0895      	.global	port_set_portbit
  63:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
  64:io/port.c     **** 	//volatile char *port;
  65:io/port.c     **** 	unsigned char data;
 185               	,0,port_set_portbit
  66:io/port.c     ****  pin, unsigned char val){
  67:io/port.c     **** 	//volatile char *port;
 189               	,0,0
  68:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
 193               	_uint64_t:t(9,11)=(5,8)",128,0,0,0
  69:io/port.c     **** t_portbit(unsigned char portchar, unsigned char pin, unsigned char val){
  70:io/port.c     **** 	//volatile char *port;
 200               	0
 208               	.global	port_set_portbit
 210               	port_set_portbit:
 212               	.LM0:
 213               	.LFBB1:
 214               	/* prologue: function */
 215               	/* frame size = 0 */
 216               		mov r18,r24
  71:io/port.c     **** ortchar, unsigned char pin, unsigned char val){
  72:io/port.c     **** 	//volatile char *port;
  73:io/port.c     **** 	unsigned char data;
  74:io/port.c     **** 
  75:io/port.c     **** 	//only allow bit0-bit7
  76:io/port.c     **** 	pin = (pin-'0') & 0x07;
  77:io/port.c     **** 
  78:io/port.c     **** 	if (val)
  79:io/port.c     **** 		data = (1<<pin);
  80:io/port.c     **** 	else
  81:io/port.c     **** 		data = ~(1<<pin);
  82:io/port.c     **** 
  83:io/port.c     **** 	//WARNING: make sure not to set/clear used IO pins !!!
  84:io/port.c     **** 	switch (portchar){
  85:io/port.c     **** 		case('A'):
  86:io/port.c     **** 			if (val)
  87:io/port.c     **** 				PORTA |= data;
  88:io/port.c     **** 			else
  89:io/port.c     **** 				PORTA &= data;
  90:io/port.c     **** 			break;
  91:io/port.c     **** 		case('C'):
  92:io/port.c     **** 			if (pin != 3)
 218               	rt_set_portbit, @function
 219               	port_set_portbit:
 221               	.LM0:
 222               	.LFBB1:
  93:io/port.c     **** TA &= data;
  94:io/port.c     **** 			break;
 223               		"pin:P(0,11)",64,0,0,22
 225 007a 8234      	.global	port_set_portbit
 227 007e 8334      	port_set_portbit:
 229 0082 8134      	.LM0:
 230 0084 01F4      	.LFBB1:
 231 0086 00C0      	/* prologue: function */
 232               	/* frame size = 0 */
 233 0088 8334      		mov r18,r24
 235 008c 8434      	.LM1:
 236 008e 01F0      		andi r22,lo8(7)
 238 0090 80E0      	.LM2:
 239 0092 0895      		tst r20
 240               		breq .L2
 242 0096 F0E0      	.LM3:
 243 0098 00C0      		ldi r24,lo8(1)
 244               		ldi r25,hi8(1)
 245 009a EBE3      		mov r25,r24
 246 009c F0E0      		mov r0,r22
 247 009e 00C0      		rjmp 2f
 248               	1:	lsl r25
 249 00a0 E5E3      	2:	dec r0
 250 00a2 F0E0      		brpl 1b
 251 00a4 00C0      		rjmp .L3
 252               	.L2:
  95:io/port.c     **** 		PORTA |= data;
  96:io/port.c     **** 			else
  97:io/port.c     **** 				PORTA &= data;
 253               		breq .L2
 255 00a6 E2E3      	.LM3:
 256 00a8 F0E0      		ldi r24,lo8(1)
 257               		ldi r25,hi8(1)
  98:io/port.c     **** if (val)
  99:io/port.c     **** 				PORTA |= data;
 100:io/port.c     **** 			else
 101:io/port.c     **** 				PORTA &= data;
 102:io/port.c     **** 			break;
 103:io/port.c     **** 		case('C'):
 104:io/port.c     **** 			if (pin != 3)
 258               		68,0,40,.LM1-.LFBB1
 259               	.LM1:
 260 00aa 8081      		andi r22,lo8(7)
 262 00ae 6770      	.LM2:
 263 00b0 00C0      		tst r20
 264 00b2 9595      		breq .L2
 266 00b6 6A95      	.LM3:
 267 00b8 02F4      		ldi r24,lo8(1)
 268 00ba 8170      		ldi r25,hi8(1)
 105:io/port.c     **** TA &= data;
 106:io/port.c     **** 			break;
 107:io/port.c     **** 		case('C'):
 108:io/port.c     **** 			if (pin != 3)
 269               		68,0,40,.LM1-.LFBB1
 270               	.LM1:
 271 00bc 0895      		andi r22,lo8(7)
 273               	.LM2:
 274               		tst r20
 275               		breq .L2
 277               	.LM3:
 278               		ldi r24,lo8(1)
DEFINED SYMBOLS
                            *ABS*:00000000 port.c
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:2      *ABS*:0000003f __SREG__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:3      *ABS*:0000003e __SP_H__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:4      *ABS*:0000003d __SP_L__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:5      *ABS*:00000034 __CCP__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:6      *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:7      *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:98     .text:00000000 port_set_portbit
C:\DOCUME~1\ESERVIS\USTAWI~1\Temp/ccVEI1vb.s:217    .text:0000007a port_get_portbit

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss

⌨️ 快捷键说明

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