UltraTechnology homepage
P21Forth 1.04

Updated 5/8/2000

P21Forth 1.04 ROM

P21Forth is an American National Standard X3.215-1994 document compliant implementation of the Forth language for the MuP21 (P21) microprocessor. P21Forth provides a portable high level ANS Forth programming environment with a built-in MuP21 assembler. An HTML version of the (draft) ANS Forth standard is available on the web.

Version 1.04 of P21Forth contains serial I/O drivers for the 82C51 serial I/O chip built into Offete Enterpises Inc. item 4019 or 4020 MuP21H Evaluation kits.

Version 1.04 of P21Forth boots using Chuck Moore's OK code and starts with serial input, serial output, and video output enabled.

Version 1.04 of P21Forth uses drivers for the 82C51 serial I/O chip on the Offete 4019 and 4020 boards for the 44pin PLCC MuP21h. The kits come with a 1.8432Mhz oscilator for the serial I/O circuit and are setup to deliver a 7200 baud serial signal from this oscilator. Offete includes a 7200 baud serial communication program for the PC. We recommend that you use a 2.4576Mhz oscilator on the board to get a 9600 baud serial signal. A driver is included for an expansion parallel port that can be added in the prototype area on the board. The details of this upgrade will be posted at that Ultra Technology Website.

When P21Forth 1.04 starts it will first display:

P21Forth 1.04

Copyright Ultra Technology 1998

It does this with P21Forth 1.04 in white on blue and the copyright in white on black. Then it displays:

Contributions by:
Jeff Fox, Charles Moore
Bill Muench, Dr. C. H. Ting
Dr. Michael Montvelishsky
Dr. Wonyong Koh, Raul Miller
Dave Lowry, Adrian Blake

then it delays about 5 seconds and clears the screen. If you then press enter you should see OK on the serial output and on the video screen.

A serial communication program running on the PC at 7200 or 9600 baud can control P21Forth and be used with a script to compile source files. P21Forth will respond with an OK at the end of each line of compiled code. A terminal program script should be set to wait for the OK prompt before transmitting the next line of source. Serial output can be turned off as can video output while syncing with a terminal program delivering source from a PC file the P21Forth compiler.

To work on a wider range of monitors P21Forth 1.04 starts in 32X16 character mode while the older versions started in 48X24 character mode. That worked on my monitor but on most TVs and monitors you could not see beyond a 40X20 area. To be safe P21Forth 1.04 starts in 32 column by 16 line mode mode. Some of the demos from 1.02 required that the system be in 48X24 and you may need to put the system into that mode before running demos such as the Towers of Hanio. Some of the source blocks for other demos may habe been overwritten when the 1.04 boot image was merged with the 1.02 blocks. Not all of the demonstration programs from 1.02 still work with the new image.

The words SLOW and FAST have changed meaning from 1.02. In 1.02 they changed the system speed to match the I/O chips. The standard chips used 250ns SLOW I/O and the alternate I/O chips used 50ns FAST I/O. With 1.02 you could use SLOW and FAST ROMs that defaulted to those speeds and switch speed interactively with those words. In P21Forth 1.04 they control the speed of sampling the serial port just as in Offete's eForth implementation.

The words P4@ P5@ P6@ P7@ and P4! P5! P6! P7! can be used to access parallel I/O ports on an additional 8250 I/O chip in the expansion area. Plans for the expansion will provided on this web page. Ports 0-3 are used in the 82C51 serial port interface.

In P21Forth 1.04 output can be vectored with the following words: VIDEO-OUTPUT SERIAL-OUTPUT NO-OUTPUT VIDEO+SERIAL-OUTPUT. The system begins in VIDEO+SERIAL-OUTPUT and 32X16 character mode for video.

The utility FLIPPROM.EXE will unscramble the ROM image so that screens can be edited with any ROM editor. After editing the same utility can be used to rescramble the image for booting. One should be careful not to edit screens that contain the boot image as the ROM will become unbootable. With this utility one can edit the P21Forth blocks and burn a new PROM if you have a PROM burner.

Ultra Technology also plans to offer a non-volitle SRAM or FLASH packaged version of P21Forth where one can edit the BLOCKs and save changes to source and compiled code. Versions 1.01 and 1.02 were debugged using a 128K byte PCMCIA SRAM card either in the original P21 development system or using a cable to plug such a card into the ROM socket on the Offete Enterprises 4019 and 4020 MuP21h circuit boards. Verions 1.02 and 1.04 are designed for SRAM not ROM. If the image is placed in a non-volitile SRAM blocks can be edited. If careful an SRAM can be swapped for the PROM after a board has been booted and a copy of the ROM has been placed in DRAM. At that point one can make their own copy of the P21Forth 1.02 or 1.04 ROM onto their non-volitile SRAM.

For most details on P21Forth 1.04 consult the P21Forth 1.02 Manual

ultratechnology hompage

Ultra Technology
2512 10th St.
Berkeley CA 94710