Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!kunivv1!wn2!sommel From: sommel@wn2.sci.kun.nl (Ron Sommeling) Newsgroups: comp.sys.atari.st Subject: Re: Mfpint() Summary: BIOS/XBIOS is not reentrant Message-ID: <336@wn2.sci.kun.nl> Date: 17 Feb 89 10:52:32 GMT References: <8902140121.AA03228@ucbvax.Berkeley.EDU> <825@per2.UUCP> Organization: University of Nijmegen, The Netherlands. Lines: 19 In article <825@per2.UUCP>, dag@per2.UUCP (Daniel A. Glasser) writes: > > Although, technically, you can call BIOS and XBIOS functions from interrupt > level routines, it is not a good idea in general. It is better to set flags > for the application "user-mode" routines to deal with. No, you can't safely call any BIOS or XBIOS function from within an interrupt. Take a look at the trap 13/14 trap-handler! Some registers are copied to an area pointed to by saveptr and then saveptr is updated. If an interrupt occurs after saving some registers in this area but before saveptr is updated, then the saved registers will be overwritten if you call BIOS/XBIOS routines in that interrupt. I can't see why Atari decided to save the registers in the area pointed to by saveptr instead of on the (supervisor)stack. If they did the latter then BIOS/XBIOS would be reentrant. Ron Sommeling email: sommel@wn2.sci.kun.nl