brouhaha / fp09

Motorola MC6839 floating point firmware for MC6809 microprocessor
17 stars 5 forks source link

Working around non-standard macro processor #1

Open gtoal opened 4 years ago

gtoal commented 4 years ago

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!

thorpej commented 2 years ago

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.

gtoal commented 2 years ago

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

thorpej commented 2 years ago

@gtoal Thanks to the pointer!