Instruction set manual

This is the user manual for the instruction set of the Bedrock computer system.

This document is aimed at people who are learning about or writing programs for the Bedrock system. For people who are implementing the system from scratch, the architecture specification will provide more relevant information.

Overview

The Bedrock processor can perform 32 different operations, each of which can be combined with three mode flags to create one of 256 different instructions. Each instruction is stored as a single byte in memory.

The architecture manual should be read alongside this manual to understand how each instruction interacts with the rest of the system.

Instructions

Each instruction is a single byte that contains three mode flags and an operation. The three highest bits of the instruction represent the mode flags, and the lower five bits represent the operation:

Bits Description
80 r Return mode
40 * Wide mode
20 : Immediate mode
3F Operation

Each operation has a three letter name, and can be suffixed with the r, *, and : characters to set the corresponding mode flags (in that order).

Return mode

When the return mode flag is set (written as r), the working stack and the return stack will be swapped for that instruction. Whenever a byte would be pushed or popped from one stack, it will instead be pushed or popped from the other stack.

Wide mode

When the wide mode flag is set (written as *), the instruction will oeprate on double values instead of byte values. This will only affect variable-width values, those listed in the signature without a trailing . (byte) or * (double) character.

Immediate mode

When the immediate mode flag is set (written as :), the first argument value that would be popped from a stack by the instruction will instead be read from the bytes of program memory that follow the instruction. The program counter will be incremented for each byte read.

Operations

The signature column in the following table shows the values that are read from and written to the working stack by each operation, separated by --. An optional second signature represents the return stack.

Values followed by a . are bytes, values followed by a * are doubles, and values followed by neither have their width determined by the wide mode flag. Values wrapped in square brackets, as is [b*] for the JCS operation, are only conditionally pushed.

See Appendix A: Expanded reference for a table listing the signatures of all 256 instruction variants.

Op. Name Description Signature
00 HLT Halt the processor. ( -- )
01 PSH Move a value between stacks. ( -- x ) ( x -- )
02 POP Remove a value from a stack. ( x -- )
03 CPY Copy a value between stacks. ( -- x ) ( x -- x )
04 DUP Duplicate a value. ( x -- x x )
05 OVR Duplicate the next value down. ( x y -- x y x )
06 SWP Swap the top two values. ( x y -- y x )
07 ROT Rotate the top three values. ( x y z -- y z x )
08 JMP Jump to an address. ( a* -- )
09 JMS Jump to an address, keeping the current address. ( a* -- ) ( -- b* )
0A JCN Conditionally jump. ( t a* -- )
0B JCS Conditionally jump, keeping the current address. ( t a* -- ) ( -- [b*] )
0C LDA Load a value from a memory address. ( a* -- v )
0D STA Store a value to a memory address. ( v a* -- )
0E LDD Load a value from a device port. ( p. -- v )
0F STD Store a value to a device port. ( v p. -- )
10 ADD Add two values. ( x y -- r )
11 SUB Subtract one value from another. ( x y -- r )
12 INC Increment a value. ( x -- r )
13 DEC Decrement a value. ( x -- r )
14 LTH Test if a value is less than another. ( x y -- t. )
15 GTH Test if a value is greater than another. ( x y -- t. )
16 EQU Test if two values are equal. ( x y -- t. )
17 NQK Test if two values are inequal, keeping both. ( x y -- x y t. )
18 SHL Shift the bits in a value to the left. ( x y. -- r )
19 SHR Shift the bits in a value to the right. ( x y. -- r )
1A ROL Rotate the bits in a value to the left. ( x y. -- r )
1B ROR Rotate the bits in a value to the right. ( x y. -- r )
1C IOR Find the bits that are set in either value. ( x y -- r )
1D XOR Find the bits that are different in both values. ( x y -- r )
1E AND Find the bits that are set in both values. ( x y -- r )
1F NOT Invert the bits in a value. ( x -- r )

Stack operations

The stack operations will add, remove, transfer, and permute values on the stacks.

HLT

The HLT operation halts the Bedrock processor, terminating the current program. If any of the mode flags are set, it will do nothing. It does not affect the stacks.

Op. Working stack
00 ( -- )

Each byte of memory outside of the loaded program is set to 00 (the value of the HLT instruction), so jumping outside of the program will immediately terminate the system.

The names of the variants of this operation use a different scheme to every other operation. The immediate-mode variant has the name NOP (no operation). It has no effect on the system, and can be used as a placeholder instruction. The six remaining variants are named DB1, DB2, DB3, DB4, DB5, and DB6. They also have no effect on the system, and can be used as hooks for debug functionality. Refer to the individual user manual of your Bedrock system to see how these instructions can be used.

PSH

The PSH operation pushes a value onto a stack, or moves a value between stacks.

Op. Working stack Return stack
01 ( -- x ) ( x -- )

Using this operation in immediate mode will push the next value in the program to the working stack, or the return stack in return mode. This is such a common operation that there are aliases for each of the four immediate-mode variants: PSH:, PSH*:, PSHr:, and PSHr*: can each be shortened to :, *:, r:, and r*::

PSH:01 PSHr:02  ( 01    | 02    )
:03    r:04     ( 01 03 | 02 04 )

Using this operation without immediate mode will move a value from the return stack to the working stack, or the other way in return mode. This can be used to temporarily shift a value to another stack so that you can work on the values beneath it, moving it back into place once you’ve finished:

:01 :02  ( 01 02 |    )
PSHr     ( 01    | 02 )
ADD:08   ( 09    | 02 )
PSH      ( 09 02 |    )

POP

The POP operation removes a value from the top of a stack.

Op. Working stack
02 ( x -- )

This operation is used for removing values from the stacks that are no longer needed, keeping the stacks clear of debris:

:01 :02  ( 01 02 )
POP      ( 01    )
POP      (       )

The immediate-mode variants of this operation can be used to skip over a value without jumping:

:01 :02  ( 01 02 )
POP: 03  ( 01 02 )

CPY

The CPY operation copies a value from one stack to another.

Op. Working stack Return stack
03 ( -- x ) ( x -- x )

This operation acts similarly to the PSH operation, but it also keeps a copy of the value on the original stack. This can be used to preserve a copy of a value that is about to be modified or consumed, similar to the DUP operation:

:03     ( 03    |    )
CPYr    ( 03    | 03 )
ADD:05  ( 08    | 03 )

The immediate-mode variants of this operation can be used to push a value to both stacks with a single instruction:

CPY:01     ( 01       | 01       )
CPY*:0203  ( 01 02 03 | 01 02 03 )

DUP

The DUP operation duplicates the value at the top of a stack.

Op. Working stack
04 ( x -- x x )

This operation can be used to preserve a copy of a value that is about to be modified or consumed, similar to the CPY operation:

:03        ( 03    )
DUP        ( 03 03 )
ADD:05     ( 03 08 )

The immediate-mode variants of this operation will push two copies of a value to a stack with a single instruction:

DUP:01     ( 01 01             )
DUP*:0203  ( 01 01 02 03 02 03 )

OVR

The OVR operation copies the second value on a stack to the top of the stack.

Op. Working stack
05 ( x y -- x y x )

This operation can be used to preserve copies of two doubles that are about to be modified or consumed, similar to the DUP operation but reaching further down the stack:

*:0102 *:0304  ( 01 02 03 04             )
OVR*           ( 01 02 03 04 01 02       )
OVR*           ( 01 02 03 04 01 02 03 04 )

The immediate-mode variant OVR: can be used to duplicate a byte and convert it to a double with a single instruction:

:02         ( 02       )
OVR:00      ( 02 00 02 )

SWP

The SWP operation swaps the top two values on a stack.

Op. Working stack
06 ( x y -- y x )

This operation can be used to temporarily surface the second value on a stack to operate on:

:03 :05  ( 03 05 )
SWP      ( 05 03 )
ADD:40   ( 05 43 )
SWP      ( 43 05 )

The immediate-mode variant SWP: can be used to convert a byte to a double with a single instruction:

:02           ( 02    )
SWP:00        ( 00 02 )

ROT

The ROT operation rotates the top three values on a stack:

Op. Working stack
07 ( x y z -- y z x )

The modeless variant ROT can be used to surface a byte from underneath a double:

:02 *:0001  ( 02 00 01 )
ROT         ( 00 01 02 )

Control operations

The control operations will set the program counter, and access values from devices and program memory.

JMP

The JMP operation sets the program counter to address a*, jumping to that address in the program.

Op. Working stack
08 ( a* -- )

This operation can be used link together multiple pieces of a program, tracing a path between labels:

@A JMP:B   ( runs first  )
@C JMP:D   ( runs third  )
@B JMP:C   ( runs second )
@D HLT     ( runs fourth )

It can also create an infinite loop in a program. This can be used for an event loop, where the program repeatedly handles incoming device events:

@main
  :'.' STD:86     ( print a dot    )
  *:0040 STD*:38  ( set a timer    )
  *:1000 STD:00   ( wait for timer )
  JMP:main        ( loop to start  )

The return-mode variant JMPr can be used to return from a function call. It will consume the return address stored on the return stack by the JMS operation, returning control to just after the function was called:

:05            ( 05 |       )
JMS:add-2 HLT  ( 07 |       )

@add-2         ( 05 | addr* )
  ADD:02       ( 07 | addr* )
  JMPr         ( 07 |       )

JMS

The JMS operation sets the program counter to address a*, jumping to that address in the program and storing the original address b* on the return stack.

Op. Working stack Return stack
09 ( a* -- ) ( -- b* )

This operation can be used to perform a function call. The address of the next instruction will be stored to the return stack just before jumping, and a JMPr instruction will return to that address to end the function:

:05        ( 05 )
JMS:add-2  ( 07 )
JMS:add-2  ( 09 )
HLT        ( 09 )

@add-2     ( 05 | addr* )
  ADD:02   ( 07 | addr* )
  JMPr     ( 07 |       )

The return- and immediate-mode variant JMSr: can be used with the block syntax to implement anonymous functions (also called lambdas). The function address will be placed on the working stack, and the program will jump to the closing brace:

%λ: JMSr: ;

:05 λ:{ ADD:02 JMPr }  ( 05 λ* )
JMS HLT                ( 07    )

The same technique can also be used to implement anonymous strings:

%λ: JMSr: ;

λ:{"This is a string. "}  ( string* )

JCN

The JCN operation sets the program counter to address a* if the condition t is not zero, performing a conditional jump.

Op. Working stack
0A ( t a* -- )

This operation can be used to perform a conditional jump, jumping to a different section of the program if a value is true, or continuing without jumping if the value is false. A value is true if it isn’t zero:

:01 JCN:if-true
@if-false  HLT  ( program ends here if value was false )
@if-true   HLT  ( program ends here if value was true  )

This can also be used to loop over a section of code by using a loop counter as the jump condition. The loop counter will decrement with each iteration of the loop, and the program will keep looping until the counter reaches zero:

:08 @loop           ( loop eight times  )
  :'.' STD:86       ( print a dot       )
  DEC DUP JCN:loop  ( decrement counter )
POP                 ( remove counter    )

The immediate-mode variant JCN: can be used with the block syntax to skip over a block of code if a condition is true:

:02 :01                 ( 02 01 )
JMS:sort-ascending HLT  ( 01 02 )

@sort-ascending  ( a b -- c d )
  DUP* GTH JCN:{ SWP } JMPr

JCS

The JCS operation sets the program counter to address a* if the condition t is not zero, performing a conditional jump. The original address b* will be stored one the return stack if the jump was performed.

Op. Working stack Return stack
0B ( t a* -- ) ( -- [b*] )

This operation can be used to perform a conditional function call, similar to the JCN and JMS operations. It can only be used to call functions that don’t add or remove values from the stack, because any values pushed to the stack for the function will not be consumed if the function isn’t called. To work around this, the operation can be used to call a no-argument function that pushes values to the stack and jumps to the intended function:

:01 JCS:print-a HLT

@print-a  ( -- )
  :'A' JMP:print-char

@print-char  ( c -- )
  STD:86 JMPr

LDA

The LDA operation loads the value v from address a*.

Op. Working stack
0C ( a* -- v )

This operation can be used to read from a variable, a value that has been saved to memory for later:

LDA:var HLT  ( 03 )

@var 03

The wide-mode variants of this operation can be used to read a double value from memory:

LDA*:var HLT  ( 12 34 )

@var 1234

STA

The STA operation stores the value v at address a*.

Op. Working stack
0D ( v a* -- )

This operation can be used to write a value to a variable, to be read back later with the LDA operation:

:03 STA:var  (    )
LDA:var HLT  ( 03 )

@var 00

The wide-mode variants of this operation can be used to write a double value to memory:

*:1234 STA*:var  (       )
LDA*:var HLT     ( 12 34 )

@var 0000

This operation can also be used to overwrite instruction bytes in memory, modifying the program:

:DEC STA:op  (    )
:03 @op INC  ( 02 )

LDD

The LDD operation loads the value v from device port p. The port value is always a byte.

Op. Working stack
0E ( p. -- v )

This operation is used to read a value from a device port:

LDD:0C  ( wst )

The wide-mode variants of this operation can be used to read from two consecutive ports with a single instruction:

LDD*:0C  ( wst rst )

STD

The STD operation stores the value v to device port p. The port value is always a byte.

Op. Working stack
0F ( v p. -- )

This operation is used to write a value to a device port:

:'B' STD:86  (    )

The wide-mode variants of this operation can be used to write to two consecutive ports with a single instruction:

*:'BB' STD*:86  (    )

Integer operations

The integer operations will add, subtract, and compare values as integers.

ADD

The ADD operation adds x and y, returning the result r.

Op. Working stack
10 ( x y -- r )
:02 :03 ADD  ( 05 )

SUB

The SUB operation subtracts y from x, returning the result r.

Op. Working stack
11 ( x y -- r )
:05 :03 SUB  ( 02 )

INC

The INC operation increments x by one, returning the result r.

Op. Working stack
12 ( x -- r )
:03 INC  ( 04 )

DEC

The DEC operation decrements x by one, returning the result r.

Op. Working stack
13 ( x -- r )
:03 DEC  ( 02 )

LTH

The LTH operation checks if x is less than y, returning the truth byte t. The truth byte is FF if true or 00 if false.

Op. Working stack
14 ( x y -- t. )
:02 :03 LTH  ( FF )

This operation can be combined with the NOT operation to check if x is greater than or equal to y:

:02 :03 LTH NOT  ( 00 )

GTH

The GTH operation checks if x is greater than y, returning the truth byte t. The truth byte is FF if true or 00 if false.

Op. Working stack
15 ( x y -- t. )
:02 :03 GTH  ( 00 )

This operation can be combined with the NOT operation to check if x is less than or equal to y:

:02 :03 GTH NOT  ( FF )

EQU

The EQU operation checks if x is equal to y, returning the truth byte t. The truth byte is FF if true or 00 if false.

Op. Working stack
16 ( x y -- t. )
:02 :03 EQU  ( 00 )

This operation can be combined with the NOT operation to check if x is equal to y, similar to the NQK operation but without keeping both values:

:02 :03 EQU NOT  ( FF )

NQK

The NQK operation checks if x is not equal to y, keeping both values and returning the truth byte t. The truth byte is FF if true or 00 if false.

Op. Working stack
17 ( x y -- x y t. )
:02 :03 NQK  ( 02 03 FF )

This operation can be used to loop over a range of values. The end value is kept beneath the loop counter, and the NQK instruction is used to compare both values without consuming them, with the truth value being passed to the JCN instruction. The program will keep looping until the loop counter becomes equal to the end value:

:5B :41 @loop       ( end i )
  DUP STD:86        ( end i )
  INC NQK JCN:loop  ( end i )
POP POP             (       )

This operation can be combined with the NOT operation to check if x is equal to y while keeping both values, similar to the EQU operation:

:02 :03 NQK NOT  ( 02 03 00 )

Binary operations

The binary operations will shift, rotate, and perform logical operations on values as binary.

SHL

The SHL operation shifts the bits of x to the left by y places, returning the result r.

Op. Working stack
18 ( x y. -- r )
:A7     ( A7 ) ( binary 10100111 )
SHL:04  ( 70 ) ( binary 01110000 )

This operation can be used to multiply a number by a power of 2. Each bit shifted to the left will double the value:

:01     ( 01 ) ( binary 00000001 )
SHL:01  ( 02 ) ( binary 00000010 )
SHL:01  ( 04 ) ( binary 00000100 )
SHL:01  ( 08 ) ( binary 00001000 )

SHR

The SHR operation shifts the bits of x to the right by y places, returning the result r.

Op. Working stack
19 ( x y. -- r )
:A7     ( A7 ) ( binary 10100111 )
SHR:04  ( 0A ) ( binary 00001010 )

This operation can be used to divide a number by a power of 2. Each bit shifted to the right will halve the value:

:08     ( 08 ) ( binary 00001000 )
SHL:01  ( 04 ) ( binary 00000100 )
SHL:01  ( 02 ) ( binary 00000010 )
SHL:01  ( 01 ) ( binary 00000001 )
SHL:01  ( 00 ) ( binary 00000000 )

ROL

The ROL operation rotates the bits of x to the left by y places, returning the result r.

Op. Working stack
1A ( x y. -- r )
:92     ( 92 ) ( binary 10010010 )
ROL:02  ( 4A ) ( binary 01001010 )

ROR

The ROR operation rotates the bits of x to the right by y places, returning the result r.

Op. Working stack
1B ( x y. -- r )
:92     ( 92 ) ( binary 10010010 )
ROR:02  ( A4 ) ( binary 10100100 )

IOR

The IOR operation finds the union of the bits of x and y, with each bit being set in the result r if it is set in x or y.

Op. Working stack
1C ( x y -- r )
:33   ( 33    ) ( 33 is binary 00110011 )
:0F   ( 33 0F ) ( 0F is binary 00001111 )
IOR   ( 3F    ) ( 3F is binary 00111111 )

XOR

The XOR operation finds the difference between the bits of x and y, with each bit being set in the result r if it is set in only one of x or y.

Op. Working stack
1D ( x y -- r )
:33   ( 33    ) ( 33 is binary 00110011 )
:0F   ( 33 0F ) ( 0F is binary 00001111 )
XOR   ( 3C    ) ( 3F is binary 00111100 )

AND

The AND operation finds the intersection of the bits of x and y, with each bit being set in the result r if it is set in both x and y.

Op. Working stack
1E ( x y -- r )
:33   ( 33    ) ( 33 is binary 00110011 )
:0F   ( 33 0F ) ( 0F is binary 00001111 )
AND   ( 02    ) ( 3F is binary 00000011 )

This operation can be used to conditionally add a value without using a jump. The example below converts a hexadecimal digit to a character byte, adding 30 to values 00..09 and 37 to values 0A..0F. To do this, we compare the value using GTH:09 to get FF or 00, and then we use AND:07 to convert that to 07 or 00. We can then ADD:30 to get 37 or 30, adding this to the original digit value:

:0B JMS:digit-to-char STD:86 HLT

@digit-to-char
  DUP GTH:09 AND:07 ADD:30 ADD JMPr

NOT

The NOT operation inverts the bits of x, with each bit being set in r if it isn’t set in x.

Op. Working stack
1F ( x -- r )
:3F  ( 3F ) ( binary 00111111 )
NOT  ( C0 ) ( binary 11000000 )

Appendix A: Expanded reference

In the following table, the r column represents return mode, * represents wide mode, and : reresents immediate mode. Instructions are grouped by operation, with the first instruction of each group being hyperlinked to that operation.

For the signatures listed in the working stack and return stack columns, the i value represents an immediate value read from memory. Values with a trailing * are doubles, and all other values are bytes. Signatures with no argument values or return values have been omitted for clarity.

Byte Mnem. r * : Working stack Return stack
00 HLT
20 NOP
40 DB1
60 DB2
80 DB3
A0 DB4
C0 DB5
E0 DB6
01 PSH ( -- x ) ( x -- )
21 PSH: ( -- i )
41 PSH* ( -- x* ) ( x* -- )
61 PSH*: ( -- i* )
81 PSHr ( x -- ) ( -- x )
A1 PSHr: ( -- i )
C1 PSHr* ( x* -- ) ( -- x* )
E1 PSHr*: ( -- i* )
02 POP ( x -- )
22 POP:
42 POP* ( x* -- )
62 POP*:
82 POPr ( x -- )
A2 POPr:
C2 POPr* ( x* -- )
E2 POPr*:
03 CPY ( -- x ) ( x -- x )
23 CPY* ( -- x* ) ( x* -- x* )
43 CPY: ( -- i ) ( -- i )
63 CPY*: ( -- i* ) ( -- i* )
83 CPYr ( x -- x ) ( -- x )
A3 CPYr* ( x* -- x* ) ( -- x* )
C3 CPYr: ( -- i ) ( -- i )
E3 CPYr*: ( -- i* ) ( -- i* )
04 DUP ( x -- x x )
24 DUP: ( -- i i )
44 DUP* ( x* -- x* x* )
64 DUP*: ( -- i* i* )
84 DUPr ( x -- x x )
A4 DUPr: ( -- i i )
C4 DUPr* ( x* -- x* x* )
E4 DUPr*: ( -- i* i* )
05 OVR ( x y -- x y x )
25 OVR: ( x -- x i x )
45 OVR* ( x* y* -- x* y* x* )
65 OVR*: ( x* -- x* i* x* )
85 OVRr ( x y -- x y x )
A5 OVRr: ( x -- x i x )
C5 OVRr* ( x* y* -- x* y* x* )
E5 OVRr*: ( x* -- x* i* x* )
06 SWP ( x y -- y x )
26 SWP: ( x -- i x )
46 SWP* ( x* y* -- y* x* )
66 SWP*: ( x* -- i* x* )
86 SWPr ( x y -- y x )
A6 SWPr: ( x -- i x )
C6 SWPr* ( x* y* -- y* x* )
E6 SWPr*: ( x* -- i* x* )
07 ROT ( x y z -- y z x )
27 ROT: ( x y -- y i x )
47 ROT* ( x* y* z* -- y* z* x* )
67 ROT*: ( x* y* -- y* i* x* )
87 ROTr ( x y z -- y z x )
A7 ROTr: ( x y -- y i x )
C7 ROTr* ( x* y* z* -- y* z* x* )
E7 ROTr*: ( x* y* -- y* i* x* )
08 JMP ( a* -- )
28 JMP:
48 JMP* ( a* -- )
68 JMP*:
88 JMPr ( a* -- )
A8 JMPr:
C8 JMPr* ( a* -- )
E8 JMPr*:
09 JMS ( a* -- ) ( -- b* )
29 JMS: ( -- b* )
49 JMS* ( a* -- ) ( -- b* )
69 JMS*: ( -- b* )
89 JMSr ( -- b* ) ( a* -- )
A9 JMSr: ( -- b* )
C9 JMSr* ( -- b* ) ( a* -- )
E9 JMSr*: ( -- b* )
0A JCN ( t a* -- )
2A JCN: ( t -- )
4A JCN* ( t* a* -- )
6A JCN*: ( t* -- )
8A JCNr ( t a* -- )
AA JCNr: ( t -- )
CA JCNr* ( t* a* -- )
EA JCNr*: ( t* -- )
0B JCS ( t a* -- ) ( -- [b*] )
2B JCS: ( t -- ) ( -- [b*] )
4B JCS* ( t* a* -- ) ( -- [b*] )
6B JCS*: ( t* -- ) ( -- [b*] )
8B JCSr ( -- [b*] ) ( t a* -- )
AB JCSr: ( -- [b*] ) ( t -- )
CB JCSr* ( -- [b*] ) ( t* a* -- )
EB JCSr*: ( -- [b*] ) ( t* -- )
0C LDA ( a* -- v )
2C LDA: ( -- v )
4C LDA* ( a* -- v* )
6C LDA*: ( -- v* )
8C LDAr ( a* -- v )
AC LDAr: ( -- v )
CC LDAr* ( a* -- v* )
EC LDAr*: ( -- v* )
0D STA ( v a* -- )
2D STA: ( v -- )
4D STA* ( v* a* -- )
6D STA*: ( v* -- )
8D STAr ( v a* -- )
AD STAr: ( v -- )
CD STAr* ( v* a* -- )
ED STAr*: ( v* -- )
0E LDD ( p -- v )
2E LDD: ( -- v )
4E LDD* ( p -- v* )
6E LDD*: ( -- v* )
8E LDDr ( p -- v )
AE LDDr: ( -- v )
CE LDDr* ( p -- v* )
EE LDDr*: ( -- v* )
0F STD ( v p -- )
2F STD: ( v -- )
4F STD* ( v* p -- )
6F STD*: ( v* -- )
8F STDr ( v p -- )
AF STDr: ( v -- )
CF STDr* ( v* p -- )
EF STDr*: ( v* -- )
10 ADD ( x y -- r )
30 ADD: ( x -- r )
50 ADD* ( x* y* -- r* )
70 ADD*: ( x* -- r* )
90 ADDr ( x y -- r )
B0 ADDr: ( x -- r )
D0 ADDr* ( x* y* -- r* )
F0 ADDr*: ( x* -- r* )
11 SUB ( x y -- r )
31 SUB: ( x -- r )
51 SUB* ( x* y* -- r* )
71 SUB*: ( x* -- r* )
91 SUBr ( x y -- r )
B1 SUBr: ( x -- r )
D1 SUBr* ( x* y* -- r* )
F1 SUBr*: ( x* -- r* )
12 INC ( x -- r )
32 INC: ( -- r )
52 INC* ( x* -- r* )
72 INC*: ( -- r* )
92 INCr ( x -- r )
B2 INCr: ( -- r )
D2 INCr* ( x* -- r* )
F2 INCr*: ( -- r* )
13 DEC ( x -- r )
33 DEC: ( -- r )
53 DEC* ( x* -- r* )
73 DEC*: ( -- r* )
93 DECr ( x -- r )
B3 DECr: ( -- r )
D3 DECr* ( x* -- r* )
F3 DECr*: ( -- r* )
14 LTH ( x y -- t )
34 LTH: ( x -- t )
54 LTH* ( x* y* -- t )
74 LTH*: ( x* -- t )
94 LTHr ( x y -- t )
B4 LTHr: ( x -- t )
D4 LTHr* ( x* y* -- t )
F4 LTHr*: ( x* -- t )
15 GTH ( x y -- t )
35 GTH: ( x -- t )
55 GTH* ( x* y* -- t )
75 GTH*: ( x* -- t )
95 GTHr ( x y -- t )
B5 GTHr: ( x -- t )
D5 GTHr* ( x* y* -- t )
F5 GTHr*: ( x* -- t )
16 EQU ( x y -- t )
36 EQU: ( x -- t )
56 EQU* ( x* y* -- t )
76 EQU*: ( x* -- t )
96 EQUr ( x y -- t )
B6 EQUr: ( x -- t )
D6 EQUr* ( x* y* -- t )
F6 EQUr*: ( x* -- t )
17 NQK ( x y -- x y t )
37 NQK: ( x -- x i t )
57 NQK* ( x* y* -- x* y* t )
77 NQK*: ( x* -- x* i* t )
97 NQKr ( x y -- x y t )
B7 NQKr: ( x -- x i t )
D7 NQKr* ( x* y* -- x* y* t )
F7 NQKr*: ( x* -- x* i* t )
18 SHL ( x y -- r )
38 SHL: ( x -- r )
58 SHL* ( x* y -- r )
78 SHL*: ( x* -- r )
98 SHLr ( x y -- r )
B8 SHLr: ( x -- r )
D8 SHLr* ( x* y -- r )
F8 SHLr*: ( x* -- r )
19 SHR ( x y -- r )
39 SHR: ( x -- r )
59 SHR* ( x* y -- r )
79 SHR*: ( x* -- r )
99 SHRr ( x y -- r )
B9 SHRr: ( x -- r )
D9 SHRr* ( x* y -- r )
F9 SHRr*: ( x* -- r )
1A ROL ( x y -- r )
3A ROL: ( x -- r )
5A ROL* ( x* y -- r )
7A ROL*: ( x* -- r )
9A ROLr ( x y -- r )
BA ROLr: ( x -- r )
DA ROLr* ( x* y -- r )
FA ROLr*: ( x* -- r )
1B ROR ( x y -- r )
3B ROR: ( x -- r )
5B ROR* ( x* y -- r )
7B ROR*: ( x* -- r )
9B RORr ( x y -- r )
BB RORr: ( x -- r )
DB RORr* ( x* y -- r )
FB RORr*: ( x* -- r )
1C IOR ( x y -- r )
3C IOR: ( x -- r )
5C IOR* ( x* y* -- r* )
7C IOR*: ( x* -- r* )
9C IORr ( x y -- r )
BC IORr: ( x -- r )
DC IORr* ( x* y* -- r* )
FC IORr*: ( x* -- r* )
1D XOR ( x y -- r )
3D XOR: ( x -- r )
5D XOR* ( x* y* -- r* )
7D XOR*: ( x* -- r* )
9D XORr ( x y -- r )
BD XORr: ( x -- r )
DD XORr* ( x* y* -- r* )
FD XORr*: ( x* -- r* )
1E AND ( x y -- r )
3E AND: ( x -- r )
5E AND* ( x* y* -- r* )
7E AND*: ( x* -- r* )
9E ANDr ( x y -- r )
BE ANDr: ( x -- r )
DE ANDr* ( x* y* -- r* )
FE ANDr*: ( x* -- r* )
1F NOT ( x -- r )
3F NOT: ( -- r )
5F NOT* ( x* -- r* )
7F NOT*: ( -- r* )
9F NOTr ( x -- r )
BF NOTr: ( -- r )
DF NOTr* ( x* -- r* )
FF NOTr*: ( -- r* )