Page 2 of 2

Re: Which program can you use to convert float into 5 bytes for ASM?

Posted: Wed May 08, 2024 3:20 pm
by mgkaiser
Is there a way to write an assembler macro that takes a float constant and a name and emits "name .byte $00 $00 $00 $00 $00" where "name" is the name specified and the bytes are the float constant?

Re: Which program can you use to convert float into 5 bytes for ASM?

Posted: Wed May 08, 2024 3:21 pm
by mgkaiser
Or even better, bake into one of the 6502 assembler a datatype called ".float" into which you put a float constant and it emits 5 bytes?

Re: Which program can you use to convert float into 5 bytes for ASM?

Posted: Wed May 08, 2024 8:15 pm
by PaulForgey
Mine has .df that does just that.

Re: Which program can you use to convert float into 5 bytes for ASM?

Posted: Thu May 09, 2024 7:31 pm
by mgkaiser
PaulForgey wrote: Wed May 08, 2024 8:15 pm Mine has .df that does just that.
Which assembler is yours? Sounds like it might become mine too....

Re: Which program can you use to convert float into 5 bytes for ASM?

Posted: Sat May 11, 2024 4:27 pm
by PaulForgey
It’s my own project, github.com/PaulForgey/xasm

It’s very picky about petscii source, so be sure you are either natively on the system (I developed it on hardware) or converting your source files.