add more glossary entries for mem: words

FossilOrigin-Name: 1a777b619a5109735110d4ab35fa2a60f7de41d38fa118a8bb292689cfa81aac
This commit is contained in:
crc 2022-08-22 09:52:09 +00:00
parent 9f45486425
commit ef2e2e05df
5 changed files with 127 additions and 12 deletions

View file

@ -652,6 +652,9 @@ Fetch the double cell values stored in the double cell variable at a.
double:store D: nna- A: - F: -
Store the double cell values on the stack in the double cell variable at a.
double:swap D: nnmm-mmnn A: - F: -
Swap double cell value on stack.
double:var D: nns- A: - F: -
Create a variable for holding the specified double cell value.
@ -1075,12 +1078,24 @@ Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise.
lteq? D: nn-f A: - F: -
Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` otherwise.
mem:alloc D: n-nn A: - F: -
Use malloc to allocate memory. Returns a double cell pointer to this memory.
mem:cell+ D: nnn-n A: - F: -
Return address of next cell. Uses a double cell pointer on the stack.
mem:fetch D: nn-n A: - F: -
Fetch value from malloc'd memory region. Address is a double cell value.
mem:fetch-double D: nn-n A: - F: -
Fetch a double cell value from a malloc memory region.
mem:free D: nn- A: - F: -
Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free.
mem:store D: xnn- A: - F: -
Store a value into a malloc'd memory region. Uses a double cell pointer for the address.
mod D: nm-o A: - F: -
Divide `n` by `m` and return the remainder.

View file

@ -216,6 +216,7 @@ does D: q- A: - F: -
double:const D: nns- A: - F: -
double:fetch D: a-n A: - F: -
double:store D: nna- A: - F: -
double:swap D: nnmm-mmnn A: - F: -
double:var D: nns- A: - F: -
drop D: n- A: - F: -
drop-pair D: nn- A: - F: -
@ -357,8 +358,12 @@ io:unix-syscall D: ...n- A: - F: -
listen D: - A: - F: -
lt? D: nn-f A: - F: -
lteq? D: nn-f A: - F: -
mem:alloc D: n-nn A: - F: -
mem:cell+ D: nnn-n A: - F: -
mem:fetch D: nn-n A: - F: -
mem:fetch-double D: nn-n A: - F: -
mem:free D: nn- A: - F: -
mem:store D: xnn- A: - F: -
mod D: nm-o A: - F: -
n:-zero? D: n-f A: - F: -
n:MAX D: -n A: - F: -

View file

@ -1592,28 +1592,35 @@
<b>Float:</b> -</p>
</div>
<p>Create a constant returning the specified double cell value.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>double:fetch</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> a-n<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Fetch the double cell values stored in the double cell variable at a.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>double:store</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nna-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Store the double cell values on the stack in the double cell variable at a.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>double:swap</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nnmm-mmnn<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Swap double cell value on stack.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>double:var</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nns-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Create a variable for holding the specified double cell value.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>double</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>drop</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> n-<br>
<b>Addr:</b> -<br>
@ -2677,6 +2684,13 @@
</div>
<p>Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` otherwise.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>global</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<h2>mem:alloc</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> n-nn<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Use malloc to allocate memory. Returns a double cell pointer to this memory.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mem:cell+</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nnn-n<br>
<b>Addr:</b> -<br>
@ -2684,6 +2698,13 @@
</div>
<p>Return address of next cell. Uses a double cell pointer on the stack.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mem:fetch</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nn-n<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Fetch value from malloc'd memory region. Address is a double cell value.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mem:fetch-double</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nn-n<br>
<b>Addr:</b> -<br>
@ -2691,6 +2712,20 @@
</div>
<p>Fetch a double cell value from a malloc memory region.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mem:free</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nn-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mem:store</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> xnn-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Store a value into a malloc'd memory region. Uses a double cell pointer for the address.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>mem</td></tr><tr><td><b>Interface Layer:</b> </td><td>rre</td></tr></table><hr/>
<h2>mod</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> nm-o<br>
<b>Addr:</b> -<br>

View file

@ -2468,7 +2468,7 @@ double:const
Create a constant returning the specified double cell value.
Class: class:word | Namespace: double | Interface Layer: all
Class: class:word | Namespace: double | Interface Layer: rre
------------------------------------------------------------------------
double:fetch
@ -2479,7 +2479,7 @@ double:fetch
Fetch the double cell values stored in the double cell variable at a.
Class: class:word | Namespace: double | Interface Layer: all
Class: class:word | Namespace: double | Interface Layer: rre
------------------------------------------------------------------------
double:store
@ -2490,7 +2490,18 @@ double:store
Store the double cell values on the stack in the double cell variable at a.
Class: class:word | Namespace: double | Interface Layer: all
Class: class:word | Namespace: double | Interface Layer: rre
------------------------------------------------------------------------
double:swap
Data: nnmm-mmnn
Addr: -
Float: -
Swap double cell value on stack.
Class: class:word | Namespace: double | Interface Layer: rre
------------------------------------------------------------------------
double:var
@ -2501,7 +2512,7 @@ double:var
Create a variable for holding the specified double cell value.
Class: class:word | Namespace: double | Interface Layer: all
Class: class:word | Namespace: double | Interface Layer: rre
------------------------------------------------------------------------
drop
@ -4146,6 +4157,17 @@ Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` o
Class: class:word | Namespace: global | Interface Layer: all
------------------------------------------------------------------------
mem:alloc
Data: n-nn
Addr: -
Float: -
Use malloc to allocate memory. Returns a double cell pointer to this memory.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mem:cell+
Data: nnn-n
@ -4157,6 +4179,17 @@ Return address of next cell. Uses a double cell pointer on the stack.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mem:fetch
Data: nn-n
Addr: -
Float: -
Fetch value from malloc'd memory region. Address is a double cell value.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mem:fetch-double
Data: nn-n
@ -4168,6 +4201,28 @@ Fetch a double cell value from a malloc memory region.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mem:free
Data: nn-
Addr: -
Float: -
Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mem:store
Data: xnn-
Addr: -
Float: -
Store a value into a malloc'd memory region. Uses a double cell pointer for the address.
Class: class:word | Namespace: mem | Interface Layer: rre
------------------------------------------------------------------------
mod
Data: nm-o

View file

@ -213,10 +213,11 @@ decimal - - - Set `Base` to decimal. class:word {n/a} {n/a} a all
depth -n - - Return the number of items on the stack. class:word {n/a} {n/a} global all
dip nq-n - - Temporarily remove n from the stack, execute the quotation, and then restore n to the stack. class:word {n/a} {n/a} global all
does q- - - Attach an action to the most recently created word. This is used in a manner similar to CREATE/DOES> in traditional Forth. class:word {n/a} {n/a} global all
double:const nns- - - Create a constant returning the specified double cell value. class:word {n/a} {n/a} double all
double:fetch a-n - - Fetch the double cell values stored in the double cell variable at a. class:word {n/a} {n/a} double all
double:store nna- - - Store the double cell values on the stack in the double cell variable at a. class:word {n/a} {n/a} double all
double:var nns- - - Create a variable for holding the specified double cell value. class:word {n/a} {n/a} double all
double:const nns- - - Create a constant returning the specified double cell value. class:word {n/a} {n/a} double rre
double:fetch a-n - - Fetch the double cell values stored in the double cell variable at a. class:word {n/a} {n/a} double rre
double:store nna- - - Store the double cell values on the stack in the double cell variable at a. class:word {n/a} {n/a} double rre
double:swap nnmm-mmnn - - Swap double cell value on stack. class:word {n/a} {n/a} double rre
double:var nns- - - Create a variable for holding the specified double cell value. class:word {n/a} {n/a} double rre
drop n- - - Discard the top value on the stack. class:primitive {n/a} {n/a} global all
drop-pair nn- - - Remove top two items on the stack. class:word {n/a} {n/a} global all
dump-stack - - - Display the items on the data stack. class:word {n/a} {n/a} global all
@ -357,8 +358,12 @@ io:unix-syscall ...n- - - Trigger a Unix system call. This is not intended to be
listen - - - "Run interactive ""listener"" (a REPL)." class:word {n/a} {n/a} global rre
lt? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise. class:primitive {n/a} {n/a} global all
lteq? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` otherwise. class:word {n/a} {n/a} global all
mem:alloc n-nn - - Use malloc to allocate memory. Returns a double cell pointer to this memory. class:word {n/a} {n/a} mem rre
mem:cell+ nnn-n - - Return address of next cell. Uses a double cell pointer on the stack. class:word {n/a} {n/a} mem rre
mem:fetch nn-n - - Fetch value from malloc'd memory region. Address is a double cell value. class:word {n/a} {n/a} mem rre
mem:fetch-double nn-n - - Fetch a double cell value from a malloc memory region. class:word {n/a} {n/a} mem rre
mem:free nn- - - Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free. class:word {n/a} {n/a} mem rre
mem:store xnn- - - Store a value into a malloc'd memory region. Uses a double cell pointer for the address. class:word {n/a} {n/a} mem rre
mod nm-o - - Divide `n` by `m` and return the remainder. class:word {n/a} {n/a} global all
n:-zero? n-f - - Return `TRUE` if number is not zero, or `FALSE` otherwise. class:word {n/a} {n/a} n all
n:MAX -n - - Return the maximum value that will fit in a cell. class:word {n/a} {n/a} n all

1 $ -c - - Return ASCII:NUL (0). class:macro {n/a} {n/a} global all
213 depth -n - - Return the number of items on the stack. class:word {n/a} {n/a} global all
214 dip nq-n - - Temporarily remove n from the stack, execute the quotation, and then restore n to the stack. class:word {n/a} {n/a} global all
215 does q- - - Attach an action to the most recently created word. This is used in a manner similar to CREATE/DOES> in traditional Forth. class:word {n/a} {n/a} global all
216 double:const nns- - - Create a constant returning the specified double cell value. class:word {n/a} {n/a} double all rre
217 double:fetch a-n - - Fetch the double cell values stored in the double cell variable at a. class:word {n/a} {n/a} double all rre
218 double:store nna- - - Store the double cell values on the stack in the double cell variable at a. class:word {n/a} {n/a} double all rre
219 double:var double:swap nns- nnmm-mmnn - - Create a variable for holding the specified double cell value. Swap double cell value on stack. class:word {n/a} {n/a} double all rre
220 double:var nns- - - Create a variable for holding the specified double cell value. class:word {n/a} {n/a} double rre
221 drop n- - - Discard the top value on the stack. class:primitive {n/a} {n/a} global all
222 drop-pair nn- - - Remove top two items on the stack. class:word {n/a} {n/a} global all
223 dump-stack - - - Display the items on the data stack. class:word {n/a} {n/a} global all
358 listen - - - Run interactive "listener" (a REPL). class:word {n/a} {n/a} global rre
359 lt? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is less than n2, or `FALSE` otherwise. class:primitive {n/a} {n/a} global all
360 lteq? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is less than or equal to n2, or `FALSE` otherwise. class:word {n/a} {n/a} global all
361 mem:alloc n-nn - - Use malloc to allocate memory. Returns a double cell pointer to this memory. class:word {n/a} {n/a} mem rre
362 mem:cell+ nnn-n - - Return address of next cell. Uses a double cell pointer on the stack. class:word {n/a} {n/a} mem rre
363 mem:fetch nn-n - - Fetch value from malloc'd memory region. Address is a double cell value. class:word {n/a} {n/a} mem rre
364 mem:fetch-double nn-n - - Fetch a double cell value from a malloc memory region. class:word {n/a} {n/a} mem rre
365 mem:free nn- - - Fre a malloc'd region of memory. Pass a double cell pointer to the memory to free. class:word {n/a} {n/a} mem rre
366 mem:store xnn- - - Store a value into a malloc'd memory region. Uses a double cell pointer for the address. class:word {n/a} {n/a} mem rre
367 mod nm-o - - Divide `n` by `m` and return the remainder. class:word {n/a} {n/a} global all
368 n:-zero? n-f - - Return `TRUE` if number is not zero, or `FALSE` otherwise. class:word {n/a} {n/a} n all
369 n:MAX -n - - Return the maximum value that will fit in a cell. class:word {n/a} {n/a} n all