Data stack: ( v -- )
+X-Git-Url: https://git.rrq.au/?a=blobdiff_plain;ds=sidebyside;f=reference.html;h=9137d075cfd0bd68e35fda305d8050d21cc8f636;hb=7a99f2ed7cfe55f3aa69560b31c055ce45fe1f0c;hp=04da3738999684d452c0701a1335e93ede9ccd18;hpb=04f2de0478f8924fecee363057c208434f32a119;p=rrq%2Frrqforth.git diff --git a/reference.html b/reference.html index 04da373..9137d07 100644 --- a/reference.html +++ b/reference.html @@ -770,17 +770,24 @@ asciidoc.install(); ! C@ C! +W@ +W! +D@ +D! 2@ 2! !+ @n++ @n-- C, +W, +D, S" >R R@ R> -R[n]
+R[n] +D[n]DATA-STACK RETURN-STACK @@ -844,7 +851,9 @@ asciidoc.install(); LOAD-BUFFER-SIZE LOAD-FILE
NEGATE NIP NL @@ -858,6 +867,7 @@ asciidoc.install(); PROGRAM_VERSION
READ-STREAM-CHAR +READ-STREAM-LINE READ-WORD REALLOC RETURN @@ -878,7 +888,9 @@ asciidoc.install();
TELL .TEMP TEMP +TEMPHELD TEMPSPACE +TEMPUSED TERMINATE0 TFA>CFA TFA>DFA @@ -1142,6 +1154,65 @@ at the current free head address, which also is incremented.
Data stack: ( v -- )
+"W," (W-comma) is a function word that puts a "word" (double-byte) on +the HERE heap. The two least significant bytes of the value +are put at the current free head address, which also is incremented +accordingly.
Data stack: ( v -- )
+"D," (D-comma) is a function word that puts a "double word" +(double-byte) on the HERE heap. The four least significant +bytes of the value are put at the current free head address, which +also is incremented accordingly.
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.
Data stack: ( a -- v )
+"W@" is a function word that pushes the "word" (double-byte) value v +from the address a.
Data stack: ( -- v ) Return stack: ( v -- v )
+"R@" is a function word that "copies" the top return stack value onto +the data stack.
Data stack: ( v a -- )
+"W!" is a function word that stores the "word" (2-byte) value v (the +two least significant bytes of the cell) at the address a.
Data stack: ( v a -- )
+"D!" is a function word that stores the "doublw word" (4-byte) value v +(the four least significant bytes of the cell) at the address a.
Data stack: ( -- v ) Return stack: ( v -- v )
@@ -1292,7 +1415,8 @@ _______________________________________________________
"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.
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
Data stack: ( v1 v2 -- v3 )
+"MAX" is a function word that selects the greatest of v1 and v2. To +that end, the values are 64-bit signed integers.
Data stack: ( v1 v2 -- v3 )
+"MIN" is a function word that selects the least of v1 and v2. To that +end, the values are 64-bit signed integers.
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.
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.
Data stack: ( -- a )
+"TEMPHELD" is a variable word that keeps the lowest offset of the +TEMPSPACE space to reuse upon cycling. The space +below TEMPHELD is "held" in the sense of not being reused upon +cycling. An application may change the TEMPSPACE offset as needed to +dynamically preserve memory longer term.
Data stack: ( -- a )
+"TEMPUSED" is a variable word that keeps the lowest offset of the +TEMPSPACE space to use next as temporary space. This +is advance upon each allocation via TEMP, and recycled back +to TEMPHELD when next allocation otherwise would exceed +the space size.