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

📄 level4.lst

📁 此程序为利用mage8 AVR 和EM4094实现读取TYPE A类型卡的C程序、读卡稳定、这个项目我们做了好久、非常不错的程序、很适合做这方面产品的朋友们参考
💻 LST
📖 第 1 页 / 共 5 页
字号:
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 1


   1               		.file	"level4.c"
   2               		.arch atmega8
   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	"E:\\PROJECT_GCC\\ISO14443-A_OK/",100,0,0,.Ltext0
  11               		.stabs	"level4.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)=@s8;r(0,2);0;255;",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	"level4.c",130,0,0,0
  36               		.stabs	"C:/WinAVR/avr/include/avr/io.h",130,0,0,0
  37               		.stabs	"C:/WinAVR/avr/include/avr/sfr_defs.h",130,0,0,0
  38               		.stabs	"C:/WinAVR/avr/include/inttypes.h",130,0,0,0
  39               		.stabs	"int8_t:t(4,1)=(0,10)",128,0,67,0
  40               		.stabs	"uint8_t:t(4,2)=(0,11)",128,0,72,0
  41               		.stabs	"int16_t:t(4,3)=(0,1)",128,0,90,0
  42               		.stabs	"uint16_t:t(4,4)=(0,4)",128,0,95,0
  43               		.stabs	"int32_t:t(4,5)=(0,3)",128,0,106,0
  44               		.stabs	"uint32_t:t(4,6)=(0,5)",128,0,111,0
  45               		.stabs	"int64_t:t(4,7)=(0,6)",128,0,124,0
  46               		.stabs	"uint64_t:t(4,8)=(0,7)",128,0,129,0
  47               		.stabs	"intptr_t:t(4,9)=(4,3)",128,0,141,0
  48               		.stabs	"uintptr_t:t(4,10)=(4,4)",128,0,146,0
  49               		.stabn	162,0,0,0
  50               		.stabn	162,0,0,0
  51               		.stabs	"C:/WinAVR/avr/include/avr/iom8.h",130,0,0,0
  52               		.stabn	162,0,0,0
  53               		.stabs	"C:/WinAVR/avr/include/avr/portpins.h",130,0,0,0
  54               		.stabn	162,0,0,0
  55               		.stabn	162,0,0,0
  56               		.stabs	"C:/WinAVR/avr/include/avr/interrupt.h",130,0,0,0
  57               		.stabn	162,0,0,0
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 2


  58               		.stabs	"C:/WinAVR/avr/include/avr/signal.h",130,0,0,0
  59               		.stabn	162,0,0,0
  60               		.stabs	"C:/WinAVR/avr/include/avr/wdt.h",130,0,0,0
  61               		.stabn	162,0,0,0
  62               		.stabs	"level4.h",130,0,0,0
  63               		.stabn	162,0,0,0
  64               		.stabs	"level3.h",130,0,0,0
  65               		.stabn	162,0,0,0
  66               		.stabs	"level2.h",130,0,0,0
  67               		.stabs	"TDECODE:T(12,1)=s256capture_data:(12,2)=ar(12,3)=r(12,3);0000000000000;0000000177777;;0;12
  68               		.stabs	"TDECODE:t(12,4)=(12,1)",128,0,69,0
  69               		.stabs	"TCAPTURE:T(12,5)=s576decoded_data:(12,1),0,2048;raw_data:(12,6)=ar(12,3);0;319;(4,2),2048,
  70               		.stabs	"TCAPTURE:t(12,7)=(12,5)",128,0,74,0
  71               		.stabn	162,0,0,0
  72               		.stabs	"level1.h",130,0,0,0
  73               		.stabn	162,0,0,0
  74               	.global	uart_out_buffer
  75               		.data
  76               		.type	uart_out_buffer, @object
  77               		.size	uart_out_buffer, 4
  78               	uart_out_buffer:
  79 0000 55        		.byte	85
  80 0001 AA        		.byte	-86
  81 0002 01        		.byte	1
  82 0003 02        		.byte	2
  83               		.text
  84               		.stabs	"__vector_11:F(0,20)",36,0,47,__vector_11
  85               	.global	__vector_11
  86               		.type	__vector_11, @function
  87               	__vector_11:
   1:level4.c      **** 
   2:level4.c      **** 
   3:level4.c      **** #include <avr/io.h>
   4:level4.c      **** #include <inttypes.h>
   5:level4.c      **** #include <avr/interrupt.h>
   6:level4.c      **** #include <avr/signal.h>
   7:level4.c      **** #include <avr/wdt.h>
   8:level4.c      **** #include "level4.h"
   9:level4.c      **** #include "level3.h"
  10:level4.c      **** #include "level2.h"
  11:level4.c      **** #include "level1.h"
  12:level4.c      **** 
  13:level4.c      **** 
  14:level4.c      **** 
  15:level4.c      **** //--------------------------------------------------------------
  16:level4.c      **** //global declarations
  17:level4.c      **** 
  18:level4.c      **** uint8_t uart_out_buffer[ 4 ] = { 0x55 , 0xAA , 0x01 , 0x02 };
  19:level4.c      **** uint8_t uart_in_buffer[ UART_IN_BUFFER_SIZE ];    //receive buffer,receive data from UART of PC;
  20:level4.c      **** //uint8_t uart_in_error;       //uart receive error;
  21:level4.c      **** //uint8_t uart_in_write;       //received value numbers;
  22:level4.c      **** //uint8_t uart_in_read;        //
  23:level4.c      **** //uint8_t uart_in_overflow;
  24:level4.c      **** uint8_t tx_number;           //received data byte number of raw data from PC;
  25:level4.c      **** uint8_t rx_number;
  26:level4.c      **** 
  27:level4.c      **** //uint8_t uart_valid_data_num; //recieved valid data number,one command and one parameter counted a
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 3


  28:level4.c      **** //uint8_t uart_command;
  29:level4.c      **** //uint8_t uart_param;
  30:level4.c      **** uint8_t uart_in_command;
  31:level4.c      **** uint8_t uart_in_param;
  32:level4.c      **** uint8_t valid_data_flag ;
  33:level4.c      **** 
  34:level4.c      **** // ==================================================================
  35:level4.c      **** void Send_Weigan0( void );
  36:level4.c      **** void Send_Weigan1( void );
  37:level4.c      **** void Send_Weigan26( uint8_t * data );
  38:level4.c      **** void Send_Weigan34( uint8_t * data );
  39:level4.c      **** void Send_Weigan36( uint8_t * data );
  40:level4.c      **** void Send_Weigan44( uint8_t * data );
  41:level4.c      **** void Send_9600( uint8_t * data );
  42:level4.c      **** 
  43:level4.c      **** // ==================================================================
  44:level4.c      **** // uart byte receive interrupt
  45:level4.c      **** 
  46:level4.c      **** SIGNAL ( SIG_UART_RECV )
  47:level4.c      **** {
  88               		.stabn 68,0,47,.LM1-__vector_11
  89               	.LM1:
  90               	/* prologue: frame size=0 */
  91 0000 1F92      		push __zero_reg__
  92 0002 0F92      		push __tmp_reg__
  93 0004 0FB6      		in __tmp_reg__,__SREG__
  94 0006 0F92      		push __tmp_reg__
  95 0008 1124      		clr __zero_reg__
  96 000a 2F93      		push r18
  97 000c 3F93      		push r19
  98 000e 8F93      		push r24
  99 0010 9F93      		push r25
 100               	/* prologue end (size=9) */
  48:level4.c      **** 	  uint8_t temp;
  49:level4.c      **** 	  uint8_t error;
  50:level4.c      **** 	  error = UCSRA & ( ( 1 << FE ) | ( 1 << DOR ) | ( 1 << PE ) ); 
 101               		.stabn 68,0,50,.LM2-__vector_11
 102               	.LM2:
 103               	.LBB2:
 104 0012 8BB1      		in r24,43-0x20
 105 0014 8C71      		andi r24,lo8(28)
  51:level4.c      ****     temp = UDR;               //store byte into cyclic buffer
 106               		.stabn 68,0,51,.LM3-__vector_11
 107               	.LM3:
 108 0016 2CB1      		in r18,44-0x20
  52:level4.c      ****     if ( error != 0 )
 109               		.stabn 68,0,52,.LM4-__vector_11
 110               	.LM4:
 111 0018 8823      		tst r24
 112 001a F9F4      		brne .L25
  53:level4.c      ****     {
  54:level4.c      ****         rx_number = 0 ;    
  55:level4.c      ****         return;
  56:level4.c      ****     }
  57:level4.c      ****     if ( valid_data_flag != 0 )
 113               		.stabn 68,0,57,.LM5-__vector_11
 114               	.LM5:
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 4


 115 001c 3091 0000 		lds r19,valid_data_flag
 116 0020 3323      		tst r19
 117 0022 09F0      		breq .+2
 118 0024 41C0      		rjmp .L1
  58:level4.c      ****     	  return;
  59:level4.c      ****     switch( rx_number )
 119               		.stabn 68,0,59,.LM6-__vector_11
 120               	.LM6:
 121 0026 8091 0000 		lds r24,rx_number
 122 002a 9927      		clr r25
 123 002c 8330      		cpi r24,3
 124 002e 9105      		cpc r25,__zero_reg__
 125 0030 B9F1      		breq .L15
 126 0032 8430      		cpi r24,4
 127 0034 9105      		cpc r25,__zero_reg__
 128 0036 E4F4      		brge .L27
 129 0038 8130      		cpi r24,1
 130 003a 9105      		cpc r25,__zero_reg__
 131 003c A9F0      		breq .L8
 132 003e 8230      		cpi r24,2
 133 0040 9105      		cpc r25,__zero_reg__
 134 0042 4CF0      		brlt .L29
  60:level4.c      ****     {
  61:level4.c      ****         case 0 :
  62:level4.c      ****         	  if ( temp == 0x55 )
  63:level4.c      ****         	      rx_number = 1 ;
  64:level4.c      ****         	  else
  65:level4.c      ****         	      rx_number = 0 ;
  66:level4.c      ****             break;
  67:level4.c      ****             
  68:level4.c      ****         case 1 :
  69:level4.c      ****         	  if ( temp == 0xAA )
  70:level4.c      ****         	      rx_number = 2 ;
  71:level4.c      ****         	  else
  72:level4.c      ****         	      rx_number = 0 ;
  73:level4.c      ****         	  break;	
  74:level4.c      ****         	  
  75:level4.c      ****         case 2 :
  76:level4.c      ****         	  if ( temp == 0x01 )
 135               		.stabn 68,0,76,.LM7-__vector_11
 136               	.LM7:
 137 0044 2130      		cpi r18,lo8(1)
 138 0046 19F0      		breq .L30
 139               	.L21:
  77:level4.c      ****         	      rx_number = 3 ;
  78:level4.c      ****         	  else 
  79:level4.c      ****         	      rx_number = 0 ;
  80:level4.c      ****         	  break;	
  81:level4.c      ****         	  
  82:level4.c      ****         case 3 :
  83:level4.c      ****         	  if ( error != 0 )
  84:level4.c      ****         	  	  rx_number = 0 ;
  85:level4.c      ****         	  else
  86:level4.c      ****         	  {
  87:level4.c      ****         	      uart_in_command = temp;
  88:level4.c      ****         	      rx_number = 4 ;
  89:level4.c      ****         	  }
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 5


  90:level4.c      ****         	  break;	
  91:level4.c      ****         	          	  
  92:level4.c      ****         case 4 :
  93:level4.c      ****         	  if ( error != 0 )
  94:level4.c      ****         	  	  rx_number = 0 ;
  95:level4.c      ****         	  else
  96:level4.c      ****         	  {
  97:level4.c      ****         	      uart_in_param = temp;
  98:level4.c      ****         	      rx_number = 5 ;
  99:level4.c      ****         	  }
 100:level4.c      ****         	  break;	 
 101:level4.c      ****         	         	  
 102:level4.c      ****         case 5 :
 103:level4.c      ****         	  if ( temp == 0x55 )
 104:level4.c      ****         	      rx_number = 6 ;
 105:level4.c      ****         	  else
 106:level4.c      ****         	  {
 107:level4.c      ****         	  	  rx_number = 0 ;
 140               		.stabn 68,0,107,.LM8-__vector_11
 141               	.LM8:
 142 0048 3093 0000 		sts rx_number,r19
 108:level4.c      ****         	  }
 109:level4.c      ****         	  break;	
 143               		.stabn 68,0,109,.LM9-__vector_11
 144               	.LM9:
 145 004c 2DC0      		rjmp .L1
 146               		.stabn 68,0,77,.LM10-__vector_11
 147               	.LM10:
 148               	.L30:
 149 004e 83E0      		ldi r24,lo8(3)
 150               	.L28:
 151 0050 8093 0000 		sts rx_number,r24
 152 0054 29C0      		rjmp .L1
 153               	.L29:
 154 0056 892B      		or r24,r25
 155 0058 19F0      		breq .L5
 156               	.L25:
 110:level4.c      ****         	          	  
 111:level4.c      ****         case 6 :
 112:level4.c      ****         	  rx_number = 0 ;
 113:level4.c      ****         	  if ( temp == 0xAA )
 114:level4.c      ****         	  {
 115:level4.c      ****                 valid_data_flag = 0x55;
 116:level4.c      ****         	  }
 117:level4.c      ****         	  break;
 118:level4.c      ****         default :
 119:level4.c      ****         	  rx_number = 0 ;
 157               		.stabn 68,0,119,.LM11-__vector_11
 158               	.LM11:
 159 005a 1092 0000 		sts rx_number,__zero_reg__
 160 005e 24C0      		rjmp .L1
 161               	.L5:
 162               		.stabn 68,0,62,.LM12-__vector_11
 163               	.LM12:
 164 0060 2535      		cpi r18,lo8(85)
 165 0062 91F7      		brne .L21
 166               		.stabn 68,0,63,.LM13-__vector_11
GAS LISTING C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/cccVbaaa.s 			page 6


 167               	.LM13:
 168 0064 81E0      		ldi r24,lo8(1)
 169 0066 F4CF      		rjmp .L28
 170               	.L8:

⌨️ 快捷键说明

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