?? readwriteeeprom.s
字號(hào):
.module ReadWriteEEPROM.c
.area text
.dbfile E:\grc\licc\例子10.3.3\ReadWriteEEPROM.c
.dbfunc s main _main fI
; temp -> R20
; i -> R20
.even
_main::
.dbline 7{
; // These work for devices with more than 256 bytes of EEPROM
; //int EEPROMwrite( int location, unsigned char);
; //unsigned char EEPROMread( int);
; #include <io8515.h>
; #include <eeprom.h>
; void main(void)
; {
.dbline 8
; unsigned char temp =0xaa,i;
ldi R20,170
.dbline 9
; EEPROMwrite(0x20,temp); /* 寫(xiě)E2PROM 地址0x20 */
mov R18,R20
ldi R16,32
ldi R17,0
rcall _EEPROMwrite
.dbline 10
; i=EEPROMread(0x20); /* 讀E2PROM 地址 0x20 */
ldi R16,32
ldi R17,0
rcall _EEPROMread
mov R20,R16
.dbline 11
; i++;
inc R20
.dbline 12
; EEPROMwrite(0x30,i);
mov R18,R20
ldi R16,48
ldi R17,0
rcall _EEPROMwrite
.dbline 13}
; }
L1:
ret
.dbsym r temp 20 c
.dbsym r i 20 c
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -