2 ; void __fastcall__ _sys (struct regs* r);
4 ; Ullrich von Bassewitz, 16.12.1998
13 stx ptr1+1 ; Save the pointer to r
15 ; Fetch the PC and store it into the jump vector
24 ; Remember the flags so we can restore them to a known state after calling the
29 ; Get the flags, keep the state of bit 4 and 5 using the other flags from
30 ; the flags value passed by the caller. Push the new flags and push A.
34 pla ; Current flags -> A
38 pha ; Push new flags value
43 ; Get and assign X and Y
52 ; Set a and the flags, call the machine code routine
58 ; Back from the routine. Save the flags and A.
63 ; Put the register values into the regs structure
78 ; Restore the old flags value