Jump to content
IGNORED

Turbo Basic Page Zero Usage?


Larry

Recommended Posts

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Rybags
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...