diff --git a/doc/Glossary-Concise.txt b/doc/Glossary-Concise.txt index 2d66b44..a81c17c 100644 --- a/doc/Glossary-Concise.txt +++ b/doc/Glossary-Concise.txt @@ -466,9 +466,27 @@ Return TRUE if character is whitespace, or FALSE otherwise. call D: a- A: - F: - Call a function. +car D: a-a A: - F: - +Return a pointer to the car of cons a. + +car! D: na- A: - F: - +Store n into the car of cons a. + +car@ D: a-n A: - F: - +Return the contents of the car of cons a. + case D: nmq- || nmq-n A: - F: - If `n` is equal to `m`, drop both and execute the specified quote before exiting the calling word. If not equal, leave `n` on the stack and let execution continue. +cdr D: a-a A: - F: - +Return a pointer to the cdr of cons a. + +cdr! D: na- A: - F: - +Store n into the cdr of cons a. + +cdr@ D: a-n A: - F: - +Return the contents of the cdr of cons a. + choose D: fqq- A: - F: - Execute q1 if the flag is true (-1) or q2 if the flag is false (0). Only these flags are valid when using `choose`; passing other values as flags will result in memory corruption. @@ -544,6 +562,9 @@ Compile a return instruction into the current definition. compiling? D: -f A: - F: - Return `TRUE` if compiler is on or `FALSE` otherwise. +cons D: xy-a A: - F: - +Create a new cons cell with a car of x and a cdr of y. + const D: ns- A: - F: - Create a constant returning the specified value. diff --git a/doc/Glossary-Names-and-Stack.txt b/doc/Glossary-Names-and-Stack.txt index d2e2b1a..ba5d4a5 100644 --- a/doc/Glossary-Names-and-Stack.txt +++ b/doc/Glossary-Names-and-Stack.txt @@ -154,7 +154,13 @@ c:visible? D: c-f A: - F: - c:vowel? D: c-f A: - F: - c:whitespace? D: c-f A: - F: - call D: a- A: - F: - +car D: a-a A: - F: - +car! D: na- A: - F: - +car@ D: a-n A: - F: - case D: nmq- || nmq-n A: - F: - +cdr D: a-a A: - F: - +cdr! D: na- A: - F: - +cdr@ D: a-n A: - F: - choose D: fqq- A: - F: - class:data D: n- || n-n A: - F: - class:macro D: a- A: - F: - @@ -180,6 +186,7 @@ compile:jump D: a- A: - F: - compile:lit D: n- A: - F: - compile:ret D: - A: - F: - compiling? D: -f A: - F: - +cons D: xy-a A: - F: - const D: ns- A: - F: - copy D: sdl- A: - F: - core:init D: n- A: - F: - diff --git a/doc/Glossary.html b/doc/Glossary.html index 1660f07..2a50b47 100644 --- a/doc/Glossary.html +++ b/doc/Glossary.html @@ -1149,6 +1149,27 @@

Call a function.

Class: class:primitive
Namespace: global
Interface Layer: all

+

car

+

Data: a-a
+Addr: -
+Float: -

+
+

Return a pointer to the car of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

+

car!

+

Data: na-
+Addr: -
+Float: -

+
+

Store n into the car of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

+

car@

+

Data: a-n
+Addr: -
+Float: -

+
+

Return the contents of the car of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

case

Data: nmq- || nmq-n
Addr: -
@@ -1156,6 +1177,27 @@

If `n` is equal to `m`, drop both and execute the specified quote before exiting the calling word. If not equal, leave `n` on the stack and let execution continue.

Class: class:word
Namespace: global
Interface Layer: all

+

cdr

+

Data: a-a
+Addr: -
+Float: -

+
+

Return a pointer to the cdr of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

+

cdr!

+

Data: na-
+Addr: -
+Float: -

+
+

Store n into the cdr of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

+

cdr@

+

Data: a-n
+Addr: -
+Float: -

+
+

Return the contents of the cdr of cons a.

+
Class: class:word
Namespace: global
Interface Layer: all

choose

Data: fqq-
Addr: -
@@ -1355,6 +1397,13 @@

Return `TRUE` if compiler is on or `FALSE` otherwise.

Class: class:word
Namespace: global
Interface Layer: all

+

cons

+

Data: xy-a
+Addr: -
+Float: -

+
+

Create a new cons cell with a car of x and a cdr of y.

+
Class: class:word
Namespace: global
Interface Layer: all

const

Data: ns-
Addr: -
diff --git a/doc/Glossary.txt b/doc/Glossary.txt index c6d9f6a..080b5e2 100644 --- a/doc/Glossary.txt +++ b/doc/Glossary.txt @@ -1787,6 +1787,39 @@ Call a function. Class: class:primitive | Namespace: global | Interface Layer: all ------------------------------------------------------------------------ +car + + Data: a-a + Addr: - + Float: - + +Return a pointer to the car of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + +car! + + Data: na- + Addr: - + Float: - + +Store n into the car of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + +car@ + + Data: a-n + Addr: - + Float: - + +Return the contents of the car of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + case Data: nmq- || nmq-n @@ -1798,6 +1831,39 @@ If `n` is equal to `m`, drop both and execute the specified quote before exiting Class: class:word | Namespace: global | Interface Layer: all ------------------------------------------------------------------------ +cdr + + Data: a-a + Addr: - + Float: - + +Return a pointer to the cdr of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + +cdr! + + Data: na- + Addr: - + Float: - + +Store n into the cdr of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + +cdr@ + + Data: a-n + Addr: - + Float: - + +Return the contents of the cdr of cons a. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + choose Data: fqq- @@ -2097,6 +2163,17 @@ Return `TRUE` if compiler is on or `FALSE` otherwise. Class: class:word | Namespace: global | Interface Layer: all ------------------------------------------------------------------------ +cons + + Data: xy-a + Addr: - + Float: - + +Create a new cons cell with a car of x and a cdr of y. + +Class: class:word | Namespace: global | Interface Layer: all +------------------------------------------------------------------------ + const Data: ns- diff --git a/doc/words.tsv b/doc/words.tsv index 9f5f694..62baa6e 100644 --- a/doc/words.tsv +++ b/doc/words.tsv @@ -154,7 +154,13 @@ c:visible? c-f - - Return TRUE if character is printable or FALSE otherwise. c c:vowel? c-f - - Return TRUE if character is a vowel or FALSE otherwise. class:word {n/a} {n/a} c all c:whitespace? c-f - - Return TRUE if character is whitespace, or FALSE otherwise. class:word {n/a} {n/a} c all call a- - - Call a function. class:primitive {n/a} {n/a} global all +car a-a - - Return a pointer to the car of cons a. class:word {n/a} {n/a} global all +car! na- - - Store n into the car of cons a. class:word {n/a} {n/a} global all +car@ a-n - - Return the contents of the car of cons a. class:word {n/a} {n/a} global all case nmq- || nmq-n - - If `n` is equal to `m`, drop both and execute the specified quote before exiting the calling word. If not equal, leave `n` on the stack and let execution continue. class:word {n/a} {n/a} global all +cdr a-a - - Return a pointer to the cdr of cons a. class:word {n/a} {n/a} global all +cdr! na- - - Store n into the cdr of cons a. class:word {n/a} {n/a} global all +cdr@ a-n - - Return the contents of the cdr of cons a. class:word {n/a} {n/a} global all choose fqq- - - Execute q1 if the flag is true (-1) or q2 if the flag is false (0). Only these flags are valid when using `choose`; passing other values as flags will result in memory corruption. class:word {n/a} {n/a} global all class:data n- || n-n - - Class handler for data structures. Keep the address or value on the stack. Compile the value or address as a literal into the current definition. class:word {n/a} {n/a} class all class:macro a- - - Class handler for compiler macros (immediate words) Execute the function at the provided address. Execute the function at the provided address. class:word {n/a} {n/a} class all @@ -180,6 +186,7 @@ compile:jump a- - - Compile a jump to the specified address into the current def compile:lit n- - - Compile the code to push a number to the stack into the current definition. class:word {n/a} {n/a} compile all compile:ret - - - Compile a return instruction into the current definition. class:word {n/a} {n/a} compile all compiling? -f - - Return `TRUE` if compiler is on or `FALSE` otherwise. class:word {n/a} {n/a} global all +cons xy-a - - Create a new cons cell with a car of x and a cdr of y. class:word {n/a} {n/a} global all const ns- - - Create a constant returning the specified value. class:word {n/a} {n/a} global all copy sdl- - - Copy `l` cells from memory at `s` to the memory at `d`. These should not overlap. class:word {n/a} {n/a} global all core:init n- - - Clear the internal state of core `n`. This should be done prior to use of `core:start`, which activates processing on the core. class:word {n/a} {n/a} core rre