home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.forth      Forth programmers eat a lot of Bratwurst      117,927 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 117,210 of 117,927   
   Anton Ertl to David Meyer   
   Re: Word name storage quirk in VAX fig-F   
   16 Apr 25 16:18:56   
   
   From: anton@mips.complang.tuwien.ac.at   
      
   David Meyer  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   
   --   
   M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html   
   comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html   
        New standard: https://forth-standard.org/   
   EuroForth 2023 proceedings: http://www.euroforth.org/ef23/papers/   
   EuroForth 2024 proceedings: http://www.euroforth.org/ef24/papers/   
      
   --- SoupGate-DOS v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca