Re: [hatari-devel] Re: New GemdosParam variable in debugger (was: EmuTOS startup sequence vs. real TOS) |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi, On 05/03/2018 11:50 AM, Thorsten Otto wrote:
On Mittwoch, 2. Mai 2018 21:41:58 CEST Eero Tamminen wrote:Can somebody explain why e.g. BIOS & XBIOS trap entries don't need to do that in Hatari code?GemDOS_OpCode is executed by emulating the GEMDOS_OPCODE instruction, which is part of the cartridge code. The code there is executed by the TRAP #1 handler, and thus already in supervisor mode, after pushing the trap exception frame. Whereas VDI, BIOS & XBIOS calls are intercepted in newcpu.c, before actually emulating the TRAP instruction.
Thanks. So it's not about in which mode the program calls the trap, but whether there's supervisor mode switch between program pushing the args to stack, and Hatari code processing them? (i.e. as debugger traps GemDOS calls on the trap instruction, like the other OS calls, there's no switch and args for all can be extracted same way.) - Eero
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |