A Tale of Four BASICs

78 views
Skip to first unread message

Tom Lake

unread,
Jul 25, 2025, 11:20:20 AMJul 25
to Altair-Duino
For those of you trying to convert Altair 680 BASIC to other versions, here's a person who converted four different BASICs to run on a Sphere computer. It shows the types of problems you may run into.

A Tale of Four BASICs

Tom Lake

unread,
Jul 25, 2025, 6:10:13 PMJul 25
to Altair-Duino
For those people who are curious about how Altair 680 BASIC stacks up when running Program 1 in the above article:

10 REM :FUNCTION SPEED AND
20 REM :ACCURACY BENCHMARK
30 PRINT "START"
40 LET T=0
50 LET E=0
60 FOR I=1 TO 1000
70 LET S=EXP(LOG(I))
80 IF ABS(S-I)/I<=T THEN 100
90 LET T=ABS(S-I)/I
100 LET R=1/I
110 LET F=SQR(SIN(R)^2 + COS(R)^2)
120 IF ABS(F - 1.0)<=E THEN 140
130 LET E=ABS(F - 1.0)
140 NEXT I
150 PRINT "DONE"
160 PRINT "LARGEST ERROR IN EXP, LOG=";T
170 PRINT "LARGEST ERROR IN SIN, COS, SQR=";E
180 END


RUN
START
DONE
LARGEST ERROR IN EXP, LOG= 8.71931E-07
LARGEST ERROR IN SIN, COS, SQR= 5.66244E-07
TIME: 155 SECONDS

It looks like Altair BASIC smokes the others and has about 6 digits of accuracy. Not bad!
Sphere BASIC took 8059 seconds and SwTPC BASIC took 6631 seconds. 

Thomas Niccum

unread,
Jul 26, 2025, 12:42:55 AMJul 26
to Altair-Duino
FUN!

I have a 1990's retro AlphaMicro AM1600 (sitting on top of an AM 1400, next to an AM1200) on my desk right now that I'm restoring - typed this in and got:

start
done
Largest error in EXP, LOG = 1.4197E-11
Largest error in SIN, COS, SQR = 1.81899E-12

CPU time was 1.81 seconds, elapsed time was 1 seconds

To be fair, this particular Alpha has a floating point processor on it... 

It has a BASIC that was fine tuned for business purposes with record layouts sorta like cobol, for handling real business data processing stuff.

I now have 4 generations of them up and running (along with my replica Altari, Imsai, PiDP-8, PiDP-11 and PiDP-10 - but they don't have blinky lights :(

Looking forward to the Altair-duino 680 and Oscar's upcoming PiDP-1 kit!

For those that don't know the AlphaMicro history - it was the first generally available CPU board set for the S-100 bus that was 16-bit.  It was essentially a PDP-11 (LSI-11 chip set) clone.  The founders had 
written an OS that was very RT-11 like while at UCSD, and got it running on this board set.  I became a dealer for their systems around 1979, and right as they started shipping with a CDC 10MB hard drive (5MB fixed, 5MB removable).

Another odd breakthrough they made was the ability to back larger (ha! 30MB) drives to a standard VCR tape machine.  Later they moved to a 68000 architecture, and their os could run 30-40 dumb terminals (and later even more) on these little chips.

Very business oriented, a lot of dealers specialized in medical/dental office applications.  The 1600 I got of ebay still had a retail POS system on it, and the 1400 had a full accounting system used by CPAs - including all of the data on about 50 business including payroll records, ssns, etc.  WIld.

I've converted them all to SD card SCSI emulation so the hard drives don't need to spin any more.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages