Unix and C

Stewart C. Strait sstrait1 at san.rr.com
Sun May 5 10:50:47 PDT 2013


On Sun, May 05, 2013 at 08:39:28AM -0700, James E. Henderson wrote:
> 
> On 5/4/2013 22:24 , Stewart C. Strait wrote:
> >On Sat, May 04, 2013 at 11:21:32PM +0000, Renzema, Todd wrote:
> >...
> >>I'm no developer, but personally, I can't imagine any human being
> >>having (a) the knowledge, experience, and motivation to attempt to
> >>write an OS, and at the same time (b) the masochism and/or
> >>self-loathing to attempt to write it in BASIC.  (Yes, it would have
> >>to be compiled BASIC.)
> >>
> >It might be a stretch to call them operating systems, but both the
> >Apple II and the Commodore Pet had BASIC interpreters in their ROM. These
> >interpreters plus, I think, some code on the disks gave them a filesystem
> >and a very few utilities. Since the interpreters were written in assembly
> >this might just be an instance of a crude OS written in assembly rather than
> >BASIC. Many functions built into the interpreter could be called from assembly
> >language programs without running any interpretation, so there was a sort
> >of function library available. If part of the OS really was interpreted
> >BASIC the speed of 500 or so simple statements per second still wouldn't
> >have necessarily been particularly slow compared to those old floppy drives.
> >
> >Your 'cant imagine' remark still sounds pretty accurate, though.
> >Those two interpreters were for the same processor
> >and shared a lot of code. At least some of their less-known competitors
> >also shared a lot of code with them.
> >This might mean the task of writing an OS where everything was
> >oriented around supporting a BASIC interpreter might have only been
> >done from scratch once in the history
> >of computer science.
> >
> >Stewart Strait
> >
> >
> Don't forget the Timex Sinclair computer, which ran only tokenized
> BASIC. A British invention, it may have been a bit before your time.
> 
The Commodore Pet and the Apple II were first sold in 1977, according
to Wikipedia. I bought my Pet in 1979--it was my first computer.  The
Timex Sinclair was released July 1982.

The Pet was mainly intended to run tokenized BASIC. Booting started
the BASIC interpreter in the ROM. There were one or more BASIC statements
that would transfer control to machine language programs,
though. The Apple II had a very similar interpreter, but I don't know
if it started at boot time or how you ran other code, which of course
you could. A strange feature of the interpreter was that some of the
inner loops were in RAM and indexed through arrays by address
modification (overwriting the address portion of an instruction in the
running code) because the restricted instruction set of the 6502
processor made it slow to do some kinds of loops using the usual index
register methods. There were less than 256 instructions on a 6502 even if
you counted each addressing mode of an instruction separately.

Stewart Strait



More information about the KPLUG-List mailing list