Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Floating Point Problems With Aztec C PCode In ProDOS 8 - and a real solution

23 views
Skip to first unread message

Bill Buckels

unread,
Feb 19, 2013, 8:33:25 PM2/19/13
to
"Riccardo" <rigre...@gmail.com> wrote (in another thread):

> Hi Bill
>Impressive work, congratulation! I'm relative new on community, as you
>know. I think to use Aztek C cross-compiler to try to transfer any my old
>work in C to Apple II, like an algorithm to solve differential equations by
>numerical analysis (Runge-Kutta method). I know the slowest of A2, but i
>think to do an experimentation. Do you think this is possible? Which files
>do i need? Thank you so much.
>-Riccardo

Hi Ric et al,

Ric, thank you very much for sharing your project with me over the last
couple of days. I was somewhat sceptical of your interest until I witnessed
your determination. Your tenacity is commendable. I will provide any support
that you need for Aztec C. That goes for Brendan Roberts and anyone else who
is genuinely interested.

I will be sending you a finished completed working version of your
Runge-Kutta program over the next few hours, with assembler output and all
things singing and dancing, but first I need to run some more tests with the
various native and non-native versions of Aztec C for ProDOS. I have many
that I have accumulated over the years that I have not made available, but
they are not lost.

In testing your program, I discovered that the mi math library that is
specifically targetted to produce pcode for the Aztec C Shell blows-up
spectacularly when building shell programs that do meaningful floating
point. However when linking to the native 6502 math library (m.lib) your
program runs fantastically. I believe this is the fault of the shell
interpreter which is built into shell.system because I compiled these both
using native mode and interpreted mode compilers under 2 different versions
of ProDOS 8 Aztec C (so far) and achieved the same results. The math library
source streams are also the same between interpreted and native mode
libraries. All fingers point to the Wonderful World of the Aztec C Shell and
it could very well have something to do with the shell's environment pages
conflicting with the pseudo-stack of the pcode. I am leaning that way at the
moment in my quest.

The CG65 cross-compiler version that came from the late Paul R. Santa-Maria
reproduced the same results as the version that I bought back in 1989. You
are using the a version you put together yourself from disks I think, but I
know you now also have the version that that Mike Thomas put together with
MacProber with a bunch of Frank Gadegast's work on it as well as Mike's
ATree. Thta's the one I would use if I wanted the real flavour and wasn't so
lazy.

I mention Paul with appreciation and awe. Before he passed-on he sent me
boxes of his work and several hardcover Aztec C Manuals and other material
including CP/M and Ms-DOS related that is safely stored when not actively
used. I also miss Mike and his fine work (Kandi's Kreations, Pheonyx,
BluePhoenyx) and hope that he may someday come this way again. Frank is of
course absolutely brilliant. The work he did as a young man (Phade Software)
is just excellent! I wish I had all his source code, and his sense of
humour, and I am grateful for what of his I have been able to make
available. As a community, we are well positioned to support Aztec C thanks
to the efforts of many folks including Harry Suckow (Manx's founder and
Aztec C's Copyright holder) who gave us permission to distribute from our
website in the first place. Even Mike Spille, the developer who supported my
efforts back in 1990 has been in touch. Now if I could just get more people
into Aztec C it will go-on forever just like the Apple II.

Anyway to cut to the chase: pending more testing of this 25 year old bug
probably in the ability of the shell.system's pcode processor to interpret
complex floating point, link to the native-mode math library regardless of
whether you are building shell programs or ProDOS Sys programs. That's it.
Consider yourselves informed. And Ric, I'll put together a shell script to
build your project for ProDOS and shell.system when done.

The Aztec C Shell is a marvel of its vintage, and rivals the Aztec C
compiler for excellence. It is easy to understand why Fenwick and Goodnow
were so sought after when the big companies took over.

I'll catch the rest of this in private mail a little later-on after I am
done my spade-work. I just wanted to let the group know that even though the
Aztec C Shell is the coolest thing around, with the exception of Aztec C
itself, it gets temperamental when it needs to do real math, in case someone
needed to do some floating-point in C for ProDOS before my aging mind had
forgot all this.

Over and Out,

Bill


0 new messages