Basic Opcodes

Basic Opcodes#

The basic opcodes provide fundamental operations on nouns: addressing into tree structures, creating constants, evaluation, structure checking, arithmetic, comparison, and editing. These are the primitive building blocks upon which the composite opcodes are constructed.

Opcode

Name

Signature

Purpose

0

Slot

[0 b]

Tree address lookup.

1

Constant

[1 b]

Return literal value.

2

Evaluate

[2 b c]

Dynamic nock.

3

Cell?

[3 b]

Test if cell.

4

Increment

[4 b]

Add 1 to atom.

5

Equal?

[5 b c]

Deep equality test.

10

Edit

[10 [b c] d]

Functional update

Cell Distribution

[*[a b c] *[a d]]