From: Shawn Jefferson (shawnjefferson_at_24fightingchickens.com)
Date: 2003-10-28 23:00:57
On Mon, 27 Oct 2003 12:03:37 -0800, I wrote: I have to revise my multiple load segment instructions since I didn't understand how the stack, heap and bss segments were related. >With this setup I have two segments in my executable file that DOS >will load at $2000 and $8000 respectively, leaving the extended bank >window ($4000-$7FFF) alone. Using this method you need to be careful >not to allocate too much memory since the BSS section is in the >smaller chunk of memory. By carefully placing mycode into either >CODE, or CODE2 segments and not using malloc I was able to avoid any >potential problems. As you can see, it may be easier to write your >own crt0.s file with the modified values. This paragraph needs to read: >With this setup I have two segments in my executable file that DOS >will load at $2000 and $8000 respectively, leaving the extended bank >window ($4000-$7FFF) alone. Using this method you need to be careful >not to use dynamic memory allocation (malloc and friends) since the BSS >section has been moved. The heap location is calculated using the stack >(located just below MEMTOP) and the BSS segment location. (See the _heap.s >library source file.) By carefully placing code into either CODE, or CODE2 segments >and not using malloc I was able to avoid any potential problems. As you can see, >it may be easier to write your own crt0.s file with the modified values, and possibly >a modified _heap.s file. >[end] Feel free to edit this, or change it around. This was a first draft and I probably didn't put things in the most succinct way possible. Perhaps this is too much for the platform dependent documentation? Christian can you look it over and add it to the atari.sgml file if everything is to your liking? Thanks, -- Shawn Jefferson ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-10-28 23:04:45 CET