Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 28 |
Nodes: | 6 (0 / 6) |
Uptime: | 47:49:54 |
Calls: | 422 |
Files: | 1,024 |
Messages: | 90,420 |
I've been dusting-off fig-Forth for VAX-11 and noticed that every word
in the dictionary has 128 added to the character code of the last
character in the word name. Everything seems to work except a few things
like VLIST (prints a list of defined words like WORDS in ANS Forth)
printing a garbage character at the end of each word.
I wrote my own version of VLIST to unmunge the last characters, but it's
hard to believe it's been messed up for 40 years. Is there some
peculiarity in fig-Forth or the VAX-11 (I'm using significantly later hardware and OS) that made this work correctly back in the day?
I've been dusting-off fig-Forth for VAX-11 and noticed that every word...
in the dictionary has 128 added to the character code of the last
character in the word name.
Is there some
peculiarity in fig-Forth or the VAX-11 (I'm using significantly later >hardware and OS) that made this work correctly back in the day?
Here's the reason why the last bit is set: Fig-Forth has "variableof the Glossary, Model, and Editor document. Which had little details
length names" as headline feature, whereas earlier Forth systems only
stored the length and 3 characters (i.e., VLIST would output its own
name as VLI__ or so), and would match/conflict with, e.g., VLIKE.
Way back when I bought copies of the fig listings, I also bought a copy
Ideally FigForth should allow 8-bit EMITs and ID. rewritten to use a
127 AND EMIT loop instead of TYPE .
David Meyer <papa@sdf.org> writes:
I've been dusting-off fig-Forth for VAX-11 and noticed that every word...
in the dictionary has 128 added to the character code of the last
character in the word name.
Is there some
peculiarity in fig-Forth or the VAX-11 (I'm using significantly later >>hardware and OS) that made this work correctly back in the day?
David Schultz gave the answer to why VLIST works in fig-Forth.
Here's the reason why the last bit is set: Fig-Forth has "variable
length names" as headline feature, whereas earlier Forth systems only
stored the length and 3 characters (i.e., VLIST would output its own
name as VLI__ or so), and would match/conflict with, e.g., VLIKE.
But unlike modern systems, fig-Forth does not always store the full
length of the name. Instead, you could set the length of the number
of characters to be stored by setting a variable. That variable can
change from one definition to the next, so you do not know from this
variable how many characters are stored for a particular name.
Instead, you know the last stored character by looking whether the
most significant bit is set (the most significant bit of the
count+flags byte is also set to allow finding it from the other end.
- anton--