| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
32bit Decimal convertion
Anybody got this shitz for 32-bit numbers? http://codebase64.org/doku.php?id=base:hexadecimal_to_decimal_c.. |
|
| |
Krill
Registered: Apr 2002 Posts: 2980 |
You're too lazy to pick any of the 3 approaches and modify the routine for 32-bit numbers? :) |
| |
Frantic
Registered: Mar 2003 Posts: 1648 |
If he is, I could sort of sympathise with that, if it was part of a large project like Eye of the Beholder with zillions of lines of code and someone else had already implemented a 32-bit version of that routine.
I can't sympathise with the spelling of "Convertion" (Conversion) though. ;) |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
did you check 6502.org? i think they had sth.... i am too lazy to look though =D |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: You're too lazy to pick any of the 3 approaches and modify the routine for 32-bit numbers? :)
exactly |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: If he is, I could sort of sympathise with that, if it was part of a large project like Eye of the Beholder with zillions of lines of code and someone else had already implemented a 32-bit version of that routine.
I can't sympathise with the spelling of "Convertion" (Conversion) though. ;)
Dang!! :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: did you check 6502.org? i think they had sth.... i am too lazy to look though =D
Ahh no, I didn't. Checking now... nope, same there as on Codebase.
I guess I'll roll my own then. Just so annoyingly boring and my general purpose division in EotB is only 16-bit.. Thinking of some simple shift+add with the 1/10 since that is a very simple bitpattern 110011001100110011... |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Or I just show the experience points in hex... ;) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: If he is, I could sort of sympathise with that, if it was part of a large project like Eye of the Beholder with zillions of lines of code and someone else had already implemented a 32-bit version of that routine.
I can't sympathise with the spelling of "Convertion" (Conversion) though. ;)
Also not zillions, but just 40688 at the moment (675kb). |
| |
Krill
Registered: Apr 2002 Posts: 2980 |
Quoting JackAssernope, same there as on Codebase. Indeed, Codebase has a straight 1:1 rip of the original 6502.org page, without giving proper credit. Not cool, Codebase, not cool.
Quoting JackAsserThinking of some simple shift+add with the 1/10 since that is a very simple bitpattern 110011001100110011... Please elaborate. :) |
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
Quote: You're too lazy to pick any of the 3 approaches and modify the routine for 32-bit numbers? :)
Actually I didn't even bother to look closer on that code posted there but I didn't now and it's meant to be extended.
"The principle should be pretty clear. You can take it out to as many digits as you want."
However it relies on decimal mode being set, something my interrupt handlers can't handle and I'm not willing to fuck timing all over the place. |
... 17 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 | 3 - Next |