A bit of Floating Point help needed

From: ruud_at_baltissen.org
Date: Mon, 25 Jul 2022 21:55:25 +0200
Message-ID: <f38081c3be433b3f27355c783ff7e42a_at_baltissen.org>
Hallo allemaal,


For a very long time I'm working on three software projects between 
other things:
- My own OS meant to run on 8088 PC compatibles. My targets: C= PC10 
series. Main hurdle at this moment: directories.
- my own bootable BASIC, same targets. Shares a lot of routines with the 
OS.
- My own Pascal, written in Turbo Pascal, which outputs macros. My 
assembler should turn the macros into binaries for the various target 
machines. For the moment only the PC and the C64.

The last two projects have one thing in common: they need Floating Point 
routines for the mathematical part. So far I only found the sources of 
the original Microsoft's GW-BASIC and the so called URC library. In 
short: the code of both is very hard to understand. And I'm not the only 
one with this opinion.

For my Pascal I can use the FP routines used by the C64 of course. Saves 
me a lot of work. OK, "only" 40 bits but that is good enough for me. If 
I understand yhings better, I always can extend the number of bits. The 
idea rose to translate the 6502 code of the C64 into 8088 code. But I 
need some ways to check if things work OK. One idea was to run a small 
BASIC program and to see what happens with the Floating Point registers 
FAC1 and FAC2. I used a simple program:
10 I1=1
20 I2=2
30 i3=I1*I2
40 print content of the various FP registers starting from $61

The problem: what ever I do with I1 and I2, the printed values stay the 
same. What I need to know first is if my conversion from a string/number 
to FP is OK. If that is OK, I can fill FAC1 and FAC2 with my own values 
and SYS the various FP routines and check the resulting value.

And I have no good idea yet how to trigger the StringToFAC1 routine at 
$BCF3: the wellknow CHRGET routine is the base of it but what should I 
do to start things up?

Any help is welcome. Many thanks in advance!


-- 

Kind regards / Met vriendelijke groet, Ruud Baltissen

www.Baltissen.org
Received on 2022-07-25 22:00:09

Archive generated by hypermail 2.3.0.