NIBL (National Industrial BASIC Language) is a version of Tiny BASIC produced by National Semiconductor to run on the SC/MP 8060 processor. It provides a simple but useful version of a high level language for the SC/MP processor.
The Interpreter is only 4K bytes mapped from address $0000, BASIC programs are stored in up to seven 4K Pages from $1000 (the first page is actually about 300 bytes shorter because the Interpreter uses some of this space for its own storage). Switching between BASIC programs is achieved with the PAGE command. Whilst the first Page must be RAM (because NIBL uses this as workspace) remaining Pages can be in either RAM or ROM. A fully populated NIBL setup therefore fills the bottom 32K of the SC/MP memory space.
Originally NIBL was intended to be run on simple platforms like the National Semiconductors 'Low Cost Development System' (LCDS) which have only simple user interfaces (hex keypad and LED display) so NIBL communicated via a serial interface, originally to a Teletype, but more easily achieved now using e.g. a terminal emulator program on a PC. There is no UART the serial interface is 'bit banged', this means it is easy to change the baud rate from the original 110 baud to more useful speeds (up to 2400).
Because NIBL resides at the bottom of the memory map this means that it cannot run on a system with a Monitor/OS at that location. This is the problem that Elektor solved for their SC/MP Computer back in 1977 by producing a modified version of NIBL known as NIBL-E, this is basically NIBL relocated to $1000. Moving the code up to $1000 means losing Page 1, the remaining six Pages (Pages 2 to 7) starting at $2000 (Page 2 at $2000 again is slightly smaller because NIBL-E uses some of this for its workspace).
There seem to be two slightly different original versions of NIBL, one in an edition of Dr. Dobbs Journal and the second a cross assembler listing possibly from National Semiconductors ?, not sure which came first ?
The original National Semiconductors Tiny BASIC is documented in this manual:
and NIBL here:
I have produced an SBASM formatted version of NIBL source code that can be configured to produce a version of NIBL or NIBL-E based on either of the two sources above, you can also select the serial interface baud rate from 110 to 2400 baud. It also has switches that can select fixes/patches.
The fixes/patches are as follows
FIX1 fix to CMPR and UNTIL (this mod is mentioned in a source by Roger Marin, I haven't determined what it does !)
FIX2 serial echo bit 7 cleared (currently only for 2400 baud)
FIX3 changes default NIBL-E cursor from < to >
FIX4 remove 'reader relay', a feature left over from the days of paper tape punches !
FIX5 add GECO and PUTC redirections for page3.sys,see below
and here are a few builds (all based on original National Semiconductor source listing):
The first number refers to the CPU Clock, the second to the baud rate, Fn refers to any enabled 'Fixes'
Running NIBL-E on the MK14E
It is unfortunately not possible to run NIBL in any form on the MK14 computer because of the restricted memory map, only 4K total. However the MK14E with its Expansion Board can run NIBL-E.
This requires a 16K EPROM (27128) programmed with NIBL-E at $1000. Set the RAM-EPROM PAGE switch with PAGE 1 (red) set to EPROM and ensure link LK1 'Page 0' is open (its is tracked on the PCB underside and needs to be cut). With this link open the 4K of memory and I/O devices on the MK14E Mainboard are active. PAGE 2 (orange) must be set to the RAM position because NIBL-E needs to be able to write to its workspace but PAGE 3 (yellow) can be RAM or EPROM, NIBL-E Pages 4 to 7 are then in RAM (IC2).
Here is a 16K EPROM image: NIBL-E 4-2400 F2345.rom
The serial connection can be made using a 5V FTDI serial-USB adapter to a PC running a terminal program e.g. Python.
On the MK14E start NIBL by typing 1000 GO and you should get a '>' prompt on the terminal.
PAGE3.sys
PAGE2.sys is an add-on package for NIBL that was developed by Karen Orton which adds some useful extra commands and an assembler. As the name suggests it resides in NIBL's Page 2 so of course is not compatible with NIBL-E. Phil G (Phil__G on the vintage radio forum) has produced a variant of Karen's code moved to Page 3 that can be used with NIBL-E.
Karen had documented the project, here is her manual:
and here is 16K EPROM image of NIBL-E and Page 3.sys for the MK14E
This version of Page3.sys is a special (produced by Phil) to use with the NIBL.asm file above. Depending on the build selected (at configuration) the serial routines GECO and PUTC may move from their 'standard' addresses, they are called up from page3.sys so will then not work. FIX5 adds a couple of redirections which are at fixed addresses which the special page3.sys uses (be aware that page3.sys also calls REST at $1970, make sure any other changes do not move REST !).
Not content with an integer BASIC for the SC/MP a Floating Point version has been developed:
The code occupies 12Kbytes from $D000, for this reason I've added a second 16K EPROM to the MK14E Expansion Board (Issue 1.1).
Its worth looking at Ronald Dekker's webpage which has much more info on the history of the various versions of NIBL.