gauauu Posted August 18, 2014 Share Posted August 18, 2014 While playing with my first small 2600 project, I'm curious how big my project is, and how fast it's growing (I really have no frame of reference yet about how much I can pack into 2K, 4K, bankswitched 8K, etc). I find that when after compiling with DASM, the output .bin file is always exactly 4K in size. If I load it up in a hex editor or stella debugger, I can scan through and see how much of that 4K I've actually used, but that's rather inconvenient. Is there an easier/more convenient way to track how your rom usage is growing? The best way I thought of so far is to watch the symbol table, and visually scan through to find the symbol with the highest address in my main segment. I could write a simple script to automatically parse that out for me and report my ROM usage, but I didn't want to reinvent the wheel if there's already a standard method that people use to keep track of how much they've used? Thanks! Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted August 18, 2014 Share Posted August 18, 2014 ;=============================================================================== ; free space check before End of Cartridge ;=============================================================================== echo "------", [$FFFA - *]d, "bytes free before End of Cartridge" ;=============================================================================== ; Define End of Cartridge ;=============================================================================== ORG $FFFA ; set address to 6507 Interrupt Vectors .WORD InitSystem ; NMI .WORD InitSystem ; RESET .WORD InitSystem ; IRQecho commands are output to the terminal (dos prompt if you're using Windows) when you run DASM. Quote Link to comment Share on other sites More sharing options...
gauauu Posted August 18, 2014 Author Share Posted August 18, 2014 Awesome, thank you. So how does the * work? (It looks like it could be the address of the current position in the file?) Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted August 18, 2014 Share Posted August 18, 2014 If you search dasm.txt (which should have come with dasm) for * you'll find only 8 instances of * in the file. The relevant information is: Symbols: <snip> . -current program counter (as of the beginning of the instruction). <snip> * -synonym for ., when not confused as an operator. Quote Link to comment Share on other sites More sharing options...
gauauu Posted August 19, 2014 Author Share Posted August 19, 2014 Again, thanks! Before posting, I had searched for the * in what turned out to be an outdated version of the dasm manual, which didn't include that snippet you posted. (Turns out that the first google result for "dasm manual" isn't what I want to be using, I guess!) Time to re-download and hold on to the up-to-date version. 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.