[comp.sys.atari.st] bconinning

kbad@atari.UUCP (Ken Badertscher) (03/07/89)

This is a reply to a mail query I recieved regarding hooking into the
system console input routines.  Basically the question boiled down to:
"How do I do something at the BIOS level before GEMDOS gets ahold of an
input character?"

================

As you may have guessed, GEMDOS gets all its character input by trapping
into the BIOS.  Not only that, but (thank goodness) the BIOS has a RAM
based jump table for its* character IO, and it actually uses that jump
table. 

Starting at $51e, there are four sets of 8 vectors for character device
functions, as follows:

*--- "soft" console vectors
xconstat:	ds.l	8	; (51e)  console status vectors
xconin:		ds.l	8	; (53e)  console input vectors
xcostat:	ds.l	8	; (55e)  console output-status vectors
xconout:	ds.l	8	; (57e)  console output vectors

Each set of vectors consists of the addresses of the routines that
handle the BIOS character devices (in the following order):
0 - lst: (printer)
1 - aux: (rs232)
2 - con: (screen)
3 - midi
4 - keyboard (output only)
5 - raw console output (bypass vt52 pressure cooker)
6 - reserved
7 - reserved

and, as comments in the BIOS source indicate:
* No range checking is performed.  If a bogus device number
* is passed to the BIOS' character I/O handler, the system
* will crash or become funky duex.
*
* BIG BUG: ikbd and midi output status are reversed.  Sorry, kids.
* For compatibility, we won't fix it.  (But we should!)

Armed with all that information, you should probably be able to do what
you need at BIOS level by replacing the built-in input and input status
routines with your own. 

-- 
 Ken Badertscher                 | Hey, umm, the stuff I said up there
 Atari R&D Software Engine       | is, like, what _I_ think, okay?
 {portal,ames,imagen}!atari!kbad | So, y'know, don't bug Atari about it.

fgbrooks@pnet01.cts.com (Fred Brooks) (03/09/89)

Hello Ken. I'm setting up a hard disk using a adaptec 5580 controller and a
SMD 80 mb disk drive. I need some info about sending data "commands" to the
DMA port so I can format and setup the drive for GEM. An example in C,
Modula-2 or assemply would do. 

UUCP: {nosc ucsd hplabs!hp-sdd}!crash!pnet01!fgbrooks
ARPA: crash!pnet01!fgbrooks@nosc.mil
INET: fgbrooks@pnet01.cts.com