Skip to navigation

BBC Micro Elite

Generating system names

Producing system names from twisted seeds and two-letter tokens
---------------------------------------------------------------
References: cpl, QQ15, QQ16
  System names are generated from the three 16-bit seeds for that system. In
  the case of the selected system, those seeds live at QQ15. The process works
  as follows, where w0, w1, w2 are the seeds for the system in question
  
    1. Check bit 6 of w0_lo. If it is set then we will generate four two-letter
       pairs for the name (8 characters in total), otherwise we will generate
       three pairs (6 characters).
  
    2. Generate the first two letters by taking bits 0-4 of w2_hi. If this is
       zero, jump to the next step, otherwise we have a number in the range
       1-31. Add 128 to get a number in the range 129-159, and convert this to
       a two-letter token (see variable QQ18 for more on two-letter tokens).
  
    3. Twist the seeds by calling TT54 and repeat the previous step, until we
       have processed three or four pairs, depending on step 1.
  
  One final note. As the process above involves twisting the seeds three or
  four times, they will be changed, so we also need to back up the original
  seeds before starting the above process, and restore them afterwards.