fp09 icon indicating copy to clipboard operation
fp09 copied to clipboard

Working around non-standard macro processor

Open gtoal opened this issue 5 years ago • 3 comments

I hacked up a quick macro processor to expand the user-defined macros in the .sa files.

Not extensively tested, but I've finished all I'll be doing with it. If it is helpful to anyone, pick it up from http://gtoal.com/src/asm-expand/expand.c ( http://gtoal.com/src/asm-expand/expand.c.html )

I think a subsequent pass will be needed to convert from this assembly language to some current assembler format, even after macro expansion. It doesn't look like a format any current assembler that I'm aware of can handle. Also some pretty-printing to tidy up the final source files wouldn't hurt!

gtoal avatar Apr 02 '20 16:04 gtoal

I have a need for a 6809 FP library, and I stumbled upon this and want to say thanks for doing this macro expander! I'm taking a different tack and actually modifying the code manually... sometimes I expand the macros manually, sometimes I replace them with new ones that work with asm6809.

In any case, there definitely are bugs that will need fixing in the fp09 code itself. In particular, the VALID function's missing tail. I think I know what needs to be done to fix that, but there might be more glitches like that lurking elsewhere.

thorpej avatar Jun 27 '22 17:06 thorpej

In any case, there definitely are bugs that will need fixing in the fp09 code itself. In particular, the VALID function's missing tail.

You might also find these helpful: Lennart Lindell fixed the missing code fragments: http://lell.se/hacks/float09/float09.zip and Tim Lindner recreated the manual: http://tlindner.macmess.org/?page_id=691

gtoal avatar Jun 27 '22 19:06 gtoal

@gtoal Thanks to the pointer!

thorpej avatar Aug 04 '22 01:08 thorpej