|
||
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/ D/S M*/ T* T/ .
D+ ANS
d1 d2 - d3
Add d2 to d1 giving the sum d3.
D- ANS
d1 d2 - d3
Subtract d2 from d1 giving the difference d3.
D-A
n channel -
Digital to Analog conversion. Put digital value n (0 to 250) to channel (0 to 2). A pulse-width modulated waveform is produced on pin PW1 PW2 or PW3 (corresponding to channels 0 to 2). Use a filter to give the analog level. E.g. 10k resistor and 1.0�F capacitor, or smaller values if an op-amp is used.
D. ANS
d -
Display a signed double number d followed by a space.
D.R ANS
d n -
Display a signed double number d right-aligned in a field n characters wide. If the number of characters required to display d is greater than n, all digits are displayed with no leading spaces in a field as wide as necessary.
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 also D*S D/S M*/ T* T/ .
D/S
d2 n - d2
Divides signed double number d1 (32-bit) by signed single number n (16-bit) to produce a double number quotient d2. See also D*S D/ M*/ T* T/ .
D0< ANS
d - flag
Flag is true if 32-bit number d is less than zero.
D0= ANS
xd - flag
Flag is true if the 32-bit number xd is equal to zero.
D2* ANS
xd1 - xd2
xd2 is the result of shifting xd1 one bit left, filling the vacated least significant bit with zero. Same as multiplying by 2 in two's complement arithmetic.
D2/ ANS
xd1 - xd2
xd2 is the result of shifting xd1 one bit right, leaving the most significant bit unchanged. Same as dividing by 2 in two's complement arithmetic.
D< ANS
d1 d2 - flag
Flag is true if d1 is less than d2.
D= ANS
xd1 xd2 - flag
Flag is true if xd1 is the same as xd2.
D>S ANS
d - n
n is the 16-bit equivalent of the 32-bit d. An ambiguous condition exists if d lies outside the -32768 to +32767 range of a signed single number.
DABS ANS
d - ud
ud is the absolute value of d.
DADD,
-
Assembler instruction, see assembler section and DADD in Programming Manual. Syntax example: B R2 R3 DADD, \ Add R2 and \ carry to R3 as decimal \ numbers. Must be \ byte-size
DAYS
- aa
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,
-
Assembler instruction, see assembler section and ADD:Q in Programming Manual. ADD:Q # -1 in Hitachi code. Examples: R2 DEC, \ Decrement \ register 2 B $FF00 )) DEC, \ Decrement \ byte at address FF00
DECIMAL ANS
-
Set the numeric conversion base to decimal 10. This value is already set at power-up on the TDS2020F.
DEFER
- File #EXTEND.TDS needed -
'<spaces>name' -
Create a definition for name. Reserve one cell of data space for execution vector, at compile-time set to error message 'NOT SET'. Changed by IS . Used to create forward references.
name EXECUTION: - aa Execute the stored execution vector. A program should initialise its contents.
DEFINITIONS ANS
- File #ANS.TDS needed -
-
Make the compilation word list the same as the first word list in the search order. Specifies that the names of subsequent definitions will be placed in the compilation word list.
DEPTH ANS
- +n
+n is the number of 16-bit values contained in the data stack before +n was placed there.
DIGIT
- File #EXTEND.TDS needed -
c base - n t or c base - ? 0
True if the char c is a valid digit in the given base. If true, n is the binary value of ASCII character c.
DIS
-
Disables Interrupt System by setting interrupt mask priority in the H8/532 microprocessor status register to level 7. NMI (Non-Maskable Interrupt) is not affected.
DISPLAY-SET
- File #EXTEND.TDS needed -
blink cursor on/off -
Transfers parameters for blinking, cursor visibility and display on or off to an alphanumeric LCD connected to chip select CS81C0.
DIV
d1 n1 - n2 n3
A subroutine (not an executable Forth word) common to SM/REM and FM/MOD . It does the basic division of d1 by n1 to give quotient n3 and remainder n2, without rounding. Should not normally be used independently of these words.
DIVXU,
-
Assembler instruction, see assembler section and DIVXU in Programming Manual. Syntax example: CODE UM/MOD @R7+ R4 MOVI, @R7+ R2 MOVI, @R7+ R3 MOVI, R4 R2 DIVXU, @-R7 R2 MOVO, @-R7 R3 MOVO, END-CODE
DMA xANS
d1 d2 - d3
d3 is the greater of d1 and d2.
DMIN ANS
d1 d2 - d3
d3 is the lesser of d1 and d2.
DMY
day.month.year - n or month.day.year - n
Converts a date entered in the double number format XX.YY.ZZ or 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 2072. This enables dates to be easily subtracted. E.g. (2004 is a leap year): 25.12.04 DMY 25.12.03 DMY - . displays 366 . If the word USA has been executed, the input format should be month.day.year. E.g. 12.25.04
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 up to that date. Leap years are taken into account. Valid from 1984 to 2072. The year parameter can be specified in any of three ways-2002, 02 or 102 are all equivalent. The word >DMY does the opposite conversion.
DNEGATE ANS
d1 - -d1
Negate d1, to give arithmetic inverse -d1.
DO ANS
COMPILATION: - 3 Append run-time action below to current definition. The action is incomplete until the following LOOP or +LOOP .
RUN-TIME: u1 u2 - R: - n1 n2 Set up loop control parameters with index u2 and limit u1. In an ANS Forth program, anything already on the return stack becomes unavailable until the loop control parameters are discarded.
DOES> ANS
COMPILATION: Append run-time action below to the current definition. Append the initiation action below to the current definition. Current definition remains not findable until the definition is completed with semi-colon. Used in conjunction with CREATE to form defining words like VARIABLE .
RUN-TIME: - R: nest-sys1 - Replace the execution action of the most recent definition, referred to as 'name' with the 'name' execution action given below. Return control to the calling definition specified by nest-sys1. 'name' should be defined with CREATE or a user-defined word that calls CREATE .
INITIATION: ?1 - ?2 aa R: - nest-sys2 Save nest-sys2, characteristic of the calling definition, Place name's data field address on the stack. The stack effects ?1 and ?2 represent arguments to 'name'.
name EXECUTION: ?1 - ?2 Execute the portion of the definition that begins with the initiation action appended by the DOES> which modified 'name'. The stack effects ?1 and ?2 represent arguments to and results from name respectively.
DP
- aa
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 ROM HERE . See HERE ALLOT VDP ROM RAM .
DPL
- aa
A user variable containing the number of digits to the right of the decimal or other valid separator on double-number integer input. The default value on single-number input is -1. See <?NUMBER> .
DPR
-
Assembler word. The Data Page Register.
DROP ANS
x -
Remove x from the stack.
DSUB,
-
Assembler instruction, see assembler section and DSUB in Programming Manual. Syntax example: B R2 R3 DSUB, \ Subtract R2 \ and carry from R3 as \ decimal numbers. \ Must be byte-size
DU< ANS
ud1 ud2 - flag
Flag is true if ud1 is less than ud2.
DUMP ANS
a n -
Examine n locations from memory address a. Use EDUMP to view memory above the first 64k bytes.
DUP ANS
x - x x
Duplicate x.
|