How does the floating point math package in BASIC work?

Hardware Hacking, Programming and Game Solutions/Cheats
jedie
Posts: 655
Joined: Wed Aug 14, 2013 12:23 pm
Location: germany
Contact:

Re: How does the floating point math package in BASIC work?

Post by jedie »

btw. have add working test with: JSR $e682 - CONVERT FPA0 TO A TWO BYTE INTEGER to D :) See: https://github.com/jedie/DragonPy/blob/ ... 09.py#L211
... too many ideas and too little time ... Related stuff written in Python:
Dragon 32 emulator / PyDC - Python Dragon 32 converter: https://github.com/jedie/DragonPy
DWLOAD server / Dragon-Lib and other stuff: https://github.com/6809
User avatar
JeeK
Posts: 67
Joined: Fri Aug 16, 2013 10:45 am
Location: Vienna, Austria
Contact:

Re: How does the floating point math package in BASIC work?

Post by JeeK »

jedie wrote: [..]

The trace when calling $edcb is here:
https://gist.github.com/jedie/a17def9a40f01e435d72
raw view seems to be better:
https://gist.githubusercontent.com/jedi ... y%2010.asm




Conslusion: I expected the value 0.5 binary $80, $80, $00, $00, $00, $00 in FPA0
But there is: $80, $d0, $00, $00, $00, $00

btw. a python routine to calculate from binary back to float would be helpfull ;)
Something went wrong in the division , maybe flag behavior - not obvious (at least for me). What about to compare to a Xroar trace?
The dragon on my side: http://klasek.at/hc/dragon/
Post Reply