Page 1 of 1

asm6809 2.2 released

Posted: Thu Aug 07, 2014 2:33 pm
by sixxie
http://www.6809.org.uk/dragon/asm6809.shtml

Windows build.

Since 2.1:
  • Speed improvements.
  • Fix crash on empty input.
  • Fix crash on bad indexed operand.
  • Minor memory leak fixes.
  • Added simple manpage.
The speed increases are significant on larger input files.

Re: asm6809 2.2 released

Posted: Thu Aug 07, 2014 3:24 pm
by sorchard
Excellent :) This has rapidly become my favourite assembler.

Incidentally I've been using the following in a macro to do alignment:

org * + ((-*) & (&1-1))

I wondered if anyone knows of a less ugly way of doing it. I've seen a couple of examples that look nicer but fail when the pc is already aligned.

Re: asm6809 2.2 released

Posted: Thu Aug 07, 2014 3:44 pm
by sixxie
No and I might have to nick your approach in future ;)

Re: asm6809 2.2 released

Posted: Mon Aug 11, 2014 8:25 pm
by Bosco
Thanks sixxie. It's great to have a choice of supported assemblers. :D
sorchard wrote:Incidentally I've been using the following in a macro to do alignment:
org * + ((-*) & (&1-1))
Sounds very useful but I'm not sure I understand the calculation. Is the asterisk a substitute for the address following ORG?

I should say, I'm not familiar with macros either. :oops:

Re: asm6809 2.2 released

Posted: Mon Aug 11, 2014 10:31 pm
by sorchard
Macros take all the misery out of making tea...

align macro
org * + (-* & (&1-1))
endm

If you have the above macro defined in your source then you can have statements like the following:

align 32

This will advance the pc (program counter) to the next 32 byte boundary or leave it where it is if already aligned.

* is simply the current value of the program counter. &1 represents the first parameter passed to the macro, 32 in the example, so the macro call becomes the following code:

org * + (-* & 31)

All it is doing is adding just the right amount to the pc to achieve the required alignment. Note that the formula is really only useful for aligning to powers of 2.

Re: asm6809 2.2 released

Posted: Mon Aug 11, 2014 11:17 pm
by Bosco
Cool, thanks for the info sorchard. I'm learning something new everyday. :D