[net.micro.atari16] Calling BIOS from interrupt handlers

glenn@sdcrdcf.UUCP (Glenn C. Scott) (09/22/86)

  Has anyone been able to successfully call BIOS/XBIOS functions from interrupt
handlers ?  There was some discussion on this couple of months ago in the BIX
section of BYTE and the final message said you should subtract 46 from "savptr"
before calling the BIOS function and restoring the previous value of savptr
before returning.  The interrupt handler is supposed to ensure its own
atomicity.  Unfortunatly this doesn't work.

  I've also tried assigning savptr to my own buffer and making BIOS calls which
doesn't work either.

  My application for this is to have Xbtimer() set up an interrupt handler
which, at certain times, sends a byte (or two) out the MIDI port.  But the
usefulness of calling BIOS from interrupt routines is, I'm sure, pretty wide.

Please help !!

Glenn
--------------------------------------------------------------------------------
Glenn C. Scott
System Development Corporation, 2525 Colorado Ave, Santa Monica, CA. 90406 
213-820-4111 X5653	UUCP: glenn@sdcrdcf.UUCP   ARPA: Scott@DOCKMASTER.ARPA

braner@batcomputer.TN.CORNELL.EDU (braner) (09/26/86)

[]

Yeah, that IS a problem.  In my efforts to write a program that will
later, upon an interrupt (say alt-help), stop the running application,
I tried that and still got bombs.  Perhaps because I tried to end that
interrupt handler with TERM (GEMDOS #0), so I'd never have the chance
to add the 46 back in.  I tried both subtracting (or was it adding?)
and not, and got enough cherries for a pie!

- Moshe Braner