PNut Memory allocation issues
ozpropdev
Posts: 2,793
Hi Guys
I am having a problem with Pnut handling memory allocation.
In my Invaders code I have most of my game data at the end of the code.
These are sorted in order of LONGS,WORDS and BYTES mainly for neatness.
My video buffer is "long aligned" for efficiency of the VGA driver.
The code only works if the video buffer is at the end of all the above stuff.
If I place it at the top of all the "longs" , the code fails.
It doesn't make any sense. The longs are still aligned Ok.
I have even tried padding the video buffer at both ends in case of some code bug, no change.
Chip, does your in-house Pnut have the facility to output ".LST" style compiler output for your own debugging?
As "Bender" in Futurama once said about dreaming of 1's and 0's...I think I saw a 2!
Any ideas?
Cheers
Brian
I am having a problem with Pnut handling memory allocation.
In my Invaders code I have most of my game data at the end of the code.
These are sorted in order of LONGS,WORDS and BYTES mainly for neatness.
My video buffer is "long aligned" for efficiency of the VGA driver.
The code only works if the video buffer is at the end of all the above stuff.
If I place it at the top of all the "longs" , the code fails.
It doesn't make any sense. The longs are still aligned Ok.
I have even tried padding the video buffer at both ends in case of some code bug, no change.
Chip, does your in-house Pnut have the facility to output ".LST" style compiler output for your own debugging?
As "Bender" in Futurama once said about dreaming of 1's and 0's...I think I saw a 2!
Any ideas?
Cheers
Brian
Comments
Thanks Chip. That will be very useful!
Cheers
Brian
Here's the latest PNut.exe in a zip file:
PNut.zip
You'll want to use F11 to compile and download PASM programs. To view a list file, use CTRL-M to toggle back and forth.
I solved my memory allocation issue. It turned out to be a defective me all along!
Cheers
Brian
??? I think you have the wrong forum ???