Specifications

EPC-5A Hardware & Software Reference Manual
Page 80
66
Bits 3-0 Use the address modifier (in binary form) to determine the
appropriate values for these bits. 2Dh = 0010110
1b
Bit 3 (Address Modifier bit 5) = 1
Bit 2 (Address Modifier bit 4) = 0
Bit 1 (Address Modifier bit 2) = 1
Bit 0 (Address Modifier bit 1) = 0
Thus, 8151h should be set to 1100 1010 or CAh.
5. Map the address.
Add the A16 address to the memory window address
Addr
E0000000h + A16 address
6. Read the data.
Data
value pointed to by Addr
Microsoft C code for Example 1 -
#define WORD unsigned short
#define LWORD unsigned long
WORD addr; /* 16-bit A16 address */
WORD data;
WORD far * wptr;
outp(0x8104,(inp(0x8104)|2)); /* set VME access bit */
outp(0x8130,0xFC);
outp(0x8150,0xFF);
outp(0x8151,0xCA); /* Set address modifier to A16 supervisory access */
wptr = (WORD far *) (0xE0000000L + addr);
data = *wptr; /* Read through window */