documentation fixes
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Sun, 13 Jun 2021 04:01:13 +0000 (14:01 +1000)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Sun, 13 Jun 2021 04:01:13 +0000 (14:01 +1000)
adoc/p_args.adoc
adoc/p_dsp.adoc [new file with mode: 0644]
adoc/p_rbpn.adoc
adoc/p_read_stream_line.adoc [new file with mode: 0644]
reference.adoc
wordindex.adoc

index 825ca358b3ecd12c0d62da8e696ffd5c9b6d9dee..ca3eef6ca2e36cf72089cedf5264c7398433f2d1 100644 (file)
@@ -10,7 +10,8 @@ Data stack: ( -- p[argv** argc] )
 
 "ARGS" is a value word that holds a pointer to the command line data
 block which consists of a count cell followed by that many asciiz
-pointers and then a 0 cell.
+pointers and then a 0 cell. That is next followed by the environment
+as a number of asciiz pointers and a 0 cell.
 
 ====
 .the command line argument block
@@ -18,8 +19,9 @@ pointers and then a 0 cell.
 ----
 ARGS -> 8 bytes: count of non-zero asciiz pointers following
         8 bytes: command name string
-       8 bytes: first argument string
-       8* ...
-       8 zero
+       8* bytes: argument strings
+       8 bytes: zero cell
+       8* bytes: envirnment strings
+       8 bytes: zero cell
 ----
 ====
diff --git a/adoc/p_dsp.adoc b/adoc/p_dsp.adoc
new file mode 100644 (file)
index 0000000..5c94c4a
--- /dev/null
@@ -0,0 +1,13 @@
+// stack.asm:  WORD p_dsp, 'D[n]',fasm
+
+anchor:p_dsp[]
+
+=== Word: D[n]
+
+....
+Data stack: ( n -- a )
+....
+
+"D[n]" is a function word that pushes the address for the n:th cell of
+the data stack onto the data stack.
+
index 55071e2eea2caf8361f9585a46fa381bea84ce85..9c3a5e33172f2ec9dc796bb33ca8cfcb6fc08ad3 100644 (file)
@@ -8,8 +8,8 @@ anchor:p_rbpn[]
 Data stack: ( n -- a )
 ....
 
-"R[n]" is a function word that pushes the address for the n:th cell on
-the top return stack value onto the data stack.
+"R[n]" is a function word that pushes the address for the n:th cell of
+the return stack onto the data stack.
 
 ====
 .Defintion concept for R[n]
diff --git a/adoc/p_read_stream_line.adoc b/adoc/p_read_stream_line.adoc
new file mode 100644 (file)
index 0000000..43c56d6
--- /dev/null
@@ -0,0 +1,15 @@
+// stdio.asm:  WORD p_read_stream_line,'READ-STREAM-LINE'
+
+anchor:p_read_stream_line[]
+
+=== Word: READ-STREAM-LINE
+
+....
+Data stack: ( stream -- n )
+....
+
+"READ-STREAM-LINE" is a function word that gets the next line from the
+given stream buffer into PAD and returns number of characters. If the
+stream is backed by a file descriptor, the stream buffer is refilled
+from there as needed, by a SYS_READ call when more characters are
+needed.
index c4b512026e5457d975d13ae664f845d871e461bd..1d9f60e2dd545eee7e91f38d4eb37e4cef46663e 100644 (file)
@@ -35,6 +35,8 @@ include::adoc/p_Wcomma.adoc[]
 include::separator.adoc[]
 include::adoc/p_Dcomma.adoc[]
 include::separator.adoc[]
+include::adoc/p_dsp.adoc[]
+include::separator.adoc[]
 include::adoc/p_cfa2tfa.adoc[]
 include::separator.adoc[]
 include::adoc/p_Cget.adoc[]
@@ -241,6 +243,8 @@ include::adoc/p_rbpn.adoc[]
 include::separator.adoc[]
 include::adoc/p_read_stream_char.adoc[]
 include::separator.adoc[]
+include::adoc/p_read_stream_line.adoc[]
+include::separator.adoc[]
 include::adoc/p_read_word.adoc[]
 include::separator.adoc[]
 include::adoc/p_realloc.adoc[]
index 5a6aa433b86ad3eb00d1cc4bc3182ef915e4f03d..e59bfaa8e77c9e06158263f7766214cc8ce2bbd8 100644 (file)
@@ -50,6 +50,7 @@ xref:p_gtR[>R] {nbsp}
 xref:p_Rget[R@] {nbsp}
 xref:p_Rgt[R>] {nbsp}
 <<p_rbpn,R[n]>> {nbsp}
+<<p_dsp,D[n]>> {nbsp}
 
 xref:data_stack[DATA-STACK] {nbsp}
 xref:return_stack[RETURN-STACK] {nbsp}
@@ -143,6 +144,7 @@ xref:p_program_version[PROGRAM_VERSION] {nbsp}
 xref:p_quit[QUIT] {nbsp}
 
 xref:p_read_stream_char[READ-STREAM-CHAR] {nbsp}
+xref:p_read_stream_char[READ-STREAM-LINE] {nbsp}
 xref:p_read_word[READ-WORD] {nbsp}
 xref:p_realloc[REALLOC] {nbsp}
 xref:p_return[RETURN] {nbsp}