6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 3:56 am

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
PostPosted: Sun May 08, 2022 7:35 pm 
Offline

Joined: Sat Nov 26, 2016 2:49 pm
Posts: 27
Location: Tejas
Greetings All,

After completing a project applying the Rankin/Wozniak floating-point routines quite some time ago I finally spent the time to finish polishing, documenting, and blending in the Red Book documentation. Attached is the result. My project used the routines with cc65 so there are wrapper functions at the end of the file. When I last ran them everything appeared to work well but "it's been a while"...

If anyone has any interest in this please feel free to reply with comments, suggestions, and (especially) corrections. I believe I've incorporated all the known corrections from previous discussions here but I may have missed something, especially in trying to incorporate/update the Red Book documentation.

Ready! Fire! Aim! Or something like that... :wink:

Thanks,
Dave


Attachments:
RanWozFp.s [55.2 KiB]
Downloaded 107 times
Top
 Profile  
Reply with quote  
PostPosted: Mon May 09, 2022 2:04 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
DavidL wrote:
After completing a project applying the Rankin/Wozniak floating-point routines quite some time ago I finally spent the time to finish polishing, documenting, and blending in the Red Book documentation. Attached is the result.

What kind of file is a .S file?

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon May 09, 2022 2:42 am 
Offline

Joined: Sat Nov 26, 2016 2:49 pm
Posts: 27
Location: Tejas
BigDumbDinosaur wrote:
DavidL wrote:
After completing a project applying the Rankin/Wozniak floating-point routines quite some time ago I finally spent the time to finish polishing, documenting, and blending in the Red Book documentation. Attached is the result.

What kind of file is a .S file?


Oh, that's the assembly file for the cc65 assembler, ca65.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 09, 2022 4:09 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
DavidL wrote:
BigDumbDinosaur wrote:
DavidL wrote:
After completing a project applying the Rankin/Wozniak floating-point routines quite some time ago I finally spent the time to finish polishing, documenting, and blending in the Red Book documentation. Attached is the result.

What kind of file is a .S file?


Oh, that's the assembly file for the cc65 assembler, ca65.

Are you aware that there were some logic errors in the original that were subsequently corrected? If so, did you roll those fixes into the above code? If I correctly recall, we have both the original and the fixes in the code section of 6502.org.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Mon May 09, 2022 10:56 am 
Offline

Joined: Sat Nov 26, 2016 2:49 pm
Posts: 27
Location: Tejas
BigDumbDinosaur wrote:
DavidL wrote:
BigDumbDinosaur wrote:
DavidL wrote:
After completing a project applying the Rankin/Wozniak floating-point routines quite some time ago I finally spent the time to finish polishing, documenting, and blending in the Red Book documentation. Attached is the result.

What kind of file is a .S file?


Oh, that's the assembly file for the cc65 assembler, ca65.

Are you aware that there were some logic errors in the original that were subsequently corrected? If so, did you roll those fixes into the above code? If I correctly recall, we have both the original and the fixes in the code section of 6502.org.

OP second paragraph, second sentence: "I believe I've incorporated all the known corrections from previous discussions here..." :wink:


Top
 Profile  
Reply with quote  
PostPosted: Mon May 09, 2022 6:36 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
DavidL wrote:
OP second paragraph, second sentence: "I believe I've incorporated all the known corrections from previous discussions here..." :wink:

I guess what the ophthalmologist said was true when he told me I can't see worth a damn. :shock:

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2022 12:56 am 
Offline

Joined: Sat Nov 26, 2016 2:49 pm
Posts: 27
Location: Tejas
Wow, can't say I expected this - 10 days on and even the crickets don't care. :(


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2022 4:41 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
DavidL wrote:
Wow, can't say I expected this - 10 days on and even the crickets don't care. :(

Things ebb and flow around here. Many members have other hobby interests besides working with 65xx stuff and they may have had a look but don’t have the time at the moment to mess with it and report results. One indication of interest is the number of downloads on the file you’ve posted. Somebody is interested, I’d say.

Incidentally, around the time Rankin and Wozniak were writing this, MOS Technology developed a floating point package for the KIM called KIMath. KIMath uses binary-coded decimal instead of binary and hence doesn’t exhibit the decimal <—> binary hinkiness seen in binary FP implementations. Naturally, the code was larger and slower than the Rankin-Wozniak implementation.

Also, Charles.R. Bond wrote a BCD floating point package for the 6502 that uses Cordic functions to improve performance and decrease code size. A link to it is posted here in our code section.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2022 7:17 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Thanks David for putting this together and sharing it. As BDD says, offerings are often a slow burn.

(Here's a previous thread about Charles Bond's package, thanks BDD for the reminder:
Calc65: a BCD floating point package
See also a later post in that thread for a further development of the package, and then further posts for more.)

(However, I wouldn't want to muddy the waters: this thread is about a binary floating point package, and the other is about a BCD package. Each has its place. It would be a disservice to this thread to argue the relative merits - I'm fairly sure there are existing threads which do that.)


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2022 7:32 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
BigEd wrote:
(However, I wouldn't want to muddy the waters: this thread is about a binary floating point package, and the other is about a BCD package.

I only mentioned KIMath as a matter of historical interest. Thinking about it reminded me of Bond's implementation.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
PostPosted: Fri May 20, 2022 7:39 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10986
Location: England
Appreciated!


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 01, 2022 4:32 pm 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
DavidL on Fri 20 May 2022 wrote:
Wow, can't say I expected this - 10 days on and even the crickets don't care. :(


BigEd on Fri 20 May 2022 wrote:
As BDD says, offerings are often a slow burn.


Your work exceeds one download per day and that is extremely popular on the 6502 Forum. Detailed feedback may take one month or more but I'll make a special effort to review your work.

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 17 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: