Go to Triangle Digital Support Home Page TDS9092 TECHNICAL MANUAL
Forth word list
S->D to SWI,
Live website search
Enter key words



       n - d

Sign extend a 16-bit single number n to form a 32-bit double number d.


       - addr

An LCD user variable.  Returns address where a flag is kept.  If the flag is 1, SHIFT will move both cursor and message, if 0 just the cursor will move.  S/C is initialised to 1 at power-up and by COLD but is not changed by reset or on re-start by the watchdog. E.g. to move the cursor 4 places use this word:

 : TEST   0 S/C !
    4 0 DO SHIFT LOOP ;

Turn on cursor first. See CURSOR & R/L .


       - addr

A user variable that contains the initial value for the stack pointer. See SP! .


       b -

For I2C bus peripherals. Sends one byte to an I2C device. Sets both clock and data to be output. It then issues 8 positive-going clock pulses, setting an appropriate level on the data output (from the input byte) before each one. See I2C! .



Assembler word. Subtract accumulator B from accumulator A, leaving the result in A


       n -

Assembler word. Subtract immediate or memory with carry. E.g.

 $8000 B SBC,

subtracts the content of address hex 8000 from accumulator B and decrements by 1 if the carry flag is set beforehand.


- addr

User variable containing the block number of the block most recently referenced by LIST . SCR stands for screen.



Assembler word. Sets Carry flag.



Assembler word. Set interrupt mask flag to disable interrupts.



This is just used once, right at the end of a program and (usually) outside a definition. It sets up cold-start parameters to turn the system into a stand-alone one, i.e. so that it will power-up into your application program instead of the Forth interpreter. The last lines of the application program should look something like this. WORK is an infinite loop with get-out using ctrl+C from a terminal for debugging and maintenance purposes:

. (initialisations) .
. (program words) .
. (program words) .



Assembler word. Sets Overflow flag.



An LCD user variable.  Returns address where a flag is kept.  If the flag is 1 the display shifts when written to, if 0 it does not. Use ENTRY-SET to send the flag to the LCD.  SH 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 set entry-shift mode



Moves a message and/or cursor left or right on an alphanumeric LCD display. s/c=1 to shift both message and cursor or 0 for cursor only. r/l=1 for right or 0 for left. Put these two parameters into variables R/L and S/C before using this word. SHIFT is useful for showing a long message on a short display. The message can be made to move left along the display, or (with extra software) to rotate continuously.


       n d -

SYNTAX: <# . SIGN . #>

If n is negative add a minus sign to the left for the pictured numeric output string. n is discarded but d is maintained.



Used for fractional arithmetic. Converts n1 representing a fraction in radians, to n2 representing a fraction which is the sine of the angle. Range covered is 0 to pi/4.

Example to show sine of 50 degrees:

    50.00 D>F ( to fraction
    DEGRAD    ( to radians
    SIN .F ;

The result 0.7660 is printed.  See D>F .


       - 0809 (hex)

Gives address of jump table entry for Serial

Input-Output interrupt. Usually used before ASSIGN which places at this address a jump to the interrupt code.



Assembler instruction. Enter power-down mode until interrupt request is made.


       secs  mins  hrs - d

Converts three numbers on the stack representing hours, minutes and seconds to a double number. This is the equivalent number of 'ticks' since midnight, where one 'tick' is 53.3333ms (1125 per minute, see TICKS for details). The hours range is 0 to 23. No range checking is done on any of the inputs.



Toggles the 'smudge bit', bit 5, in the latest definition's name field. This prevents an incomplete definition from being found during dictionary searches until compilation is completed without error.



Initialise the stack pointer from the user variable S0 . Clears the stack.


       - addr

addr is the address of the uppermost byte of the top item on the stack before SP@ was executed.



Display one space.


       n -

Display n spaces, where n=1 to 32767.



Assembler word. Store accumulator A or B to memory. E.g.

 $9000 B STA,

copies the content of accumulator B to address hex 9000.



Puts the microprocessor into low power standby mode and turns off the power to the RS232 serial driver chip. The TDS9092 now takes only 3mA typically (without any external serial or parallel port loads). The watchdog will cause a reset and power up the system within 106ms. See section LOW POWER OPERATION for an example of use.



For I2C bus peripherals. Issued at the start of an I2C command. Sets both I2C ports to output. Pulls data, then clock to logic 0. See I2C! .


       - addr

A user variable which is true (non-zero) when in compilation mode, false (0) otherwise.



Sets up editor control codes for most standard terminals such as ADM3A and Televideo. On the TDS9092 these are the codes set up at power-up.


       n -

Assembler word. Store accumulators A and B to memory (i.e. register D). E.g.

 $9000 STD,

copies the content of A to address hex 9000 and B to address 9001.



Sets up editor control codes to match most standard terminals, but uses ctrl+W, ctrl+S, ctrl+Z & ctrl+A for cursor direction up, right, down and left instead of arrows.  Useful for terminals with no direction keys.  Note that with this setting use ctrl+K not ctrl+W to Kill a line and ctrl+L not ctrl+S to re-list.



For I2C bus peripherals. Issued at the end of an I2C command. Sets both I2C ports to output. Pulls clock then data to logic 1. See I2C! .



Assembler word. Store stack pointer to memory. E.g.

 $9000 STS,

copies the stack pointer to addresses  hex 9000 and 9001.


       n -

Assembler word. Store register X to memory. E.g.

 $9000 STX,

copies the content of register X to addresses  hex 9000 and 9001.


       n -

Assembler word. Subtract immediate or memory content from accumulator. E.g.

 45 ## A SUB,

subtracts 45 from the content of accumulator A


       n -

Assembler word. subtract immediate or memory from accumulator D, which is a A and B put together with A the more significant byte. E.g.

 $1234 ## SUBD,

subtracts hex 1234 from the 16-bit content of the pair of accumulators A and B.


       n1 n2 - n2 n1

Exchange the top two stack items.


       -0818 (hex)

Gives address of jump table entry for Software Interrupt. Usually used before ASSIGN which places at this address a jump to the interrupt code.  To make a software interrupt include SWI, (op-code 3F) in a machine code routine.



Assembler word. Software Interrupt. See SWI .

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