--- gforth/wordinfo.fs 1994/06/17 13:28:33 1.3 +++ gforth/wordinfo.fs 1994/11/29 16:22:51 1.6 @@ -13,33 +13,34 @@ INCLUDE look.fs : alias? ( nfa -- flag ) dup name> look 0= ABORT" WINFO: CFA not found" - cell+ +\ cell+ 2dup <> IF nip dup 1 cells - here ! count $1f and here cell+ place true ELSE 2drop false THEN ; : var? ( nfa -- flag ) - (name>) + cell+ (name>) >code-address ['] udp >code-address = ; : con? ( nfa -- flag ) - (name>) + cell+ (name>) >code-address ['] bl >code-address = ; +: user? ( nfa -- flag ) + cell+ (name>) + >code-address ['] s0 >code-address = ; + : does? ( nfa -- flag ) - dup (name>) - >code-address ['] source >code-address = - dup IF swap (name>) cell+ @ here ! ELSE nip THEN ; + cell+ (name>) + >code-address ['] bits >code-address = ; : defered? ( nfa -- flag ) - dup does? - IF here @ ['] source cell+ @ = - dup IF swap (name>) >body @ here ! ELSE nip THEN - ELSE drop false THEN ; + cell+ (name>) + >code-address ['] source >code-address = ; : colon? ( nfa -- flag ) - (name>) + cell+ (name>) >code-address ['] does? >code-address = ; \ VALUE VCheck @@ -66,24 +67,26 @@ INCLUDE look.fs 5 CONSTANT Doe# \ Does part 6 CONSTANT Def# \ Defer 7 CONSTANT Col# \ Colon def +8 CONSTANT Use# \ User variable \ Nobody knows: -8 CONSTANT Ali# \ Alias +9 CONSTANT Ali# \ Alias -9 CONSTANT Str# \ Structure words +10 CONSTANT Str# \ Structure words -10 CONSTANT Com# \ Compiler directives : ; POSTPONE +11 CONSTANT Com# \ Compiler directives : ; POSTPONE CREATE InfoTable - ' Alias? A, Ali# , - ' Con? A, Con# , - ' Var? A, Var# , -\ ' Value? A, Val# , + ' Prim? A, Pri# , + ' Alias? A, Ali# , + ' Con? A, Con# , + ' Var? A, Var# , +\ ' Value? A, Val# , ' Defered? A, Def# , - ' Does? A, Doe# , - ' Colon? A, Col# , - ' Prim? A, Pri# , + ' Does? A, Doe# , + ' Colon? A, Col# , + ' User? A, Use# , 0 , : WordInfo ( nfa --- code )