View Single Post
Old 24 June 2012, 14:17   #9
Registered User
Join Date: Jun 2008
Location: Boston USA
Posts: 277
Originally Posted by deg View Post
> That's really incredible. I'm interested how (and if) it works on a real hardware.

I seem to remember that programming TOS on Atari works as follows:

move.w #<parameter>, -(sp) ; push function parameter onto stack
move.w #<function number>, -(sp) ; the function you want to call
trap #21 ; call tos function
add.w #4, sp ; correct stack

the "trap" is like a user interrupt, on both the ST and Amiga you can set a handler for it something like eg move.l #handler, $80

and <function number> might be 1 for open file, 2 for close file, etc in which case a simple tos emulator would look like this:

void handler(int function_number, ...)
if (function_number == 1)
// put code for open file here
else if (function_number == 2)
// put code for close file here

very cool project, with the only problem that most of the worthwhile ST applications would hit the hardware in some way and not be pure TOS/GEM. My guess is that the neochome paint program will not work, however perhaps the "Magic Shadow Archiver" for atari .msa disk images will work?
Correct about the TOS calls above however MSA won't work yet because there's no floppy support. What would be cool would be do get Emutos running as a process in Amiga OS in the same manner as shapeshifter.
frank_b is offline  
Page generated in 0.07948 seconds with 9 queries