From 6474a66c42e0fb1119506116cac251c44de4dc21 Mon Sep 17 00:00:00 2001 From: crc <> Date: Mon, 22 Aug 2022 10:03:44 +0000 Subject: [PATCH] add block: words and rest of mem: words to glossary FossilOrigin-Name: 1ae4c608cf65d3c29faabaff2ed627d26579b796f56867a7a254c4df60ad205b --- doc/Glossary-Concise.txt | 12 +++++++++ doc/Glossary-Names-and-Stack.txt | 4 +++ doc/Glossary.html | 28 ++++++++++++++++++++ doc/Glossary.txt | 44 ++++++++++++++++++++++++++++++++ doc/words.tsv | 4 +++ 5 files changed, 92 insertions(+) diff --git a/doc/Glossary-Concise.txt b/doc/Glossary-Concise.txt index 2cef4dd..22ab3b6 100644 --- a/doc/Glossary-Concise.txt +++ b/doc/Glossary-Concise.txt @@ -361,6 +361,15 @@ Execute q against x, then execute q against y. binary D: - A: - F: - Set `Base` to binary. +block:read D: an- A: - F: - +Read 1024 cells from block n in the block storage into memory at address a. + +block:set-file D: s- A: - F: - +Set the file name of the block storage device. + +block:write D: an- A: - F: - +Save the 1024 cells at address a to block n in the block storage. + buffer:add D: n- A: - F: - Append a value to the current buffer. @@ -1093,6 +1102,9 @@ 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:resize D: mmn- A: - F: - +Resize a malloc'd memory area. + mem:store D: xnn- A: - F: - Store a value into a malloc'd memory region. Uses a double cell pointer for the address. diff --git a/doc/Glossary-Names-and-Stack.txt b/doc/Glossary-Names-and-Stack.txt index e1a4937..662a870 100644 --- a/doc/Glossary-Names-and-Stack.txt +++ b/doc/Glossary-Names-and-Stack.txt @@ -119,6 +119,9 @@ bi D: xqq-? A: - F: - bi* D: xyqq-? A: - F: - bi@ D: xyq-? A: - F: - binary D: - A: - F: - +block:read D: an- A: - F: - +block:set-file D: s- A: - F: - +block:write D: an- A: - F: - buffer:add D: n- A: - F: - buffer:empty D: - A: - F: - buffer:end D: -a A: - F: - @@ -363,6 +366,7 @@ 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:resize D: mmn- A: - F: - mem:store D: xnn- A: - F: - mod D: nm-o A: - F: - n:-zero? D: n-f A: - F: - diff --git a/doc/Glossary.html b/doc/Glossary.html index 95db3b0..70f361b 100644 --- a/doc/Glossary.html +++ b/doc/Glossary.html @@ -904,6 +904,27 @@

Set `Base` to binary.

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

+

block:read

+

Data: an-
+Addr: -
+Float: -

+
+

Read 1024 cells from block n in the block storage into memory at address a.

+
Class: class:word
Namespace: block
Interface Layer: rre

+

block:set-file

+

Data: s-
+Addr: -
+Float: -

+
+

Set the file name of the block storage device.

+
Class: class:word
Namespace: block
Interface Layer: rre

+

block:write

+

Data: an-
+Addr: -
+Float: -

+
+

Save the 1024 cells at address a to block n in the block storage.

+
Class: class:word
Namespace: block
Interface Layer: rre

buffer:add

Data: n-
Addr: -
@@ -2719,6 +2740,13 @@

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:resize

+

Data: mmn-
+Addr: -
+Float: -

+
+

Resize a malloc'd memory area.

+
Class: class:word
Namespace: mem
Interface Layer: rre

mem:store

Data: xnn-
Addr: -
diff --git a/doc/Glossary.txt b/doc/Glossary.txt index 17779e6..72deac0 100644 --- a/doc/Glossary.txt +++ b/doc/Glossary.txt @@ -1402,6 +1402,39 @@ Set `Base` to binary. Class: class:word | Namespace: a | Interface Layer: all ------------------------------------------------------------------------ +block:read + + Data: an- + Addr: - + Float: - + +Read 1024 cells from block n in the block storage into memory at address a. + +Class: class:word | Namespace: block | Interface Layer: rre +------------------------------------------------------------------------ + +block:set-file + + Data: s- + Addr: - + Float: - + +Set the file name of the block storage device. + +Class: class:word | Namespace: block | Interface Layer: rre +------------------------------------------------------------------------ + +block:write + + Data: an- + Addr: - + Float: - + +Save the 1024 cells at address a to block n in the block storage. + +Class: class:word | Namespace: block | Interface Layer: rre +------------------------------------------------------------------------ + buffer:add Data: n- @@ -4212,6 +4245,17 @@ Fre a malloc'd region of memory. Pass a double cell pointer to the memory to fre Class: class:word | Namespace: mem | Interface Layer: rre ------------------------------------------------------------------------ +mem:resize + + Data: mmn- + Addr: - + Float: - + +Resize a malloc'd memory area. + +Class: class:word | Namespace: mem | Interface Layer: rre +------------------------------------------------------------------------ + mem:store Data: xnn- diff --git a/doc/words.tsv b/doc/words.tsv index ae656bd..bd8dd39 100644 --- a/doc/words.tsv +++ b/doc/words.tsv @@ -119,6 +119,9 @@ bi xqq-? - - Execute q1 against x, then execute q2 against a copy of x. class: bi* xyqq-? - - Execute q1 against x and q2 against y. class:word #10 #20 [ #2 * ] [ #10 / ] bi* {n/a} global all bi@ xyq-? - - Execute q against x, then execute q against y. class:word #10 #20 [ #3 * ] bi@ {n/a} global all binary - - - Set `Base` to binary. class:word {n/a} {n/a} a all +block:read an- - - Read 1024 cells from block n in the block storage into memory at address a. class:word {n/a} {n/a} block rre +block:set-file s- - - Set the file name of the block storage device. class:word {n/a} {n/a} block rre +block:write an- - - Save the 1024 cells at address a to block n in the block storage. class:word {n/a} {n/a} block rre buffer:add n- - - Append a value to the current buffer. class:word {n/a} {n/a} buffer all buffer:empty - - - Reset the current buffer to an empty state. class:word {n/a} {n/a} buffer all buffer:end -a - - Return a pointer to the current end of the active buffer. class:word {n/a} {n/a} buffer all @@ -363,6 +366,7 @@ mem:cell+ nnn-n - - Return address of next cell. Uses a double cell pointer on t 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:resize mmn- - - Resize a malloc'd memory area. 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