Is it legit to issue another trap #14 within an already running trap #14 handler?
E.g. use the value from a different XBIOS call in a given replacement one?
XBIOS call invoking another?
Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team
-
- Moderator
- Posts: 5520
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
XBIOS call invoking another?
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
-
- Fuji Shaped Bastard
- Posts: 2370
- Joined: Sun Aug 03, 2014 5:54 pm
Re: XBIOS call invoking another?
To some degree, yes. However TOS (and also EmuTOS) use the memory that the system variable savptr ($4a2) points to, to save the callers registers. That area is rather limited (5 levels in TOS, 3 in EmuTOS). And of course you are also using more space on the supervisor stack.
-
- Moderator
- Posts: 5520
- Joined: Wed Oct 23, 2002 4:36 pm
- Location: Friedrichshafen, Germany
- Contact:
Re: XBIOS call invoking another?
Understood however is there a different way to invoke existing functionalities for a TSR which will not replace all calls like EmuTOS does?
For my special usecase I can probably work around the need and implement the necessary functionality in my own code but it would be nice to know if it is allowed.
BTW how does it handled Supexec()? This is a call I use very often to given my code SUpervidor rights for hardware access. IIRC I didn't ran into problems with calling more XBIOS stuffs from that one. Ofcourse I have no idea on nesting with the used TOS.
For my special usecase I can probably work around the need and implement the necessary functionality in my own code but it would be nice to know if it is allowed.
BTW how does it handled Supexec()? This is a call I use very often to given my code SUpervidor rights for hardware access. IIRC I didn't ran into problems with calling more XBIOS stuffs from that one. Ofcourse I have no idea on nesting with the used TOS.
Simon Sunnyboy/Paradize - http://paradize.atari.org/
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
Stay cool, stay Atari!
1x2600jr, 1x1040STFm, 1x1040STE 4MB+TOS2.06+SatanDisk, 1xF030 14MB+FPU+NetUS-Bee
-
- Fuji Shaped Bastard
- Posts: 2370
- Joined: Sun Aug 03, 2014 5:54 pm
Re: XBIOS call invoking another?
You can try to call XBIOS from your function, but i would be careful about that. If some other TSR is doing the same, then you sooner or later run into trouble.
Supexec() is not special in this regard. It saves your registers, then calls your function. If that calls XBIOS again, its about the same as other scenarios.
Supexec() is not special in this regard. It saves your registers, then calls your function. If that calls XBIOS again, its about the same as other scenarios.
Re: XBIOS call invoking another?
Profibuch says Atari said (X)BIOS maximum reentrancy level is three (but requires you to manually adjust the save area).
Anyway, this doesn't help you much if somebody else already exhausted that as Thorsten said.
Anyway, this doesn't help you much if somebody else already exhausted that as Thorsten said.