LMI Forth Product Catalog

Previous Page TOC Next Page


LMI UR/FORTH

LMI's high-performance UR/FORTH development systems are designed for use in rich software and hardware environments. UR/FORTH systems let you make full use of your computer's operating system on machines with huge address spaces and memory protection without sacrificing the power of the interactive Forth environment.

The UR/FORTH interpreter/compilers incorporate the following features:

Forth-83 Standard;

• Advanced direct threaded code implementation with top of stack in register for maximum execution speed;

Segmented memory model with code, data, headers and dictionary hash table each in a separate segment;

• "Well-behaved" use of system dynamic memory allocation functions;

Completely hashed dictionary for extremely fast compilation;

Uniform file interface across all supported operating systems ;

• Powerful new string handling operators (search, extract, compare, and concatenate) and dynamic string storage manager;

May be linked with object modules created with an assembler or other high-level language compilers;

• Easy creation of headerless turnkey applications which may distributed without payment of further royalties or license fees;

• Relocatable binary overlay capability;

Enhanced user interface, including a SHELL command that allows you to run any operating system command, batch file, or program (either interactively or under the control of a Forth application) and examine its return code;

Table-driven full-screen editor and assembler supplied in both overlay and source code form (assembler for 16-bit MS-DOS version supports all 80286 and 80287 mnemonics, assembler for 80386/486/Pentium version supports all 32-bit 80386 and 80387 operations).

Each UR/FORTH system is supplied with a 500-page language reference manual and a 450-page tutorial. The tutorial was written by Michael Ham, noted Forth columnist, author, and programmer.

Implementation

UR/FORTH has been designed from the ground up for maximum compilation and execution speed. The key features of the UR/FORTH implementation are:

• segmented memory model

• object-compiled nucleus

• direct threaded code interpreter

• fully hashed dictionary

The segmented memory model allows UR/FORTH to make very efficient use of segmented memory; placing the dictionary, headers (symbol table), and hash table in separate segments which can be resized dynamically as needed. Proper use of segmentation allows UR/FORTH to run in protected memory environments, and conforms to the same memory usage conventions as most language translators for 80x86 and 68000 computers. This facilitates linkage of modules written in other languages (such as C or Fortran) to the UR/FORTH nucleus.

UR/FORTH's object-compiled nucleus is extremely modular. Over 200 separate object modules are linked together to produce the executable nucleus. Because the object modules are in the format used by the host operating system, the UR/FORTH nucleus can be recompiled, relinked and debugged using standard operating system utility programs.

The use of direct threaded code is natural given UR/FORTH's memory architecture. UR/FORTH address relocations, which would be handled in other Forth compilers by indirection (indirect threaded code or token threaded code) are managed by the operating system linker and loader. UR/FORTH also maintains the logical "top of stack" in a register, which particularly enhances the execution of the common Forth memory access, arithmetic, and stack operations.

The use of a fully hashed dictionary markedly improves compilation speed. The modular structure of the UR/FORTH dictionary allows forward references, redefinitions and headerless definitions. UR/FORTH compiles code up to ten times faster than conventional Forth systems with linked dictionary structures, even those with multi-threaded dictionaries.

More About Object Modules

The entire UR/FORTH nucleus is built from independent object modules, which are created with the system assembler or with a special LMI compiler that transforms Forth high level code directly into relocatable object records in the host system's standard format. These modules are maintained in a library and linked with an operating system linker, just like object modules created with a macro assembler or other high-level language compilers.

This highly-modular design allows you to tailor the UR/FORTH system to your application. You can replace supplied Forth primitives in the library with your own, then rebuild a modified UR/FORTH nucleus. You may also use your own object libraries to include special graphics or arithmetic routines in the UR/FORTH nucleus.

Programmers generating application programs for resale can build size-optimized, headerless applications by compiling their high-level Forth code into OBJ modules and linking those modules to the supplied UR/FORTH library. The linker automatically "prunes" the nucleus so that only the required primitives are built into the final executable file (as an example, a simple Forth application that prints "Hello World" generates a 2.5 Kbyte EXE file).

Video Support

UR/FORTH supports all text and graphics (all-points-addressable) display modes of the CGA, EGA, VGA, and Hercules video adapters. In text modes, UR/FORTH offers functions for:

• high speed display of text with control of all character attributes;

• selection of foreground, background, and border colors, and palette programming;

• setting or obtaining the current cursor position;

• clearing selected portions of the screen or the entire screen with a selected character attribute;

• a library of basic windowing functions;

• direct control of multiple display pages and "shadow buffering" for adapters and memory configurations that support paging.

In graphics modes, UR/FORTH contains built-in, highly efficient graphics drawing routines for:

• reading or setting individual pixels;

• line drawing;

• arcs, ellipses, and circles (with clipping);

• region fill with patterns or solid colors;

• bit-block moves;

• custom character sets;

• positioning of graphics text at any arbitrary graphics coordinate.

The graphics drawing primitives are all coded in native assembly language for maximum performance.

Floating Point Support

UR/FORTH is supplied with four separate libraries of floating point functions: software floating point, Intel 8087 floating point, Intel 80287 floating point, and Intel 80387 floating point. The four libraries are symmetric and provide Forth applications with the following classes of operators for 64-bit real numbers:

• arithmetic operations (addition, subtraction, multiplication, division, and square root);

• transcendental operations (common and natural logs and antilogs, exponentiation, trig and inverse trig functions, hyperbolic and inverse hyperbolic functions);

• floating point data structures and constants;

• floating point comparisons and stack operations.

The software floating point library can be used on any machine and allows maximum portability for floating point applications. The Intel 8087 floating point library can be used on any system with an Intel 8087, 80287, or 80387 processor and offers maximum portability for hardware assisted floating point; it provides approximately 40 times the speed of the software floating point implementation.

The 80287 floating point library can be used with either an 80287 or 80387 numeric coprocessor and takes advantage of the 80287/80387's automatic synchronization and and ability to transfer status directly to a register. The 80387 floating point library exploits the additional trasncendental instructions of that numeric coprocessor and provides approximately 75 times the speed of software floating point.

Special Considerations, 32-bit UR/FORTH for 80386/486/Pentium

80386 UR/FORTH contains a special loader that moves it into "extended memory" (the memory above the 1 MB boundary) for execution. It executes in the native 32-bit protected mode at the highest privilege level (Ring 0), thus, the programmer can access conventional memory, read or write I/O ports, or execute other privileged operations as necessary for device control. 80386 UR/FORTH supports demand paging, so the maximum size of your program is limited only by the amount of installed physical memory plus the amount of swap space available on the disk.

Although 80386 UR/FORTH executes in 32-bit protected mode, it relies on MS-DOS for file and record operations and similar system services. In order to obtain such services, 80386 UR/FORTH switches temporarily into real mode, performs any necessary address translation, and relays the request to MS-DOS. When the MS-DOS operation is completed, UR/FORTH switches the system back into protected mode to continue execution.

The area of conventional memory (the memory below the 640 KB boundary) which is not used by MS-DOS is available for the execution of real-mode applications under the control of 80386 UR/FORTH. 80386 UR/FORTH is compatible with XMS or VCPI-based memory managers.

Distribution and Hardware Requirements, 16-bit MS-DOS Version

The 16-bit MS-DOS version of UR/FORTH is distributed on two high-density 5.25" (1.2 MB) diskettes or two 3.5" (1.4 MB) microdisks, and requires the following hardware and software:

• MS-DOS or PC-DOS version 3.0 or later;

• an IBM-PC compatible personal computer based on an Intel 8088, 8086, 80286, or 80386 processor;

• 320 KB of free RAM;

• one disk drive;

• a video adapter compatible with the IBM MDA, CGA, EGA, or VGA, or a Hercules Monochrome Graphics Card.

UR/FORTH fully supports additional flexible disk drives, all fixed disks, serial ports, parallel ports, and mouse pointing devices when they are present.

Distribution and Hardware Requirements, 32-bit Version for 80386/486/Pentium

LMI's UR/FORTH for 32-bit protected mode is distributed on two high-density (1.2 MB) 5.25" diskettes or two high-density (1.4 MB) 3.5" microdisks, and requires the following hardware and software:

• MS-DOS or PC-DOS 3.0 or later;

• an 80386/486/Pentium-based ISA, EISA, or PS/2-compatible personal computer;

• 2 megabytes of RAM;

• one disk drive;

• a video adapter compatible with the IBM MDA, CGA, EGA, or VGA, or a Hercules Monochrome Graphics Card.

80386 UR/FORTH fully supports additional flexible disk drives, all fixed disks, serial ports, parallel ports, and mouse pointing devices when they are present.


Created January 1, 1996 / Last Modified January 12, 1996
Copyright (C) 1996 Laboratory Microsystems Inc.

Send EMAIL questions and queries to LMI@CERF.NET

Previous Page TOC Next Page


Contents of this web page do not and are not intended to reflect the views of CERFnet. The author of this home page is solely responsible for its contents.