Intel 386 User Manual page 391

Embedded microprocessor
Table of Contents

Advertisement

Intel386™ EX EMBEDDED MICROPROCESSOR USER'S MANUAL
#else
/*Else in compact, large, or huge memory model*/
wSegment = _FP_SEG(ptMemory);
wOffset = _FP_OFF(ptMemory);
#endif
address*/
lAddress = ((DWORD) wSegment << 4) + wOffset;
_SetEXRegByte(DMACLRBP, 0x0);
/* Write target address, bits 0-7 */
_SetEXRegByte(addrDMATar0_1, (BYTE) (lAddress & 0xFF));
/* Write target address, bits 8-15 */
_SetEXRegByte(addrDMATar0_1, (BYTE) ((lAddress >> 8) & 0xFF));
/* Write target address, bits 16-23 */
_SetEXRegByte(addrDMATar2, (BYTE) ((lAddress >> 16) & 0xFF));
/* Write target address, bits 24-25 */
_SetEXRegByte(addrDMATar3, (BYTE) ((lAddress >> 24) & 0x03));
return ERR_NONE;
}
/*****************************************************************************
SetDMAXferCount:
Description:
Sets the target memory device for the DMA channel specified
by nChannel
PARAMETERS:
nChannel
ptMemory
Returns:
None
Assumptions:
Processor is in real mode.
Syntax:
static char lpsz[]="Hello World";
SetDMATargMemAddr(DMA_Channel0, lpsz);
Real/Protected Mode:
The address calculation from ptMemory assumes the processor is in real
mode.
12-56
/*...grab the segment from the pointer*/
/*...and the offset from the pointer*/
/*Assuming real mode, compute our physical
/*Clear the byte pointer flip-flop */
--channel for which to set target address
--pointer to target memory location

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Intel386 exIntel386 extbIntel386 extc

Table of Contents