Go to Triangle Digital Support Home Page TDS9092 TECHNICAL MANUAL
Forth word list
V-C to ^_
Live website search
Enter key words
 

ALPHANUMERIC WORD DEFINITIONS


V-C

       -

Sets up editor control codes to match Volker-Craig and some other terminals.


VARIABLE

       n -

       - addr

SYNTAX: n VARIABLE cccc

COMPILING: Creates a dictionary entry for cccc and reserves 16 bits of ROM space, which at compile-time is initialised to n.

EXECUTING: At run-time the address of the reserved word is returned. See section USE OF VARIABLES to create variables in RAM.


VLIST

       -

Displays the names of the definitions in the CONTEXT vocabulary. Ctrl+C will terminate the listing.


VOC-LINK

       - addr

A user variable containing the address of a field in the definition of the most recently created vocabulary (of FORTH at power-up). All vocabulary names are linked by these fields to allow control for FORGETting through multiple vocabularies. See VOCABULARY .


VOCABULARY

       -

SYNTAX: VOCABULARY cccc

COMPILING: A defining word to create a vocabulary definition cccc .

EXECUTING: At run-time use of cccc will make it the CONTEXT vocabulary which is searched first by INTERPRET . The sequence cccc DEFINITIONS will also make cccc the CURRENT vocabulary into which new definitions are placed. cccc is also chained to include all definitions of the vocabulary in which cccc is itself defined. All vocabularies ultimately chain to FORTH . All vocabularies are immediate. In applications that must be put into PROM it is suggested that no more vocabularies be defined, all words forming part of the FORTH vocabulary. This is because otherwise you will be precluded from adding definitions to a system with turnkey PROM, since only FORTH is created in RAM.


VS

       - 28 (hex)

SYNTAX:   CODE cccc
   . VS IF, . THEN, . END-CODE

Assembler word. Condition code for use before IF, WHILE, and UNTIL, - see IF, . The IF, is true when in the status register V = 1.


VT52

       -

Sets up editor control codes to match VT52 terminals. Many other terminals, such as VT100, also have this mode.


W

       - 40 (hex)

Assembler word.  The address returned is the Forth system code field pointer.


WAI,

       -

Wait for interrupt. SLP, is similar but also reduces processor power consumption.


WAIT

       n -

Suspend operations for n units of time (n=1 to 32767). Each unit is approximately 64�s but a bit larger for small n. The watchdog timer is serviced but nothing else happens. See also MS and REST .


WARM

       -

Causes warm restart without initialisations normally carried out at power-up.


WARNING

       - addr

User variable enabling you to have substitute error messages instead of those given by the Forth compiler. Normally addr contains 0 and default messages like NOT UNIQUE are given. If the number addr contains is not zero then the number is taken as the code field address (cfa) of a word to be executed. E.g. to make a user-defined word FAULTS execute instead of the Forth error system:

 ' FAULTS CFA   WARNING !

Include this after defining FAULTS . The error number is passed to FAULTS on the stack.


WDT

       -

Resets the watchdog timer. This, and machine code equivalents, are included in most Forth branching words such as DO LOOP +LOOP UNTIL MS etc. so WDT will normally not be needed. If the TDS9092 resets itself without showing CRASHED MACHINE then the watchdog has timed out 106ms since it was last serviced. Insert WDT at a suitable place or read or write address hex 0160 in Forth or Assembler. The data is irrelevant.


WHERE

       n1 n2 -

Enters the editor at the screen containing the data block n2 and moves the cursor to the position indicated by n1. Use WHERE immediately after encountering an error during compiling (E.g. 1 LOAD ). The error systems puts the values of n1 and n2 on the stack, they are the values in IN and BLK when the error occurs.


WHILE


       addr1 n1 - addr1 n1 addr2 n2
       f -

SYNTAX:   : cccc .
   BEGIN 
. WHILE . REPEAT . ;

COMPILING: At compile-time WHILE compiles 0BRANCH and leaves addr2 as the position of the reserved offset. The stack values will be resolved by REPEAT .

EXECUTING: At run-time WHILE selects conditional execution based on a boolean flag f. If f is true (non-zero) WHILE continues execution of the true part through to REPEAT , which then branches back to BEGIN . If f is false (0) execution skips to just after REPEAT , leaving the structure.


WHILE,

       addr1 - addr1 addr2

Assembler word. Used in a structure like: BEGIN, . xx WHILE, . REPEAT, This is the most general form of loop. Despite its high structure it assembles to simple machine code - no extra op codes. xx is a condition code like EQ . See IF, .


WIDTH

       - addr

A user variable containing the maximum number of letters saved in compilation of a definition's name. Range is 1 to 31. The name's actual character count and its letters, up to the number in WIDTH , are saved. The value may be changed at any time within the limits given. The default width is 31.


WIPE

       -

Blanks alphanumeric LCD display and restores character pointer in variable AT to the first position. See AT and 0AT .


WITHIN

       n1 n2 n3 - f

Tests whether n1 is within the range n2 to n3 where n2 and n3 are like the parameters of a DO loop, n3 is one beyond the range so that the difference between n3 and n2 is the number of possible true values. f=1 if n1 >= n2 and n1 < n3, and f=0 otherwise. See also BETWEEN .


WORD

       c -

Reads the next text characters from the input stream (defined by BLK and IN ) until a delimiter c is found. The packed character string is stored at HERE . WORD leaves the character count in the first byte, followed by the characters, and ends with two or more blanks. Leading occurrences of c are ignored. If BLK is zero, text is taken from the terminal input buffer, otherwise it is taken from the block number stored in  BLK . IN gives the offset into the terminal input buffer or block where WORD is to begin.


XGDX,

       -

Assembler word. Exchange the D and X registers. The D register is A and B together, with A as the more significant byte.


XOR

       n1 n2 - n3

n3 is the logical exclusive or of n1 and n2.


[

       -

SYNTAX: : cccc . [ words. ;

Used in a colon definition to suspend compilation. The words after [ are executed, not compiled. This allows calculation or compilation exceptions before resuming compilation with ] . See LITERAL and ] .


[COMPILE]

       -

SYNTAX:   : cccc
   
. [COMPILE] immediate-word . ;

Forces compilation of an immediate definition that would otherwise execute during compilation.


]

       -

Resume (or start) compilation. See [ .


^_

       - n

This is a set of words  ^@  ^A  ^B  etc. to put numbers equivalent to ASCII control characters on the stack. The above leave 0, 1 and 2 respectively for example. More convenient and giving better documentation than the number equivalent. See also "_ .

Go to Triangle Digital Support Home Page Go to top   Next page