Jump to content
IGNORED

32K access from XB


Opry99er

Recommended Posts

Yo...

 

I have been working on an assembly support routine for an XB program. I have a very excellent template to go by that Matthew worked up some time ago, but it accesses the lower 8. Is there any "safe" access to the upper 24 in XB, or does it arbitrarily utilize the space for program stuff?

 

I dont think it starts at the top and works it's way down (which would be awesome) but I am not 100% sure HOW it goes about accessing the upper 24K and IF there is any safe place to stick stuff.

 

Is there a resource I could read that would help me gather some info?

Link to comment
Share on other sites

The upper 24k is reserved for program listing and numeric variables. I don't think you can safely load anything there without it getting obliterated.

 

It's tough to find resources on this... the TI-Tech Pages do not have the Extended BASIC cartridge detailed, a curious omission. The original Editor/Assembler manual and Mosley's primer book are the only resources I'm aware of that discuss bridging to XB.

Link to comment
Share on other sites

Yo...

 

I have been working on an assembly support routine for an XB program. I have a very excellent template to go by that Matthew worked up some time ago, but it accesses the lower 8. Is there any "safe" access to the upper 24 in XB, or does it arbitrarily utilize the space for program stuff?

 

I dont think it starts at the top and works it's way down (which would be awesome) but I am not 100% sure HOW it goes about accessing the upper 24K and IF there is any safe place to stick stuff.

 

Is there a resource I could read that would help me gather some info?

 

XB does, in fact, “start at the top and work its way down”! ;-) You would want to load your ALC routine(s) starting at >A000. CPU RAM >8386 contains the highest available RAM location. You can discover this address (after running your program once) by PEEKing that location (-31866) or just executing the SIZE command and adding that to >A000. As @adamantyr said, this information is in the E/A manual (starting at p. 410).

 

...lee

Link to comment
Share on other sites

Hey, thanks guys!

 

@Senior_falcon: Yea, I was thinking I needed to read up on the TML or XB256 docs after I posted this... You'd be the guy to know about assembly/XB hybridization. :)

 

What I am hoping to do is reserve a spot for roughly 864 bytes of data along with a very small AL routine for some quick display stuff.

 

I am currently using a large chunk of the low 8, so as long as I am careful about not overstepping the SIZE of PROGRAM space (-864-routine) then I should be able to use the bottom of the high memory.

 

And I know XB256 has all this stuff covered (or most of it) as far as the type of stuff I am hoping to do here, but I want to gain some experience while working on this project. :) maybe I'll be able to come up with a custom XB256-style package for my own needs.

 

Thanks a ton, guys.

Link to comment
Share on other sites

This is independent of TML or XB256, and it will do exactly what you want to do. Write your assembly program:

REF DISPLY

BUFFER BSS 864

DISPLY LWPI WKSP

CODE TO DISPLAY STUFF ON SCREEN

LWPI >83E0

B @>006A back to XB

END

Use HMLOADER which loads this code into high memory and sets pointers so an XB program can be added without overwriting the assembly code. Add your XB code - you'll probably Paste XB from Classic99. Save this as an XB program. When you load the XB program the AL code will be part of it, and you can CALL LINK("DISPLY") and the subroutine will run directly from high memory. This leaves low memory alone, so whatever A/L subs are loaded there will be available as well. This also avoids having to use the agonizingly slow assembly loader in XB.

 

(HMLOADER is part of the Missing Link package.)

Edited by senior_falcon
Link to comment
Share on other sites

Very cool! Thank you. :)

 

Yea, I was doing some load-time testing on my game and it takes 1:08 for XB to load about 4K of data and a small assembly routine into the low 8. That is pretty insane. LOL!!!

 

IIRC, we discussed using a custom loader to speed this up quite a bit back a couple years ago. :)

 

Thank you for your help, falcon. As I work to refine the parameters of this game-specific package, I know I will learn alot from your good work on XB256 and TML.

 

Since the game is a series of chained XB programs with paired assy subroutines, having an easily editable package with clearly defined parameters will make life much easier.

 

:thumbsup:

Link to comment
Share on other sites

The upper 24k is reserved for program listing and numeric variables. I don't think you can safely load anything there without it getting obliterated.

 

It's tough to find resources on this... the TI-Tech Pages do not have the Extended BASIC cartridge detailed, a curious omission. The original Editor/Assembler manual and Mosley's primer book are the only resources I'm aware of that discuss bridging to XB.

 

Get a copy of my game IN THE DARK source and the game it used Assembly in the upper 24K and the SAMS too.

 

 

http://atariage.com/forums/topic/213441-rxb-sams-game-in-the-dark/page-2?hl=in+the+dark&do=findComment&comment=3013220

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...