Is there a pasm command to pad data?
Dr_Acula
Posts: 5,484
Quick question - I have a piece of pasm code and I have a 'fit 496' at the end. Is there an instruction that I can add in pasm code that pads out my code so it always takes 496 (or 495) longs?
The reason is that I have a huge screen buffer and I am working on putting all the cog load code into this buffer, loading them into the cog and then recycling the screen buffer.
If my screen buffer is n bytes long, and I then put some cog code in that buffer that is x bytes long, I then need to subtract x from n from the screen buffer (otherwise this doesn't save anything!).
At the moment I'm determining the cog size by trial and error, but I was just wondering if I could ensure that the cog code was always a known size.
Any help would be most appreciated.
The reason is that I have a huge screen buffer and I am working on putting all the cog load code into this buffer, loading them into the cog and then recycling the screen buffer.
If my screen buffer is n bytes long, and I then put some cog code in that buffer that is x bytes long, I then need to subtract x from n from the screen buffer (otherwise this doesn't save anything!).
At the moment I'm determining the cog size by trial and error, but I was just wondering if I could ensure that the cog code was always a known size.
Any help would be most appreciated.
Comments
-Phil
So declare an array of longs at the end of the PASM that has length 496 - $
Getting some much faster downloads for the 256x224 video driver thanks to this. Cheers.