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
84 stars 26 forks source link

Default and negative -D values broken. Fixes #83. #84

Closed mungre closed 2 years ago

mungre commented 2 years ago

The new number parser that handles underscores didn't handle negative numbers. This mostly isn't a problem because - is treated as a unary operator in expressions. However, -D numbers on the command line are not expressions so negative numbers stopped working. The default also broke because this parses the string "-1"!

This is rather a significant bug so this fix ought to go into v1.10.

ZornsLemma commented 2 years ago

This was a good spot! FWIW I've had a quick look at the change and it looks good to me. I agree this ought to go into 1.10.

mungre commented 2 years ago

I've fixed a separate but related regression. It wasn't reporting an error for a missing value like -D V=

ZornsLemma commented 2 years ago

Thanks, LGTM!