A benchmark of three different floating point packages for the 6809 - The Boston Diaries - Captain Napalm

submited by
Style Pass
2024-10-14 09:30:02

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

I recently came across another floating point package for the 6809 (written by Lennart Benschop) and I wanted to see how it stacked up against IEEE-754 and BASIC floating point math. To do this, I wanted to add support to my 6809 assembler, but it required some work. There was no support to switch floating point formats—if you picked the rsdos output format, you got the Microsoft floating point, and for the other output formats, you got IEEE-754 support.

The other issue, the format used by the new floating point package I found is ever-so-slightly different from the Microsoft format. It's just a single bit difference—Microsoft uses an exponential bias of 129, whereas this package uses a bias of 128 (and why do floating point packages use an exponential bias? I'm not entirely sure why). But other than this one small difference, they are basially the same.

It turned out not to be that hard to support all three floating point formats. The output formats still select a default format like before, but now, you can use the .OPT directive to select the floating point formats:

Leave a Comment