In article <851a6j$s4i$1@acme.gcfn.org>, dalloff@gcfn.org (Dave Althoff Jr) wrote: > There is some space starting at $300 (768) but not a whole lot. If > you're > not using hi-res page 2 ($4000-$6000 (16384-24576) that is fairly safe > because > it is out in the middle of nowhere...and you know your Applesoft program > isn't > going to go up that far because it will crash into hi-res page #1 first > (Applesoft program lines build up from $800, typically. And I have had a > few that overran the first hi-res page). Almost as safe is up around > $6000 (24576) again, because Applesoft doesn't usually use much space up Guys, guys, don't you know anything about programming the Apple? You just can't POKE all over the place and hope you've stumbled on some unused memory area! If you want a piece of free space, you have got to make sure that it's free, not blindly stumble in with your fingers crossed. Ordinarily, all of the memory is reserved, with the exception of $300-$3CF. But there are several areas where you can put your data, if you prepare for it in the right way. - Between the text screen and the Applesoft program: set the start of the program to, for instance, $0A00 and you have 512 bytes of free space between $0800 and $09FF: POKE 103,1: POKE 104,10: POKE 2560,0: NEW Hoever, this is something that must be done before loading your program, so it isn't very popular. (There are ways to do it from inside a program, but I'm not going to bore you with details.) - Between the end of the program and the variables. You can achieve this with doing a LOMEM and then loading your data, or you can glue your data to the end of the program before you save it: Check where the program ends with PEEK(175)+PEEK(176)*256. Load your data at this address. Add the size of the data to the address and POKE that value in 175~176. Then save the program. And your data will stick there, even if you modify the program! (Note that the location of the data may change by modifying, though.) - Between the variables and the string space. Ordinarily, the strings will use all of available memory, but you can restrict them to stay above memory address, say, 32768, by doing a POKE 109,0: POKE 110,128. Then you have room below 32768 to put your data. Warning: do these POKEs only after the program has allocated all variables, because creating new variables tends to push 109~110 up. - Between the string space and the DOS buffers (note: DOS 3.x only): use HIMEM to set the end of the string space to any value you want and load your data above it. - Between the first DOS buffer and the other DOS buffers (note: ProDOS only): use HIMEM to set the end of the string space to any value you want and load your data 1K above the value of it. Of course, you can also load your data in other memory banks, but those banks aren't always switched in, so you can't get to it directly. I'm not about to do a discourse about the uses and pitfalls of bank switched memory here... -- Groetjes, Pim Same excuse every time In article <8je5lj$806$1@nnrp1.deja.com>, bobryan9@my-deja.com wrote: > I am looking for the following Applesoft Memory locations: > I've found these so far: $67 $68 load location $69 $6A (Lomem) start of variable space and usually same as end of program unless lomem was altered $6b $6c pointer to array memory space $6d $6e a pointer to end of variable space, this grows up. $6f $70 a pointer to start of string space $73 $74 end of string space + 1 byte. is set by himem $75 $76 LINE NUMBER being executed location $79 $80 address of line number being executed $AF $B0 end of program Any you can add? I am looking for the CALL to RUN a specific line after you poke $75,$76,$79,$80 with the line and address of the line. Or, what is required to RUN another program that is IN MEMORY, without erasing variables? I do not want to use CHAIN. Bob Sent via Deja.com http://www.deja.com/ Before you buy.