Concise Atari ST 68000 Programmer's Reference Guide
To access the GEM BIOS functions, push the parameters in the order given onto the stack and then call Trap #13. Reply or status is returned in register D0 and the data placed on the stack trashed.Typical use might be:
move.w driveA,-(sp) * push device code move.w record,-(sp) * push record to start move.w count, -(sp) * push no, of sectors move.1 address,-(sp) * push buffer address move.w #0, -(sp) * push read data eove.w #4, -(sp) * push swabs function call trap #13 * call the function add.w #14,sp * tidy the stack tst.w D0 * test for error its
It is the programmers responsibility to tidy the stack after the call. The BIOS, accessible from user mode, is re-entrant to three levels of calls, users are advised that this non-standard feature should be used wisely where program portability is required.