Forth for PDP-11

From: Dwight K. Elvey <dwightk.elvey_at_amd.com>
Date: Tue Jun 25 20:58:13 2002

>From: "Zane H. Healy" <healyzh_at_aracnet.com>
>
>>
>> > SOL-11 - A Small Language and OS for the PDP-11
>> >
>> > SOL is a small, non-standard, stand-alone FORTH kernel containing
>> > everything that is required to edit, store, recall, compile, and run
>> > programs on PDP-11 microcomputers. It is intended for a minimum
>> > operating system and programming environment. The FORTH language offers
>> > full access to the complete hardware. Device drivers for the console and
>> > some block devices are included.
>
>This is so cool!
>
>> > Supported Hardware
>> >
>> > * PDP-11 CPU with EIS (required)
>> > * 8K to 28K words of memory
>
>Dang, the EIS requirement sucks! This would be perfect for PDP-11/03's and
>SBC-11/21's. Unfortunatly the /03 needs the KEV11 option, and the SBC-11/21
>is just plain out of luck.
>
>> Presumably it ignores the MMU (but doesn't object if one is present, as
>> few machines have EIS but no MMU).
>>
>> > * console terminal (preferrably VT100)
>> > * RX01/RX02 floppy disk drives
>> > * RL02 disk drive
>> > * TU58 tape drive
>>
>> I assume it needs the CPU, RAM, console and at least one of the mass
>> storage devices. It can't need _all_ the drives, surely?
>
>It only needs one of the drives.
>
>I just built it and booted the RL02 image on SIMH. It looks pretty cool, of
>course I don't know FORTH, so can't actually do anything....
>
>I suspect the TU58 option means that it's possible to run this on a PDP-11
>that doesn't have any drives, but has two SLU's, just run a TU58 emulator on
>a PC.
>
>> > The Sources
>> >
>> > SOL is written in PDP-11 assembly language and FORTH. The BTN11
>> > assembler (version 0.9 or later) is required to compile the assembly
>> > part of SOL.
>> > 40187 2001-07-17 sol-11.tar.gz version 0.4
>>
>> Sounds like just what I need (given that I have all of the supported
>> hardware!). I will take a look. Thanks....
>
>You'll want a UNIX box to build everything. If you don't have a way to
>build the images I can through them up on my FTP site (if anyone needs this
>it would be best to send me a private email so I'm sure to see the request).
>
>Now to go googling for some FORTH documentation...
>
> Zane
>

Hi
 Try:
 
 http://www.forth.org/
 
 
 For I/O, you may need to look at the source code some.
It varies from amchine to machine.
 Everything in Forth is a word. A word can be as short as :
or longer. These words have actions. Some expect a string,
as in : expects a name and ." expect a string. Words that
start with . are usually some kind of print. The sequence:

4 .

will print the number 4. Here is another fun definition:

: .H BASE _at_ SWAP HEX U. BASE ! ;

DECIMAL 45 .H

Disk I/O on fig Forth was block I/O. To access the first
block:

0 BLOCK ( returns the address of the buffer, usually 1K )

If you type:

 UPDATE FLUSH
 
it will write the buffer back to the disk.
 You could modify the data by:
 
 55 0 BLOCK !
 UPDATE FLUSH
 
Not a good idea to try until you know what damage is done.
The site I just sent does have some tutorials but remember
there were several standards. Most are similar but some
will be different enough to cause troubles. Examples:

 2 NOT
 
 will return different values for fig and F89. I forget
which but one will be 0 and the other will be FFFD hex
or -3. One complements the flag and the other complements
the bits.
 A good book to find is called "Starting Forth" by Leo Brodie.
Dwight
Received on Tue Jun 25 2002 - 20:58:13 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:35:07 BST