Page 1 of 1
asm6809 Christmas wish
Posted: Thu Dec 19, 2024 9:37 pm
by rolfmichelsen
Hi sixxie
With asm6809 being my goto tool for any Dragon development work, dare I suggest a few new pseudo-ops to make life even easier? Something along the lines of
Code: Select all
ASSERT condition, message
WARNING message
ERROR message
INFO message
Especially the ASSERT would be tremendously useful when making assumptions about an EQU constant, e.g., when optimizing code based on such assumptions.
-- Rolf
Re: asm6809 Christmas wish
Posted: Fri Dec 20, 2024 10:57 am
by sixxie
Wish granted...
At least, I've added ASSERT - code's in the git repo. Can't guarantee I'll do a release before christmas though
At the moment you can give an optional message, but I'd like to figure out how to make it print the failed assertion if you don't. Trickier than it sounds - only whole lines of source text are held internally, everything else is - by the time the error is generated - only available as an abstract syntax tree.
..ciaran
Re: asm6809 Christmas wish
Posted: Fri Dec 20, 2024 1:28 pm
by rolfmichelsen
Thanks. It feels like Christmas came early this year. I will certainly try a build and give it a spin.
-- Rolf
Re: asm6809 Christmas wish
Posted: Fri Dec 20, 2024 4:22 pm
by rolfmichelsen
Asserts work like a charm. I don't have a big problem with the message-less asserts either. As long as it produces an assertion error and a line reference, that also works for quick tests where I can't be bothered to actually write a meaningful message.
Onward to more robust code, and thanks again.
-- Rolf