Chapter 15: Serial EEPROM
Description
A 1024-word serial EEPROM is available to the user. The serial EEPROM does not
require battery backup to maintain the data when the system power is off. The
serial EEPROM is easily accessible via software interrupts by most programming
languages.
Enhanced INT 17h function definitions
The serial EEPROM definitions include the following functions: Read a single word
from serial EEPROM, Write a single word to serial EEPROM, Read multiple words
from serial EEPROM, Write multiple words to serial EEPROM, and Return serial
EEPROM size.
Serial EEPROM
Read a single word from the serial EEPROM
Function: fch
Subfunction: 00h
Purpose:
To read a single word from the on–board serial
EEPROM.
Calling registers:
AH
fch
AL
00h
BX
Word address (zero based)
DX
ffffh (User area relative address)
9876h (Absolute address)
Return registers:
Carry flag cleared if successful
AX
Word
read
Carry flag set if error
AL
Error
code
Error code
Meaning
ffh
Unknown
error
01h
Function not implemented
02h
Defective serial EEPROM
03h
Illegal
access
Comments:
This function reads a word from the user area of
the serial EEPROM.
Programming example:
/* Read word 2*/
unsigned int seeData;
/* Inline assembly code for Borland C++ 3.1*/
asm {
mov
ax,0fc00h
mov
bx,02h /* Read word 2*/
mov
dx,0ffffh
int
17h
mov
seeData,ax/* store data in c environment */
84