Post Reply 
HP-71B FORTH VOCABULARY playground
09-11-2022, 09:48 PM (This post was last modified: 09-15-2022 10:05 AM by Stefan_Titan2944A.)
Post: #1
HP-71B FORTH VOCABULARY playground
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 File(s)
.pdf  FTHVOC.pdf (Size: 331.07 KB / Downloads: 19)
Find all posts by this user
Quote this message in a reply
09-26-2022, 11:22 AM (This post was last modified: 09-26-2022 11:28 AM by Stefan_Titan2944A.)
Post: #2
RE: HP-71B FORTH VOCABULARY playground
UPDATE - complete FORTH DICTIONARY SCAN of all user defined WORDS and VOCABULARIES - including HP41V VOC content.


: USERDICT
FORTH
FORTH DEFINITIONS
0
CUR 5+ PVL2NFA
BEGIN
BEGIN
DUP ?VOC
IF
DUP U. „ [v. „ TYPE
DUP NAME$
KEY DROP CR
DUP LWL@
ELSE
DUP U. " [w] " TYPE
DUP NAME$
KEY DROP CR
LFA@
THEN
2DUP =
UNTIL
DROP
DUP U. „ .v] „ TYPE
DUP NAME$
KEY DROP CR
LFA@ ;
2DUP =
UNTIL
DROP DROP DROP ;


If the "HP-41 Translator Pac Owner's Manual" example page 73
is entered last, expect an output like this:

2FD0C [v. FORTH
306EA [w] WORD4
30655 [v. NEW
306CF [w] WORD3
30690 [v. NEWER
306B4 [w] WORD2
30690 .v] NEWER
30675 [w] WORD1
30655 .v] NEW
... (user dict)
2FD30 [v. HP41V
... (user dict)
2FD64 [w] R41
2FD54 [w]
EAF0C [w] MOD
EAEA8 [w] SIGN
... (HP41 functions - page 169ff, Table E-1)
2FD30 .v] HP41V


N.B. 30xxx will be different, depending on what was defined earlier.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)