Robert S64 Posted July 2, 2011 Share Posted July 2, 2011 Greetings everyone. I have a little problem with 3 emulators. (I hope this is the right forum). I searched everywhere to find a solution (or lack thereof) When using 3 emulators, (Atari800win Plus 4.0, XFormer and don't know the name of the third. It's an older DOS one) I try to use a USR(X) routine, they all crash. I thought I may have missed something with my code but it was very simplistic so I did a simple... POKE 1536,96 (RTS) A=USR(1536) Crash It happens with all ROMS. OSA, OSB, XL/XE Anyone know of a resolution for this? Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted July 2, 2011 Share Posted July 2, 2011 You might find this useful :- http://www.atariarchives.org/roots/chapter_8.php You need a PLA before the RTS to "clear the stack" Quote Link to comment Share on other sites More sharing options...
Robert S64 Posted July 2, 2011 Author Share Posted July 2, 2011 Ahhhh. Thank you thank you very much. When I added one PLA it still crashed. Then it started all coming back to me. There is a 3 byte stack. Thanks a ton Quote Link to comment Share on other sites More sharing options...
Rybags Posted July 2, 2011 Share Posted July 2, 2011 (edited) 1st stack entry, always has to be pulled = number of parameters, 00 = none e.g. USR(routine) e.g. 01 - 1 parameter, like USR(routine,parm1) Each parameter if supplied is another 2 bytes you have to pull. High byte comes off first, then low each time. Edited July 2, 2011 by Rybags Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.