Commit 3955fa40 authored by anton's avatar anton

a little cleanup in 386.h

renamed special: to interpret/compile:
renamed save-string to save-mem
added extend-mem
replaced (name>) with ((name>))
replaced name> with name>int and name>comp
renamed compile-only to compile-only-error
replaced xt>i with name>int
replaced xt>c with name>comp
removed xt>s
removed found
search-wordlist now delivers interpretation-xt
replaced (sfind) with find-name
replaced C' with COMP' and [C'] with [COMP']
removed S' and [S']
added hex.
added some helper words
adapted other words to the changes
started documenting the intergration of Gforth in applications
parent e725919f
......@@ -60,10 +60,10 @@
#define DOES_CODE(xt) \
({ long _xt = (long)(xt); \
long _ca = (long)(CODE_ADDRESS(_xt)); \
(((*(unsigned char *)_xt) == CALL) && \
((*(unsigned char *)_ca) == JMP) && \
((long)(CODE_ADDRESS(_ca)) == (long)symbols[DODOES])) ? \
_ca+DOES_HANDLER_SIZE : 0L; })
((((*(unsigned char *)_xt) == CALL) \
&& ((*(unsigned char *)_ca) == JMP) \
&& ((long)(CODE_ADDRESS(_ca)) == (long)&&dodoes)) \
? _ca+DOES_HANDLER_SIZE : 0L); })
/* this is a special version of DOES_CODE for use in dodoes */
#define DOES_CODE1(label) (CODE_ADDRESS(label)+DOES_HANDLER_SIZE)
......
......@@ -21,8 +21,8 @@ http://www.complang.tuwien.ac.at/forth/gforth/
or
ftp://ftp.complang.tuwien.ac.at/pub/forth/gforth/
This site will contains binary distributions of Gforth for some
popular platforms.
This site contains binary distributions of Gforth for some popular
platforms.
If you want to work on Gforth, mail me. Tasks to be done can be found
in ToDo; but if you would like to do something not mentioned there,
......
......@@ -42,7 +42,7 @@ vocabulary assembler ( -- ) \ tools-ext
:noname ( -- colon-sys )
align here lastxt code-address!
defstart init-asm ;
special: ;code
interpret/compile: ;code
: end-code ( colon-sys -- ) \ gforth end_code
( end a code definition )
......
......@@ -278,9 +278,8 @@ Variable last-ghost
: gfind ( string -- ghost true/1 / string false )
\ searches for string in word-list ghosts
\ !! wouldn't it be simpler to just use search-wordlist ? ae
dup count [ ' ghosts >body ] ALiteral search-wordlist
dup IF >r >body nip r> THEN ;
dup IF >r >body nip r> THEN ;
VARIABLE Already
......@@ -708,7 +707,7 @@ by Defer :dodefer resolve
Build: ( inter comp -- ) swap T immediate A, A, H ;
DO: ( ghost -- ) ABORT" CROSS: Don't execute" ;DO
Builder special:
Builder interpret/compile:
\ Sturctures 23feb95py
......
......@@ -71,24 +71,24 @@ create description-buffer 4096 chars allot
+loop ;
: condition-stack-effect ( c-addr1 u1 -- c-addr2 u2 )
save-string 2dup replace-_ ;
save-mem 2dup replace-_ ;
: condition-wordset ( c-addr1 u1 -- c-addr2 u2 )
dup 0=
if
2drop s" unknown"
else
save-string
save-mem
endif ;
: condition-pronounciation ( c-addr1 u1 -- c-addr2 u2 )
save-string 2dup replace-_ ;
save-mem 2dup replace-_ ;
: make-doc ( -- )
get-current documentation set-current
create
last @ name>string 2, \ name
[char] ) parse save-string 2, \ stack-effect
[char] ) parse save-mem 2, \ stack-effect
bl parse-word condition-wordset 2, \ wordset
bl parse-word dup \ pronounciation
if
......@@ -97,7 +97,7 @@ create description-buffer 4096 chars allot
2drop last @ name>string
endif
2,
get-description save-string 2,
get-description save-mem 2,
set-current ;
: emittexi ( c -- )
......
......@@ -37,6 +37,7 @@
new-addr i 2* cells + 2!
LOOP ;
: dump-fi ( addr u -- )
w/o bin create-file throw >r
update-image-included-files
......
......@@ -88,6 +88,7 @@ personal machines. This manual corresponds to version 0.2.
* Words:: Forth words available in Gforth
* ANS conformance:: Implementation-defined options etc.
* Model:: The abstract machine of Gforth
* Integrating Gforth:: Forth as scripting language for applications.
* Emacs and Gforth:: The Gforth Mode
* Internals:: Implementation details
* Bugs:: How to report them
......@@ -2184,7 +2185,7 @@ use @code{>DOES-CODE}.
To the best of our knowledge, Gforth is an
ANS Forth System
@itemize
@itemize @bullet
@item providing the Core Extensions word set
@item providing the Block word set
@item providing the Block Extensions word set
......@@ -2203,7 +2204,7 @@ ANS Forth System
@item providing the Memory-Allocation word set
@item providing the Memory-Allocation Extensions word set (that one's easy)
@item providing the Programming-Tools word set
@item providing @code{;code}, @code{AHEAD}, @code{ASSEMBLER}, @code{BYE}, @code{CODE}, @code{CS-PICK}, @code{CS-ROLL}, @code{STATE}, @code{[ELSE]}, @code{[IF]}, @code{[THEN]} from the Programming-Tools Extensions word set
@item providing @code{;CODE}, @code{AHEAD}, @code{ASSEMBLER}, @code{BYE}, @code{CODE}, @code{CS-PICK}, @code{CS-ROLL}, @code{STATE}, @code{[ELSE]}, @code{[IF]}, @code{[THEN]} from the Programming-Tools Extensions word set
@item providing the Search-Order word set
@item providing the Search-Order Extensions word set
@item providing the String word set
......@@ -3212,11 +3213,63 @@ are applied to the latest defined word (as reported by @code{last} or
@end table
@node Model, Emacs and Gforth, ANS conformance, Top
@node Model, Integrating Gforth, ANS conformance, Top
@chapter Model
@node Emacs and Gforth, Internals, Model, Top
This chapter has yet to be written. It will contain information, on
which internal structures you can rely.
@node Integrating Gforth, Emacs and Gforth, Model, Top
@chapter Integrating Gforth into C programs
This is not yet implemented.
Several people like to use Forth as scripting language for applications
that are otherwise written in C, C++, or some other language.
The Forth system ATLAST provides facilities for embedding it into
applications; unfortunately it has several disadvantages: most
implorantly, it is not based on ANS Forth, and it is apparently dead
(i.e., not developed further and not supported). The facilities
provided by Gforth in this area are inspired by ATLASTs facilities, so
making the switch should not be hard.
We also tried to design the interface such that it can easily be
implemented by other Forth systems, so that we may one day arrive at a
standardized interface. Such a standard interface would allow you to
replace the Forth system without having to rewrite C code.
You embed the Gforth interpreter by linking with the library
@code{libgforth.a} (give the compiler the option @code{-lgforth}). All
global symbols in this library that belong to the interface, have the
prefix @code{forth_}. (Global symbols that are used internally have the
prefix @code{gforth_}).
You can include the declarations of Forth types and the functions and
variables of the interface with @code{include <forth.h>}.
Types.
Variables.
Data and FP Stack pointer. Area sizes.
functions.
forth_init(imagefile)
forth_evaluate(string) exceptions?
forth_goto(address) (or forth_execute(xt)?)
forth_continue() (a corountining mechanism)
Adding primitives.
No checking.
Signals?
Accessing the Stacks
@node Emacs and Gforth, Internals, Integrating Gforth, Top
@chapter Emacs and Gforth
Gforth comes with @file{gforth.el}, an improved version of
......@@ -3549,7 +3602,7 @@ An important optimization for stack machine emulators, e.g., Forth
engines, is keeping one or more of the top stack items in
registers. If a word has the stack effect @var{in1}...@var{inx} @code{--}
@var{out1}...@var{outy}, keeping the top @var{n} items in registers
@itemize
@itemize @bullet
@item
is better than keeping @var{n-1} items, if @var{x>=n} and @var{y>=n},
due to fewer loads from and stores to the stack.
......@@ -3583,7 +3636,7 @@ The TOS optimization makes the automatic generation of primitives a
bit more complicated. Just replacing all occurrences of @code{sp[0]} by
@code{TOS} is not sufficient. There are some special cases to
consider:
@itemize
@itemize @bullet
@item In the case of @code{dup ( w -- w w )} the generator must not
eliminate the store to the original location of the item on the stack,
if the TOS optimization is turned on.
......@@ -3785,7 +3838,7 @@ VolksForth descends from F83. It was written by Klaus Schleisiek, Bernd
Pennemann, Georg Rehfeld and Dietrich Weineck for the C64 (called
UltraForth there) in the mid-80s and ported to the Atari ST in 1986.
Hennry Laxen and Mike Perry wrote F83 as a model implementation of the
Henry Laxen and Mike Perry wrote F83 as a model implementation of the
Forth-83 standard. !! Pedigree? When?
A team led by Bill Ragsdale implemented fig-Forth on many processors in
......
......@@ -528,7 +528,7 @@ forth definitions
OF POSTPONE laddr# >body @ lp-offset, POSTPONE f! ENDOF
-&32 throw
endcase ;
special: TO ( c|w|d|r "name" -- ) \ core-ext,local
interpret/compile: TO ( c|w|d|r "name" -- ) \ core-ext,local
: locals|
\ don't use 'locals|'! use '{'! A portable and free '{'
......
......@@ -22,7 +22,7 @@
char [char] @ - ;
:noname
char [char] @ - postpone Literal ;
special: ctrl ( "<char>" -- ctrl-code )
interpret/compile: ctrl ( "<char>" -- ctrl-code )
\ command line editing 16oct94py
......
......@@ -160,20 +160,16 @@ $80 constant alias-mask \ set when the word is not an alias!
$40 constant immediate-mask
$20 constant restrict-mask
: (name>) ( nfa+cell -- cfa )
1 cells - name>string + cfaligned ;
: name> ( nfa -- cfa ) \ gforth
cell+
dup (name>) swap c@ alias-mask and 0= IF @ THEN ;
: ((name>)) ( nfa -- cfa )
name>string + cfaligned ;
\ (find) 17dec92py
\ : (find) ( addr count nfa1 -- nfa2 / false )
\ BEGIN dup WHILE dup >r
\ name>string dup >r 2over r> =
\ IF -text 0= IF 2drop r> EXIT THEN
\ ELSE 2drop drop THEN r> @
\ REPEAT nip nip ;
: (name>x) ( nfa -- cfa b )
\ cfa is an intermediate cfa and b is the flags byte of nfa
dup ((name>))
swap cell+ c@ dup alias-mask and 0=
IF
swap @ swap
THEN ;
\ place bounds 13feb93py
......@@ -182,6 +178,18 @@ $20 constant restrict-mask
: bounds ( beg count -- end beg ) \ gforth
over + swap ;
: save-mem ( addr1 u -- addr2 u ) \ gforth
\ copy a memory block into a newly allocated region in the heap
swap >r
dup allocate throw
swap 2dup r> -rot move ;
: extend-mem ( addr1 u1 u -- addr addr2 u2 )
\ extend memory block allocated from the heap by u aus
\ the (possibly reallocated piece is addr2 u2, the extension is at addr
over >r + dup >r resize throw
r> over r> + -rot ;
\ input stream primitives 23feb93py
: tib ( -- c-addr ) \ core-ext
......@@ -267,13 +275,16 @@ Defer source ( -- addr count ) \ core
: (compile) ( -- ) \ gforth
r> dup cell+ >r @ compile, ;
: postpone ( "name" -- ) \ core
name sfind dup 0= abort" Can't compile "
0> IF compile, ELSE postpone (compile) A, THEN ; immediate restrict
: special: ( interp comp "name" -- )
\ not the most efficient implementation of POSTPONE, but simple
: POSTPONE ( -- ) \ core
COMP' swap POSTPONE aliteral compile, ; immediate restrict
: interpret/compile: ( interp-xt comp-xt "name" -- )
Create immediate swap A, A,
DOES> state @ IF cell+ THEN perform ;
DOES>
abort" executed primary cfa of an interpret/compile: word" ;
\ state @ IF cell+ THEN perform ;
\ Use (compile) for the old behavior of compile!
......@@ -504,10 +515,10 @@ Defer interpreter-notfound ( c-addr count -- )
' no.extensions IS compiler-notfound
' no.extensions IS interpreter-notfound
: compile-only ( ... -- )
: compile-only-error ( ... -- )
-&14 throw ;
Defer interpret-special ( c-addr u xt -- ) \ !! use nfa instead of xt?
' compile-only IS interpret-special
' compile-only-error IS interpret-special
: interpret ( ?? -- ?? ) \ gforth
\ interpret/compile the (rest of the) input buffer
......@@ -520,48 +531,41 @@ Defer interpret-special ( c-addr u xt -- ) \ !! use nfa instead of xt?
\ interpreter compiler 30apr92py
: interpreter ( c-addr u -- ) \ gforth
\ interpretation semantics for the name/number c-addr u
2dup (sfind) dup
IF
1 and
IF \ not restricted to compile state?
nip nip execute EXIT
THEN
interpret-special exit
THEN
drop
2dup 2>r snumber?
IF
2rdrop
ELSE
2r> interpreter-notfound
THEN ;
' interpreter IS parser
: compiler ( c-addr u -- ) \ gforth
\ compilation semantics for the name/number c-addr u
2dup (sfind) dup
IF
0>
\ not the most efficient implementations of interpreter and compiler
: interpreter ( c-addr u -- )
2dup find-name dup
if
nip nip name>int execute
else
drop
2dup 2>r snumber?
IF
nip nip execute EXIT
2rdrop
ELSE
2r> interpreter-notfound
THEN
compile, 2drop EXIT
THEN
drop
2dup snumber? dup
IF
0>
then ;
: compiler ( c-addr u -- )
2dup find-name dup
if ( c-addr u nfa )
nip nip name>comp execute
else
drop
2dup snumber? dup
IF
swap postpone Literal
0>
IF
swap postpone Literal
THEN
postpone Literal
2drop
ELSE
drop compiler-notfound
THEN
postpone Literal
2drop
ELSE
drop compiler-notfound
THEN ;
then ;
' interpreter IS parser
: [ ( -- ) \ core left-bracket
['] interpreter IS parser state off ; immediate
......@@ -639,7 +643,7 @@ variable backedge-locals
over 0<>
while
over
name> >body @ max
((name>)) >body @ max
swap @ swap ( get next )
repeat
faligned nip ;
......@@ -1199,61 +1203,96 @@ G forth-wordlist current T !
\ higher level parts of find
: special? ( xt -- flag )
>does-code ['] S" >does-code = ;
( struct )
0 >body cell
1 cells: field special-interpretation
1 cells: field special-compilation
end-struct special-struct
: xt>i ( xt -- xt )
dup special? IF >body @ THEN ;
: interpret/compile? ( xt -- flag )
>does-code ['] S" >does-code = ;
: xt>c ( xt -- xt )
dup special? IF >body cell+ @ THEN ;
: (x>int) ( cfa b -- xt )
\ get interpretation semantics of name
restrict-mask and
if
drop ['] compile-only-error
else
dup interpret/compile?
if
special-interpretation @
then
then ;
: xt>s ( xt -- xt )
dup special? IF >body state @ IF cell+ THEN @ THEN ;
: name>int ( nfa -- xt ) \ gforth
(name>x) (x>int) ;
: found ( nfa -- cfa n ) \ gforth
cell+ dup c@ >r (name>)
r@ alias-mask and 0= IF @ THEN -1
r@ restrict-mask and IF 1- THEN
r> immediate-mask and IF negate THEN ;
: name>comp ( nfa -- w xt ) \ gforth
\ get compilation semantics of name
(name>x) >r dup interpret/compile?
if
special-compilation @
then
r> immediate-mask and if
['] execute
else
['] compile,
then ;
: (search-wordlist) ( addr count wid -- nfa / false )
dup wordlist-map @ find-method perform ;
: search-wordlist ( addr count wid -- 0 / xt +-1 ) \ search
(search-wordlist) dup IF found swap xt>s swap THEN ;
: flag-sign ( f -- 1|-1 )
\ true becomes 1, false -1
0= 2* 1+ ;
: (sfind) ( c-addr u -- xt n / 0 )
lookup @ (search-wordlist) dup IF found THEN ;
: search-wordlist ( addr count wid -- 0 / xt +-1 ) \ search
\ xt is the interpretation semantics
(search-wordlist) dup if
(name>x) tuck (x>int) ( b xt )
swap immediate-mask and flag-sign
then ;
: sfind ( c-addr u -- xt n / 0 ) \ gforth
lookup @ search-wordlist ;
: find-name ( c-addr u -- nfa/0 )
lookup @ (search-wordlist) ;
: find ( addr -- cfa +-1 / string false ) \ core,search
dup count sfind dup IF
: sfind ( c-addr u -- 0 / xt +-1 ) \ gforth-obsolete
find-name dup
if ( nfa )
state @
if
name>comp ['] execute =
else
(name>x) tuck (x>int)
swap immediate-mask and
then
flag-sign
then ;
: find ( c-addr -- xt +-1 / c-addr 0 ) \ core
dup count sfind dup
if
rot drop
THEN
dup 1 and 0= IF 2/ THEN ;
then ;
: (') ( "name" -- xt ) \ gforth paren-tick
name (sfind) 0= IF -&13 bounce THEN ;
: [(')] ( compilation "name" -- ; run-time -- addr ) \ gforth bracket-paren-tick
: (') ( "name" -- nfa ) \ gforth
name find-name dup 0=
IF
drop -&13 bounce
THEN ;
: [(')] ( compilation "name" -- ; run-time -- nfa ) \ gforth bracket-paren-tick
(') postpone ALiteral ; immediate restrict
: ' ( "name" -- xt ) \ core tick
(') xt>i ;
: ['] ( compilation "name" -- ; run-time -- addr ) \ core bracket-tick
(') name>int ;
: ['] ( compilation "name" -- ; run-time -- xt ) \ core bracket-tick
' postpone ALiteral ; immediate restrict
: C' ( "name" -- xt ) \ gforth c-tick
(') xt>c ;
: [C'] ( compilation "name" -- ; run-time -- addr ) \ gforth bracket-c-tick
C' postpone ALiteral ; immediate restrict
: S' ( "name" -- xt ) \ gforth s-tick
(') xt>s ;
: [S'] ( compilation "name" -- ; run-time -- addr ) \ gforth bracket-s-tick
S' postpone ALiteral ; immediate restrict
: COMP' ( "name" -- w xt ) \ gforth c-tick
(') name>comp ;
: [COMP'] ( compilation "name" -- ; run-time -- w xt ) \ gforth bracket-comp-tick
COMP' swap POSTPONE Aliteral POSTPONE ALiteral ; immediate restrict
\ reveal words
......@@ -1519,7 +1558,7 @@ create image-included-files 1 , A, ( pointer to and count of included files )
loadline @ ;
: init-included-files ( -- )
image-included-files 2@ 2* cells save-string drop ( addr )
image-included-files 2@ 2* cells save-mem drop ( addr )
image-included-files 2@ nip included-files 2! ;
: included? ( c-addr u -- f ) \ gforth
......@@ -1537,20 +1576,17 @@ create image-included-files 1 , A, ( pointer to and count of included files )
: add-included-file ( c-addr u -- ) \ gforth
\ add name c-addr u to included-files
included-files 2@ tuck 1+ 2* cells resize throw
swap 2dup 1+ included-files 2!
2* cells + 2! ;
: save-string ( addr1 u -- addr2 u ) \ gforth
\ !! not a string, but a memblock word
swap >r
dup allocate throw
swap 2dup r> -rot move ;
included-files 2@ 2* cells 2 cells extend-mem
2/ cell / included-files 2!
2! ;
\ included-files 2@ tuck 1+ 2* cells resize throw
\ swap 2dup 1+ included-files 2!
\ 2* cells + 2! ;
: included1 ( i*x file-id c-addr u -- j*x ) \ gforth
\ include the file file-id with the name given by c-addr u
loadfilename# @ >r
save-string add-included-file ( file-id )
save-mem add-included-file ( file-id )
included-files 2@ nip 1- loadfilename# !
['] include-file catch
r> loadfilename# !
......@@ -1650,6 +1686,10 @@ max-errors 6 * cells allot
\ print value in decimal representation
base @ decimal swap . base ! ;
: hex. ( u -- ) \ gforth
\ print value as unsigned hex number
'$ emit base @ swap hex u. base ! ;
: typewhite ( addr u -- ) \ gforth
\ like type, but white space is printed instead of the characters
bounds ?do
......
......@@ -42,7 +42,7 @@ decimal
: (look) ( xt startlfa -- lfa flag )
false swap
BEGIN @ dup
WHILE dup name>
WHILE dup name>int
3 pick = IF nip dup THEN
REPEAT
drop nip
......
......@@ -1010,7 +1010,7 @@ resize a_addr1 u -- a_addr2 wior memory
""Change the size of the allocated area at @i{a_addr1} to @i{u}
address units, possibly moving the contents to a different
area. @i{a_addr2} is the address of the resulting area. If
@code{a_addr2} is 0, Gforth's (but not the standard) @code{resize}
@code{a_addr1} is 0, Gforth's (but not the standard) @code{resize}
@code{allocate}s @i{u} address units.""
/* the following check is not necessary on most OSs, but it is needed
on SunOS 4.1.2. */
......
......@@ -42,7 +42,7 @@
warnings off
require interpretation.fs
\ require interpretation.fs
require debugging.fs
[IFUNDEF] vocabulary include search-order.fs [THEN]
[IFUNDEF] environment? include environ.fs [THEN]
......@@ -165,7 +165,7 @@ print-token !
0. r> 6 chars + 20 >number drop >r drop line ! r> ( c-addr )
dup c@ bl = if
char+ dup c@ [char] " <> abort" sync line syntax"
char+ dup 100 [char] " scan drop swap 2dup - save-string filename 2!
char+ dup 100 [char] " scan drop swap 2dup - save-mem filename 2!
char+
endif
dup c@ nl-char <> abort" sync line syntax"
......
......@@ -546,15 +546,15 @@ DEFER dosee
: dopri .name ." is primitive" cr ;
: dovar ." Variable " .name cr ;
: douse ." User " .name cr ;
: docon dup cell+ (name>) >body @ . ." Constant " .name cr ;
: doval dup cell+ (name>) >body @ . ." Value " .name cr ;
: docon dup ((name>)) >body @ . ." Constant " .name cr ;
: doval dup ((name>)) >body @ . ." Value " .name cr ;
: dodef ." Defer " dup >r .name cr
r@ cell+ (name>) >body @ look
r@ ((name>)) >body @ look
0= ABORT" SEE: No valid xt in deferred word"
dup dosee cr
." ' " .name r> ." IS " .name cr ;
: dodoe ." Create " dup .name cr
S" DOES> " Com# .string XPos @ Level ! name>
S" DOES> " Com# .string XPos @ Level ! name>int
>does-code dup C-Pass @ DebugMode = IF ScanMode c-pass ! EXIT THEN
ScanMode c-pass ! dup makepass
DisplayMode c-pass ! makepass ;
......@@ -564,7 +564,7 @@ DEFER dosee
S" : " Com# .string
dup name>string 2 pick wordinfo .string bl cemit bl cemit
( XPos @ ) 2 Level !
name> >body
name>int >body
C-Pass @ DebugMode =
IF
ScanMode c-pass ! EXIT
......@@ -605,8 +605,12 @@ create wordtypes
cr c-init
dosee ;
: see name sfind 0= IF ." Word unknown" cr exit THEN
xtc ;
: see ( "name" -- ) \ tools
name find-name dup 0=
IF
drop -&13 bounce
THEN
name>int xtc ;
: lfc cr c-init cell+ dosee ;
: nfc cr c-init dosee ;
......
\ state-smart words last, because they override cross' words.
\ words with non-default and non-immediate compilation semantics
\ Copyright (C) 1996 Free Software Foundation, Inc.
\ This file is part of Gforth.
\ Gforth is free software; you can redistribute it and/or
\ modify it under the terms of the GNU General Public License
\ as published by the Free Software Foundation; either version 2
\ of the License, or (at your option) any later version.
\ This program is distributed in the hope that it will be useful,
\ but WITHOUT ANY WARRANTY; without even the implied warranty of
\ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\ GNU General Public License for more details.
\ You should have received a copy of the GNU General Public License
\ along with this program; if not, write to the Free Software
\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
\ this file comes last, because these words override cross' words.
create s"-buffer /line chars allot
:noname [char] " parse
/line min >r s"-buffer r@ cmove
s"-buffer r> ;
:noname [char] " parse postpone SLiteral ;
special: S" ( compilation 'ccc"' -- ; run-time -- c-addr u ) \ core,file s-quote
interpret/compile: S" ( compilation 'ccc"' -- ; run-time -- c-addr u ) \ core,file s-quote
:noname ' >body ! ;
:noname ' >body postpone ALiteral postpone ! ;
special: IS ( addr "name" -- ) \ gforth
interpret/compile: IS ( addr "name" -- ) \ gforth
' IS Alias TO ( addr "name" -- ) \ core-ext
immediate
:noname ' >body @ ;
:noname ' >body postpone ALiteral postpone @ ;
special: What's ( "name" -- addr ) \ gforth
interpret/compile: What's ( "name" -- addr ) \ gforth
:noname [char] " parse type ;
:noname postpone (.") ," align ;
special: ." ( compilation 'ccc"' -- ; run-time -- ) \ core dot-quote
interpret/compile: ." ( compilation 'ccc"' -- ; run-time -- ) \ core dot-quote
\ DOES> 17mar93py
......@@ -28,4 +48,4 @@ special: ." ( compilation 'ccc"' -- ; run-time -- ) \ core dot-quote
defstart :-hook ;
:noname ;-hook postpone (does>) ?struc dodoes,
defstart :-hook ;
special: DOES> ( compilation colon-sys1 -- colon-sys2 ; run-time nest-sys -- ) \ core does
interpret/compile: DOES> ( compilation colon-sys1 -- colon-sys2 ; run-time nest-sys -- ) \ core does
......@@ -32,46 +32,38 @@ INCLUDE look.fs