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

📄 eeprom.lst

📁 winAVR编写的MEGA16内部EEPROM读写程序
💻 LST
📖 第 1 页 / 共 3 页
字号:
 213:C:/WinAVR/avr/include/avr/eeprom.h ****   return result;
 214:C:/WinAVR/avr/include/avr/eeprom.h **** }
 215:C:/WinAVR/avr/include/avr/eeprom.h **** 
 216:C:/WinAVR/avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
 217:C:/WinAVR/avr/include/avr/eeprom.h ****     Read a block of \c n bytes from EEPROM address \c pointer_eeprom to
 218:C:/WinAVR/avr/include/avr/eeprom.h ****     \c pointer_ram.  For constant n <= 256 bytes a library function is used.
 219:C:/WinAVR/avr/include/avr/eeprom.h ****     For block sizes unknown at compile time or block sizes > 256 an inline
 220:C:/WinAVR/avr/include/avr/eeprom.h ****     loop is expanded. */
 221:C:/WinAVR/avr/include/avr/eeprom.h **** 
 222:C:/WinAVR/avr/include/avr/eeprom.h **** void 
 223:C:/WinAVR/avr/include/avr/eeprom.h **** eeprom_read_block (void *pointer_ram,
 224:C:/WinAVR/avr/include/avr/eeprom.h ****                    const void *pointer_eeprom,
 225:C:/WinAVR/avr/include/avr/eeprom.h ****                    size_t n)
 226:C:/WinAVR/avr/include/avr/eeprom.h **** {
 227:C:/WinAVR/avr/include/avr/eeprom.h ****   if (!__builtin_constant_p (n)
 228:C:/WinAVR/avr/include/avr/eeprom.h ****       || n > 256)
 229:C:/WinAVR/avr/include/avr/eeprom.h ****     {
 230:C:/WinAVR/avr/include/avr/eeprom.h ****       /* make sure size is a 16 bit variable.  */
 231:C:/WinAVR/avr/include/avr/eeprom.h ****       uint16_t size = n; 
 232:C:/WinAVR/avr/include/avr/eeprom.h **** 
 233:C:/WinAVR/avr/include/avr/eeprom.h ****       asm volatile ( 
 234:C:/WinAVR/avr/include/avr/eeprom.h ****             ".%=_start:" CR_TAB
 235:C:/WinAVR/avr/include/avr/eeprom.h ****             "sbiw %2,1" CR_TAB
 236:C:/WinAVR/avr/include/avr/eeprom.h ****             "brlt .%=_finished" CR_TAB
 237:C:/WinAVR/avr/include/avr/eeprom.h ****              XCALL " __eeprom_read_byte_" _REG_LOCATION_SUFFIX CR_TAB
 238:C:/WinAVR/avr/include/avr/eeprom.h ****             "st z+,__tmp_reg__" CR_TAB
 239:C:/WinAVR/avr/include/avr/eeprom.h ****             "rjmp .%=_start" CR_TAB
 240:C:/WinAVR/avr/include/avr/eeprom.h ****             ".%=_finished:" 
 241:C:/WinAVR/avr/include/avr/eeprom.h ****           : "=x" (pointer_eeprom),
 242:C:/WinAVR/avr/include/avr/eeprom.h ****             "=z" (pointer_ram),
 243:C:/WinAVR/avr/include/avr/eeprom.h ****             "+w" (size)
 244:C:/WinAVR/avr/include/avr/eeprom.h ****            : "x" (pointer_eeprom), 
 245:C:/WinAVR/avr/include/avr/eeprom.h ****              "z" (pointer_ram)
 246:C:/WinAVR/avr/include/avr/eeprom.h ****            : "memory");
 247:C:/WinAVR/avr/include/avr/eeprom.h ****     }
 248:C:/WinAVR/avr/include/avr/eeprom.h ****   else
 249:C:/WinAVR/avr/include/avr/eeprom.h ****     {
 250:C:/WinAVR/avr/include/avr/eeprom.h ****       if (n != 0)
 251:C:/WinAVR/avr/include/avr/eeprom.h ****         {
 252:C:/WinAVR/avr/include/avr/eeprom.h ****           if (n == 256)
 253:C:/WinAVR/avr/include/avr/eeprom.h ****             {
 254:C:/WinAVR/avr/include/avr/eeprom.h ****               asm volatile (
 255:C:/WinAVR/avr/include/avr/eeprom.h ****                   XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX 
 256:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "+x" (pointer_eeprom),
 257:C:/WinAVR/avr/include/avr/eeprom.h ****                   "=z" (pointer_ram)
 258:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "z"  (pointer_ram)
 259:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "memory");
 260:C:/WinAVR/avr/include/avr/eeprom.h ****             }
 261:C:/WinAVR/avr/include/avr/eeprom.h ****           else
 262:C:/WinAVR/avr/include/avr/eeprom.h ****             {
 263:C:/WinAVR/avr/include/avr/eeprom.h ****               /* Needed in order to truncate to 8 bit.  */
 264:C:/WinAVR/avr/include/avr/eeprom.h ****               uint8_t len;
 265:C:/WinAVR/avr/include/avr/eeprom.h ****               len = (uint8_t) n; 
 266:C:/WinAVR/avr/include/avr/eeprom.h **** 
 267:C:/WinAVR/avr/include/avr/eeprom.h ****               asm volatile (
 268:C:/WinAVR/avr/include/avr/eeprom.h ****                   "mov __zero_reg__,%2"      CR_TAB
 269:C:/WinAVR/avr/include/avr/eeprom.h ****                    XCALL " __eeprom_read_block_" _REG_LOCATION_SUFFIX 
 270:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "+x" (pointer_eeprom),
 271:C:/WinAVR/avr/include/avr/eeprom.h ****                   "=z" (pointer_ram)
 272:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "r"  (len),
 273:C:/WinAVR/avr/include/avr/eeprom.h ****                   "z"  (pointer_ram)
 274:C:/WinAVR/avr/include/avr/eeprom.h ****                 : "memory");
 275:C:/WinAVR/avr/include/avr/eeprom.h ****             }
 276:C:/WinAVR/avr/include/avr/eeprom.h ****         }
 277:C:/WinAVR/avr/include/avr/eeprom.h ****     }
 278:C:/WinAVR/avr/include/avr/eeprom.h **** }
 279:C:/WinAVR/avr/include/avr/eeprom.h **** 
 280:C:/WinAVR/avr/include/avr/eeprom.h **** /** \ingroup avr_eeprom
 281:C:/WinAVR/avr/include/avr/eeprom.h ****     Write a byte \c value to EEPROM address \c addr. */
 282:C:/WinAVR/avr/include/avr/eeprom.h **** 
 283:C:/WinAVR/avr/include/avr/eeprom.h **** void 
 284:C:/WinAVR/avr/include/avr/eeprom.h **** eeprom_write_byte (uint8_t *addr,uint8_t value)
 285:C:/WinAVR/avr/include/avr/eeprom.h **** {
 176               	.LM10:
 177 0066 82E4      		ldi r24,lo8(578)
 178 0068 92E0      		ldi r25,hi8(578)
 179 006a 9D83      		std Y+5,r25
 180 006c 8C83      		std Y+4,r24
 181 006e 8981      		ldd r24,Y+1
 182 0070 8E83      		std Y+6,r24
 183               	.LBB5:
 286:C:/WinAVR/avr/include/avr/eeprom.h ****   asm volatile (
 185               	.LM11:
 186 0072 AC81      		ldd r26,Y+4
 187 0074 BD81      		ldd r27,Y+5
 188 0076 8E81      		ldd r24,Y+6
 189               	/* #APP */
 190 0078 082E      		mov __tmp_reg__,r24
 191 007a 0E94 0000 		call __eeprom_write_byte_1C1D1E
 192               	/* #NOAPP */
 193 007e BD83      		std Y+5,r27
 194 0080 AC83      		std Y+4,r26
 195               	.L13:
 196               	.LBE5:
 197               	.LBE4:
 199               	.Ltext4:
  44:eeprom.c      **** 	eeprom_write_byte(578, aa);                              //把aa值写到EEPROM 0地址处
  45:eeprom.c      ****   eeprom_busy_wait();                                    //等待EEPROM读写就绪
 201               	.LM12:
 202 0082 8091 3C00 		lds r24,60
 203 0086 9927      		clr r25
 204 0088 8270      		andi r24,lo8(2)
 205 008a 9070      		andi r25,hi8(2)
 206 008c 0097      		sbiw r24,0
 207 008e 09F0      		breq .L14
 208 0090 F8CF      		rjmp .L13
 209               	.L14:
  46:eeprom.c      ****   
  47:eeprom.c      **** 	buff[0]=aa%10;
 211               	.LM13:
 212 0092 8981      		ldd r24,Y+1
 213 0094 9AE0      		ldi r25,lo8(10)
 214 0096 692F      		mov r22,r25
 215 0098 0E94 0000 		call __udivmodqi4
 216 009c 892F      		mov r24,r25
 217 009e 8093 0000 		sts buff,r24
  48:eeprom.c      ****   buff[1]=(aa/10)%10;
 219               	.LM14:
 220 00a2 8981      		ldd r24,Y+1
 221 00a4 9AE0      		ldi r25,lo8(10)
 222 00a6 692F      		mov r22,r25
 223 00a8 0E94 0000 		call __udivmodqi4
 224 00ac 9AE0      		ldi r25,lo8(10)
 225 00ae 692F      		mov r22,r25
 226 00b0 0E94 0000 		call __udivmodqi4
 227 00b4 892F      		mov r24,r25
 228 00b6 8093 0000 		sts buff+1,r24
  49:eeprom.c      ****   buff[2]=aa/100;
 230               	.LM15:
 231 00ba 8981      		ldd r24,Y+1
 232 00bc 94E6      		ldi r25,lo8(100)
 233 00be 692F      		mov r22,r25
 234 00c0 0E94 0000 		call __udivmodqi4
 235 00c4 8093 0000 		sts buff+2,r24
 236               	.L16:
  50:eeprom.c      **** 
  51:eeprom.c      ****   while(1)
  52:eeprom.c      ****   {
  53:eeprom.c      ****     Disp(buff); 
 238               	.LM16:
 239 00c8 80E0      		ldi r24,lo8(buff)
 240 00ca 90E0      		ldi r25,hi8(buff)
 241 00cc 0E94 0000 		call Disp
 242 00d0 FBCF      		rjmp .L16
 243               	/* epilogue: frame size=6 */
 244               	/* epilogue: noreturn */
 245               	/* epilogue end (size=0) */
 246               	/* function main size 107 (103) */
 261               	.Lscope0:
 263               		.text
 265               	Letext:
 266               	/* File "eeprom.c": code  107 = 0x006b ( 103), prologues   4, epilogues   0 */
DEFINED SYMBOLS
                            *ABS*:00000000 eeprom.c
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:3      *ABS*:0000003f __SREG__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:4      *ABS*:0000003e __SP_H__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:5      *ABS*:0000003d __SP_L__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:6      *ABS*:00000000 __tmp_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:7      *ABS*:00000001 __zero_reg__
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:83     .bss:00000000 buff
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:89     .text:00000000 main
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp/ccyIbaaa.s:265    .text:000000d2 Letext

UNDEFINED SYMBOLS
__do_copy_data
__do_clear_bss
__stack
DispPortInit
__eeprom_read_byte_1C1D1E
__eeprom_write_byte_1C1D1E
__udivmodqi4
Disp

⌨️ 快捷键说明

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