From: Tim Vaughan Date: Mon, 2 May 2016 11:54:38 +0000 (+1200) Subject: Added C, X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=8170797f810ae128fda2d6ccf8eaaf37de177a64;p=forth.jl.git Added C, --- diff --git a/src/lib.4th b/src/lib.4th index ad6a3a5..a43f6c1 100644 --- a/src/lib.4th +++ b/src/lib.4th @@ -8,7 +8,15 @@ : FALSE 0 ; : NOT 0= ; -: CELLS ; \ Allow for slightly more portable code + \ Allow for slightly more portable code +: CELLS ; + +\ Since the smallest unit of memory in our system is 64 bits and since strings +\ are stored as arrays of 64 bit integers, the character store/fetch words are +\ just aliases of the standard store/fetch words. +: C! ! ; +: C@ @ ; +: C, , ; : DEPTH PSP@ PSP0 @ - ; @@ -383,11 +391,6 @@ ( STRINGS ---------------------------------------------------------------------- ) -( Since the smallest unit of memory in our system is 64 bits and since strings - are stored as arrays of 64 bit integers, the character store/fetch words are - just aliases of the standard store/fetch words. ) -: C! ! ; -: C@ @ ; ( Block copy, however, is important and novel: ) : CMOVE ( src dest length -- )