Link here

Forth v4.4 Changes from Prior Kernels

The QCard, QScreen Controller, and QED Handheld operating system firmware carries the version number V4.4x, where x represents a numeric value. Customers who are familiar with the prior V4.08 operating system software will notice that certain device driver functions have been removed from the V4.4x library because the corresponding hardware is not present. These 19 functions comprise the hardware drivers for the 12-bit A/D, D/A, PIA, and high current drivers. We recommend the use of the many available WildCard I/O modules and their associated pre-coded kernel extension device drivers to add customized I/O to meet the needs of your application.

The V4.4x keypad scanner and character/graphics display drivers are available to support an optional Keypad/Display WildCard. These kernel-resident drivers work only if the Keypad/Display WildCard is assigned a WildCard module address of 0. On the QCard, this is accomplished by installing the Keypad/Display WildCard on module header 0, and leaving the jumper caps off the WildCard’s two on-board jumpers. The QScreen and Handheld products come complete with a graphical user interface that is controlled by pre-coded drivers.

The READ.WATCH and SET.WATCH functions are backwardly compatible with prior versions, but they rely on different real-time clock hardware as described in their glossary entries.

The V4.4x kernel boots up at 19200 baud, compared to 9600 baud on many earlier products based on the V4.08 kernel.

The following seven QED-Forth functions have been added to the V4.4x kernel:


Software development in V4.4 Forth uses the Mosaic IDE Integrated Development Environment; this is the same IDE used for software development in C. While Forth programmers will not use the IDE's C compiler, the IDE provides a full-featured text editor and customized terminal for rapid Forth code downloads and interactive Forth debugging sessions with the 68HC11 processor on the controller board.


Summary of modified functions

A set of functions makes it easy for Forth programmers to manage the downloading of code into RAM and the transfer of the compiled code to flash. The PAGE.TO.FLASH and PAGE.TO.RAM utilities can copy between parallel RAM and flash pages. The TO.FLASH function can program flash anywhere it appears in the memory map. The STANDARD.MAP, DOWNLOAD.MAP, TO.FLASH, PAGE.TO.FLASH and PAGE.TO.RAM routines are now aware of the additional memory in the memory map. In the "standard map", the QCard has flash at pages 4-7 that swaps with RAM on parallel pages 1-3, plus flash at hex pages 10-17 that swaps with RAM on parallel hex pages 18-1F. In the "download map", flash and RAM are swapped: flash is present on pages 1-3 and 18-1F, and RAM is present on pages 4-6 and 10-17. On the QScreen Controller and Handheld, TO.FLASH can program the optional flash memory at pages 0x20-2F.

The great majority of Forth applications compile to less than 96 KBytes of code, which fits on pages 4, 5 and 6. For these applications, the new functions ENABLE.DOWNLOAD and ALL.TO.FLASH greatly simplify the downloading process. Simply insert the command ENABLE.DOWNLOAD at the top of the first file to be downloaded to the QCard. This function makes sure that any previously downloaded code is transferred to RAM, and calls DOWNLOAD.MAP to ensure a RAM-based memory map that enables compilation of code. At the end of the last file to be downloaded, insert the command ALL.TO.FLASH. This copies the compiled code in pages 4, 5 and 6 to flash, sets the STANDARD.MAP, and calls SAVE so that the RESTORE command can be used to recover after a crash or a COLD restart during the development process.

To support a "bullet-proof" kernel extension to enable firmware upgrades, an optional "boot vector" is implemented using the SET.BOOT.VECTOR function. This allows the posting of a function that is executed before the autostart program is run; see the glossary entry of SET.BOOT.VECTOR for details. The boot vector and its code are located on page 0x0C, a page that can be hardware write protected with the "page-C write protect" jumper. Removal of the boot vector is accomplished by invoking CLEAR.BOOT.VECTOR or by using the special cleanup mode described in the hardware documentation.

The V4.4x interpreter and its DIN, NEXT.NUMBER, and NUMBER functions now accept a leading "0x" or "0X" to indicate that hexadecimal base should be used when converting the number to binary.

The ?KEYPAD, ?KEYPRESS and KEYPAD functions have been upgraded to support more than 20 keys. They work identically to prior versions for keys 0 through 19, but add support for an additional 20 keys with numbers 20 through 39.

INIT.SPI now configures the SPI to sample data on the falling trailing edge of the SPI clock. This is consistent with the data transfer protocol of the on-board battery-backed real-time clock. The user may freely change the SPI configuration to meet the needs of the application program.

This page is about: Changes in Available V4.4 Forth Functions, Compared to Prior V4.08 Forth Kernel, Functions Make It Easy for Forth Programmers to Download Code into RAM, Transfe Compiled Code to Flash – Describes changes in the available V4.4 Forth functions compared to the prior V4.08 Forth kernel, including a set of functions makes it easy for Forth programmers to manage the downloading of code into RAM and the transfer of the compiled code to flash.