[net.micro.pc] More on Interrupts

HUNEYCUTT%GUNTER-ADAM@sri-unix.UUCP (11/08/83)

From:  Doug <HUNEYCUTT@GUNTER-ADAM>

Please don't use the phrase "MS-DOS/PCDOS" in any context concerning
interrupts.....the slight perversion of the Microsoft-defined
interrupt structure by Big Blue has caused me no end of headaches.

Under standard (pre 2.0) MS-DOS, interrupts 0-4 are hardware defined.
Microsoft scarfed up interrupts 20H-27H for the DOS interface under
1.0, with some higher ones used for 2.0 up.  Software that uses only
the Microsoft defined entry points (like code generated by C86) has no
problem being transfered between the IBM-PC, the Z-100, TI-PC, ...ad
nauseum.

The real rub (and above mentioned headaches) come when someone has
written code that uses the blasted BIOS direct entries (most commonly
INT 10H for screen manipulation).  This code generates the phrase
'WILD INTERRUPT' under Z-DOS, and has been known to totally crump
machines other than the PC and clones.  This has caused such logical
trains of thought in the military management as "If it doesn't run on
the Z-100 just like it does on the PC, the Z-100 must not be a good
machine."  Convincing managers that machine-dependent code is
generally avoidable insanity is hard to do.

While most useful programs available must use cursor positioning, but
this doesn't necessarily mean that they have to do BIOS calls to
accomplish this.  Most of my experience is in the CP/M world, where
most packages are either patchable or can be configured thru a
separate program.  The Z-100 contains in ROM the code that the MS-DOS
BIOS calls to display characters, position cursor, change colors, etc.
However, these functions are invoked the same way as with an
H-19...through escape sequences in a print string or sequence of
characters sent one at a time.  This allows a program to use standard
DOS calls to manipulate the screen any way that is desired.  You CAN
do screen manipulation through BIOS calls or direct memory access, but
this results in loss of portability.

If the only way available on the PC to position the cursor is to do an
INT 10, is sounds like a (successful) attempt to assure that code for
the PC can't run on the others.  I've written several 'intercept'
routines to get stuff running, but the results have been slow.

Again, Zenith is still running DOS 1.25, so I don't know anything
about 2.0 or later.  If the device drivers I've been hearing so much
about are similar enough to Unix drivers, maybe we can avoid this mess
entirely.

Please don't take this as a total condemnation of PC-DOS.  There are
obviously times when direct BIOS access is essential....but I refuse
to believe that standard DOS calls can't meet the vast majority of
code requirements.

Doug