EPC-26A/27 Hardware Reference
Page 42
6
6
SRAM Standard Memory Array
Typically, access to the SRAM is via a file system installed by the device
driver
SRAMDISK.SYS
. For users who wish to bypass the file system and
use the SRAM as a standard memory array, the following ANSI C routine is
provided as an example of how to program an executable file.
#include <stdio.h>
#include <memory.h>
#include <conio.h>
typedef unsigned char UCHAR;
typedef unsigned short USHORT;
typedef unsigned long ULONG;
#define FAR
_far
#define BYTESPERSECTION 0x100
#define EXMID
0x96
#define EXMENABLE
0x00000001
#define LSWLOWBYTE
0x8380
#define LSWHIGHBYTE
0x8381
#define MSWLOWBYTE
0x8382
#define MSWHIGHBYTE
0x8386
#define SRAMDATA
0x8384
UCHAR
Slot
=
5;
/* presumes Flash is in slot 5 */
void
readsection(UCHAR FAR *target, ULONG sramoffset)
{ UCHAR ob;
register USHORT rinductor;
/*
// Enable the card to allow register access
*/
outp(EXMID,Slot);
ob = inp(0x102);
outp(0x102,ob | EXMENABLE);
/*
// Load initial offset value (sramoffset should be
// divisible by 256)
*/
outp(MSWHIGHBYTE,(USHORT) (sramoffset >> 24));
outp(MSWLOWBYTE,(USHORT) (sramoffset >> 16));
outp(LSWHIGHBYTE,(USHORT) (sramoffset >>8));
outp(LSWLOWBYTE,(USHORT) sramoffset);
/*
// Read a section using the autoincrement feature.
*/
for (rinductor = 0; rinductor < BYTESPERSECTION; ri+) {
*+ = (UCHAR) inp(SRAMDATA);
}
outp(0x102,ob);
/* restore the option byte */
}
Содержание EPC-26A/27
Страница 5: ...EPC 26A 27 Hardware Reference Page iv NOTES...
Страница 27: ...BIOS Configuration 2 2 Page 21 NOTES...
Страница 35: ...EPC 26A 27 Hardware Reference Page 28 3 3 NOTES...
Страница 45: ...EPC 26A 27 Hardware Reference Page 38 5 5 NOTES...
Страница 51: ...EPC 26A 27 Hardware Reference Page 44 6 6 NOTES...
Страница 56: ...Page A1 A A Appendix A Mechanical Dimensions Figure 8 EPC Mechanical Dimensions...
Страница 57: ...EPC 26A 27 Hardware Reference Page A2 A A NOTES...
Страница 58: ...Page A1 A A Appendix A Mechanical Dimensions Figure 8 EPC Mechanical Dimensions...
Страница 59: ...EPC 26A 27 Hardware Reference Page A2 A A NOTES...
Страница 64: ...Appendix B Chip Set I O Map Page B5 B B...