09-11-2022, 09:48 PM
Hello,
attached a codelisting with barebone WORDS ( incl. example structures)
to LOADF and play around with the FORTH VOCABULARY.
INTRO_1: list ALL HP41V WORDS - system internal AND the user-defined in HP41 environment.
change to HP41 environment and get the CONTEXT Addr pointer
CONTEXT @ - ends up on top of FORTH data stack
change to FORTH
FORTH HEX
top of FORTH data stack is the LWL of the CONTEXT VOC of the HP41 environment
Regress pointer to NFA
5+ PVL2NFA
Duplicate the NFA and get the NAME
DUP NAME$ -- HP41V (sic!)
Scan HP41V
VOCSCAN
INTRO_2: Scan FORTH VOCABULARY (in FORTH environment)
set FORTH as CONTEXT
FORTH
Scan the CONTEXT
CON 5+ PVL2NFA VOCSCAN
NOTE:
VOCSCAN shows NFA addr and NAME
Advance with any key - abort with "ON"
Have fun!
- Stefan
EDIT
FTHVOC is not a VOCABULARY any more - rational: VOCSCAN passing through HP41V changes CONTEXT (reason unknown, so far - FORTH behaviour)
Changed CON, CUR, CON$, CUR$
Added CONLW$, CURLW$
Changed the intro.
attached a codelisting with barebone WORDS ( incl. example structures)
to LOADF and play around with the FORTH VOCABULARY.
INTRO_1: list ALL HP41V WORDS - system internal AND the user-defined in HP41 environment.
change to HP41 environment and get the CONTEXT Addr pointer
CONTEXT @ - ends up on top of FORTH data stack
change to FORTH
FORTH HEX
top of FORTH data stack is the LWL of the CONTEXT VOC of the HP41 environment
Regress pointer to NFA
5+ PVL2NFA
Duplicate the NFA and get the NAME
DUP NAME$ -- HP41V (sic!)
Scan HP41V
VOCSCAN
INTRO_2: Scan FORTH VOCABULARY (in FORTH environment)
set FORTH as CONTEXT
FORTH
Scan the CONTEXT
CON 5+ PVL2NFA VOCSCAN
NOTE:
VOCSCAN shows NFA addr and NAME
Advance with any key - abort with "ON"
Have fun!
- Stefan
EDIT
FTHVOC is not a VOCABULARY any more - rational: VOCSCAN passing through HP41V changes CONTEXT (reason unknown, so far - FORTH behaviour)
Changed CON, CUR, CON$, CUR$
Added CONLW$, CURLW$
Changed the intro.