Path: utzoo!utgpu!watmath!iuvax!purdue!tut.cis.ohio-state.edu!XEROX.COM!Leisner.Henr
From: Leisner.Henr@XEROX.COM (marty)
Newsgroups: gnu.gcc
Subject: Re: interrupt handlers
Message-ID: <890809-081813-4065@Xerox>
Date: 9 Aug 89 15:17:02 GMT
References: <1989Aug9.020658.2482@esegue.uucp>
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36

[  John Levine sez: 
I suspect that in any real architecture, there will be a few little warts
in
the way interrupts are handled that make it hard to provide the compiler
with
a general interrupt handler that it can generate.  The assembler glue code
required is always short but never quite trivial.  I don't think it's worth
the effort to shove the whole thing into the compiler.  ]

I agree whole-heartedly with the above statement.  I also feel if a
programmer wants to perform such low-level, hardware dependent,
non-portable work as interrupt handling, he should know how to do it
himself and understand  the necessary glue.    

[ John sez:
In many PC compilers, there is a poorly documented keyword "interrupt" so
you can say this:

void interrupt
foo_handler(bp, di, si, ds, es, dx, cx, bx, ax, ip, cs, flags, ...)
]


The interrupt an abomination.  It doesn't really work.  I see people use it
since they don't know the details of generating the glue themselves.  I
don't know how they expect to ever be able to debug their code when it
breaks.  


Real programmers write their interrupt handlers in assembler!

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  leisner:wbst139:xerox
UUCP:  hplabs!arisia!leisner