asm6809 Christmas wish

A place to discuss everything Dragon related that doesn't fall into the other categories.
Post Reply
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

asm6809 Christmas wish

Post 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
sixxie
Posts: 1431
Joined: Fri Jul 18, 2008 8:36 am
Location: Hertfordshire
Contact:

Re: asm6809 Christmas wish

Post 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
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: asm6809 Christmas wish

Post by rolfmichelsen »

Thanks. It feels like Christmas came early this year. I will certainly try a build and give it a spin.

-- Rolf
User avatar
rolfmichelsen
Posts: 327
Joined: Wed Apr 08, 2009 8:43 pm
Location: Oslo, Norway
Contact:

Re: asm6809 Christmas wish

Post 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
Post Reply