Help with conversion floating point to 4 byte for apple1

Topics pertaining to the emulation or simulation of the 65xx microprocessors and their peripheral chips.
Post Reply
Powersoft
Posts: 31
Joined: 13 May 2021
Location: Hellevoetsluis-NL

Help with conversion floating point to 4 byte for apple1

Post by Powersoft »

Hello,

I wont to implement the floatingpoint routines from Steve Wozniak.
Enaugh info is availble on the web but
I Have trouble to convert a float to the 4 byte format, and back.

In the source I found as an example 1.4426950409 => $80,$5C,$55,$1E

Can someone explane me the conversion.

Thank for any help.

Cheers,

Jan
User avatar
barrym95838
Posts: 2056
Joined: 30 Jun 2013
Location: Sacramento, CA, USA

Re: Help with conversion floating point to 4 byte for apple1

Post by barrym95838 »

It's not super-complicated, but I stalled on my attempts due to a secret combination of lack of spare time, lack of enthusiasm, and lack of talent. I speculate that a small improvement in any of those three qualities could have produced working code, but that's just the way the cookie crumbled. Maybe later ...

viewtopic.php?f=2&t=5652

viewtopic.php?f=1&t=3633

viewtopic.php?f=2&t=5724

viewtopic.php?f=2&t=5879&p=72341&hilit=wozfloat#p72341
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!

Mike B. (about me) (learning how to github)
User avatar
dclxvi
Posts: 362
Joined: 11 Mar 2004

Re: Help with conversion floating point to 4 byte for apple1

Post by dclxvi »

Buried in the rabbit hole of all those threads is this post which covers converting the bytes the floating point number they represent, and goes through some examples.

viewtopic.php?p=3116#p3116
Post Reply