Go to Triangle Digital Support Home Page TDS9092 TECHNICAL MANUAL
Forth word list
D*/ to DUP
Live website search
Enter key words
 

ALPHANUMERIC WORD DEFINITIONS


D*/

       d1 n1 n2 - d2

Multiply signed double number d1 (32 bits) by signed single number n1 (16 bits) and then divide by signed single number n2 (16 bits), to form a signed double number d2 (32 bits). A 48-bit intermediate product is used for accuracy. Use to scale a signed double number since d2=d1* n1/n2. See also  U*/  T*  T/  D/  D*S  D/S .


D*S

       d1 n - d2

Multiply signed double number d1 (32 bits) by signed single number n (16 bits) to form a signed double number product d2 (32 bits). See also  D/S  D*/  U*/ D/  T* T/ .


D+

       d1 d2 - d1+d2

Leave the double number (32-bit) sum of two double numbers.


D+-

       d1 n - d2

Apply the sign of n to the double number d1, leaving it as d2.


D-

       d1 d2 - d1-d2

Leave the double number (32-bit) difference of two double numbers.


D.

       d -

Display a signed double number from a 32-bit twos complement value d. The high order 16 bits are most accessible on the stack. Conversion is performed according to the current radix in BASE . One space follows.


D.R

       d n -

Display a signed double number d right aligned in a field n characters wide.


D/

       d1 d2 - n

Divides signed double number d1 (32-bit) by signed double number d2 to produce a single number n (16-bit) quotient. See D/S D*S  T* T/  D*/  U*/ .


D/S

       d1 n - d2

Divide signed double number d1 (32 bits) by signed single number n (16 bits) to form double number quotient d2 (32 bits). See also  D*S  D*/  U*/ D/  T*  T/ .


D0=

       d - f

Leave f=1 if the double number is equal to zero, otherwise f=0.


D<

       d1 d2 - f

Leave a true flag if d1 is less than d2; otherwise leave a false flag.


D=

       d1 d2 - f

Leave f=1 if double number d1 is equal to double number d2, otherwise f=0.


D>F

       d - n

Used in fractional arithmetic. Converts double number d to a single number n representing a fraction. Operators  +  -  *. /. SIN  COS  LOG ALOG  are available to manipulate such fractions and results can be printed as real numbers by  .F .  Example:

 0.2500 D>F 0.8000 D>F /.  .F

This prints the result 0.3125 which is 0.25 divided by 0.8 .


DAA,

       -

Assembler word. Decimal Adjust A. Converts binary add of BCD characters into BCD format.


DABS

       d - ud

Leave the absolute value ud of a double number (32-bit) d.


DAYS

       - addr

A system variable containing the number of days since 1st Jan 1984 (that day is 0). If date has not been set it has the number of days since power-up. See TICKS .


DEC,

       n -

Assembler word. Decrement memory location or accumulator. E.g.

 $8000 DEC,

will subtract 1 from the content of address hex 8000.


DECIMAL

       -

Set the numeric conversion base for decimal input and output.


DEFINITIONS

       -

SYNTAX: cccc DEFINITIONS

Set the CURRENT vocabulary for new definitions to the CONTEXT vocabulary used for searches.


DEGRAD

       n1 - n2

Used for fractional arithmetic. Converts a fraction n1 representing degrees to a fraction n2 representing radians.  See  SIN for example of use.


DES,

       -

Assembler word. Decrement stack pointer register. Add one unspecified byte to stack.

 


DEX,

       -

Assembler word. Decrement X register.


DIGIT

       c n1 - n2 tf   (ok)
       c n1 - ff       (bad)

Converts the ASCII character c (using base n1) to its binary equivalent accompanied by a true flag. If the conversion is invalid it leaves only a false flag.


DIS

       -

Disables Interrupt System. NMI (non-maskable interrupt) is not affected.


DISPLAY-SET

       -

Transfers parameters for blinking, cursor visibility and display on or off to an alphanumeric LCD connected to chip select CS01C0.


DLITERAL

       d -
       d1 - d2

COMPILING: If compiling, compile a stack double number into a literal. Later execution of the definition containing the literal will push it to the stack.

EXECUTING: If executing do nothing. The double number remains on the stack.


DMINUS

       d1 - d2

Convert d1 to its double number two's complement.


DMY

       day.month.year - n
      

Converts a date entered in the double number format XX.YY.ZZ to a 16-bit number n. This is the number of days since 1st Jan 1984 to that date. Leap years are taken into account. Valid from 1984 to 2073. This enables dates to be easily subtracted. Eg (1996 is a leap year):

 25.12.96 DMY
 25.12.95 DMY - .

displays 366 .


DMY>

       day  month  year - n

Converts three numbers on the stack which represent day, month and year to the number of days since 1st Jan 1984 to that date. Leap years are taken into account. Valid from 1984 to 2073. >DMY does the reverse.


DO

       addr n -
       n1 n2 -

SYNTAX: : cccc . DO . LOOP . ;
( or n +LOOP )

COMPILING: When compiling within a colon definition DO compiles (DO) , leaves the following address addr and n for later error checking.

EXECUTING: At run-time sets up loop control parameters with index n2 and limit n1. Anything on the return stack becomes unavailable until the loop control parameters are discarded. On the TDS9092 the index n2 is on top of the return stack, and the limit n1 is under it, during the loop.


DOES>

       -

Defines the run-time action within a high level defining word. DOES> alters the code field and the first parameter of the new word to execute the sequence of compiled word addresses following DOES> . Used in combination with <BUILDS . When the DOES> part executes it begins with the address of the first parameter of the new word on the stack. This allows interpretation using this area or its contents.


DOWN

       -

Moves the terminal cursor down one position. If this does not work see HOME .


DP

       - addr

A user variable, the dictionary pointer, which contains the address of the next free memory byte above the dictionary. The value may be read by HERE . See HERE and ALLOT .


DPL

       - addr

A user variable containing the number of digits to the right of the decimal on double number integer input. It may also be used to hold output column location of a decimal point in user generated formatting. The default value on single number input is -1.


DROP

       n -

Remove n from the stack


DUMP

       addr u -

Display the memory content of u successive addresses starting at addr. On TDS9092 both hex and character formats are displayed.


DUP

       n - n n

Duplicate n.

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