🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.intel
Article #1714

Re: i8237 DMA controller

#1714
From: spalding
Date: Sun, 03 Apr 1988 23:34
29 lines
1814 bytes
You could read the "current word count register", which goes to
0FFFFH at TC (terminal count).  I don't know what peripheral card you're
using here, but usually the peripheral senses the TC signal (from the 8237A,
available on the I/O bus), so the peripheral card should know when
TC is reached and would hopefully provide a status bit or interrupt
signal.

Note that when reading the 8237A's registers on the fly, you have
to read them LSB, then MSB, and it is possible that a DMA cycle
could occur in between, causing the values to be skewed.  However,
unless you are initially setting the word count to values with
the most significant byte = 0FFH, you should be perfectly safe
in reading the word count register and testing for 0FFFFH to 
detect TC.

In general, when reading these registers on the fly, you need
to disable interrupts, read the register twice, enable interrupts, and do
some reasonableness testing on the results, on the assumption that,
at worst, only one DMA cycle could have occured, so that only one of the
readings would be skewed.

BTW, the IBM RT also uses the 8237A, but the 64K boundary problem is
avoided by allowing each 2K block within the 8237A's 64K address space to be
individually mapped to a real page using "translation control
words" (TCWs).

-John W. Spalding
spalding@p.cs.uiuc.edu
Technical Details
Message-ID: <80000001@uiucdcsp>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!rutgers!iuvax!pur-ee!uiucdcs!uiucdcsp!spalding
References: <232@babbage.acc.virginia.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!tut.cis.ohio-state.edu!rutgers!iuvax!pur-ee!uiucdcs!uiucdcsp!spalding
From: spalding@uiucdcsp.cs.uiuc.edu
Newsgroups: comp.sys.intel
Subject: Re: i8237 DMA controller
Message-ID: <80000001@uiucdcsp>
Date: 3 Apr 88 23:34:00 GMT
References: <232@babbage.acc.virginia.edu>
Lines: 29
Nf-ID: #R:babbage.acc.virginia.edu:232:uiucdcsp:80000001:000:1324
Nf-From: uiucdcsp.cs.uiuc.edu!spalding    Apr  3 17:34:00 1988