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

All aspects of programming on the Commander X16.
mgkaiser
Posts: 60
Joined: Sat Dec 02, 2023 6:49 pm

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

Post 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?
mgkaiser
Posts: 60
Joined: Sat Dec 02, 2023 6:49 pm

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

Post 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?
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

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

Post by PaulForgey »

Mine has .df that does just that.
mgkaiser
Posts: 60
Joined: Sat Dec 02, 2023 6:49 pm

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

Post 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....
PaulForgey
Posts: 17
Joined: Tue Mar 12, 2024 3:12 am

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

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