DIRECT MEMORY ACCESS UNIT

 

 

 

 

 

SECTORS

MOV

AX, 512

 

; THE DISK READS IN 512 BYTE

MOV

DX, D1TC

 

; XFER COUNT REG

 

 

 

OUT

DX, AX

 

 

; NOW WE NEED

TO SET THE PARAMETERS FOR THE CHANNEL AS FOLLOWS:

;

 

 

 

 

;

DESTINATION

SOURCE

 

;

-----------

------

 

;

MEMORY SPACE

I/O SPACE

 

;

INCREMENT PTR

CONSTANT PTR

 

;

 

 

 

 

; TERMINATE ON TC, INTERRUPT, SOURCE SYNC, HIGH PRIORITY RELATIVE TO

; CHANNEL 0, BYTE XFERS, USE DRQ PIN FOR REQUEST SOURCE. ARM CHANNEL.

 

MOV

AX, 1010001101100110B

 

 

MOV

DX, D0CON

 

 

 

OUT

DX, AX

 

 

; REQUESTS ON

DRQ1 WILL NOW RESULT IN TRANSFERS

CODE_SEG

ENDS

 

 

DATA_SEG

SEGMENT

 

 

SOURCE_DATA_1DB '80C186EC INTEGRATED PROCESSOR'

DEST_DATA_1DB

30 DUP('MITCH')

; JUNK DATA FOR TEST

DISK_BUFF

DB

512 DUP(?)

 

DATA_SEG

ENDS

 

 

 

END START

 

 

 

 

 

 

 

Example 10-1. Initializing the DMA Unit (Continued)

10-25

Page 280
Image 280
Intel 80C188XL, 80C186XL user manual 10-25