Projects / Interp / Comments

Comments for Interp

25 May 2011 22:03 kingdl802

2011-05-25: Interp Release 01.08.00
introduces Interp Image Format (IIF) files. They are portable
binary containers for your interp programs. They are the
perfect way to distribute an interp-based solution to a
non-technical audience.

This release also incorporates Patch 01.07.01,
Patch 01.07.02, and Patch 01.07.03 in their entirety. Keep
reading the following three news items for more, and
read all the release details in the NOTES and the CHANGELOG.

16 Jan 2011 15:56 kingdl802

Release 01.07.00

2011-01-15:Add a new QUOTE (") and M-QUOTE (M") modifier (C) for the '#' meta-character to print one ASCII character. The original "#c" will print -anything- you pass to it on the data stack. It does not check the data. It assumes you have given it exactly what you want to print. On the other hand, the new "#C" will only print ASCII characters in the inclusive range 0x20-0x7E. If you pass it something outside this range, it will print '.' instead.

Add two new print meta-characters, '!' and '@', to QUOTE (") and M-QUOTE (M"). These new print facilities make it possible to print values taken directly from memory as bytes, halfword, or words. A memory address called the PRINT_ITERATOR_ADDRESS (System Constant 38) is set via "!A". This address is automatically incremented/decremented as each location is printed. Whether to increment or decrement is determinted by PRINT_ITERATOR_MODE (System Constant 39.) It is initialized to auto-increment by "!A", but can be switched to auto-decrement by "!d", or back to auto-increment by "!i". Auto-decrement requires a more complex implementation because the decrementing can only be done just before printing the value of the -next- memory location. That is handled by PRINT_ITERATOR_FIRST_ONE (System Constant 40.) It is set TRUE by "!A", "!i", and "!d", and set FALSE by the first following '@' meta-character.

As with the '#' print meta-character, the '@' may be followed by an optional modifier. Without a modifier, the value is read from memory as a 32-bit word and printed in the current output base. If a modifier is present, the value is read from memory as indicated below (HALFWORD is 2-bytes, and WORD is 4-bytes):
a - (WORD) print the print iterator address as a notated (0x)
hexadecimal word (10 characters). Print iterator address is
not changed by this modifier.
A - (WORD) print the print iterator address as a hexadecimal
word (8 characters). Print iterator address is not changed
by this modifier.
b - (BYTE) print value as a notated (0x) hexadecimal byte
(4 chars)
B - (BYTE) print value as a hex byte (2 characters)
c - (BYTE) print value as one ASCII character
C - (BYTE) print value as one ASCII character, prints '.' if the
character is non-printable
d - (WORD) print value as free-form decimal
Dn - (BYTE/HALFWORD/WORD) display decimal value right-
justified in an n-digit field. The range of n is 0-9 with 0
representing a 10-digit field and all other values
representing their equivalent field width. The size of
memory read is determined by the specified field width:
BYTE - D1, D2, and D3
HALFWORD - D4 and D5
WORD - D6, D7, D8, D9, and D0
h - (HALFWORD) print value as a notated (0x) hexadecimal
halfword (6 chars)
H - (HALFWORD) print value as a hex halfword (4 characters)
s - (WORD) use value as the address of a null-terminated
string of ASCII characters, and print the entire string or
"NULL" if the value (treated as pointer) is NULL.
S - (string length+1) use value as a zero-terminated string
of ASCII characters, and print the entire string
T - (WORD) treat the value as elapsed time in microseconds
and print it as hh:mm:ss.uuuuuu, where "hh" is hours, "mm"
minutes, "ss" seconds, and "uuuuuu" microseconds
w - (WORD) print value as a notated (0x) hexadecimal word
(10 chars)
W - (WORD) print value as a hex word (8 characters)

NOTE: these modifiers (bBhHwW) specify minimum field
width. If the value is larger, it still prints properly.

NOTE: Each modifier (except aA) increments the print
iterator address after reading the value.

NOTE: the 'S' modifier is illegal when outo-decrement mode is
enabled ("!d") because of the uncertainty associated with
searching backwards for the beginning of a variable-length

Because there are now two new print meta-characters, you are advised to check through your scripts for '!' or '@' in any QUOTE or M-QUOTE print statement, and escape them with a preceding '\' character.

For working examples that use the new print iterator, look in DOC/SAMPLE_SCRIPTS for,,,,,, and

10 Jul 2010 17:04 kingdl802

Release 01.06.00

2010-07-08: Interp Release 01.06.00 continues to improve integration with embedded environments by reducing it's c library requirements. Now you can use an alternate library, source code provided, that replaces the necessary functions needed from strings.h and ctype.h. This idea can be extended to replace other library functions as needed.

At the language-level, Release 01.06.00 prevents the use of several interactive-only commands within functions: Xd (X-OUT-DEFINITION), Xg (X-OUT-FUNCTIONS), dG (GLOBAL-DEFINITION), dL (LOCAL-DEFINITION), dg (LIST-GLOBALS), dl (LIST-LOCALS), and v (VERSION.)

Interp converted to the GPLv3 license.

12 Jun 2010 13:17 kingdl802

Release 01.05.00

2009-10-14: Interp Release 01.05.00 continues the theme of improving the usefulness of the language by adding the "#assign" directive to the outer interpreter as a way of creating macros that are defined during execution of your scripts. (Scripts are sections of interp code that are not inside function definitions - although they may call functions.) This technique can take you into the world of macros whose definitions can be calculated values or strings that are created on the spot.

21 Mar 2009 11:58 kingdl802

Release 01.02.00

2009-03-21: This version adds the ability to control memory use during build-time, including the sizes of the data stack, loop control stack, function return stack, global/local variable areas, input buffer, concatenation/ execution buffer, and whether or not global and local functions have private data (their own local variables, and local functions.)

It also adds the ability to access the build configuration parameters during run-time through the system constants ("K") operator.

The "-q" CLI option and the "#quit" outer interpreter directive were also added. They allow you to tell interp to quit on the next error (which cancels the active "-C" option or "#CONTINUE" directive.)

Plus this release fixes a CLI bug that occurs when a run-time error occurs while reading input from a file via the "-f" option.


Project Spotlight


An open, cross-platform journaling program.


Project Spotlight


A scientific plotting package.