Heaven/TQA Posted July 22, 2013 Share Posted July 22, 2013 Jesus... I am used to INIT/RUN since for more than 20 years and first I thought this is common on every plattform until I did some C64/VIC stuff... and I was thrown back to 70s . in Superpacker (as you need to crunch your data anyway at the end)... you can set/delete/pack each segments separatly. There is Windows tool available. I used this memory overlay concept with segemts for some demos which run on 64k machines but have additional FX on >64kb machines... so I did a memtest segment INIT memtest, store the amount of RAM banks available load effect1 at $4000... INIT set_next_bank load effect2 at $4000... INIT set_next_bank load effect3 at $4000... load main part RUN main 2 Quote Link to comment Share on other sites More sharing options...
morelenmir Posted August 28, 2013 Author Share Posted August 28, 2013 (edited) Are segments ordered at all or they just loaded in the order they occur in the source file? For instance: ORG $3000 <some instructions> ORG $600 <some instructions> ORG $2E0 WORD $3000 Would the specified code be loaded into address $3000 onwards first, then code be loaded in $600 onwards and then finally a WORD value at $2E0. OR would they be loaded in numerical order, ignoring the order the segments occur in the source? Edited August 28, 2013 by morelenmir Quote Link to comment Share on other sites More sharing options...
Xuel Posted August 28, 2013 Share Posted August 28, 2013 Segments are loaded in the order they appear in the file, not in the order of their destination memory locations. Quote Link to comment Share on other sites More sharing options...
+JAC! Posted August 29, 2013 Share Posted August 29, 2013 (edited) Correct, but beware that there are compilers which sort the segments by address before they write them to the file, like e.g. ATASM. There have to use special options to keep the order defined in the source. MADS always uses source code order. Edited August 29, 2013 by JAC! 2 Quote Link to comment Share on other sites More sharing options...
ricortes Posted August 31, 2013 Share Posted August 31, 2013 (edited) Almost off topic considering modern tools and techniques. You can just use a disk with a MEMSAV and DOS. MEMSAV is useful for going to DOS w/o losing your BASIC or ED/ASM source, but it also works with any binary you may have in memory. It can be pretty useful in a lot of different circumstances. For instance, some one has a page 6 VBI music program you want to use in your program but don't have the source. Just use binary save w/o RUN or INIT vectors and then use COPY with the append /A option to prepend it to your program. Edited August 31, 2013 by ricortes 1 Quote Link to comment Share on other sites More sharing options...
Rybags Posted September 1, 2013 Share Posted September 1, 2013 The AtAsm trait of putting the file in memory order is very annoying. But using .bank directive between every origin change forces it to create your object file in the intended way. MEM.SAV is superceded in some cases these days by the better Doses which do save/restore of the low main Ram area to extended Ram either under the OS or PortB banked. However with IDE class devices it's often better/faster to use the file based MemSav as it's usually quicker for the Dos to do the save/restore operation and has the additional benefit that some even allow saving work area across powerdowns. Quote Link to comment Share on other sites More sharing options...
morelenmir Posted September 1, 2013 Author Share Posted September 1, 2013 I have heard about certain 'battery-backed RAM expansions' which might also be apropriate to this. MADS scores again it would seem! I really like ATAsm, but... There are sadly fewer and fewer reasons to use it. Quote Link to comment Share on other sites More sharing options...
Kyle22 Posted December 18, 2018 Share Posted December 18, 2018 (edited) You can also append segments to do certain functions such as FF FF C6 02 C6 02 00 to make the screen background black, IIRC. In that case, the FF FF is optional. It could be C6 02 C6 02 00. It's late, and that's from the 'top of my head', but it sounds right. Edit: Typo. Edited December 18, 2018 by Kyle22 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.