BASIC 1000D

Jean-Jacques Labarthe
10 May 2000, revised 15 september 2008

français

The Basic 1000d is a programming language permitting to solve exactly mathematical problems (Computer Algebra). In addition to usual Basic programming, the Basic 1000d manipulates symbols and mathematical expressions. If you have already programmed in Basic, you can learn Basic 1000d quickly and easily. Originally (1990), the software was sold for Atari ST et TT. It is now freeware. You can download it here, with its associated files and commented source code, in a version (1.20) specially adapted for use on Mac's under the emulator NoSTalgia or PC's under the emulator PaCifiST.


SOFTWARE


The Basic 1000d (version 1.20) software is available as a disk-image, disk1.st.sit.hqx or 1000dst.zip (the decompressed files are identical but named differently), which is directly usable in the emulators. This disk-image contains the program 1000D.PRG, the libraries MATH.Z and STND.Z, the configuration file CFG1000D.Z, and the on-line help file HELP.Z.
The folder 1000d containing 1000D.PRG, MATH.Z, STND.Z, CFG1000D.Z and HELP.Z is also available as a zip archive. On a Mac, this folder can be created by st2mac from the disk-image disk1.st.

The disk-image 1000dprg.zip contains several interesting programs written in Basic 1000d. These programs, specially 0TEST.Z, can be used to test the various emulators.
The utilitaires archive contains mac2st and st2mac, two programs which permit to exchange files between the Mac and the NoSTalgia emulator. C sources are included.
disk1.st
  • disk1.st.sit.hqx (371 299 bytes) disk-image of the Basic 1000d
  • 1000dst.zip (289 211 bytes) the same disk-image as a zip archive
  • 1000d.zip (286 991 bytes) zip archive of (1000D.PRG, MATH.Z, STND.Z, CFG1000D.Z and HELP.Z)
  • 1000dprg.zip (27 084 bytes) zip archive of a disk-image containing programs in Basic 1000d
  • utilitaires.sit.hqx (116 939 bytes) utilities mac2st and st2mac


SOURCE CODE



The source of the Basic 1000d (in 680x0 assembler) is available. Up to now, I had only a handwritten documentation for it (description of algorithms and comments on the code). I have started to type this documentation in the source of the Basic 1000d.
The archive 1000d.src contains the source SYN.Z, with no comments. This source can be assembled with ASM.PRG, a freeware 680x0 assembler that runs on Atari TT, but neither on ST, nor under ST emulators. This source permits the assembly of a faster version for Atari TT by setting FLAG30=1 and FLAGTT=1 at the beginning of the source. ASM.DOC + ASM2.DOC is a 1stWord manual in French of the assembler.
The file algorthm.c is the fully commented source of the Basic 1000d, with a description of the algorithms. The added comments are in C++ style. They will stand out in color by using a C++ text editor. The comments have not yet all been typed in. At the time being, the parts commented are the basic subroutines manipulating the integers, rationals, and floats (including the exp, log, sin, tan, atn functions).

Documentation on the MC68K (680x0) assembly language can be found at


DOCUMENTATION


The documentation is available as TEX sources or pdf files (fast web display).


The on-line help (HELP.Z in disk1.st) is in French, but gives useful information on the syntax. The keywords of the Basic 1000d are in English (while, left$, etc.) Some documentation is available in English.

Reference Manual (in French)

This Reference Manual, in French, was originally published as a book in paper (1990, 529 pages, in French). I still have some of these books in paper left. The file min is easier to download: the 23 illustrations and the two tables in the appendix (ASCI codes and filling patterns) have been omitted.

  • manuelp.pdf (2 284 984 bytes) pdf format
  • man.tar.gz (700 792 bytes) TEX source with 25 EPS files as a Gzip archive
  • min.tar.gz (289 707 bytes) TEX source without illustrations

Basic 1000d

Reference Manual (in English)

This Reference Manual, partly in English, partly in French, is an unfinished translation I did in 1991 of the above Reference Manual (in French). Chapters 1 to 10, 12 and 13 are entirely translated into English. The beginning of chapter 11 and half of chapter 14 are also translated. The rest is in French, with some French words changed into English. For those who cannot read French, it gives enough information for starting to use the Basic 1000d.

Update of the Reference Manual (in French)

This update (1992, in French, 24 pages) corrects some errors and describes new functions.

Practice of the Basic 1000d (in French)

This book (1991, 288 pages, in French) describes in detail many examples.


Performances of the Basic 1000d (computation times on Atari ST)


NUMBERS

Floating point real and complex numbers with as many as 1230 digits
The square root of 2 is computed with 1000 digits in 1.3 s
Special functions (Gamma(x), erf, 3j coefficient, ...)
Integers and rational numbers with as many as 19000 digits are manipulated exactly. (the factorial 100! is computed exactly in 0.12 s)
Primality test, factoring in prime numbers (the factoring of 267 - 1 into 193707721 * 761838257287 is obtained in 12 minutes)
Radix from 2 to 36
Modulo arithmetics

COMPUTER ALGEBRA

Expanding, substitution and factoring of polynomials and rational fractions (x9 + y9 is factored in 1 s)
Treatment of algebraic extensions
Derivation, integration and summation
Plane geometry (algebraic treatment)
Series expansion
Linear algebra (matrix determinant and inverse)
Symbolic resolution of systems of equations

A GENUINE, USER-FRIENDLY AND EFFICIENT BASIC

On-line help that can be edited
Libraries which enhance the Basic with new functions (Over 300 programs in 2 libraries are included)
Powerful, easy-to-use debugger
Musical and graphic instructions
Curve plotting
Structured programming
Recursive functions and procedures


Running the Basic on Mac's with NoSTalgia


The Basic 1000d 1.20 runs perfectly under the NoSTalgia 0.62 emulator (with TOS 1.0, 1.4 or 1.6) of Philippe Gérin. The emulation is so splendid that it is much better to run the Basic under NoSTalgia than on an Atari ST. On an iMAC DV with a 400 MHz G3, the Basic runs 6 times faster than on an Atari ST with an 8 MHz 68000.
However, the Basic 1000d is not running properly under the PowerST 0.2 emulator (also of Philippe Gérin): some functions return false results or crash the program. For instance, the command print intsqr(2^67-1) does not return 12148001999 under PowerST 0.2. According to Philippe Gérin, the Basic 1000d runs fine on the coming PowerST 0.3.

Some keys used by the Basic are not emulated in version 0.62 of NoSTalgia. Therefore, I have duplicated some commands. The list is to be found in sub-menu Nostalg of menu HELPS in the Basic 1000d.
Combinations of function keys with Alt and Alt+Shift are intercepted by Mac OS 9. The only combinations used by the Basic, in the debugger menu, [a]F2 et [a]F9, have been duplicated. The new key combinations, Control+Alt+key in the numerical pad, do not work with TOS 2.6. You have to use TOS 1.0, 1.4 or 1.6.


Running the Basic on PC's with PaCifiST


The Basic 1000d runs perfectly on PC's under the PaCifiST emulator of Fréderic Gidouin (I tested versions v0.46 and v0.48 with TOS 1.62). On a 450 MHz PC, the Basic runs about 10 times faster than on an Atari ST with an 8 MHz 68000.

The Basic 1000d is not running properly under the WinSTon v0.4 emulator of Paul Bates. Some functions return false results or crash the program. For instance, the instructions:
     precision 100
     print sin(2)
do not return
  0.9092974268256816953960198659117448427022549714478902683789730115309673015407
835446201266889249593803~


Revisions



ETC.


This page was visited compteur times.
This site is also a member of the Anneau Atari Francophone (Webring of sites on Atari in French)

This
ST Emulation Webring
site owned by Jean-Jacques Labarthe
[ Previous 5 Sites ¦ Previous ¦ Next ¦ Next 5 Sites ¦ Random Site ¦ List Sites ]