Write Multiple Words To The Serial Eeprom - Octagon Systems XE–700 Reference Manual

Table of Contents

Advertisement

Comments:
Programming example:
/* Read 10 words starting at word 5*/
unsigned int far*seeDataPtr = new unsigned int[10];
/* Allocate storage /
/ Inline assembly code for Borland C++ 3.1*/
asm {
mov ax,0fc02h
mov bx,05h /* Read starts at word 5*/
mov cx,10 /* Read 10 words */
mov dx,0ffffh
les di,seeDataPtr
int 17h
}

Write multiple words to the serial EEPROM

Function:
Subfunction:
Purpose:
Calling registers:
Return registers:
Comments:
Programming example:
/* Write 8 words starting at word 6*/
unsigned int far*seeDataPtr = new unsigned int[8];
/* Allocate storage /
unsigned int far tmpPtr = seeDataPtr;
for(int I=0;I<8;I++)
seeDataPtr = I; / initialize data /
/ Inline assembly code for Borland C++ 3.1*/
asm {
push
mov ax,0fc03h
mov bx,06h /* Write starts at
mov cx,8
mov dx,0ffffh
lds si,seeDataPtr
int 17h
pop ds
86
02h
03h
This function reads multiple words from the user
area of the serial EEPROM.
fch
03h
To write multiple words to the on–board serial
EEPROM.
AH
AL
BX
CX
DX
DS:SI Source pointer
Carry flag cleared if successful
Carry flag set if error
AL
Error Code
ffh
01h
02h
03h
This function writes multiple words to the
user area of the serial EEPROM.
ds
word 6*/
/* Write 8 words */
Defective serial EEPROM
Illegal access
fch
03h
Word address (zero based)
Word count
ffffh
Error code
Meaning
Unknown error
Function not implemented
Defective serial EEPROM
Illegal access

Advertisement

Table of Contents
loading

Table of Contents