|
||
ALPHANUMERIC WORD DEFINITIONS
b addr - Store byte b at address addr.
b addr - Add lower byte of the second item on the stack to the byte at addr.
b - Store byte b into the next available dictionary byte, advancing the dictionary pointer. See also , and DP .
- 64 This constant leaves the number of characters on an editing line.
addr - b Fetch byte b from address addr.
n - Start of a CASE structure allowing a series of different operations dependent on the number input to the structure. The general form is: : TEST nx represents possible value(s) of n. cond is any conditional such as > = or < . For example try this: : TEST CASE 1 OF ." 1st case" ENDOF 2 OF ." 2nd case" ENDOF 3 OF ." 3rd case" ENDOF R 10 < IFCASE ." 4th to 9th case" ENDOF ." not 1st to 9th case" ENDCASE ;
- Assembler word. Compare accumulators B and A.
pfa - cfa Convert the parameter field address (pfa) of a definition to its code field address (cfa).
- addr A variable which holds the same content as the Port A and Port B configuration register. This register at address 01F0 is write only, it cannot be read back. Because of this is it useful to keep a copy in RAM so that one bit can be changed without affecting others. At power-up the content of CFIGM and the real configuration register is 00. Bits are allocated as follows:
Other bits are unused. See INKEY NEWKEY . E.g. CFIGM @ 2 OR DUP CFIGM ! This sets Port B to be an output.
- Sets up editor control codes to match some Cifer dumb terminals.
- Assembler word. Clears Carry flag.
- Assembler word. Clear interrupt mask flag to allow interrupts.
- May be compiled before an 8-bit literal in the Forth dictionary. At run-time the value of the literal is pushed on the stack.
n - Assembler word. Zero memory location or accumulator. E.g. B CLR, will clear accumulator B.
- Assembler word. A macro which assembles A CLR, B CLR, . Convenient for clearing the 16-bit D register (concatenated A and B).
- Assembler word. Clears two's complement overflow flag.
- 0803 (hex) Gives address of jump table entry for Timer 2 Counter Match Interrupt. Usually used before ASSIGN which places at this address a jump to the interrupt code. To enable this interrupt set bit 6 of the Timer Control/Status Register 3 at addr 1B.
from to count - Move the specified number of bytes beginning at address 'from' to address 'to'. The content of address 'from' is moved first proceeding towards high memory. If source and destination address areas overlap use this to move to lower memory addresses, otherwise use CMOVE> .
from to count - Move the specified number of bytes beginning at address 'from' to address 'to'. The content of address 'to' is moved first proceeding towards low memory. If source and destination address areas overlap use this to move to higher memory addresses, otherwise use CMOVE .
n - Assembler word. Compare immediate or memory content to accumulator. E.g. 123 ## B ADD, compares 123 to the content of accumulator B.
- Start of definition of a Forth word which is defined in assembler language and runs at machine code speed. E.g. CODE 4* PULD, ASLD, ASLD, PSHD, END-CODE This example multiplies the top of the stack by 4 (using two 16-bit left shifts).
- The cold start procedure which deletes all user-defined definitions and restarts via ABORT . Unlike the power-up situation COLD does not (i) zero the real-time clock (ii) reset mass memory area defined for use as screens and blocks (iii) blank screens or (iv) change terminal type in use.
n - Assembler word. complement each bit of accumulator or memory address. E.g. B COM, If B initially contained binary 00110111 it would be changed to 11001000.
- Assembler word. A macro which assembles A COM, B COM, . Convenient for inverting the 16-bit D register (concatenated A and B).
- SYNTAX: When the word cccc containing COMPILE executes, the execution address of nnnn is copied (compiled) into the dictionary. This allows compilation to be deferred until run-time.
n - SYNTAX: n CONSTANT cccc COMPILING: Creates a word cccc with its parameter field containing n. EXECUTING: When cccc is executed it will push the value n on to the stack.
- addr A user variable containing a pointer to the vocabulary first used for dictionary searches.
n1 n2 - Copies screen n1 to screen n2. n1 and n2 must be 1 to 13 since the TDS9092 has just 13 screens, otherwise the error message ? - MEM RANGE will occur.
n1 - n2 Used for fractional arithmetic. Converts n1 representing a fraction in radians, to n2 representing a fraction which is the cosine of the angle. Range is 0 to pi/4. See SIN for example.
addr1 - addr2 n Leave the address addr2 and byte count n of text beginning at address addr1. It is presumed that the first byte at addr1 contains the text byte count and the actual text starts with the second byte. Typically COUNT is followed by TYPE .
n - Assembler word. Compare immediate or memory content to 16-bit X register. E.g. $8000 ## CPX, compares hex 8000 to the content of the X register.
- Transmit a carriage return and line feed to the selected output device, Serial Port 1 by default. Zero variable OUT . See 'EMIT .
- SYNTAX: CREATE cccc COMPILING: A defining word used by such words as CODE and CONSTANT to create a dictionary header for a Forth definition. The code field contains the address of the word's parameter field. The new word is in the CURRENT vocabulary.
- 24 (hex) SYNTAX: Assembler word. Condition code for use before IF, WHILE, and UNTIL, . The IF, is true when in the status register C=1 (carry flag set). See IF, .
- addr A user variable temporarily storing the stack pointer position for compilation error checking.
- addr A user variable containing a pointer to the vocabulary to which definitions will be added. Also it is the vocabulary searched if a word is not found in the CONTEXT vocabulary.
- addr An LCD user variable. Returns address where a flag is kept. If the flag is 1 the LCD cursor is on, if 0 it is not. Use DISPLAY-SET to send the flag to the LCD. CURSOR is initialised to 0 at power up and by COLD but is not changed by reset or re-start by the watchdog. E.g. To put the cursor on: 1 CURSOR ! DISPLAY-SET |