stardot / beebasm

A portable 6502 assembler with BBC Micro style syntax
http://www.retrosoftware.co.uk/wiki/index.php/BeebAsm
GNU General Public License v3.0
83 stars 26 forks source link

Suppress “no save” warning if other output commands are present (or allow warning to be suppressed manually) #78

Closed markmoxon closed 1 year ago

markmoxon commented 1 year ago

Currently BeebAsm outputs a warning if a source file doesn’t contain a SAVE command. This can’t be turned off.

It is common to create source files that create disc images using PUTFILE and PUTBASIC only, such as this example. These files always give this warning, even though they are perfectly valid.

Would it be sensible to amend the warning so it is only shown if the file doesn’t contain SAVE or a PUT command? Or, alternatively, add a directive or command line flag to allow us to suppress the warning on a per-file basis?

It’s a minor thing, but it would be great not to see this error at the end of every compilation run!

mungre commented 1 year ago

If you've done a PUT and assembled some code but forgotten to SAVE it then the warning would still be useful. So maybe warn when there hasn't been a save and the memory has changed (i.e. isn't all zeroes).

This would suppress the warning when there are only PUTs, and also when the source file does nothing at all, but that doesn't seem like a problem.

mungre commented 1 year ago

P.S. Rather than checking if the memory is zero, it makes more sense to check if any of the memory has the USED flag.

markmoxon commented 1 year ago

That sounds like a good solution - keeping the warning for genuinely unsaved code is important.

mungre commented 1 year ago

Cheers, it's here: #79

markmoxon commented 1 year ago

Thank you for the fix, it's working nicely!