Go to Triangle Digital Support Home Page TDS2020F TECHNICAL MANUAL
Forth word list
B to BTSTI,
Live website search
Enter key words
 

B

 

-

 

Assembler word. Sets operand size to 8 bits (byte). Use only in a CODE definition and as first word in an instruction. See also . E.g.

B $FF00 )) R3 ADD, \ Add byte

  \ at hex FF00 to R3

 

BASE                    ANS

 

- aa

 

aa is the address of a cell containing the current number conversion base, 2 to 36. At power-up the value is 10.

 

BAUD

 

n -

 

Sets the baud rate of the main serial port at pins SIN1 and SOUT1. The value of n should be 75, 110, 150, 300, 600, 1200, 2400, 4800, 9600, 19200, 31250, or 38400. To set the baud rate on the H8/532 microprocessor is complex since two internal registers may need to be set. BAUD makes it easy. It looks up the correct values for registers and sets them accordingly. At power up the TDS2020F baud rate is 9600 but can be changed either during development or by an application program. E.g.

: WORK 1200 BAUD . etc ;

 

BCLR,

 

-

 

Assembler instruction, see assembler section and BCLR in Programming Manual. Syntax example:

R2 R3 BCLR, \ In R2 test then

 \ clear the bit number found

 \ in the bottom 4 bits of R3

 

BCLRI,

 

-

 

Assembler instruction, see assembler section and BCLR in Programming Manual. Syntax example:

B $FF8E )) 2 ## BCLRI,

 \ Test then clear bit 2 of

 \ address FF8E, the data

 \ register of Port 7,

 \ i.e. clear output bit P72

 

BEGIN                    ANS

 

SYNTAX:

BEGIN . UNTIL   or

 

BEGIN . AGAIN   or

 

BEGIN . WHILE . REPEAT

 

COMPILATION:   - dest 1

Put the next location for a transfer of control, dest, onto the stack. Append the run-time action below to the current definition. Used at the start of loops when the number of times the loop will be executed is not known.

 

RUN-TIME:   -

Continue execution.

 

BEGIN,

 

- addr

 

Assembler word. Used in either of these structures:

BEGIN, . xx UNTIL, or

BEGIN, . xx WHILE, . REPEAT,

It leaves the value of the dictionary pointer on the stack, which is used by UNTIL, or REPEAT, to assemble a branch back to the start. Use only in a CODE definition. See WHILE, REPEAT, and UNTIL, .

 

BETWEEN

 

- File #EXTEND.TDS needed -

 

n1 n2 n3 - flag

 

Tests whether n1 is in the range n2 to n3 inclusive. Flag is true if n1 >= n2 and n1 =< n3, otherwise it is false. See WITHIN .

 

BIT

 

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.

HEX

: BITSET

 BIT FF8E C@ OR FF8E C! ;

Now 5 BITSET will set bit 5 in Port 7 (at address FF8E) and 2 BITSET will set bit 2 etc. Another example:

DECIMAL

14 BIT 2 BASE ! U. DECIMAL

This displays 100000000000000 .

 

BL                    ANS

 

- 32

 

A constant that leaves the ASCII value for blank (a space character).

 

BLANK                    ANS

 

ca u -

 

If u1 is greater than zero, store the value decimal 32 (space) in u consecutive character positions beginning at ca.

 

BLK                    ANS

 

- aa

 

A user variable containing the block number being interpreted. If zero the input is taken from the terminal input buffer.

 

BNOT,

 

-

 

Assembler instruction, see assembler section and BNOT in Programming Manual. Syntax example:

R2 R3 BNOT, \ In R2 test

 \ then invert the bit

 \ number found in the

 \ bottom 4 bits of R3

 

BNOTI,

 

-

 

Assembler instruction, see assembler section and BNOT in Programming Manual. Syntax example:

B $FF8E )) 2 ## BNOTI,

 \ Test then invert bit 2 of

 \ address FF8E, the data

 \ register of Port 7, i.e.

 \ invert output bit P72

 

BODY>

 

- File #EXTEND.TDS needed -

 

aa - xt

 

xt is the execution token of the word whose data field address (parameter field address, pfa) is address aa.

 

BR

 

-

 

Assembler word. Base register.

 

BRA,

 

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. Use only in a CODE definition.

 

BSET,

 

-

 

Assembler instruction, see assembler section and BSET in Programming Manual. Syntax example:

R2 R3 BSET, \ In R2 test then

 \ set the bit number found

 \ in the bottom 4 bits of R3

 

BSETI,

 

-

 

Assembler instruction, see assembler section and BSET in Programming Manual. Syntax example:

B $FF8E )) 2 ## BSETI,

 \ Test then set bit 2 of

 \ address FF8E, the data

 \ register of Port 7,

 \ i.e. set output bit P72.

 

BSR,

 

addr -

 

Assembler word. Use to call a subroutine at address addr from within a CODE definition. It assembles a branch to subroutine. E.g.

CODE 3X  R3 R4 MOVI, R3 SHAL,

 R4 R3 ADD, RTS, SMUDGE

CODE 1.5X  @R7+ R3 MOVI,

 ' 3X >BODY BSR, R3 SHAR,

 @-R7 R3 MOVO, END-CODE

This is a contrived example. Usually the situation is more complex. 3X is a subroutine that multiples register 3 by 3. It cannot be used directly from Forth. 1.5X is a Forth word which multiplies the top of stack by 1.5. The top of stack is pulled to R3, multiplied by 3 using the subroutine then divided by 2. It is then put back to the stack. Note how ' 3X >BODY finds the required address. Use only in a CODE definition.

 

BTST,

 

-

 

Assembler instruction, see assembler section and BTST in Programming Manual. Syntax example:

R2 R3 BTST, \ In R2 test the

 \ bit number found in the

 \ bottom 4 bits of R3

 

BTSTI,

 

-

 

Assembler instruction, see assembler section and BTST in Programming Manual. Syntax example:

B $FF8E )) 2 ## BTSTI,

 \ Test bit 2 of address

 \ FF8E, the data register

 \ of Port 7, i.e. check

 \ input bit P72

 

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