+Larry Posted June 5, 2008 Share Posted June 5, 2008 Does anyone have any info on Page Zero usage in TBXL? Presumably it uses the zero page exactly like Atari Basic, but that may not be true. I have an ABBUC manual, but it is in German, so the odds are high that if it is in the manual, I've missed seeing it. I am especially interested in $CB - $D1 which I frequently use in ML routines. Thanks, Larry Quote Link to comment Share on other sites More sharing options...
peteym5 Posted June 6, 2008 Share Posted June 6, 2008 Larry, you are in luck. Turbobasic does not use these bytes for anything because I have wrote ML routines that uses those zero page locations. I have also seen people use bytes $00 to $07 that are like for the cassette buffers and used only when the Atari is being powered up. If you are having additional problems, you can also consider using self modifying code. That is instead of using LDA ($CB), Y you can use LDA $FFFF,Y and change the values for $FFFF. The only drawback is it has to be memory location specific, like if the routine is loaded into page 6. Quote Link to comment Share on other sites More sharing options...
Rybags Posted June 6, 2008 Share Posted June 6, 2008 (edited) Using locations 0-7 isn't always advisable. I forget which one, but either location 0 or 1 can cause problems on the 600XL OS with warmstarts (600XL OS, I mean the one which instantly reboots if you insert/remove a cartridge, rather than going into a wait like later versions). 2,3 is CASINI - fine to do whatever there so long as bit 1 in the boot flags (location 9) is a 0. No idea about the pointers around the $80-$C0 range but they're best left well alone. Of course, you might want to reference them if you want to relocate string addresses but I think we established that the technique might not work in compiled T-Basic programs (?) $D2-$FF pretty much used by the Floating Point routines, so not available either. However, within a USR routine you can generally use the FP locations as you wish for workspace. Just totally avoid using them in interrupts or user-supplied handlers etc. There's a number of OS locations in the range $08-$7F that you can get away with using in certain circumstances - I think we might have gone over it in another thread somewhere. However, all of those locations will be reset on a warmstart. A good technique is to just keep the z-page workspace you want copied to upper RAM. Then just copy it back down at the start of your routine, back up at the end. Edited June 6, 2008 by Rybags Quote Link to comment Share on other sites More sharing options...
+Larry Posted June 6, 2008 Author Share Posted June 6, 2008 Larry, you are in luck. Turbobasic does not use these bytes for anything because I have wrote ML routines that uses those zero page locations. I have also seen people use bytes $00 to $07 that are like for the cassette buffers and used only when the Atari is being powered up. If you are having additional problems, you can also consider using self modifying code. That is instead of using LDA ($CB), Y you can use LDA $FFFF,Y and change the values for $FFFF. The only drawback is it has to be memory location specific, like if the routine is loaded into page 6. Thanks to both of you for your replies. I had never thought of using self-modifying code! -Larry 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.