Primordial Ooze Posted October 8, 2012 Share Posted October 8, 2012 Is there some way to have disam display how much rom space remains everytime you compile your homebrew? I remember someone saying something allong the lines of: echo "bytes free:" *-$F800 But thatonly produces garbage output. Any assistance in this matter would be greatly appreciated. Sincerely, Primordial Ooze Quote Link to comment Share on other sites More sharing options...
Omegamatrix Posted October 8, 2012 Share Posted October 8, 2012 You can do something like this: ECHO ([$FF00-*]d), "bytes free" ORG $FF00 ;code continues That will print the number of bytes left (in decimal). DASM will print it twice though, and if you have multiple banks it gets kind of ugly. One solution is to wrap each echo statement inside an IF statement, and have the condition that defined after the echo statement. What happens is the first pass DASM doesn't know if the IF statement is true or false, so it doesn't execute it. On the second pass the IF statement is resolved, and DASM executes it, so it only prints once, not twice. Example: IF ECHO_1 ECHO ([$FF00-*]d), "bytes free bank 1" ENDIF ECHO_1 = 1 ORG $FF00 ;code continues The address in your echo statement should match the address in the org statement after it, and if you have multiple ECHO statements give them all unique conditions (I called mine ECHO_1 in the above example, call yours whatever you like). 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.