• Please review our updated Terms and Rules here

Prodos and Applesoft Basic not friends with each other :(

Robuck

Experienced Member
Joined
Jul 30, 2017
Messages
65
Location
Philadelphia PA
Hi, I'm trying to code a roguelike engine on my apple iie in applesoft basic with beagle bros program writer and compiler. My current hurdle is figuring out how to store and load maps. Currently, my program uses string arrays as maps, but it takes a lot of space in my program if I code them directly into the main .bas file. I'd like to use separate .bas files that are executed by the main program, which load map data into an array, and then return to the main file. This way hopefully in the future I can write a map maker program that allows the user to make and save map files.

I've tried all of the commands I could find (load/run, store/restore, exec, etc) but I haven't been able to get any of them to work. Are any of you aware of a guide that can help me? Or a simple solution to this problem? I would even settle for a good example of the correct syntax used for these commands. Any advice is appreciated.
 
Applesoft uses the PRINT CHR$(4) hack for DOS commands, and indeed there is no "CHAIN" or "MERGE" command.

Also, I'm pretty sure that direct string assignment (A$="SOMETHING") doesn't take up string space, it sets the string data to point into the code space. (Assuming of course that you don't later modify those strings.) Those would have to be untangled into string space for a chain command to work, and wouldn't actually save any memory.

Really, the best way (other than using a disk file) would be to reserve HIMEM (I don't know how that works on A2) and poke the map data up there.
 
Back
Top