|
||
ALPHANUMERIC WORD DEFINITIONS
- Assembler word. Used before an assembly mnemonic to reference the B register. E.g. B ROL, rotate left register B.
- 1024 (decimal) This constant leaves the number of bytes per buffer, the byte count read by BLOCK .
- 1 This constant leaves the number of blocks per editing screen. By convention an editing screen is 1024 bytes organized as 16 lines of 64 characters each.
addr - Calculate the backward branch offset from HERE to addr and compile into the next available dictionary memory address.
- addr A user variable containing the current number base used for input and output conversion. Set to decimal 10 at power-up.
n - Sets the baud rate of serial port 1 at pins SIN1 and SOUT1. The value of n should be 75, 110, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 31250, 38400 or 76800. To set the baud rate on the 6301 microprocessor is complex since up to 3 internal registers may need to be set. BAUD sets registers TCONR, TCSR3 and RMCR from a table. Timer 2 is unused for baud rates 300, 1200, 9600 and 76800. At power-up the TDS9092 baud rate is 9600 but can be changed either during development or by an application program. E.g. : WORK 1200 BAUD . etc ;
- Sets up editor control codes to match BBC Basic and Viewdata.
- addr n COMPILING: Occurs in a colon definition in the forms: BEGIN . UNTIL BEGIN . AGAIN or BEGIN . WHILE . REPEAT At compile-time BEGIN leaves its return address and n for compiler error checking. EXECUTING: At run-time BEGIN marks the start of a sequence that may be repetitively executed. It serves as a return point for the corresponding UNTIL AGAIN or REPEAT . When executing UNTIL a return to BEGIN will occur if the top of the stack is false. For AGAIN and REPEAT a return to BEGIN always occurs.
- addr Assembler word. Used in either of these structures:
- Emits the ASCII character 7 which sounds the bell in the terminal.
n1 n2 n3 - f Tests whether n1 is in the range n2 to n3 inclusive. f=1 if n1 >= n2 and n1 =< n3 , otherwise f=0. See WITHIN .
n1 - n2 The result n2 is a single number which, when considered as a binary number, has just one bit set. This is bit 0 to bit 15 according the input number n1. Only the bottom 4 bits of n1 are taken into account in deciding the result. E.g. : BITSET ( n - BIT $17 C@ OR $17 C! ; Now 5 BITSET will set bit 5 in Port 6 (at address 17) and 2 BITSET will set bit 2 etc. Another example: DECIMAL 14 BIT 2 BASE ! U. DECIMAL This displays 0100000000000000 .
n - Assembler word. Logically AND immediate or memory content with accumulator but don't store the result. Used to test if certain bits are set. E.g. $80 ## B BIT, ANDs the immediate data hex 80 with the content of accumulator B. The Z flag is not set if bit 7 of B was set.
- 20 (hex) A constant that leaves the ASCII value for blank (a space character).
addr count - Fill an area of memory beginning at addr with blanks.
- addr An LCD user variable. Returns address where a flag is kept. If the flag is 1 the cursor character blinks, if 0 it does not. Use ENTRY-SET to send the flag to the LCD. BLINK is initialised to 0 at power up and by COLD but is not changed by reset or on re-start by the watchdog. E.g. 1 BLINK ! ENTRY-SET to cause blink.
- addr A user variable containing the block number being interpreted. If zero the input is taken from the terminal input buffer.
n - addr Leaves the memory address of the block buffer containing block n. If the block is not already in a buffer, it is transferred from mass memory to whichever buffer was least recently written. If the block occupying that buffer has been marked as updated, it is re-written to mass memory before block n is read into the buffer. Blocks are disabled on power-up on the TDS9092. To enable them, include $B400 06 +ORIGIN ! in your program. See also <BLOCK> BUFFER UPDATE FLUSH .
addr - Assembler word. Used to compile a branch to a particular address addr. E.g. NEXT BRA, to re-enter the Forth system from assembler.
- The run-time procedure to unconditionally branch. An in-line offset is added to the interpretive pointer to branch ahead or back. BRANCH is compiled by ELSE AGAIN REPEAT .
addr - Assembler word. Use to call a subroutine at address addr from within a CODE definition. It assembles a branch or jump to subroutine, the former if the distance in bytes is low enough. E.g. CODE COMX XGDX, COMD, XGDX, RTS, SMUDGE CODE COM PULX, ' COMX BSR, PSHX, END-CODE Usually the situation is more complex. COMX is a subroutine which complements the X register. It cannot be used directly from Forth. COM is a Forth word which complements the top of the stack by pulling it to the X register, calling the subroutine and putting it back again. Note how ' COMX finds the required address.
n - addr Obtains the next memory buffer, assigning it to block n. If the content of the buffer is marked as updated it is written to the mass memory, the block is not read from the mass memory. The address left is the start of 1024 bytes within the buffer for data storage. Blocks are disabled on power-up on the TDS9092. To enable them, include $B400 06 +ORIGIN ! in your program. |