Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
60 lines (50 sloc) 1.29 KB
; 28C256 EEPROM write
; Page mode used (up to 64 bytes at once, all of them must be in one page)
; Pages are:
; 0000 - 003F
; 0040 - 007F
; ...
; 7FC0 - 7FFF
; Do not forget switch the WREN to the ENABLE position!
; compile
; load
; G 8000
; read memory at 7300h
.ORG 8000h
LXI h,7300h
MVI a,055h
CALL eewrite
MVI a,0AAh
CALL eewrite
MVI a,0DEh
CALL eewrite
MVI a,0ADh
CALL eewrite
MVI a,0BEh
CALL eewrite
MVI a,0EFh
CALL eewrite
MVI a,055h
CALL eewrite
MVI a,0AAh
CALL eewrite
;page write check /data poll
CALL dloop
JMP 0
EEWRITE:
MOV m,a
INX h
STA LASTBYTE
RET
;Wait for real data
;Due to the /DATA polling the data you read will always have D7 inverted
;during the internal write cycle
DLOOP:
DCX h
DLOOP2:
MOV a,m
CPI 0
LASTBYTE EQU $-1
JNZ dloop2
INX h
RET
You can’t perform that action at this time.