[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Basic compiler



Paul Schlyter wrote:

In article <JradnWOVdZ8HoKPY4p2dnA@telenor.com>,
Knut Roll-Lund  <kr-lund@nogarbage.online.no> wrote:


Paul Schlyter wrote:

...............

So Applesoft do have integer variables, but no integer arithmetic.
And the operation

    30000 * 10

won't overflow, because it is performed in floating-point arithmetic.
In MBASIC, the operation   30000% * 10%    *will* overflow !!!!

I'm surprised, on the TRS-80 which also has Microsoft basic, though a bit differently looking, does integer operations on integers (and it is an important point to use integers for speed). This is so except for division where the actual division is done in single precision. Even constants are done as integers as long as they fit.

The Microsoft basic came with the TRS-80 (Model I) Level II that came in August 1978. The original TRS-80 Microcomputer (Model I Level I) from August 1977 had a basic that was made by Tandy famous for its error messages: 3 in all WHAT?, HOW? and SORRY (means syntaxerr, outofrange and outofmemory respectively). :-)


The TSR-80 was an 8080 or Z80 based computer.  Microsoft did put considerably
more effort into its Basic interpreters in 8080 assembly language than
the interpreters in 6502 assembly language.

Z-80 at a blazing 1.76MHz for model I (same family: model III does 2MHz and model 4 does 4MHz).

--
Knut
(delete 'nogarbage.' for email)