add comma & gc to glossary

FossilOrigin-Name: b2a5e66264d4a5b2a757710c72641cd097445b6b7109cd91c0d22668aa4ed637
This commit is contained in:
crc 2023-01-26 22:29:37 +00:00
parent 30cb84e7f1
commit e2b55648cb
14 changed files with 653 additions and 587 deletions

View file

@ -547,6 +547,9 @@ Return the current year in UTC.
clock:year D: -n A: - F: -
Return the current year.
comma D: n- A: - F: -
Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia.
compile:call D: a- A: - F: -
Compile a call to the specified address into the current definition.
@ -1045,6 +1048,9 @@ Trigger a floating-point operation. This is not intended to be used directly.
forever D: q- A: - F: -
Run quotation in an endless loop.
gc D: a- A: - F: -
Save value of `Heap`, run the function provided, then restore `Heap`.
gopher:get D: asns-n A: - F: -
Takes an address, a server, a port, and a selector. Fetch the resource and store it at address. Return the number of bytes received.

View file

@ -181,6 +181,7 @@ clock:utc:month D: -n A: - F: -
clock:utc:second D: -n A: - F: -
clock:utc:year D: -n A: - F: -
clock:year D: -n A: - F: -
comma D: n- A: - F: -
compile:call D: a- A: - F: -
compile:jump D: a- A: - F: -
compile:lit D: n- A: - F: -
@ -347,6 +348,7 @@ file:tell D: h-n A: - F: -
file:write D: ch- A: - F: -
float:operation D: ...n- A: - F: -
forever D: q- A: - F: -
gc D: a- A: - F: -
gopher:get D: asns-n A: - F: -
gt? D: nn-f A: - F: -
gteq? D: nn-f A: - F: -

View file

@ -1362,6 +1362,17 @@
</div>
<p>Return the current year.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>clock</td></tr><tr><td><b>Interface Layer:</b> </td><td>iOS, rre</td></tr></table><hr/>
<h2>comma</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> n-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia.</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><p><b>Example:</b> <br>
<br>
<xmp style='background:#f2f2f2'> $a , $b , $c , #0 ,</xmp>
</p>
<hr/>
<h2>compile:call</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> a-<br>
<b>Addr:</b> -<br>
@ -2585,6 +2596,13 @@
</div>
<p>Run quotation in an endless loop.</p>
<table><tr><td><b>Class:</b> </td><td>class:word</td></tr><tr><td><b>Namespace:</b> </td><td>a</td></tr><tr><td><b>Interface Layer:</b> </td><td>all</td></tr></table><hr/>
<h2>gc</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> a-<br>
<b>Addr:</b> -<br>
<b>Float:</b> -</p>
</div>
<p>Save value of `Heap`, run the function provided, then restore `Heap`.</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>gopher:get</h2>
<div style='margin-left: 1em;'><p><b>Data:</b> asns-n<br>
<b>Addr:</b> -<br>

View file

@ -2108,6 +2108,22 @@ Return the current year.
Class: class:word | Namespace: clock | Interface Layer: iOS, rre
------------------------------------------------------------------------
comma
Data: n-
Addr: -
Float: -
Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia.
Class: class:word | Namespace: global | Interface Layer: all
Example #1:
$a , $b , $c , #0 ,
------------------------------------------------------------------------
compile:call
Data: a-
@ -4009,6 +4025,17 @@ Run quotation in an endless loop.
Class: class:word | Namespace: a | Interface Layer: all
------------------------------------------------------------------------
gc
Data: a-
Addr: -
Float: -
Save value of `Heap`, run the function provided, then restore `Heap`.
Class: class:word | Namespace: global | Interface Layer: all
------------------------------------------------------------------------
gopher:get
Data: asns-n

View file

@ -181,6 +181,7 @@ clock:utc:month -n - - Return the current month in UTC. class:word {n/a} {n/a}
clock:utc:second -n - - Return the current second in UTC. class:word {n/a} {n/a} clock iOS, rre
clock:utc:year -n - - Return the current year in UTC. class:word {n/a} {n/a} clock iOS, rre
clock:year -n - - Return the current year. class:word {n/a} {n/a} clock iOS, rre
comma n- - - Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia. class:word $a , $b , $c , #0 , {n/a} global all
compile:call a- - - Compile a call to the specified address into the current definition. class:word {n/a} {n/a} compile all
compile:jump a- - - Compile a jump to the specified address into the current definition. class:word {n/a} {n/a} compile all
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
@ -347,6 +348,7 @@ file:tell h-n - - Given a file handle, return the current offset in the file.
file:write ch- - - Write a character to the file represented by the handle. class:word {n/a} {n/a} file rre
float:operation ...n- - - Trigger a floating-point operation. This is not intended to be used directly. class:word {n/a} {n/a} float rre
forever q- - - Run quotation in an endless loop. class:word {n/a} {n/a} a all
gc a- - - Save value of `Heap`, run the function provided, then restore `Heap`. class:word {n/a} {n/a} global all
gopher:get asns-n - - Takes an address, a server, a port, and a selector. Fetch the resource and store it at address. Return the number of bytes received. class:word here 'forthworks.com #70 '/ gopher:get\n here s:put {n/a} gopher ios
gt? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is greater than n2, or `FALSE` otherwise. class:primitive {n/a} {n/a} global all
gteq? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is greater than or equal to n2, or `FALSE` otherwise. class:word {n/a} {n/a} global all

1 $ -c - - Return ASCII:NUL (0). class:macro {n/a} {n/a} global all
181 clock:utc:second -n - - Return the current second in UTC. class:word {n/a} {n/a} clock iOS, rre
182 clock:utc:year -n - - Return the current year in UTC. class:word {n/a} {n/a} clock iOS, rre
183 clock:year -n - - Return the current year. class:word {n/a} {n/a} clock iOS, rre
184 comma n- - - Store the specified value into the memory at `here` and increment `Heap` by 1. Identical to `,`, this is provided for compatibility with the RetroForth on ilo and napia. class:word $a , $b , $c , #0 , {n/a} global all
185 compile:call a- - - Compile a call to the specified address into the current definition. class:word {n/a} {n/a} compile all
186 compile:jump a- - - Compile a jump to the specified address into the current definition. class:word {n/a} {n/a} compile all
187 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
348 file:write ch- - - Write a character to the file represented by the handle. class:word {n/a} {n/a} file rre
349 float:operation ...n- - - Trigger a floating-point operation. This is not intended to be used directly. class:word {n/a} {n/a} float rre
350 forever q- - - Run quotation in an endless loop. class:word {n/a} {n/a} a all
351 gc a- - - Save value of `Heap`, run the function provided, then restore `Heap`. class:word {n/a} {n/a} global all
352 gopher:get asns-n - - Takes an address, a server, a port, and a selector. Fetch the resource and store it at address. Return the number of bytes received. class:word here 'forthworks.com #70 '/ gopher:get\n here s:put {n/a} gopher ios
353 gt? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is greater than n2, or `FALSE` otherwise. class:primitive {n/a} {n/a} global all
354 gteq? nn-f - - Compare n1 and n2. Return `TRUE` if n1 is greater than or equal to n2, or `FALSE` otherwise. class:word {n/a} {n/a} global all

View file

@ -20,3 +20,13 @@ The exposed word set is compact:
:block:set-file (s-) #2 block:invoke ;
}}
~~~
# Source Data
~~~
'interface/blocks.retro s:dedup
dup 'block:read d:lookup d:source store
dup 'block:write d:lookup d:source store
dup 'block:set-file d:lookup d:source store
drop
~~~

View file

@ -27,7 +27,7 @@ system clock.
## d:source
~~~
'interface/clock.retro s:keep
'interface/clock.retro s:dedup
dup 'clock:utc:second d:lookup d:source store
dup 'clock:utc:minute d:lookup d:source store
dup 'clock:utc:hour d:lookup d:source store
@ -44,4 +44,3 @@ dup 'clock:timestamp d:lookup d:source store
dup 'clock:operation d:lookup d:source store
drop
~~~

View file

@ -210,7 +210,7 @@ Deal with special cases.
## Populate d:source
~~~
'interface/floatingpoint.retro s:keep
'interface/floatingpoint.retro s:dedup
dup 'e:put d:lookup d:source store
dup 'f:dump-astack d:lookup d:source store
dup 'f:dump-stack d:lookup d:source store

View file

@ -11,7 +11,7 @@
~~~
~~~
'interface/multicore.retro s:keep
'interface/multicore.retro s:dedup
dup 'io:core d:lookup d:source store
dup 'core:init d:lookup d:source store
dup 'core:start d:lookup d:source store

View file

@ -59,7 +59,7 @@ Adds support for obtaining current source line text
## d:source
~~~
'interface/scripting.retro s:keep
'interface/scripting.retro s:dedup
dup 'abort d:lookup d:source store
dup 'script:abort-include d:lookup d:source store
dup 'script:ignore-to-eol d:lookup d:source store

View file

@ -6,7 +6,7 @@ each of the provided words are found in.
## Standard Library
~~~
'retro.forth s:keep
'retro.forth s:dedup
dup 'listen d:lookup d:source store
dup 'bye d:lookup d:source store
dup 's:get-word d:lookup d:source store

View file

@ -137,7 +137,7 @@ seconds.
## d:source
~~~
'interface/unix.retro s:keep
'interface/unix.retro s:dedup
dup 'unix:slurp-pipe d:lookup d:source store
dup 'unix:for-each-file d:lookup d:source store
dup 'unix:count-files-in-cwd d:lookup d:source store

View file

@ -15,7 +15,7 @@
~~~
~~~
'interface/unsigned.retro s:keep
'interface/unsigned.retro s:dedup
dup 'unsigned:+ d:lookup d:source store
dup 'unsigned:- d:lookup d:source store
dup 'unsigned:* d:lookup d:source store

File diff suppressed because it is too large Load diff