The EXAMPLES directory contains much useful code, ranging from simple tools to fully documented extensions. The best way to use the EXAMPLES directory is to browse through the source code. If you want to modify the code, we recommend that you move it to become part of your own application directory structure.
The following is a list of files as of November 2002.
CALENDAR.FTH | A perpetual calendar by Christophe Lavarenne. A choiceof calendars is provided. |
COSINE.FTH | Integer 14 bit cosine generation, suitable for 16 bitsystems. Tested on an RTX2000. |
DALLAS.Z80 | Driver for Dallas smart watch. Derived from sourcecode provided by Gerry Coe of Devantech Electronics (good lowcost boards) and modified by MPE. |
DEFINE.FTH | Provides an example of using defining words in boththe cross compiler and the target. |
DOUBLES.HI | This file implements double and some quad precisionnumber support using the primitives of PowerForth and high leveldefinitions. To obtain better performance some definitions shouldbe coded. These are indicated in the source code. |
HEXPAD.FTH | Keypad read routine for hex matrix keypad. The examplewas written for an 8051 port using four input bits and four outputbits. |
MATH.FTH | Miscellaneous math functions. |
PRIMES.FTH | Eratosthenes sieve - simple prime benchmark. |
SINCOS.FTH | Integer trig words from Kurt Heinz at Synics.These words provide a simple implementation of sine, cosine,and tangent functions. |
TESTCODE.FTH | A test harness for verifying the stack effect ofof Forth words and phrases. |
This directory contains code contributed by users for others to use, and MPE thanks the contributors.
The contents of this directory are untouched by MPE who provide no warranty at all on this code. Sorry about that.
AD.FTH | 68HC11 A/D handler. |
CW.FTH | This program will display text in CW (Morse Code) upon eitherthe system's console or the system's LEDs. |
DATES.FTH | Conversions between calendar date and Julian day numberfrom ACM# 199. Forth Scientific Library Algorithm #22 |
HIDEN.FTH | This code replaces REQUEST and SIGNAL in the MPE multitaskerbecause they allow a task to lock a semaphore multiple times. |
IEEE.FTH | Converts between MPE software floating point format for 32 bitsystems and IEEE 32 bit format. |
LANDER.FTH | Lunar Landing Simulation. |
29F0X0.FTH | 29F010/40 Driver code assuming a 16 bit bus using 2 devices. |
CANREAL.FTH | This file provides a set of words to act has a hardwareabstraction layer for the i82527 drivers when using the physicaldevice on the MPE H8 Board. |
I82527.FTH | i82527 CAN Controller Device Driver. |
DARTCTC.FTH | Serial i/o drivers for Z80/64180 + DART + CTC. |
KEYBRD.DRV | Code for 4x4 matrix keyboard connected via theMPE User Interface Card containing an 8255 PIA. |
LCD.DRV | Code for Hitachi LMG6400PLGR LCD Display.This will drive the Hitachi display connected via the MPE User InterfaceCard containing an 8255 PIA at base address defined in USERBRD.DRV. |
SCSI5380.FTH | SCSI interface words for RTX-2000 with a 5380 SCSIcontroller. |
SER2681.FTH | 2681 serial driver. This driver was written for aCavendish Automation board |
SMC91C9X.FTH | SMC9192/94/96 Ethernet Driver Code. |
USERBRD.DRV | Code for MPE User Interface Board Setup for cardcontaining an 8255 PIA at base address 0F000h. A glossary canbe found in USERBRD.TXT |
I2CLOAD.BLD | Build file for other I2C files. |
BCD.FTH | BCD to binary conversion and back |
I2CBASE.FTH | I2C primitives. This file requires an I2C bit-bangingI/O driver to have been compiled. |
I2CNOTES.DOC | I2C documentation in Word format. |
DEVICES\8574DRV.FTH | Driver for an 8574. |
DEVICES\8583DRV.FTH | Driver for an 8583. |
DRIVERS\I2CVFXDRV.FTH | Bit banging parallel port driverfor VFX Forth for Windows. |
SPINOTES.DOC | SPI documentation in Word format. |
SPILOAD.BLD | Build file that pulls in other SPI files. |
PPDRV.FTH | PC printer port access for VFX Forth for Windows. |
SPIVFXDRV.FTH | SPI primitives for VFX Forth for Windows. Requires PPDRV.FTH. |
SPIBASE.FTH | SPI byte read and write primitives. A lower level driver is required. |
25LCDRV.FTH | Driver for a Microchip 25LC series SPI EEPROM. |