View Single Post
Old 24 June 2012, 14:11   #8
Posts: n/a
> 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?
Page generated in 0.03886 seconds with 10 queries