PiDP-8/I Software

Hex Artifact Content
Log In

Artifact cea8aa6202213ee02bb050358417fe8a1b84b212:


0000: 23 20 6f 73 38 2d 72 75 6e 3a 20 41 20 53 63 72  # os8-run: A Scr
0010: 69 70 74 69 6e 67 20 4c 61 6e 67 75 61 67 65 20  ipting Language 
0020: 66 6f 72 20 44 72 69 76 69 6e 67 20 4f 53 2f 38  for Driving OS/8
0030: 0a 0a 23 23 20 48 69 73 74 6f 72 79 20 61 6e 64  ..## History and
0040: 20 4d 6f 74 69 76 61 74 69 6f 6e 0a 0a 49 6e 20   Motivation..In 
0050: 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 2c 20 74  the beginning, t
0060: 68 65 20 50 69 44 50 2d 38 2f 49 20 70 72 6f 6a  he PiDP-8/I proj
0070: 65 63 74 20 73 68 69 70 70 65 64 20 61 20 68 61  ect shipped a ha
0080: 6e 64 2d 6d 61 64 65 20 61 6e 64 0a 68 61 6e 64  nd-made and.hand
0090: 2d 6d 61 69 6e 74 61 69 6e 65 64 20 4f 53 2f 38  -maintained OS/8
00a0: 20 64 69 73 6b 20 69 6d 61 67 65 2e 20 54 68 69   disk image. Thi
00b0: 73 20 69 6d 61 67 65 20 68 61 64 20 6d 75 6c 74  s image had mult
00c0: 69 70 6c 65 20 70 72 6f 62 6c 65 6d 73 2c 20 61  iple problems, a
00d0: 6e 64 0a 73 6f 6d 65 74 69 6d 65 73 20 74 68 65  nd.sometimes the
00e0: 20 62 79 2d 68 61 6e 64 20 66 69 78 65 73 20 74   by-hand fixes t
00f0: 6f 20 74 68 6f 73 65 20 70 72 6f 62 6c 65 6d 73  o those problems
0100: 20 63 61 75 73 65 64 20 6f 74 68 65 72 20 70 72   caused other pr
0110: 6f 62 6c 65 6d 73 2e 0a 0a 46 6f 72 20 74 68 65  oblems...For the
0120: 20 32 30 31 37 2e 31 32 2e 32 32 20 72 65 6c 65   2017.12.22 rele
0130: 61 73 65 2c 20 5b 77 65 5d 5b 61 75 74 68 5d 20  ase, [we][auth] 
0140: 63 72 65 61 74 65 64 20 61 20 74 6f 6f 6c 20 63  created a tool c
0150: 61 6c 6c 65 64 20 60 6d 6b 6f 73 38 60 0a 77 68  alled `mkos8`.wh
0160: 69 63 68 20 63 72 65 61 74 65 73 20 74 68 69 73  ich creates this
0170: 20 64 69 73 6b 20 70 72 6f 67 72 61 6d 6d 61 74   disk programmat
0180: 69 63 61 6c 6c 79 20 62 61 73 65 64 20 6f 6e 20  ically based on 
0190: 74 68 65 20 75 73 65 72 27 73 20 63 6f 6e 66 69  the user's confi
01a0: 67 75 72 61 74 69 6f 6e 0a 63 68 6f 69 63 65 73  guration.choices
01b0: 2e 20 54 68 69 73 20 68 61 73 20 6d 61 6e 79 20  . This has many 
01c0: 76 69 72 74 75 65 73 3a 0a 0a 2a 20 20 20 54 68  virtues:..*   Th
01d0: 65 20 4f 53 2f 38 20 73 79 73 74 65 6d 20 6d 65  e OS/8 system me
01e0: 64 69 61 20 69 73 20 63 72 65 61 74 65 64 20 66  dia is created f
01f0: 72 6f 6d 20 70 72 69 73 74 69 6e 65 20 64 69 73  rom pristine dis
0200: 74 72 69 62 75 74 69 6f 6e 20 6d 65 64 69 61 2c  tribution media,
0210: 0a 20 20 20 20 72 61 74 68 65 72 20 74 68 61 6e  .    rather than
0220: 20 62 65 69 6e 67 20 62 75 69 6c 74 20 75 70 20   being built up 
0230: 69 6e 20 61 6e 20 75 6e 64 6f 63 75 6d 65 6e 74  in an undocument
0240: 65 64 20 2a 61 64 20 68 6f 63 2a 20 66 61 73 68  ed *ad hoc* fash
0250: 69 6f 6e 2e 0a 20 20 20 20 0a 2a 20 20 20 54 68  ion..    .*   Th
0260: 65 20 62 75 69 6c 64 20 73 65 71 75 65 6e 63 65  e build sequence
0270: 20 69 73 20 64 6f 63 75 6d 65 6e 74 65 64 20 69   is documented i
0280: 6e 20 74 68 65 20 73 6f 75 72 63 65 20 63 6f 64  n the source cod
0290: 65 20 6f 66 20 60 6d 6b 6f 73 38 60 2c 0a 20 20  e of `mkos8`,.  
02a0: 20 20 72 61 74 68 65 72 20 74 68 61 6e 20 62 65    rather than be
02b0: 69 6e 67 20 61 20 6d 79 73 74 65 72 69 6f 75 73  ing a mysterious
02c0: 20 70 72 6f 64 75 63 74 20 6f 66 20 68 69 73 74   product of hist
02d0: 6f 72 79 2c 20 6d 6f 73 74 20 6f 66 20 77 68 69  ory, most of whi
02e0: 63 68 0a 20 20 20 20 68 61 70 70 65 6e 65 64 20  ch.    happened 
02f0: 62 65 66 6f 72 65 20 74 68 65 20 4f 53 2f 38 20  before the OS/8 
0300: 6d 65 64 69 61 20 63 61 6d 65 20 75 6e 64 65 72  media came under
0310: 20 76 65 72 73 69 6f 6e 20 63 6f 6e 74 72 6f 6c   version control
0320: 2e 0a 0a 2a 20 20 20 54 68 65 20 62 75 69 6c 64  ...*   The build
0330: 20 70 72 6f 64 75 63 74 73 20 63 61 6e 20 62 65   products can be
0340: 20 5b 74 65 73 74 65 64 5d 5b 74 6d 5d 2c 20 62   [tested][tm], b
0350: 65 63 61 75 73 65 20 74 68 65 20 70 72 6f 63 65  ecause the proce
0360: 73 73 20 69 73 0a 20 20 20 20 70 75 72 70 6f 73  ss is.    purpos
0370: 65 66 75 6c 6c 79 20 64 6f 6e 65 20 69 6e 20 61  efully done in a
0380: 20 77 61 79 20 74 68 61 74 20 69 74 20 69 73 20   way that it is 
0390: 5b 72 65 70 72 6f 64 75 63 69 62 6c 65 5d 5b 72  [reproducible][r
03a0: 62 5d 2e 0a 0a 2a 20 20 20 42 65 63 61 75 73 65  b]...*   Because
03b0: 20 60 6d 6b 6f 73 38 60 20 69 73 20 77 72 69 74   `mkos8` is writ
03c0: 74 65 6e 20 69 6e 20 50 79 74 68 6f 6e 2c 20 77  ten in Python, w
03d0: 65 20 68 61 76 65 20 61 20 66 75 6c 6c 2d 73 74  e have a full-st
03e0: 72 65 6e 67 74 68 0a 20 20 20 20 73 63 72 69 70  rength.    scrip
03f0: 74 69 6e 67 20 6c 61 6e 67 75 61 67 65 20 66 6f  ting language fo
0400: 72 20 6d 61 6b 69 6e 67 20 74 68 65 20 62 75 69  r making the bui
0410: 6c 64 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 2e 20  ld conditional. 
0420: 54 68 65 20 6f 6c 64 20 6d 61 6e 75 61 6c 0a 20  The old manual. 
0430: 20 20 20 70 72 6f 63 65 73 73 20 70 72 6f 64 75     process produ
0440: 63 65 64 20 6a 75 73 74 20 6f 6e 65 20 4f 53 2f  ced just one OS/
0450: 38 20 73 79 73 74 65 6d 20 64 69 73 6b 20 69 6d  8 system disk im
0460: 61 67 65 2c 20 62 75 74 20 74 68 65 20 6e 65 77  age, but the new
0470: 20 73 63 68 65 6d 65 0a 20 20 20 20 63 61 6e 20   scheme.    can 
0480: 6e 6f 77 20 70 72 6f 64 75 63 65 20 74 65 6e 73  now produce tens
0490: 20 6f 66 20 74 68 6f 75 73 61 6e 64 73 20 6f 66   of thousands of
04a0: 20 64 69 66 66 65 72 65 6e 74 20 63 6f 6e 66 69   different confi
04b0: 67 75 72 61 74 69 6f 6e 73 2e 0a 0a 54 68 61 74  gurations...That
04c0: 20 70 72 6f 63 65 73 73 20 77 6f 72 6b 65 64 20   process worked 
04d0: 66 69 6e 65 20 66 6f 72 20 74 68 65 20 6c 69 6d  fine for the lim
04e0: 69 74 65 64 20 73 63 6f 70 65 20 6f 66 20 70 72  ited scope of pr
04f0: 6f 62 6c 65 6d 20 69 74 20 77 61 73 20 6d 65 61  oblem it was mea
0500: 6e 74 20 74 6f 0a 63 6f 76 65 72 3a 20 63 72 65  nt to.cover: cre
0510: 61 74 69 6f 6e 20 6f 66 20 61 6e 20 4f 53 2f 38  ation of an OS/8
0520: 20 56 33 44 20 52 4b 30 35 20 69 6d 61 67 65 20   V3D RK05 image 
0530: 6d 65 61 6e 74 20 66 6f 72 20 75 73 65 20 77 69  meant for use wi
0540: 74 68 20 53 49 4d 48 27 73 20 50 44 50 2d 38 0a  th SIMH's PDP-8.
0550: 73 69 6d 75 6c 61 74 6f 72 2c 20 77 68 69 63 68  simulator, which
0560: 20 77 61 73 20 63 6f 6e 66 69 67 75 72 65 64 20   was configured 
0570: 69 6e 20 61 20 76 65 72 79 20 70 61 72 74 69 63  in a very partic
0580: 75 6c 61 72 20 77 61 79 2e 20 49 74 20 64 6f 65  ular way. It doe
0590: 73 6e 27 74 20 73 6f 6c 76 65 0a 61 20 6e 75 6d  sn't solve.a num
05a0: 62 65 72 20 6f 66 20 72 65 6c 61 74 65 64 20 70  ber of related p
05b0: 72 6f 62 6c 65 6d 73 20 74 68 61 74 20 73 68 6f  roblems that sho
05c0: 75 6c 64 20 62 65 20 73 69 6d 70 6c 65 20 65 78  uld be simple ex
05d0: 74 65 6e 73 69 6f 6e 73 20 74 6f 20 74 68 65 20  tensions to the 
05e0: 69 64 65 61 3a 0a 0a 2a 20 20 20 57 68 61 74 20  idea:..*   What 
05f0: 69 66 20 77 65 20 77 61 6e 74 20 61 20 64 69 66  if we want a dif
0600: 66 65 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f  ferent version o
0610: 66 20 4f 53 2f 38 2c 20 73 75 63 68 20 61 73 20  f OS/8, such as 
0620: 56 33 46 3f 0a 0a 2a 20 20 20 57 68 61 74 20 69  V3F?..*   What i
0630: 66 20 77 65 20 77 61 6e 74 20 74 68 69 73 20 74  f we want this t
0640: 6f 20 68 61 70 70 65 6e 20 6f 6e 20 61 20 73 74  o happen on a st
0650: 6f 72 61 67 65 20 64 65 76 69 63 65 20 6f 74 68  orage device oth
0660: 65 72 20 74 68 61 6e 20 61 6e 0a 20 20 20 20 52  er than an.    R
0670: 4b 30 35 3f 20 4f 74 68 65 72 20 63 6f 6d 6d 6f  K05? Other commo
0680: 6e 20 62 6f 6f 74 20 64 65 76 69 63 65 73 20 63  n boot devices c
0690: 68 6f 69 63 65 73 20 61 72 65 20 52 4c 30 31 2c  hoices are RL01,
06a0: 20 52 58 30 32 2c 20 61 6e 64 20 54 44 38 45 2c   RX02, and TD8E,
06b0: 0a 20 20 20 20 61 6e 64 20 74 68 65 79 20 61 6c  .    and they al
06c0: 6c 20 68 61 76 65 20 63 6f 6e 73 65 71 75 65 6e  l have consequen
06d0: 63 65 73 20 69 6e 20 74 68 65 20 77 61 79 20 79  ces in the way y
06e0: 6f 75 20 62 75 69 6c 64 20 74 68 65 20 6d 65 64  ou build the med
06f0: 69 61 2e 0a 0a 2a 20 20 20 57 68 61 74 20 69 66  ia...*   What if
0700: 20 77 65 e2 80 99 72 65 20 62 75 69 6c 64 69 6e   we’re buildin
0710: 67 20 6d 65 64 69 61 20 74 61 72 67 65 74 65 64  g media targeted
0720: 20 61 74 20 73 70 65 63 69 66 69 63 20 72 65 61   at specific rea
0730: 6c 20 50 44 50 2d 38 0a 20 20 20 20 68 61 72 64  l PDP-8.    hard
0740: 77 61 72 65 2c 20 61 6e 64 20 74 68 75 73 20 6e  ware, and thus n
0750: 65 65 64 20 63 65 72 74 61 69 6e 20 6e 6f 6e 2d  eed certain non-
0760: 64 65 66 61 75 6c 74 20 63 68 6f 69 63 65 73 20  default choices 
0770: 66 6f 72 20 4f 53 2f 38 20 64 65 76 69 63 65 0a  for OS/8 device.
0780: 20 20 20 20 64 72 69 76 65 72 73 3f 20 53 49 4d      drivers? SIM
0790: 48 20 63 61 6e 20 62 65 20 73 6f 66 74 2d 72 65  H can be soft-re
07a0: 63 6f 6e 66 69 67 75 72 65 64 20 74 6f 20 61 63  configured to ac
07b0: 63 6f 6d 6d 6f 64 61 74 65 20 77 68 61 74 65 76  commodate whatev
07c0: 65 72 0a 20 20 20 20 60 6d 6b 6f 73 38 60 20 70  er.    `mkos8` p
07d0: 75 74 20 6f 75 74 2c 20 62 75 74 20 72 65 61 6c  ut out, but real
07e0: 20 68 61 72 64 77 61 72 65 20 69 73 20 77 68 61   hardware is wha
07f0: 74 20 69 74 20 69 73 2e 0a 0a 2a 20 20 20 48 6f  t it is...*   Ho
0800: 77 20 64 6f 20 77 65 20 6d 61 6b 65 20 69 74 20  w do we make it 
0810: 64 72 69 76 65 20 6f 74 68 65 72 20 74 6f 6f 6c  drive other tool
0820: 73 20 6e 6f 74 20 61 6c 72 65 61 64 79 20 68 61  s not already ha
0830: 72 64 2d 63 6f 64 65 64 20 69 6e 74 6f 0a 20 20  rd-coded into.  
0840: 20 20 60 6d 6b 6f 73 38 60 20 6f 72 20 69 74 73    `mkos8` or its
0850: 20 75 6e 64 65 72 6c 79 69 6e 67 20 68 65 6c 70   underlying help
0860: 65 72 20 6c 69 62 72 61 72 79 3f 0a 0a 53 68 6f  er library?..Sho
0870: 72 74 6c 79 20 61 66 74 65 72 20 72 65 6c 65 61  rtly after relea
0880: 73 65 20 32 30 31 37 2e 31 32 2e 32 32 20 63 61  se 2017.12.22 ca
0890: 6d 65 20 6f 75 74 2c 20 42 69 6c 6c 20 43 61 74  me out, Bill Cat
08a0: 74 65 79 20 62 65 67 61 6e 20 77 6f 72 6b 20 6f  tey began work o
08b0: 6e 0a 60 6f 73 38 2d 72 75 6e 60 20 74 6f 20 73  n.`os8-run` to s
08c0: 6f 6c 76 65 20 74 68 65 73 65 20 70 72 6f 62 6c  olve these probl
08d0: 65 6d 73 2e 20 54 68 69 73 20 6e 65 77 20 74 6f  ems. This new to
08e0: 6f 6c 20 69 6d 70 6c 65 6d 65 6e 74 73 20 61 20  ol implements a 
08f0: 73 63 72 69 70 74 69 6e 67 0a 6c 61 6e 67 75 61  scripting.langua
0900: 67 65 20 61 6e 64 20 61 20 6c 6f 74 20 6f 66 20  ge and a lot of 
0910: 6e 65 77 20 75 6e 64 65 72 6c 79 69 6e 67 20 66  new underlying f
0920: 75 6e 63 74 69 6f 6e 61 6c 69 74 79 20 73 6f 20  unctionality so 
0930: 74 68 61 74 20 77 65 20 63 61 6e 20 6e 6f 74 0a  that we can not.
0940: 6f 6e 6c 79 20 69 6d 70 6c 65 6d 65 6e 74 20 61  only implement a
0950: 6c 6c 20 6f 66 20 77 68 61 74 20 60 6d 6b 6f 73  ll of what `mkos
0960: 38 60 20 64 69 64 2c 20 77 65 20 63 61 6e 20 6e  8` did, we can n
0970: 6f 77 20 77 72 69 74 65 20 73 63 72 69 70 74 73  ow write scripts
0980: 20 74 6f 20 64 6f 0a 6d 75 63 68 20 6d 6f 72 65   to do.much more
0990: 2e 0a 0a 54 68 65 20 67 6f 61 6c 73 20 6f 66 20  ...The goals of 
09a0: 74 68 65 20 70 72 6f 6a 65 63 74 20 61 72 65 3a  the project are:
09b0: 0a 0a 2a 20 20 20 45 6e 74 69 72 65 6c 79 20 72  ..*   Entirely r
09c0: 65 70 6c 61 63 65 20 60 6d 6b 6f 73 38 60 2c 20  eplace `mkos8`, 
09d0: 69 6e 20 74 68 61 74 20 60 6f 73 38 2d 72 75 6e  in that `os8-run
09e0: 60 20 70 6c 75 73 20 61 20 73 75 69 74 61 62 6c  ` plus a suitabl
09f0: 65 20 73 63 72 69 70 74 0a 20 20 20 20 73 68 6f  e script.    sho
0a00: 75 6c 64 20 62 65 20 61 62 6c 65 20 74 6f 20 64  uld be able to d
0a10: 6f 20 65 76 65 72 79 74 68 69 6e 67 20 74 68 61  o everything tha
0a20: 74 20 60 6d 6b 6f 73 38 60 20 63 75 72 72 65 6e  t `mkos8` curren
0a30: 74 6c 79 20 64 6f 65 73 2e 0a 0a 2a 20 20 20 50  tly does...*   P
0a40: 72 6f 76 69 64 65 20 61 20 73 75 69 74 65 20 6f  rovide a suite o
0a50: 66 20 73 63 72 69 70 74 73 20 61 6e 64 20 64 6f  f scripts and do
0a60: 63 75 6d 65 6e 74 61 74 69 6f 6e 20 73 75 70 70  cumentation supp
0a70: 6f 72 74 20 66 6f 72 20 63 72 65 61 74 69 6e 67  ort for creating
0a80: 0a 20 20 20 20 6f 6e 65 27 73 20 6f 77 6e 20 73  .    one's own s
0a90: 63 72 69 70 74 73 20 74 6f 20 73 6f 6c 76 65 20  cripts to solve 
0aa0: 70 72 6f 62 6c 65 6d 73 20 77 65 20 68 61 76 65  problems we have
0ab0: 6e 27 74 20 65 76 65 6e 20 61 6e 74 69 63 69 70  n't even anticip
0ac0: 61 74 65 64 2e 0a 0a 2a 20 20 20 4d 61 6b 65 20  ated...*   Make 
0ad0: 69 74 20 66 6c 65 78 69 62 6c 65 20 65 6e 6f 75  it flexible enou
0ae0: 67 68 20 74 6f 20 62 75 69 6c 64 20 6d 65 64 69  gh to build medi
0af0: 61 20 69 6d 61 67 65 73 20 73 75 69 74 61 62 6c  a images suitabl
0b00: 65 20 66 6f 72 20 61 72 62 69 74 72 61 72 79 0a  e for arbitrary.
0b10: 20 20 20 20 72 65 61 6c 20 50 44 50 2d 38 20 68      real PDP-8 h
0b20: 61 72 64 77 61 72 65 2e 0a 0a 0a 5b 61 75 74 68  ardware....[auth
0b30: 5d 3a 20 68 74 74 70 73 3a 2f 2f 74 61 6e 67 65  ]: https://tange
0b40: 6e 74 73 6f 66 74 2e 63 6f 6d 2f 70 69 64 70 38  ntsoft.com/pidp8
0b50: 69 2f 64 6f 63 2f 74 72 75 6e 6b 2f 41 55 54 48  i/doc/trunk/AUTH
0b60: 4f 52 53 2e 6d 64 0a 5b 72 62 5d 3a 20 20 20 68  ORS.md.[rb]:   h
0b70: 74 74 70 73 3a 2f 2f 72 65 70 72 6f 64 75 63 69  ttps://reproduci
0b80: 62 6c 65 2d 62 75 69 6c 64 73 2e 6f 72 67 2f 0a  ble-builds.org/.
0b90: 5b 74 6d 5d 3a 20 20 20 68 74 74 70 73 3a 2f 2f  [tm]:   https://
0ba0: 74 61 6e 67 65 6e 74 73 6f 66 74 2e 63 6f 6d 2f  tangentsoft.com/
0bb0: 70 69 64 70 38 69 2f 64 6f 63 2f 74 72 75 6e 6b  pidp8i/doc/trunk
0bc0: 2f 74 6f 6f 6c 73 2f 74 65 73 74 2d 6f 73 38 2d  /tools/test-os8-
0bd0: 72 75 6e 0a 0a 0a 23 23 20 3c 61 20 69 64 3d 22  run...## <a id="
0be0: 63 61 70 61 62 69 6c 69 74 69 65 73 22 3e 3c 2f  capabilities"></
0bf0: 61 3e 43 61 70 61 62 69 6c 69 74 69 65 73 0a 0a  a>Capabilities..
0c00: 60 6f 73 38 2d 72 75 6e 60 20 69 73 20 61 20 67  `os8-run` is a g
0c10: 65 6e 65 72 61 6c 20 73 63 72 69 70 74 20 72 75  eneral script ru
0c20: 6e 6e 69 6e 67 20 66 61 63 69 6c 69 74 79 20 74  nning facility t
0c30: 68 61 74 20 63 61 6e 3a 0a 0a 2a 20 61 74 74 61  hat can:..* atta
0c40: 63 68 20 64 65 76 69 63 65 20 69 6d 61 67 65 20  ch device image 
0c50: 66 69 6c 65 73 20 77 69 74 68 20 6f 70 74 69 6f  files with optio
0c60: 6e 73 20 74 68 61 74 20 69 6e 63 6c 75 64 65 20  ns that include 
0c70: 62 75 74 20 61 6c 73 6f 20 67 6f 20 62 65 79 6f  but also go beyo
0c80: 6e 64 20 77 68 61 74 20 53 49 4d 48 20 6f 66 66  nd what SIMH off
0c90: 65 72 73 3a 0a 20 20 20 20 2a 20 50 72 6f 74 65  ers:.    * Prote
0ca0: 63 74 20 69 6d 61 67 65 20 62 79 20 61 74 74 61  ct image by atta
0cb0: 63 68 69 6e 67 20 69 74 20 72 65 61 64 2d 6f 6e  ching it read-on
0cc0: 6c 79 2e 0a 20 20 20 20 2a 20 52 65 63 6f 67 6e  ly..    * Recogn
0cd0: 69 7a 65 20 74 68 65 20 75 73 65 20 63 61 73 65  ize the use case
0ce0: 20 6f 66 20 77 6f 72 6b 69 6e 67 20 77 69 74 68   of working with
0cf0: 20 61 20 70 72 65 2d 65 78 69 73 74 69 6e 67 20   a pre-existing 
0d00: 69 6d 61 67 65 2c 20 61 6e 64 20 61 62 6f 72 74  image, and abort
0d10: 20 74 68 65 20 73 63 72 69 70 74 20 69 66 20 74   the script if t
0d20: 68 65 20 69 6d 61 67 65 20 69 73 20 6e 6f 74 20  he image is not 
0d30: 66 6f 75 6e 64 2c 20 72 61 74 68 65 72 20 74 68  found, rather th
0d40: 61 6e 20 63 72 65 61 74 69 6e 67 20 61 20 6e 65  an creating a ne
0d50: 77 2c 20 62 6c 61 6e 6b 20 69 6d 61 67 65 2e 0a  w, blank image..
0d60: 20 20 20 20 2a 20 50 72 6f 74 65 63 74 20 61 20      * Protect a 
0d70: 6d 61 73 74 65 72 20 62 6f 6f 74 20 69 6d 61 67  master boot imag
0d80: 65 20 74 68 61 74 20 77 69 6c 6c 20 6e 6f 74 20  e that will not 
0d90: 62 6f 6f 74 20 72 65 61 64 2d 6f 6e 6c 79 20 62  boot read-only b
0da0: 79 20 63 72 65 61 74 69 6e 67 20 61 20 73 63 72  y creating a scr
0db0: 61 74 63 68 20 63 6f 70 79 20 61 6e 64 20 62 6f  atch copy and bo
0dc0: 6f 74 69 6e 67 20 74 68 65 20 63 6f 70 79 20 69  oting the copy i
0dd0: 6e 73 74 65 61 64 2e 0a 20 20 20 20 2a 20 52 65  nstead..    * Re
0de0: 63 6f 67 6e 69 7a 65 20 74 68 65 20 75 73 65 20  cognize the use 
0df0: 63 61 73 65 20 6f 66 20 63 72 65 61 74 69 6e 67  case of creating
0e00: 20 61 20 6e 65 77 2c 20 62 6c 61 6e 6b 20 69 6d   a new, blank im
0e10: 61 67 65 2c 20 62 75 74 20 70 72 65 73 65 72 76  age, but preserv
0e20: 69 6e 67 20 61 6e 79 20 70 72 65 2d 65 78 69 73  ing any pre-exis
0e30: 74 69 6e 67 20 69 6d 61 67 65 20 66 69 6c 65 73  ting image files
0e40: 20 6f 66 20 74 68 65 20 73 61 6d 65 20 6e 61 6d   of the same nam
0e50: 65 2e 0a 2a 20 62 6f 6f 74 20 4f 53 2f 38 20 6f  e..* boot OS/8 o
0e60: 6e 20 61 6e 20 61 72 62 69 74 72 61 72 79 20 61  n an arbitrary a
0e70: 74 74 61 63 68 65 64 20 64 65 76 69 63 65 20 69  ttached device i
0e80: 6d 61 67 65 2e 0a 2a 20 63 72 65 61 74 65 20 61  mage..* create a
0e90: 20 64 75 70 6c 69 63 61 74 65 20 6f 66 20 61 6e   duplicate of an
0ea0: 20 65 78 69 73 74 69 6e 67 20 66 69 6c 65 2e 20   existing file. 
0eb0: 54 68 69 73 20 69 73 20 74 68 65 20 75 73 65 20  This is the use 
0ec0: 63 61 73 65 20 6f 66 20 62 75 69 6c 64 69 6e 67  case of building
0ed0: 20 6e 65 77 20 69 6d 61 67 65 20 66 69 6c 65 73   new image files
0ee0: 20 66 72 6f 6d 20 61 6e 20 65 78 69 73 74 69 6e   from an existin
0ef0: 67 20 62 61 73 65 6c 69 6e 65 20 77 68 69 6c 65  g baseline while
0f00: 20 70 72 65 73 65 72 76 69 6e 67 20 74 68 65 20   preserving the 
0f10: 62 61 73 65 6c 69 6e 65 20 69 6d 61 67 65 20 66  baseline image f
0f20: 69 6c 65 2e 0a 2a 20 63 6f 70 79 20 66 69 6c 65  ile..* copy file
0f30: 73 20 66 72 6f 6d 20 74 68 65 20 72 75 6e 6e 69  s from the runni
0f40: 6e 67 20 4f 53 2f 38 20 65 6e 76 69 72 6f 6e 6d  ng OS/8 environm
0f50: 65 6e 74 20 69 6e 74 6f 20 74 68 65 20 50 4f 53  ent into the POS
0f60: 49 58 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 0a 72  IX environment.r
0f70: 75 6e 6e 69 6e 67 20 53 49 4d 48 2e 0a 2a 20 63  unning SIMH..* c
0f80: 6f 70 79 20 66 69 6c 65 73 20 74 6f 20 74 68 65  opy files to the
0f90: 20 72 75 6e 6e 69 6e 67 20 4f 53 2f 38 20 66 72   running OS/8 fr
0fa0: 6f 6d 20 74 68 65 20 50 4f 53 49 58 20 65 6e 76  om the POSIX env
0fb0: 69 72 6f 6e 6d 65 6e 74 20 72 75 6e 6e 69 6e 67  ironment running
0fc0: 20 53 49 4d 48 2e 0a 2a 20 72 75 6e 20 61 6e 79   SIMH..* run any
0fd0: 20 4f 53 2f 38 20 63 6f 6d 6d 61 6e 64 20 61 73   OS/8 command as
0fe0: 20 6c 6f 6e 67 20 61 73 20 69 74 20 72 65 74 75   long as it retu
0ff0: 72 6e 73 20 69 6d 6d 65 64 69 61 74 65 6c 79 20  rns immediately 
1000: 74 6f 20 74 68 65 20 4f 53 2f 38 20 4b 65 79 62  to the OS/8 Keyb
1010: 6f 61 72 64 0a 4d 6f 6e 69 74 6f 72 2e 20 54 68  oard.Monitor. Th
1020: 69 73 20 69 6e 63 6c 75 64 65 73 20 42 41 54 43  is includes BATC
1030: 48 20 73 63 72 69 70 74 73 2e 0a 2a 20 72 75 6e  H scripts..* run
1040: 20 60 41 42 53 4c 44 52 60 20 61 6e 64 20 60 46   `ABSLDR` and `F
1050: 4f 54 50 60 2c 20 63 79 63 6c 69 6e 67 20 61 6e  OTP`, cycling an
1060: 20 61 72 62 69 74 72 61 72 79 20 6e 75 6d 62 65   arbitrary numbe
1070: 72 20 6f 66 20 74 69 6d 65 73 20 74 68 72 6f 75  r of times throu
1080: 67 68 20 74 68 65 20 4f 53 2f 38 0a 43 6f 6d 6d  gh the OS/8.Comm
1090: 61 6e 64 20 44 65 63 6f 64 65 72 2e 0a 2a 20 72  and Decoder..* r
10a0: 75 6e 20 60 50 41 4c 38 60 20 61 6e 64 20 72 65  un `PAL8` and re
10b0: 70 6f 72 74 20 61 6e 79 20 65 72 72 6f 72 73 20  port any errors 
10c0: 65 6e 63 6f 75 6e 74 65 72 65 64 2e 0a 2a 20 72  encountered..* r
10d0: 75 6e 20 60 42 55 49 4c 44 60 20 77 69 74 68 20  un `BUILD` with 
10e0: 61 72 62 69 74 72 61 72 69 6c 79 20 63 6f 6d 70  arbitrarily comp
10f0: 6c 65 78 20 63 6f 6e 66 69 67 75 72 61 74 69 6f  lex configuratio
1100: 6e 20 73 63 72 69 70 74 73 2c 20 69 6e 63 6c 75  n scripts, inclu
1110: 64 69 6e 67 0a 74 68 65 20 60 42 55 49 4c 44 60  ding.the `BUILD`
1120: 20 6f 66 20 61 20 73 79 73 74 65 6d 20 68 65 61   of a system hea
1130: 64 20 74 68 61 74 20 69 6e 70 75 74 73 20 60 4f  d that inputs `O
1140: 53 38 2e 42 4e 60 20 61 6e 64 20 60 43 44 2e 42  S8.BN` and `CD.B
1150: 4e 60 2e 0a 2a 20 63 6f 6e 66 69 67 75 72 65 20  N`..* configure 
1160: 74 68 65 20 60 74 74 69 60 2c 20 60 72 78 60 2c  the `tti`, `rx`,
1170: 20 60 74 64 60 2c 20 61 6e 64 20 60 64 74 60 20   `td`, and `dt` 
1180: 64 65 76 69 63 65 73 20 61 74 20 72 75 6e 20 74  devices at run t
1190: 69 6d 65 20 74 6f 20 61 6c 6c 6f 77 0a 73 68 69  ime to allow.shi
11a0: 66 74 69 6e 67 20 62 65 74 77 65 65 6e 20 6f 74  fting between ot
11b0: 68 65 72 77 69 73 65 20 69 6e 63 6f 6d 70 61 74  herwise incompat
11c0: 69 62 6c 65 20 63 6f 6e 66 69 67 75 72 61 74 69  ible configurati
11d0: 6f 6e 73 20 6f 66 20 53 49 4d 48 20 61 6e 64 20  ons of SIMH and 
11e0: 4f 53 2f 38 0a 64 65 76 69 63 65 20 64 72 69 76  OS/8.device driv
11f0: 65 72 73 2e 0a 2a 20 72 75 6e 20 69 6e 63 6c 75  ers..* run inclu
1200: 64 65 64 20 73 63 72 69 70 74 20 66 69 6c 65 73  ded script files
1210: 20 73 6f 20 74 68 61 74 20 63 6f 6d 6d 6f 6e 20   so that common 
1220: 63 6f 64 65 20 62 6c 6f 63 6b 73 20 63 61 6e 20  code blocks can 
1230: 62 65 20 77 72 69 74 74 65 6e 20 6f 6e 63 65 0a  be written once.
1240: 69 6e 20 61 6e 20 65 78 74 65 72 6e 61 6c 20 69  in an external i
1250: 6e 63 6c 75 64 65 64 20 73 63 72 69 70 74 2e 0a  ncluded script..
1260: 2a 20 72 75 6e 20 6f 66 20 70 61 74 63 68 20 73  * run of patch s
1270: 63 72 69 70 74 73 20 74 68 61 74 20 77 69 6c 6c  cripts that will
1280: 20 75 73 65 20 60 4f 44 54 60 20 6f 72 20 60 46   use `ODT` or `F
1290: 55 54 49 4c 60 20 74 6f 20 70 61 74 63 68 20 66  UTIL` to patch f
12a0: 69 6c 65 73 20 69 6e 0a 74 68 65 20 62 6f 6f 74  iles in.the boot
12b0: 65 64 20 73 79 73 74 65 6d 20 69 6d 61 67 65 2e  ed system image.
12c0: 0a 2a 20 70 65 72 66 6f 72 6d 20 61 63 74 69 6f  .* perform actio
12d0: 6e 73 20 69 6e 20 61 20 73 63 72 69 70 74 20 63  ns in a script c
12e0: 6f 6e 64 69 74 69 6f 6e 61 6c 6c 79 20 6f 6e 20  onditionally on 
12f0: 66 65 61 74 75 72 65 20 65 6e 61 62 6c 65 6d 65  feature enableme
1300: 6e 74 20 6d 61 74 63 68 69 6e 67 0a 61 6e 20 61  nt matching.an a
1310: 72 62 69 74 72 61 72 79 20 6b 65 79 77 6f 72 64  rbitrary keyword
1320: 2e 0a 2a 20 70 65 72 66 6f 72 6d 20 61 63 74 69  ..* perform acti
1330: 6f 6e 73 20 69 6e 20 61 20 73 63 72 69 70 74 20  ons in a script 
1340: 75 6e 6c 65 73 73 20 61 20 64 69 73 61 62 6c 65  unless a disable
1350: 6d 65 6e 74 20 6b 65 79 77 6f 72 64 20 68 61 73  ment keyword has
1360: 20 62 65 65 6e 20 73 70 65 63 69 66 69 65 64 2e   been specified.
1370: 0a 2a 20 73 65 74 20 65 6e 61 62 6c 65 20 6f 72  .* set enable or
1380: 20 64 69 73 61 62 6c 65 20 6b 65 79 77 6f 72 64   disable keyword
1390: 73 20 61 6e 79 77 68 65 72 65 20 69 6e 20 74 68  s anywhere in th
13a0: 65 20 65 78 65 63 75 74 69 6f 6e 20 6f 66 20 61  e execution of a
13b0: 20 73 63 72 69 70 74 2e 0a 0a 0a 23 23 20 3c 61   script....## <a
13c0: 20 69 64 3d 22 65 78 70 65 63 74 22 3e 3c 2f 61   id="expect"></a
13d0: 3e 4b 65 79 20 49 6d 70 6c 65 6d 65 6e 74 61 74  >Key Implementat
13e0: 69 6f 6e 20 44 65 74 61 69 6c 3a 20 50 65 78 70  ion Detail: Pexp
13f0: 65 63 74 0a 0a 55 6e 64 65 72 20 74 68 65 20 63  ect..Under the c
1400: 6f 76 65 72 73 2c 20 60 72 75 6e 2d 6f 73 38 60  overs, `run-os8`
1410: 20 69 73 20 61 20 50 79 74 68 6f 6e 20 73 63 72   is a Python scr
1420: 69 70 74 20 74 68 61 74 20 75 73 65 73 20 74 68  ipt that uses th
1430: 65 20 5b 50 79 74 68 6f 6e 0a 60 70 65 78 70 65  e [Python.`pexpe
1440: 63 74 60 20 6c 69 62 72 61 72 79 5d 5b 70 65 78  ct` library][pex
1450: 5d 20 74 6f 20 69 6e 74 65 72 61 63 74 20 70 72  ] to interact pr
1460: 6f 67 72 61 6d 6d 61 74 69 63 61 6c 6c 79 20 77  ogrammatically w
1470: 69 74 68 20 53 49 4d 48 20 61 6e 64 20 4f 53 2f  ith SIMH and OS/
1480: 38 2e 0a 49 6e 20 70 72 69 6e 63 69 70 6c 65 2c  8..In principle,
1490: 20 74 68 65 72 65 20 69 73 20 6e 6f 20 6c 69 6d   there is no lim
14a0: 69 74 20 74 6f 20 74 68 65 20 63 6f 6d 70 6c 65  it to the comple
14b0: 78 69 74 79 20 6f 66 20 74 68 65 20 64 69 61 6c  xity of the dial
14c0: 6f 67 73 20 77 65 20 63 61 6e 0a 73 63 72 69 70  ogs we can.scrip
14d0: 74 20 77 69 74 68 20 74 68 69 73 2e 0a 0a 49 6e  t with this...In
14e0: 20 70 72 61 63 74 69 63 65 2c 20 74 68 65 20 6d   practice, the m
14f0: 61 6a 6f 72 20 64 69 66 66 69 63 75 6c 74 79 20  ajor difficulty 
1500: 69 6e 20 63 6f 6e 73 74 72 75 63 74 69 6e 67 20  in constructing 
1510: 63 6f 72 72 65 63 74 20 50 65 78 70 65 63 74 0a  correct Pexpect.
1520: 73 63 72 69 70 74 73 20 69 73 20 74 68 61 74 20  scripts is that 
1530: 69 66 20 79 6f 75 20 66 61 6c 6c 20 6f 75 74 20  if you fall out 
1540: 6f 66 20 73 74 65 70 20 77 69 74 68 20 77 68 61  of step with wha
1550: 74 20 69 73 20 22 65 78 70 65 63 74 22 65 64 2c  t is "expect"ed,
1560: 20 74 68 65 0a 65 78 70 65 63 74 20 65 6e 67 69   the.expect engi
1570: 6e 65 20 63 61 6e 20 67 65 74 20 69 6e 74 6f 20  ne can get into 
1580: 61 20 73 74 61 74 65 20 77 68 65 72 65 20 69 74  a state where it
1590: 20 69 73 20 62 6c 6f 63 6b 65 64 20 77 61 69 74   is blocked wait
15a0: 69 6e 67 20 66 6f 72 0a 69 6e 70 75 74 20 74 68  ing for.input th
15b0: 61 74 20 65 69 74 68 65 72 20 6e 65 76 65 72 20  at either never 
15c0: 77 69 6c 6c 20 61 72 72 69 76 65 20 6f 72 20 74  will arrive or t
15d0: 68 61 74 20 61 6c 72 65 61 64 79 20 70 61 73 73  hat already pass
15e0: 65 64 20 62 79 20 61 6e 64 20 6e 6f 77 0a 63 61  ed by and now.ca
15f0: 6e 20 6e 6f 20 6c 6f 6e 67 65 72 20 62 65 20 6d  n no longer be m
1600: 61 74 63 68 65 64 2e 20 20 54 6f 20 61 76 6f 69  atched.  To avoi
1610: 64 20 62 6c 6f 63 6b 69 6e 67 20 66 6f 72 65 76  d blocking forev
1620: 65 72 20 69 6e 20 73 75 63 68 20 73 69 74 75 61  er in such situa
1630: 74 69 6f 6e 73 2c 0a 60 6f 73 38 2d 72 75 6e 60  tions,.`os8-run`
1640: 20 63 6f 6e 66 69 67 75 72 65 73 20 50 65 78 70   configures Pexp
1650: 65 63 74 20 74 6f 20 74 69 6d 65 20 6f 75 74 20  ect to time out 
1660: 65 76 65 6e 74 75 61 6c 6c 79 2c 20 72 65 73 75  eventually, resu
1670: 6c 74 69 6e 67 20 69 6e 20 61 20 62 69 67 0a 75  lting in a big.u
1680: 67 6c 79 20 50 79 74 68 6f 6e 20 62 61 63 6b 74  gly Python backt
1690: 72 61 63 65 2e 20 20 54 68 65 20 60 6f 73 38 2d  race.  The `os8-
16a0: 72 75 6e 60 20 73 63 72 69 70 74 73 20 74 68 61  run` scripts tha
16b0: 74 20 73 68 69 70 20 77 69 74 68 20 74 68 65 0a  t ship with the.
16c0: 50 69 44 50 2d 38 2f 49 20 73 6f 66 74 77 61 72  PiDP-8/I softwar
16d0: 65 20 64 69 73 74 72 69 62 75 74 69 6f 6e 20 73  e distribution s
16e0: 68 6f 75 6c 64 20 6e 65 76 65 72 20 64 6f 20 74  hould never do t
16f0: 68 69 73 2c 20 62 75 74 20 61 73 20 79 6f 75 20  his, but as you 
1700: 77 72 69 74 65 0a 79 6f 75 72 20 6f 77 6e 2c 20  write.your own, 
1710: 79 6f 75 20 6d 61 79 20 66 69 6e 64 20 79 6f 75  you may find you
1720: 72 73 65 6c 66 20 68 61 76 69 6e 67 20 74 6f 20  rself having to 
1730: 64 65 62 75 67 20 73 75 63 68 20 70 72 6f 62 6c  debug such probl
1740: 65 6d 73 2e 0a 0a 52 75 6e 6e 69 6e 67 20 60 6f  ems...Running `o
1750: 73 38 2d 72 75 6e 60 20 77 69 74 68 20 74 68 65  s8-run` with the
1760: 20 60 2d 76 60 20 6f 70 74 69 6f 6e 20 67 69 76   `-v` option giv
1770: 65 73 20 76 65 72 62 6f 73 65 20 6f 75 74 70 75  es verbose outpu
1780: 74 20 74 68 61 74 0a 65 6e 61 62 6c 65 73 20 79  t that.enables y
1790: 6f 75 20 74 6f 20 77 61 74 63 68 20 65 76 65 72  ou to watch ever
17a0: 79 20 73 74 65 70 20 6f 66 20 74 68 65 20 73 63  y step of the sc
17b0: 72 69 70 74 20 61 73 20 69 74 20 72 75 6e 73 2e  ript as it runs.
17c0: 0a 0a 5b 70 65 78 5d 3a 20 68 74 74 70 73 3a 2f  ..[pex]: https:/
17d0: 2f 70 65 78 70 65 63 74 2e 72 65 61 64 74 68 65  /pexpect.readthe
17e0: 64 6f 63 73 2e 69 6f 2f 0a 0a 0a 23 23 20 3c 61  docs.io/...## <a
17f0: 20 69 64 3d 22 63 6f 6e 76 65 6e 74 69 6f 6e 73   id="conventions
1800: 22 3e 3c 2f 61 3e 43 6f 6e 76 65 6e 74 69 6f 6e  "></a>Convention
1810: 73 0a 0a 49 6e 20 74 68 65 20 64 6f 63 75 6d 65  s..In the docume
1820: 6e 74 61 74 69 6f 6e 20 62 65 6c 6f 77 2c 20 77  ntation below, w
1830: 65 20 75 73 65 20 74 68 65 20 74 65 72 6d 20 22  e use the term "
1840: 50 4f 53 49 58 22 20 74 6f 20 72 65 66 65 72 20  POSIX" to refer 
1850: 74 6f 20 74 68 65 0a 68 6f 73 74 20 73 69 64 65  to the.host side
1860: 20 6f 66 20 74 68 65 20 63 6f 6e 76 65 72 73 61   of the conversa
1870: 74 69 6f 6e 20 6f 72 20 74 6f 20 72 65 73 6f 75  tion or to resou
1880: 72 63 65 73 20 61 76 61 69 6c 61 62 6c 65 20 6f  rces available o
1890: 6e 20 74 68 61 74 20 73 69 64 65 2e 0a 57 65 20  n that side..We 
18a0: 75 73 65 20 74 68 69 73 20 67 65 6e 65 72 69 63  use this generic
18b0: 20 74 65 72 6d 20 62 65 63 61 75 73 65 20 74 68   term because th
18c0: 65 20 50 69 44 50 2d 38 2f 49 20 73 6f 66 74 77  e PiDP-8/I softw
18d0: 61 72 65 20 72 75 6e 73 20 6f 6e 20 5b 6d 61 6e  are runs on [man
18e0: 79 0a 64 69 66 66 65 72 65 6e 74 20 70 6c 61 74  y.different plat
18f0: 66 6f 72 6d 73 5d 5b 6f 73 63 5d 2c 20 63 75 72  forms][osc], cur
1900: 72 65 6e 74 6c 79 20 6c 69 6d 69 74 65 64 20 6f  rently limited o
1910: 6e 6c 79 20 74 6f 20 74 68 6f 73 65 20 74 68 61  nly to those tha
1920: 74 20 61 72 65 20 65 69 74 68 65 72 0a 50 4f 53  t are either.POS
1930: 49 58 2d 63 6f 6d 70 6c 69 61 6e 74 20 28 65 2e  IX-compliant (e.
1940: 67 2e 20 6d 61 63 4f 53 29 20 6f 72 20 74 68 6f  g. macOS) or tho
1950: 73 65 20 73 75 66 66 69 63 69 65 6e 74 6c 79 20  se sufficiently 
1960: 63 6c 6f 73 65 20 28 65 2e 67 2e 20 4c 69 6e 75  close (e.g. Linu
1970: 78 29 2e 0a 54 68 75 73 2c 20 61 20 22 66 69 6c  x)..Thus, a "fil
1980: 65 20 66 72 6f 6d 20 50 4f 53 49 58 22 20 72 65  e from POSIX" re
1990: 66 65 72 73 20 74 6f 20 61 20 66 69 6c 65 20 62  fers to a file b
19a0: 65 69 6e 67 20 63 6f 70 69 65 64 20 66 72 6f 6d  eing copied from
19b0: 20 74 68 65 20 68 6f 73 74 0a 73 79 73 74 65 6d   the host.system
19c0: 20 72 75 6e 6e 69 6e 67 20 60 6f 73 38 2d 72 75   running `os8-ru
19d0: 6e 60 20 61 6e 64 20 53 49 4d 48 27 73 20 50 44  n` and SIMH's PD
19e0: 50 2d 38 20 73 69 6d 75 6c 61 74 6f 72 20 69 6e  P-8 simulator in
19f0: 74 6f 20 74 68 65 20 73 69 6d 75 6c 61 74 65 64  to the simulated
1a00: 0a 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 0a 0a 56  .environment...V
1a10: 65 72 79 20 66 65 77 20 73 63 72 69 70 74 20 6c  ery few script l
1a20: 61 6e 67 75 61 67 65 20 63 6f 6d 6d 61 6e 64 73  anguage commands
1a30: 20 66 61 69 6c 20 66 61 74 61 6c 6c 79 2e 20 20   fail fatally.  
1a40: 54 68 65 20 64 65 73 69 67 6e 20 70 72 69 6e 63  The design princ
1a50: 69 70 6c 65 0a 77 61 73 20 74 6f 20 61 73 6b 2c  iple.was to ask,
1a60: 20 22 49 73 20 74 68 65 20 70 72 69 6d 61 72 79   "Is the primary
1a70: 20 75 73 65 20 63 61 73 65 20 6f 66 20 74 68 69   use case of thi
1a80: 73 20 63 6f 6d 6d 61 6e 64 20 61 20 70 72 65 72  s command a prer
1a90: 65 71 75 69 73 69 74 65 0a 66 6f 72 20 6f 74 68  equisite.for oth
1aa0: 65 72 20 77 6f 72 6b 20 74 68 61 74 20 77 6f 75  er work that wou
1ab0: 6c 64 20 6d 61 6b 65 20 6e 6f 20 73 65 6e 73 65  ld make no sense
1ac0: 20 69 66 20 74 68 69 73 20 63 6f 6d 6d 61 6e 64   if this command
1ad0: 20 66 61 69 6c 65 64 3f 22 20 20 49 66 0a 74 68   failed?"  If.th
1ae0: 65 20 61 6e 73 77 65 72 20 69 73 2c 20 22 79 65  e answer is, "ye
1af0: 73 22 2c 20 74 68 65 6e 20 74 68 65 20 66 61 69  s", then the fai
1b00: 6c 75 72 65 20 6f 66 20 63 6f 6d 6d 61 6e 64 20  lure of command 
1b10: 6b 69 6c 6c 73 20 74 68 65 20 65 78 65 63 75 74  kills the execut
1b20: 69 6f 6e 0a 6f 66 20 74 68 65 20 77 68 6f 6c 65  ion.of the whole
1b30: 20 73 63 72 69 70 74 20 61 6e 64 20 61 62 6f 72   script and abor
1b40: 74 73 20 60 6f 73 38 2d 72 75 6e 60 2e 20 20 43  ts `os8-run`.  C
1b50: 6f 6d 6d 61 6e 64 73 20 74 68 61 74 20 68 61 76  ommands that hav
1b60: 65 20 66 61 74 61 6c 0a 65 78 69 74 73 20 61 72  e fatal.exits ar
1b70: 65 20 6d 65 6e 74 69 6f 6e 65 64 20 73 70 65 63  e mentioned spec
1b80: 69 66 69 63 61 6c 6c 79 20 69 6e 20 74 68 65 20  ifically in the 
1b90: 5b 63 6f 6d 6d 61 6e 64 20 72 65 66 65 72 65 6e  [command referen
1ba0: 63 65 0a 73 65 63 74 69 6f 6e 5d 28 23 73 63 72  ce.section](#scr
1bb0: 69 70 74 69 6e 67 29 20 62 65 6c 6f 77 2e 0a 0a  ipting) below...
1bc0: 23 23 23 20 43 61 73 65 20 53 65 6e 73 69 74 69  ### Case Sensiti
1bd0: 76 69 74 79 20 2d 2d 20 61 20 74 72 69 63 6b 79  vity -- a tricky
1be0: 20 69 73 73 75 65 0a 0a 49 74 20 69 73 20 65 78   issue..It is ex
1bf0: 70 65 63 74 65 64 20 74 68 61 74 20 73 63 72 69  pected that scri
1c00: 70 74 73 20 77 69 6c 6c 20 62 65 20 77 72 69 74  pts will be writ
1c10: 74 65 6e 20 6f 6e 20 74 68 65 20 50 4f 53 49 58  ten on the POSIX
1c20: 20 70 6c 61 74 66 6f 72 6d 20 77 69 74 68 0a 61   platform with.a
1c30: 20 63 61 73 65 2d 73 65 6e 73 69 74 69 76 65 20   case-sensitive 
1c40: 74 65 78 74 20 65 64 69 74 6f 72 2e 20 20 60 6f  text editor.  `o
1c50: 73 38 2d 72 75 6e 60 20 73 68 6f 75 6c 64 20 62  s8-run` should b
1c60: 65 20 63 6f 6e 73 69 64 65 72 65 64 0a 63 61 73  e considered.cas
1c70: 65 2d 73 65 6e 73 69 74 69 76 65 20 61 73 20 77  e-sensitive as w
1c80: 65 6c 6c 2e 20 53 63 72 69 70 74 73 20 73 68 6f  ell. Scripts sho
1c90: 75 6c 64 20 73 70 65 63 69 66 79 20 74 68 65 20  uld specify the 
1ca0: 60 6f 73 38 2d 72 75 6e 60 20 63 6f 6d 6d 61 6e  `os8-run` comman
1cb0: 64 73 0a 61 6e 64 20 6f 70 74 69 6f 6e 73 20 69  ds.and options i
1cc0: 6e 20 6c 6f 77 65 72 20 63 61 73 65 2c 20 61 6e  n lower case, an
1cd0: 64 20 74 68 65 20 4f 53 2f 38 20 63 6f 6d 6d 61  d the OS/8 comma
1ce0: 6e 64 73 2c 20 6f 70 74 69 6f 6e 73 2c 20 61 6e  nds, options, an
1cf0: 64 0a 66 69 6c 65 6e 61 6d 65 73 20 69 6e 20 75  d.filenames in u
1d00: 70 70 65 72 20 63 61 73 65 2e 0a 0a 50 4f 53 49  pper case...POSI
1d10: 58 20 69 73 20 6f 73 74 65 6e 73 69 62 6c 79 20  X is ostensibly 
1d20: 61 20 63 61 73 65 2d 73 65 6e 73 69 74 69 76 65  a case-sensitive
1d30: 20 70 6c 61 74 66 6f 72 6d 2c 20 66 69 6c 65 6e   platform, filen
1d40: 61 6d 65 73 2c 20 63 6f 6d 6d 61 6e 64 73 0a 61  ames, commands.a
1d50: 6e 64 20 63 6f 6d 6d 61 6e 64 20 61 72 67 75 6d  nd command argum
1d60: 65 6e 74 73 20 61 72 65 20 61 6c 77 61 79 73 20  ents are always 
1d70: 63 61 73 65 20 73 65 6e 73 69 74 69 76 65 2e 20  case sensitive. 
1d80: 54 68 69 73 20 77 61 73 20 61 20 62 61 73 69 63  This was a basic
1d90: 0a 64 65 73 69 67 6e 20 64 65 63 69 73 69 6f 6e  .design decision
1da0: 20 66 72 6f 6d 20 74 68 65 20 65 61 72 6c 69 65   from the earlie
1db0: 73 74 20 64 61 79 73 20 6f 66 20 61 6e 63 65 73  st days of ances
1dc0: 74 72 61 6c 20 4d 75 6c 74 69 63 73 2e 0a 0a 54  tral Multics...T
1dd0: 68 65 20 4f 53 2f 38 20 70 6c 61 74 66 6f 72 6d  he OS/8 platform
1de0: 20 62 65 67 61 6e 20 61 73 20 61 6e 20 75 70 70   began as an upp
1df0: 65 72 2d 63 61 73 65 20 6f 6e 6c 79 20 65 6e 76  er-case only env
1e00: 69 72 6f 6e 6d 65 6e 74 2e 20 20 4f 6e 6c 79 20  ironment.  Only 
1e10: 6c 61 74 65 20 69 6e 0a 74 68 65 20 65 76 6f 6c  late in.the evol
1e20: 75 74 69 6f 6e 20 6f 66 20 74 68 65 20 50 44 50  ution of the PDP
1e30: 2d 38 20 61 73 20 61 20 77 6f 72 64 20 70 72 6f  -8 as a word pro
1e40: 63 65 73 73 69 6e 67 20 70 6c 61 74 66 6f 72 6d  cessing platform
1e50: 2c 20 64 69 64 20 6c 6f 77 65 72 0a 63 61 73 65  , did lower.case
1e60: 20 65 76 65 6e 20 65 78 69 73 74 20 6f 6e 20 4f   even exist on O
1e70: 53 2f 38 2e 20 20 53 49 4d 48 20 61 64 64 72 65  S/8.  SIMH addre
1e80: 73 73 65 73 20 74 68 69 73 20 72 65 61 6c 69 74  sses this realit
1e90: 79 20 77 69 74 68 20 74 77 6f 20 64 69 66 66 65  y with two diffe
1ea0: 72 65 6e 74 0a 63 6f 6e 73 6f 6c 65 20 64 65 76  rent.console dev
1eb0: 69 63 65 20 73 65 74 75 70 73 2c 20 60 4b 53 52  ice setups, `KSR
1ec0: 60 20 61 6e 64 20 60 37 62 60 2e 0a 0a 49 6e 20  ` and `7b`...In 
1ed0: 60 4b 53 52 60 20 6d 6f 64 65 2c 20 74 79 70 65  `KSR` mode, type
1ee0: 64 20 6c 6f 77 65 72 20 63 61 73 65 20 63 68 61  d lower case cha
1ef0: 72 61 63 74 65 72 73 20 61 72 65 20 75 70 63 61  racters are upca
1f00: 73 65 64 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c  sed automaticall
1f10: 79 20 62 65 66 6f 72 65 0a 62 65 69 6e 67 20 73  y before.being s
1f20: 65 6e 74 20 74 6f 20 74 68 65 20 72 75 6e 6e 69  ent to the runni
1f30: 6e 67 20 73 79 73 74 65 6d 2e 0a 0a 49 6e 20 60  ng system...In `
1f40: 37 62 60 20 6d 6f 64 65 2c 20 61 6c 6c 20 63 68  7b` mode, all ch
1f50: 61 72 61 63 74 65 72 73 20 61 72 65 20 70 61 73  aracters are pas
1f60: 73 65 64 20 74 6f 20 4f 53 2f 38 20 77 69 74 68  sed to OS/8 with
1f70: 6f 75 74 20 63 61 73 65 20 63 6f 6e 76 65 72 73  out case convers
1f80: 69 6f 6e 2e 0a 0a 54 68 65 20 63 75 72 72 65 6e  ion...The curren
1f90: 74 20 4f 53 2f 38 20 64 65 66 61 75 6c 74 20 4f  t OS/8 default O
1fa0: 53 2f 38 20 73 79 73 74 65 6d 20 69 6d 61 67 65  S/8 system image
1fb0: 20 72 75 6e 20 77 69 74 68 20 74 68 69 73 20 73   run with this s
1fc0: 6f 66 74 77 61 72 65 20 64 69 73 74 72 69 62 75  oftware distribu
1fd0: 74 69 6f 6e 0a 69 73 20 63 61 6c 6c 65 64 20 60  tion.is called `
1fe0: 76 33 64 2e 72 6b 30 35 60 2e 20 49 74 20 69 73  v3d.rk05`. It is
1ff0: 20 63 6f 6e 66 69 67 75 72 65 64 20 74 6f 20 62   configured to b
2000: 65 20 61 73 20 6d 6f 64 65 72 6e 20 61 73 20 70  e as modern as p
2010: 6f 73 73 69 62 6c 65 2e 0a 49 74 20 63 6f 6e 74  ossible..It cont
2020: 61 69 6e 73 20 70 61 74 63 68 65 73 20 74 6f 20  ains patches to 
2030: 66 6f 72 63 65 20 6c 6f 77 65 72 20 63 61 73 65  force lower case
2040: 20 63 68 61 72 61 63 74 65 72 73 20 74 79 70 65   characters type
2050: 64 20 74 6f 20 74 68 65 20 4b 65 79 62 6f 61 72  d to the Keyboar
2060: 64 20 4d 6f 6e 69 74 6f 72 0a 74 6f 20 75 70 70  d Monitor.to upp
2070: 65 72 20 63 61 73 65 20 73 6f 20 74 68 65 79 20  er case so they 
2080: 77 69 6c 6c 20 62 65 20 75 6e 64 65 72 73 74 6f  will be understo
2090: 6f 64 2e 20 20 41 20 70 61 74 63 68 20 69 73 20  od.  A patch is 
20a0: 6d 61 64 65 20 74 6f 20 4f 53 2f 38 0a 42 41 53  made to OS/8.BAS
20b0: 49 43 20 74 6f 20 64 6f 20 74 68 65 20 73 61 6d  IC to do the sam
20c0: 65 20 74 68 69 6e 67 2e 20 20 48 6f 77 65 76 65  e thing.  Howeve
20d0: 72 20 6d 61 6e 79 20 70 72 6f 67 72 61 6d 73 20  r many programs 
20e0: 61 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 75 73  available for us
20f0: 65 20 75 6e 64 65 72 0a 4f 53 2f 38 20 61 72 65  e under.OS/8 are
2100: 20 75 70 70 65 72 20 63 61 73 65 20 6f 6e 6c 79   upper case only
2110: 2c 20 61 6e 64 20 67 65 74 20 63 6f 6e 66 75 73  , and get confus
2120: 65 64 20 75 6e 6c 65 73 73 20 79 6f 75 20 73 65  ed unless you se
2130: 74 20 60 43 41 50 53 20 4c 4f 43 4b 60 20 6f 6e  t `CAPS LOCK` on
2140: 0a 79 6f 75 72 20 6b 65 79 62 6f 61 72 64 2e 0a  .your keyboard..
2150: 0a 41 6c 6c 20 6f 66 20 74 68 65 20 65 78 61 6d  .All of the exam
2160: 70 6c 65 20 73 63 72 69 70 74 73 20 73 70 65 63  ple scripts spec
2170: 69 66 79 20 4f 53 2f 38 20 63 6f 6d 6d 61 6e 64  ify OS/8 command
2180: 73 20 69 6e 20 75 70 70 65 72 20 63 61 73 65 2e  s in upper case.
2190: 20 20 53 75 63 68 0a 63 6f 6d 6d 61 6e 64 73 20    Such.commands 
21a0: 63 6f 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20  could have been 
21b0: 73 70 65 63 69 66 69 65 64 20 69 6e 20 6c 6f 77  specified in low
21c0: 65 72 20 63 61 73 65 2c 20 61 6e 64 20 77 6f 75  er case, and wou
21d0: 6c 64 20 77 6f 72 6b 20 6a 75 73 74 0a 66 69 6e  ld work just.fin
21e0: 65 20 69 66 20 72 75 6e 20 69 6e 20 74 68 65 20  e if run in the 
21f0: 64 65 66 61 75 6c 74 20 60 76 33 64 2e 72 6b 30  default `v3d.rk0
2200: 35 60 20 73 79 73 74 65 6d 20 69 6d 61 67 65 2e  5` system image.
2210: 0a 48 6f 77 65 76 65 72 2c 20 73 69 6e 63 65 20  .However, since 
2220: 61 20 62 61 73 69 63 20 75 73 65 20 63 61 73 65  a basic use case
2230: 20 6f 66 20 60 6f 73 38 2d 72 75 6e 60 20 69 73   of `os8-run` is
2240: 20 74 6f 20 62 65 20 61 62 6c 65 20 74 6f 20 72   to be able to r
2250: 75 6e 0a 73 63 72 69 70 74 73 20 61 67 61 69 6e  un.scripts again
2260: 73 74 20 61 72 62 69 74 72 61 72 79 20 73 79 73  st arbitrary sys
2270: 74 65 6d 20 69 6d 61 67 65 73 20 28 77 68 69 63  tem images (whic
2280: 68 20 70 72 6f 62 61 62 6c 79 20 77 69 6c 6c 20  h probably will 
2290: 6e 6f 74 20 68 61 76 65 0a 70 61 74 63 68 65 73  not have.patches
22a0: 20 74 6f 20 64 65 61 6c 20 77 69 74 68 20 6c 6f   to deal with lo
22b0: 77 65 72 20 63 61 73 65 29 2c 20 75 73 65 20 6f  wer case), use o
22c0: 66 20 6c 6f 77 65 72 20 63 61 73 65 20 66 6f 72  f lower case for
22d0: 20 4f 53 2f 38 20 63 6f 6d 6d 61 6e 64 73 2c 0a   OS/8 commands,.
22e0: 61 72 67 75 6d 65 6e 74 73 2c 20 6f 72 20 66 69  arguments, or fi
22f0: 6c 65 6e 61 6d 65 73 20 69 73 20 64 69 73 63 6f  lenames is disco
2300: 75 72 61 67 65 64 2e 0a 0a 60 6f 73 38 2d 72 75  uraged...`os8-ru
2310: 6e 60 20 64 6f 65 73 20 6e 6f 74 20 67 65 74 20  n` does not get 
2320: 69 6e 76 6f 6c 76 65 64 20 77 69 74 68 20 66 6f  involved with fo
2330: 72 63 69 6e 67 20 4f 53 2f 38 20 63 6f 6d 6d 61  rcing OS/8 comma
2340: 6e 64 73 20 6f 72 20 66 69 6c 65 6e 61 6d 65 73  nds or filenames
2350: 0a 74 6f 20 75 70 70 65 72 20 63 61 73 65 20 69  .to upper case i
2360: 66 20 74 68 65 79 20 61 70 70 65 61 72 20 61 73  f they appear as
2370: 20 6c 6f 77 65 72 20 63 61 73 65 20 69 6e 20 73   lower case in s
2380: 63 72 69 70 74 73 2e 20 60 6f 73 38 2d 72 75 6e  cripts. `os8-run
2390: 60 20 64 6f 65 73 0a 6f 66 66 65 72 20 63 6f 6d  ` does.offer com
23a0: 6d 61 6e 64 73 20 74 6f 20 74 6f 67 67 6c 65 20  mands to toggle 
23b0: 74 68 65 20 53 49 4d 48 20 63 6f 6e 73 6f 6c 65  the SIMH console
23c0: 20 73 75 70 70 6f 72 74 20 62 65 74 77 65 65 6e   support between
23d0: 20 60 4b 53 52 60 20 61 6e 64 20 60 37 62 60 2e   `KSR` and `7b`.
23e0: 0a 53 65 65 20 74 68 65 20 5b 60 63 6f 6e 66 69  .See the [`confi
23f0: 67 75 72 65 60 5d 28 23 63 6f 6e 66 69 67 75 72  gure`](#configur
2400: 65 2d 63 6f 6d 6d 29 20 63 6f 6d 6d 61 6e 64 2e  e-comm) command.
2410: 0a 0a 41 6c 74 68 6f 75 67 68 20 74 68 65 20 60  ..Although the `
2420: 6f 73 38 2d 72 75 6e 60 20 63 6f 6d 6d 61 6e 64  os8-run` command
2430: 73 20 61 6e 64 20 6f 70 74 69 6f 6e 73 20 63 6f  s and options co
2440: 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 6d 61  uld have been ma
2450: 64 65 20 63 61 73 65 0a 69 6e 73 65 6e 73 69 74  de case.insensit
2460: 69 76 65 2c 20 61 6e 64 20 74 68 65 20 4f 53 2f  ive, and the OS/
2470: 38 20 63 6f 6d 6d 61 6e 64 73 2c 20 6f 70 74 69  8 commands, opti
2480: 6f 6e 73 2c 20 61 6e 64 20 66 69 6c 65 6e 61 6d  ons, and filenam
2490: 65 73 20 63 6f 75 6c 64 20 68 61 76 65 0a 62 65  es could have.be
24a0: 65 6e 20 66 6f 72 63 65 64 20 74 6f 20 75 70 70  en forced to upp
24b0: 65 72 20 63 61 73 65 2c 20 72 65 6e 64 65 72 69  er case, renderi
24c0: 6e 67 20 74 68 65 6d 20 63 61 73 65 20 69 6e 73  ng them case ins
24d0: 65 6e 73 69 74 69 76 65 2c 20 74 68 65 72 65 20  ensitive, there 
24e0: 77 6f 75 6c 64 0a 73 74 69 6c 6c 20 62 65 20 74  would.still be t
24f0: 68 61 74 20 61 73 70 65 63 74 20 77 68 65 72 65  hat aspect where
2500: 20 74 68 65 20 73 63 72 69 70 74 20 64 65 76 65   the script deve
2510: 6c 6f 70 65 72 20 77 6f 75 6c 64 20 68 61 76 65  loper would have
2520: 20 74 6f 20 64 65 61 6c 20 77 69 74 68 0a 65 73   to deal with.es
2530: 74 61 62 6c 69 73 68 69 6e 67 20 63 61 73 65 2d  tablishing case-
2540: 73 65 6e 73 69 74 69 76 65 20 50 4f 53 49 58 20  sensitive POSIX 
2550: 66 69 6c 65 6e 61 6d 65 20 63 6f 6e 76 65 6e 74  filename convent
2560: 69 6f 6e 73 20 74 68 61 74 20 77 6f 75 6c 64 20  ions that would 
2570: 66 69 74 0a 77 69 74 68 20 4f 53 2f 38 27 73 20  fit.with OS/8's 
2580: 75 70 70 65 72 20 63 61 73 65 20 6f 6e 6c 79 20  upper case only 
2590: 66 69 6c 65 6e 61 6d 65 73 2e 20 20 54 68 65 20  filenames.  The 
25a0: 64 65 63 69 73 69 6f 6e 20 77 61 73 20 6d 61 64  decision was mad
25b0: 65 20 74 6f 20 68 61 76 65 0a 74 68 65 20 73 63  e to have.the sc
25c0: 72 69 70 74 69 6e 67 20 6c 61 6e 67 75 61 67 65  ripting language
25d0: 20 72 65 71 75 69 72 65 2c 20 6d 69 6e 64 66 75   require, mindfu
25e0: 6c 6e 65 73 73 20 6f 66 20 63 61 73 65 2c 20 77  lness of case, w
25f0: 68 65 72 65 20 74 68 65 20 64 65 76 65 6c 6f 70  here the develop
2600: 65 72 0a 61 64 6f 70 74 73 20 61 20 64 69 73 63  er.adopts a disc
2610: 69 70 6c 69 6e 65 20 74 6f 20 75 73 65 20 6c 6f  ipline to use lo
2620: 77 65 72 20 63 61 73 65 20 66 6f 72 20 73 63 72  wer case for scr
2630: 69 70 74 69 6e 67 20 63 6f 6d 6d 61 6e 64 73 2c  ipting commands,
2640: 20 61 6e 64 20 75 70 70 65 72 0a 63 61 73 65 20   and upper.case 
2650: 77 68 65 6e 20 64 65 61 6c 69 6e 67 20 77 69 74  when dealing wit
2660: 68 20 4f 53 2f 38 2e 0a 0a 41 70 6f 6c 6f 67 69  h OS/8...Apologi
2670: 65 73 20 69 6e 20 61 64 76 61 6e 63 65 20 66 6f  es in advance fo
2680: 72 20 74 68 65 20 69 6e 63 6f 6e 76 65 6e 69 65  r the inconvenie
2690: 6e 63 65 20 6f 66 20 68 61 76 69 6e 67 20 74 6f  nce of having to
26a0: 20 64 6f 20 74 68 61 74 2e 20 54 69 6d 65 0a 77   do that. Time.w
26b0: 69 6c 6c 20 74 65 6c 6c 20 69 66 20 69 74 20 77  ill tell if it w
26c0: 61 73 20 6f 72 20 77 61 73 20 6e 6f 74 20 74 68  as or was not th
26d0: 65 20 72 69 67 68 74 20 64 65 63 69 73 69 6f 6e  e right decision
26e0: 20 74 6f 20 68 61 76 65 20 62 65 65 6e 20 6d 61   to have been ma
26f0: 64 65 2e 0a 0a 5b 6f 73 63 5d 3a 20 68 74 74 70  de...[osc]: http
2700: 73 3a 2f 2f 74 61 6e 67 65 6e 74 73 6f 66 74 2e  s://tangentsoft.
2710: 63 6f 6d 2f 70 69 64 70 38 69 2f 77 69 6b 69 3f  com/pidp8i/wiki?
2720: 6e 61 6d 65 3d 4f 53 2b 43 6f 6d 70 61 74 69 62  name=OS+Compatib
2730: 69 6c 69 74 79 0a 0a 0a 23 23 20 3c 61 20 69 64  ility...## <a id
2740: 3d 22 66 69 72 73 74 22 3e 3c 2f 61 3e 41 6e 20  ="first"></a>An 
2750: 49 6c 6c 75 73 74 72 61 74 69 76 65 20 46 69 72  Illustrative Fir
2760: 73 74 20 45 78 61 6d 70 6c 65 0a 0a 48 65 72 65  st Example..Here
2770: 20 61 72 65 20 73 6f 6d 65 20 65 78 61 6d 70 6c   are some exampl
2780: 65 20 60 6f 73 38 2d 72 75 6e 60 20 73 63 72 69  e `os8-run` scri
2790: 70 74 73 3a 0a 0a 45 78 61 6d 70 6c 65 20 31 3a  pts:..Example 1:
27a0: 20 42 65 67 69 6e 20 77 6f 72 6b 20 6f 6e 20 61   Begin work on a
27b0: 20 6e 65 77 20 52 4b 30 35 20 69 6d 61 67 65 20   new RK05 image 
27c0: 74 68 61 74 20 67 65 74 73 20 61 6e 20 75 70 64  that gets an upd
27d0: 61 74 65 64 20 76 65 72 73 69 6f 6e 0a 6f 66 20  ated version.of 
27e0: 74 68 65 20 4f 53 2f 38 20 60 42 55 49 4c 44 60  the OS/8 `BUILD`
27f0: 20 75 74 69 6c 69 74 79 20 66 72 6f 6d 20 50 4f   utility from PO
2800: 53 49 58 20 73 6f 75 72 63 65 2e 20 28 50 65 72  SIX source. (Per
2810: 68 61 70 73 20 69 74 20 77 61 73 20 66 6f 75 6e  haps it was foun
2820: 64 0a 6f 6e 20 74 68 65 20 6e 65 74 2e 29 0a 0a  d.on the net.)..
2830: 20 20 20 20 6d 6f 75 6e 74 20 72 6b 30 20 24 62      mount rk0 $b
2840: 69 6e 2f 76 33 64 2e 72 6b 30 35 20 72 65 71 75  in/v3d.rk05 requ
2850: 69 72 65 64 0a 20 20 20 20 6d 6f 75 6e 74 20 72  ired.    mount r
2860: 6b 31 20 24 62 69 6e 2f 6f 73 38 2d 76 33 66 2d  k1 $bin/os8-v3f-
2870: 62 75 69 6c 64 2e 72 6b 30 35 20 70 72 65 73 65  build.rk05 prese
2880: 72 76 65 0a 20 20 20 20 0a 20 20 20 20 63 70 74  rve.    .    cpt
2890: 6f 20 24 73 72 63 2f 6f 73 38 2f 76 33 66 2f 42  o $src/os8/v3f/B
28a0: 55 49 4c 44 2e 50 41 20 52 4b 41 31 3a 42 55 49  UILD.PA RKA1:BUI
28b0: 4c 44 2e 50 41 20 2f 41 0a 20 20 20 20 0a 20 20  LD.PA /A.    .  
28c0: 20 20 62 6f 6f 74 20 72 6b 30 0a 20 20 20 20 0a    boot rk0.    .
28d0: 20 20 20 20 70 61 6c 38 20 52 4b 42 31 3a 42 55      pal8 RKB1:BU
28e0: 49 4c 44 2e 42 4e 3c 52 4b 41 31 3a 42 55 49 4c  ILD.BN<RKA1:BUIL
28f0: 44 2e 50 41 0a 20 20 20 20 0a 20 20 20 20 62 65  D.PA.    .    be
2900: 67 69 6e 20 63 64 70 72 6f 67 20 53 59 53 3a 41  gin cdprog SYS:A
2910: 42 53 4c 44 52 2e 53 56 0a 20 20 20 20 52 4b 42  BSLDR.SV.    RKB
2920: 31 3a 42 55 49 4c 44 2e 42 4e 0a 20 20 20 20 65  1:BUILD.BN.    e
2930: 6e 64 20 63 64 70 72 6f 67 20 53 59 53 3a 41 42  nd cdprog SYS:AB
2940: 53 4c 44 52 2e 53 56 0a 20 20 20 20 0a 20 20 20  SLDR.SV.    .   
2950: 20 6f 73 38 20 53 41 56 45 20 52 4b 42 31 3a 42   os8 SAVE RKB1:B
2960: 55 49 4c 44 2e 53 56 0a 0a 54 68 65 20 61 62 6f  UILD.SV..The abo
2970: 76 65 20 73 63 72 69 70 74 20 64 6f 65 73 20 74  ve script does t
2980: 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 3a 0a 0a 2a  he following:..*
2990: 20 41 74 74 61 63 68 20 74 68 65 20 73 79 73 74   Attach the syst
29a0: 65 6d 20 74 68 61 74 20 77 69 6c 6c 20 64 6f 20  em that will do 
29b0: 74 68 65 20 77 6f 72 6b 20 6f 6e 20 72 6b 30 2e  the work on rk0.
29c0: 20 49 74 20 6d 75 73 74 20 65 78 69 73 74 2e 0a   It must exist..
29d0: 2a 20 43 72 65 61 74 65 20 61 20 6e 65 77 20 72  * Create a new r
29e0: 6b 30 35 20 69 6d 61 67 65 2c 20 60 6f 73 38 2d  k05 image, `os8-
29f0: 76 33 66 2d 62 75 69 6c 64 2e 72 6b 30 35 60 20  v3f-build.rk05` 
2a00: 62 75 74 20 70 72 65 73 65 72 76 65 20 70 72 65  but preserve pre
2a10: 2d 65 78 69 73 69 6e 67 20 76 65 72 73 69 6f 6e  -exising version
2a20: 73 20 6f 66 20 74 68 65 20 73 61 6d 65 20 69 6d  s of the same im
2a30: 61 67 65 2e 0a 2a 20 43 6f 70 79 20 74 68 65 20  age..* Copy the 
2a40: 73 6f 75 72 63 65 20 60 42 55 49 4c 44 2e 50 41  source `BUILD.PA
2a50: 60 20 66 72 6f 6d 20 74 68 65 20 50 4f 53 49 58  ` from the POSIX
2a60: 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 74 6f 20   environment to 
2a70: 74 68 65 20 4f 53 2f 38 20 65 6e 76 69 72 6f 6e  the OS/8 environ
2a80: 6d 65 6e 74 2e 0a 2a 20 52 75 6e 20 60 50 41 4c  ment..* Run `PAL
2a90: 38 60 20 74 6f 20 61 73 73 65 6d 62 6c 65 20 60  8` to assemble `
2aa0: 42 55 49 4c 44 2e 50 41 60 20 69 6e 74 6f 20 60  BUILD.PA` into `
2ab0: 42 55 49 4c 44 2e 42 4e 60 2e 0a 2a 20 52 75 6e  BUILD.BN`..* Run
2ac0: 20 60 41 42 53 4c 44 52 60 20 74 6f 20 6c 6f 61   `ABSLDR` to loa
2ad0: 64 20 60 42 55 49 4c 44 2e 50 41 60 20 69 6e 74  d `BUILD.PA` int
2ae0: 6f 20 6d 65 6d 6f 72 79 2e 0a 2a 20 53 61 76 65  o memory..* Save
2af0: 20 74 68 65 20 72 75 6e 20 69 6d 61 67 65 20 6f   the run image o
2b00: 66 20 60 42 55 49 4c 44 60 20 61 73 20 61 6e 20  f `BUILD` as an 
2b10: 65 78 65 63 75 74 61 62 6c 65 20 6f 6e 20 60 52  executable on `R
2b20: 4b 42 31 3a 60 20 6f 66 20 74 68 65 20 6e 65 77  KB1:` of the new
2b30: 20 72 6b 30 35 20 69 6d 61 67 65 2e 0a 0a 0a 23   rk05 image....#
2b40: 23 20 3c 61 20 69 64 3d 22 70 61 74 68 73 22 3e  # <a id="paths">
2b50: 3c 2f 61 3e 50 4f 53 49 58 20 50 61 74 68 20 45  </a>POSIX Path E
2b60: 78 70 61 6e 73 69 6f 6e 73 0a 0a 4e 6f 74 69 63  xpansions..Notic
2b70: 65 20 69 6e 20 74 68 65 20 5b 61 62 6f 76 65 20  e in the [above 
2b80: 65 78 61 6d 70 6c 65 5d 28 23 66 69 72 73 74 29  example](#first)
2b90: 20 74 68 65 20 75 73 65 20 6f 66 20 74 68 65 20   the use of the 
2ba0: 76 61 72 69 61 62 6c 65 73 20 60 24 62 69 6e 2f  variables `$bin/
2bb0: 60 0a 61 6e 64 20 60 24 73 72 63 2f 60 20 69 6e  `.and `$src/` in
2bc0: 20 74 68 65 20 50 4f 53 49 58 20 70 61 74 68 20   the POSIX path 
2bd0: 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 2e 20  specifications. 
2be0: 20 54 68 65 73 65 20 72 65 66 65 72 20 74 6f 20   These refer to 
2bf0: 70 61 72 74 69 63 75 6c 61 72 0a 64 69 72 65 63  particular.direc
2c00: 74 6f 72 69 65 73 20 77 68 69 63 68 20 76 61 72  tories which var
2c10: 79 20 64 65 70 65 6e 64 69 6e 67 20 6f 6e 20 77  y depending on w
2c20: 68 65 74 68 65 72 20 79 6f 75 20 72 75 6e 20 74  hether you run t
2c30: 68 69 73 20 73 63 72 69 70 74 20 66 72 6f 6d 0a  his script from.
2c40: 74 68 65 20 50 69 44 50 2d 38 2f 49 20 73 6f 75  the PiDP-8/I sou
2c50: 72 63 65 20 74 72 65 65 20 6f 72 20 66 72 6f 6d  rce tree or from
2c60: 20 74 68 65 20 69 6e 73 74 61 6c 6c 61 74 69 6f   the installatio
2c70: 6e 20 74 72 65 65 2e 20 20 4e 6f 74 20 6f 6e 6c  n tree.  Not onl
2c80: 79 20 64 6f 65 73 0a 75 73 69 6e 67 20 74 68 65  y does.using the
2c90: 73 65 20 76 61 72 69 61 62 6c 65 73 20 61 6c 6c  se variables all
2ca0: 6f 77 20 74 68 65 20 73 61 6d 65 20 73 63 72 69  ow the same scri
2cb0: 70 74 20 74 6f 20 77 6f 72 6b 20 69 6e 20 62 6f  pt to work in bo
2cc0: 74 68 20 74 72 65 65 73 2c 20 69 74 0a 61 6c 6c  th trees, it.all
2cd0: 6f 77 73 20 79 6f 75 72 20 73 63 72 69 70 74 20  ows your script 
2ce0: 74 6f 20 72 75 6e 20 72 65 67 61 72 64 6c 65 73  to run regardles
2cf0: 73 20 6f 66 20 77 68 65 72 65 20 74 68 6f 73 65  s of where those
2d00: 20 73 6f 75 72 63 65 20 61 6e 64 0a 69 6e 73 74   source and.inst
2d10: 61 6c 6c 61 74 69 6f 6e 20 74 72 65 65 73 20 61  allation trees a
2d20: 72 65 20 6f 6e 20 61 6e 79 20 67 69 76 65 6e 20  re on any given 
2d30: 73 79 73 74 65 6d 2e 0a 0a 54 68 65 20 73 63 68  system...The sch
2d40: 65 6d 65 20 77 6f 72 6b 73 20 6d 75 63 68 20 6c  eme works much l
2d50: 69 6b 65 20 70 72 65 64 65 66 69 6e 65 64 20 50  ike predefined P
2d60: 4f 53 49 58 20 73 68 65 6c 6c 20 76 61 72 69 61  OSIX shell varia
2d70: 62 6c 65 73 2c 20 62 75 74 20 74 68 65 0a 75 6e  bles, but the.un
2d80: 64 65 72 6c 79 69 6e 67 20 6d 65 63 68 61 6e 69  derlying mechani
2d90: 73 6d 20 69 73 20 63 75 72 72 65 6e 74 6c 79 20  sm is currently 
2da0: 76 65 72 79 20 6c 69 6d 69 74 65 64 2e 20 20 46  very limited.  F
2db0: 69 72 73 74 2c 20 74 68 65 20 73 75 62 73 74 69  irst, the substi
2dc0: 74 75 74 69 6f 6e 0a 63 61 6e 20 6f 6e 6c 79 20  tution.can only 
2dd0: 6f 63 63 75 72 20 61 74 20 74 68 65 20 76 65 72  occur at the ver
2de0: 79 20 62 65 67 69 6e 6e 69 6e 67 20 6f 66 20 61  y beginning of a
2df0: 20 50 4f 53 49 58 20 66 69 6c 65 20 73 70 65 63   POSIX file spec
2e00: 69 66 69 63 61 74 69 6f 6e 2e 0a 53 65 63 6f 6e  ification..Secon
2e10: 64 2c 20 74 68 65 20 6f 6e 6c 79 20 76 61 6c 75  d, the only valu
2e20: 65 73 20 63 75 72 72 65 6e 74 6c 79 20 64 65 66  es currently def
2e30: 69 6e 65 64 20 61 72 65 3a 0a 0a 7c 20 24 62 75  ined are:..| $bu
2e40: 69 6c 64 2f 20 20 20 7c 20 54 68 65 20 61 62 73  ild/   | The abs
2e50: 6f 6c 75 74 65 20 70 61 74 68 20 74 6f 20 74 68  olute path to th
2e60: 65 20 72 6f 6f 74 20 6f 66 20 74 68 65 20 62 75  e root of the bu
2e70: 69 6c 64 2e 0a 7c 20 24 73 72 63 2f 20 20 20 20  ild..| $src/    
2e80: 20 7c 20 54 68 65 20 61 62 73 6f 6c 75 74 65 20   | The absolute 
2e90: 70 61 74 68 20 74 6f 20 74 68 65 20 72 6f 6f 74  path to the root
2ea0: 20 6f 66 20 74 68 65 20 73 6f 75 72 63 65 2e 0a   of the source..
2eb0: 7c 20 24 62 69 6e 2f 20 20 20 20 20 7c 20 54 68  | $bin/     | Th
2ec0: 65 20 64 69 72 65 63 74 6f 72 79 20 77 68 65 72  e directory wher
2ed0: 65 20 65 78 65 63 75 74 61 62 6c 65 73 20 61 6e  e executables an
2ee0: 64 20 72 75 6e 61 62 6c 65 20 69 6d 61 67 65 20  d runable image 
2ef0: 66 69 6c 65 73 20 61 72 65 20 69 6e 73 74 61 6c  files are instal
2f00: 6c 65 64 20 61 74 20 62 75 69 6c 64 20 74 69 6d  led at build tim
2f10: 65 0a 7c 20 24 6d 65 64 69 61 2f 20 20 20 7c 20  e.| $media/   | 
2f20: 54 68 65 20 61 62 73 6f 6c 75 74 65 20 70 61 74  The absolute pat
2f30: 68 20 74 6f 20 4f 53 2f 38 20 6d 65 64 69 61 20  h to OS/8 media 
2f40: 66 69 6c 65 73 0a 7c 20 24 6f 73 38 6d 69 2f 20  files.| $os8mi/ 
2f50: 20 20 7c 20 54 68 65 20 61 62 73 6f 6c 75 74 65    | The absolute
2f60: 20 70 61 74 68 20 74 6f 20 4f 53 2f 38 20 6d 65   path to OS/8 me
2f70: 64 69 61 20 66 69 6c 65 73 20 75 73 65 64 20 61  dia files used a
2f80: 73 20 69 6e 70 75 74 20 61 74 20 62 75 69 6c 64  s input at build
2f90: 20 74 69 6d 65 0a 7c 20 24 6f 73 38 6d 6f 2f 20   time.| $os8mo/ 
2fa0: 20 20 7c 20 54 68 65 20 61 62 73 6f 6c 75 74 65    | The absolute
2fb0: 20 70 61 74 68 20 74 6f 20 4f 53 2f 38 20 6d 65   path to OS/8 me
2fc0: 64 69 61 20 66 69 6c 65 73 20 70 72 6f 64 75 63  dia files produc
2fd0: 65 64 20 61 73 20 6f 75 74 70 75 74 20 61 74 20  ed as output at 
2fe0: 62 75 69 6c 64 20 74 69 6d 65 0a 0a 54 6f 20 61  build time..To a
2ff0: 64 64 20 6e 65 77 20 76 61 6c 75 65 73 2c 20 6d  dd new values, m
3000: 6f 64 69 66 79 20 60 2e 2e 2e 2f 6c 69 62 2f 70  odify `.../lib/p
3010: 69 64 70 38 69 2f 64 69 72 73 2e 70 79 2e 69 6e  idp8i/dirs.py.in
3020: 60 20 61 6e 64 20 72 65 62 75 69 6c 64 20 74 68  ` and rebuild th
3030: 65 0a 50 69 44 50 2d 38 2f 49 20 73 6f 66 74 77  e.PiDP-8/I softw
3040: 61 72 65 2e 20 20 42 65 77 61 72 65 20 74 68 61  are.  Beware tha
3050: 74 20 63 68 61 6e 67 69 6e 67 20 74 68 69 73 20  t changing this 
3060: 67 65 6e 65 72 61 74 65 73 20 74 68 65 20 60 64  generates the `d
3070: 69 72 73 2e 70 79 60 0a 66 69 6c 65 2c 20 77 68  irs.py`.file, wh
3080: 69 63 68 20 69 73 20 61 20 76 65 72 79 20 64 65  ich is a very de
3090: 65 70 20 64 65 70 65 6e 64 65 6e 63 79 2e 20 20  ep dependency.  
30a0: 54 6f 75 63 68 69 6e 67 20 74 68 69 73 20 66 69  Touching this fi
30b0: 6c 65 20 77 69 6c 6c 20 63 61 75 73 65 0a 61 6c  le will cause.al
30c0: 6c 20 74 68 65 20 4f 53 2f 38 20 62 6f 6f 74 61  l the OS/8 boota
30d0: 62 6c 65 20 73 79 73 74 65 6d 20 69 6d 61 67 65  ble system image
30e0: 20 66 69 6c 65 73 20 74 6f 20 62 65 20 72 65 62   files to be reb
30f0: 75 69 6c 74 2c 20 77 68 69 63 68 20 63 61 6e 20  uilt, which can 
3100: 74 61 6b 65 0a 71 75 69 74 65 20 73 6f 6d 65 20  take.quite some 
3110: 74 69 6d 65 20 65 76 65 6e 20 6f 6e 20 61 20 66  time even on a f
3120: 61 73 74 20 68 6f 73 74 20 63 6f 6d 70 75 74 65  ast host compute
3130: 72 2e 0a 0a 0a 23 23 20 3c 61 20 69 64 3d 22 63  r....## <a id="c
3140: 6f 6e 74 65 78 74 73 22 3e 3c 2f 61 3e 45 78 65  ontexts"></a>Exe
3150: 63 75 74 69 6f 6e 20 43 6f 6e 74 65 78 74 73 0a  cution Contexts.
3160: 0a 49 74 20 69 73 20 69 6d 70 6f 72 74 61 6e 74  .It is important
3170: 20 74 6f 20 62 65 20 6d 69 6e 64 66 75 6c 20 6f   to be mindful o
3180: 66 20 74 68 65 20 64 69 66 66 65 72 65 6e 74 20  f the different 
3190: 63 6f 6d 6d 61 6e 64 20 63 6f 6e 74 65 78 74 73  command contexts
31a0: 20 77 68 65 6e 0a 72 75 6e 6e 69 6e 67 20 73 63   when.running sc
31b0: 72 69 70 74 73 20 75 6e 64 65 72 20 60 6f 73 38  ripts under `os8
31c0: 2d 72 75 6e 60 3a 0a 0a 2a 20 5f 5f 53 49 4d 48  -run`:..* __SIMH
31d0: 20 63 6f 6e 74 65 78 74 3a 5f 5f 20 20 43 6f 6d   context:__  Com
31e0: 6d 61 6e 64 73 20 61 72 65 20 69 6e 74 65 72 70  mands are interp
31f0: 72 65 74 65 64 20 62 79 20 53 49 4d 48 20 63 6f  reted by SIMH co
3200: 6d 6d 61 6e 64 20 70 72 6f 63 65 73 73 6f 72 2e  mmand processor.
3210: 0a 2a 20 5f 5f 4f 53 2f 38 20 63 6f 6e 74 65 78  .* __OS/8 contex
3220: 74 3a 5f 5f 20 20 43 6f 6d 6d 61 6e 64 73 20 61  t:__  Commands a
3230: 72 65 20 69 6e 74 65 72 70 72 65 74 65 64 20 62  re interpreted b
3240: 79 20 74 68 65 20 4f 53 2f 38 20 4b 65 79 62 6f  y the OS/8 Keybo
3250: 61 72 64 20 4d 6f 6e 69 74 6f 72 2e 0a 2a 20 5f  ard Monitor..* _
3260: 5f 60 62 65 67 69 6e 60 20 2f 20 60 65 6e 64 60  _`begin` / `end`
3270: 20 62 6c 6f 63 6b 73 3a 5f 5f 20 20 54 68 65 73   blocks:__  Thes
3280: 65 20 63 72 65 61 74 65 20 73 70 65 63 69 61 6c  e create special
3290: 20 69 6e 74 65 72 70 72 65 74 65 72 20 6c 6f 6f   interpreter loo
32a0: 70 73 20 77 69 74 68 20 74 68 65 69 72 0a 6f 77  ps with their.ow
32b0: 6e 20 72 75 6c 65 73 2e 0a 0a 45 78 61 6d 70 6c  n rules...Exampl
32c0: 65 73 20 6f 66 20 60 62 65 67 69 6e 60 20 2f 20  es of `begin` / 
32d0: 60 65 6e 64 60 20 62 6c 6f 63 6b 73 3a 0a 0a 2a  `end` blocks:..*
32e0: 20 5f 5f 43 6f 6d 6d 61 6e 64 20 44 65 63 6f 64   __Command Decod
32f0: 65 72 3a 5f 5f 20 20 50 72 6f 67 72 61 6d 73 20  er:__  Programs 
3300: 6c 69 6b 65 20 60 41 42 53 4c 44 52 60 20 61 6e  like `ABSLDR` an
3310: 64 20 60 46 4f 54 50 60 20 63 61 6c 6c 20 74 68  d `FOTP` call th
3320: 65 20 4f 53 2f 38 20 43 6f 6d 6d 61 6e 64 20 44  e OS/8 Command D
3330: 65 63 6f 64 65 72 0a 74 6f 20 67 65 74 20 66 69  ecoder.to get fi
3340: 6c 65 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e  le specification
3350: 73 20 61 6e 64 20 6f 70 65 72 61 74 65 20 6f 6e  s and operate on
3360: 20 74 68 65 6d 2e 20 60 6f 73 38 2d 72 75 6e 60   them. `os8-run`
3370: 20 75 73 65 73 20 61 20 60 62 65 67 69 6e 60 20   uses a `begin` 
3380: 2f 20 60 65 6e 64 60 20 62 6c 6f 63 6b 20 74 6f  / `end` block to
3390: 0a 64 65 66 69 6e 65 20 73 65 74 20 6f 66 20 66  .define set of f
33a0: 69 6c 65 73 20 74 6f 20 66 65 65 64 20 74 6f 20  iles to feed to 
33b0: 74 68 65 20 43 6f 6d 6d 61 6e 64 20 44 65 63 6f  the Command Deco
33c0: 64 65 72 20 61 6e 64 20 74 6f 20 69 6e 64 69 63  der and to indic
33d0: 61 74 65 20 74 68 65 20 6c 61 73 74 20 66 69 6c  ate the last fil
33e0: 65 2c 20 61 6e 64 0a 61 20 72 65 74 75 72 6e 20  e, and.a return 
33f0: 74 6f 20 74 68 65 20 4f 53 2f 38 20 63 6f 6e 74  to the OS/8 cont
3400: 65 78 74 2e 0a 2a 20 5f 5f 4f 53 2f 38 20 60 42  ext..* __OS/8 `B
3410: 55 49 4c 44 60 3a 5f 5f 20 43 6f 6d 6d 61 6e 64  UILD`:__ Command
3420: 73 20 61 72 65 20 70 61 73 73 65 64 20 74 6f 20  s are passed to 
3430: 60 42 55 49 4c 44 60 20 61 6e 64 20 6f 75 74 70  `BUILD` and outp
3440: 75 74 20 69 73 20 69 6e 74 65 72 70 72 65 74 65  ut is interprete
3450: 64 2e 20 20 54 68 65 20 60 65 6e 64 60 0a 6f 66  d.  The `end`.of
3460: 20 74 68 65 20 62 6c 6f 63 6b 20 73 69 67 6e 69   the block signi
3470: 66 69 65 73 20 74 68 65 20 65 6e 64 20 6f 66 20  fies the end of 
3480: 74 68 65 20 60 42 55 49 4c 44 60 20 70 72 6f 67  the `BUILD` prog
3490: 72 61 6d 20 61 6e 64 20 61 20 72 65 74 75 72 6e  ram and a return
34a0: 20 74 6f 20 74 68 65 20 4f 53 2f 38 20 63 6f 6e   to the OS/8 con
34b0: 74 65 78 74 2e 0a 2a 20 5f 5f 43 6f 6e 64 69 74  text..* __Condit
34c0: 69 6f 6e 61 6c 20 45 78 65 63 75 74 69 6f 6e 3a  ional Execution:
34d0: 5f 5f 20 42 6c 6f 63 6b 73 20 6f 66 20 73 63 72  __ Blocks of scr
34e0: 69 70 74 20 63 6f 64 65 2c 20 64 65 6c 69 6d 69  ipt code, delimi
34f0: 74 65 64 20 62 79 20 61 20 60 62 65 67 69 6e 60  ted by a `begin`
3500: 20 2f 20 60 62 6c 6f 63 6b 60 20 63 61 6e 20 62   / `block` can b
3510: 65 0a 65 69 74 68 65 72 20 65 78 65 63 75 74 65  e.either execute
3520: 64 20 6f 72 20 69 67 6e 6f 72 65 64 20 64 65 70  d or ignored dep
3530: 65 6e 64 69 6e 67 20 6f 6e 20 74 68 65 20 6b 65  ending on the ke
3540: 79 20 77 6f 72 64 20 74 68 61 74 20 69 73 20 65  y word that is e
3550: 6e 61 62 6c 65 64 20 77 68 65 6e 20 74 68 61 74  nabled when that
3560: 20 62 6c 6f 63 6b 0a 69 73 20 65 6e 63 6f 75 6e   block.is encoun
3570: 74 65 72 65 64 2e 20 20 54 68 69 73 20 63 6f 6e  tered.  This con
3580: 74 65 78 74 20 69 73 20 76 65 72 79 20 69 6e 74  text is very int
3590: 65 72 65 73 74 69 6e 67 20 61 6e 64 20 69 73 20  eresting and is 
35a0: 6d 6f 72 65 20 66 75 6c 6c 79 20 64 6f 63 75 6d  more fully docum
35b0: 65 6e 74 65 64 20 62 65 6c 6f 77 2e 0a 0a 54 68  ented below...Th
35c0: 65 20 63 6f 6d 6d 61 6e 64 73 20 74 68 61 74 20  e commands that 
35d0: 65 78 65 63 75 74 65 20 69 6e 20 74 68 65 20 4f  execute in the O
35e0: 53 2f 38 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 20  S/8 environment 
35f0: 72 65 71 75 69 72 65 20 61 20 73 79 73 74 65 6d  require a system
3600: 20 69 6d 61 67 65 0a 74 6f 20 62 65 20 61 74 74   image.to be att
3610: 61 63 68 65 64 20 61 6e 64 20 62 6f 6f 74 65 64  ached and booted
3620: 2e 20 20 41 74 74 65 6d 70 74 73 20 74 6f 20 72  .  Attempts to r
3630: 75 6e 20 4f 53 2f 38 20 63 6f 6d 6d 61 6e 64 73  un OS/8 commands
3640: 20 77 69 74 68 6f 75 74 20 68 61 76 69 6e 67 0a   without having.
3650: 62 6f 6f 74 65 64 20 4f 53 2f 38 20 6b 69 6c 6c  booted OS/8 kill
3660: 20 74 68 65 20 73 63 72 69 70 74 2e 0a 0a 53 63   the script...Sc
3670: 72 69 70 74 69 6e 67 20 63 6f 6d 6d 61 6e 64 73  ripting commands
3680: 20 73 75 63 68 20 61 73 20 60 6d 6f 75 6e 74 60   such as `mount`
3690: 2c 20 60 75 6d 6f 75 6e 74 60 2c 20 61 6e 64 20  , `umount`, and 
36a0: 60 63 6f 6e 66 69 67 75 72 65 60 20 65 78 65 63  `configure` exec
36b0: 75 74 65 0a 69 6e 20 74 68 65 20 53 49 4d 48 20  ute.in the SIMH 
36c0: 63 6f 6e 74 65 78 74 2e 20 4f 53 2f 38 20 69 73  context. OS/8 is
36d0: 20 73 75 73 70 65 6e 64 65 64 20 66 6f 72 20 74   suspended for t
36e0: 68 65 73 65 20 63 6f 6d 6d 61 6e 64 73 2e 0a 0a  hese commands...
36f0: 49 64 65 61 6c 6c 79 20 77 65 20 77 6f 75 6c 64  Ideally we would
3700: 20 6a 75 73 74 20 72 65 73 75 6d 65 20 4f 53 2f   just resume OS/
3710: 38 20 77 69 74 68 20 61 20 53 49 4d 48 20 63 6f  8 with a SIMH co
3720: 6e 74 69 6e 75 65 20 63 6f 6d 6d 61 6e 64 20 77  ntinue command w
3730: 68 65 6e 20 77 65 20 61 72 65 0a 66 69 6e 69 73  hen we are.finis
3740: 68 65 64 20 72 75 6e 6e 69 6e 67 20 53 49 4d 48  hed running SIMH
3750: 20 63 6f 6d 6d 61 6e 64 73 2e 20 55 6e 66 6f 72   commands. Unfor
3760: 74 75 6e 61 74 65 6c 79 20 74 68 69 73 20 64 6f  tunately this do
3770: 65 73 20 6e 6f 74 20 77 6f 72 6b 20 75 6e 64 65  es not work unde
3780: 72 20 50 79 74 68 6f 6e 0a 65 78 70 65 63 74 2e  r Python.expect.
3790: 20 20 54 68 65 20 65 78 70 65 63 74 20 65 6e 67    The expect eng
37a0: 69 6e 65 20 6e 65 65 64 73 20 61 20 63 6f 6d 6d  ine needs a comm
37b0: 61 6e 64 20 70 72 6f 6d 70 74 2e 0a 0a 41 6c 74  and prompt...Alt
37c0: 68 6f 75 67 68 20 68 69 74 74 69 6e 67 20 74 68  hough hitting th
37d0: 65 20 65 72 61 73 65 20 63 68 61 72 61 63 74 65  e erase characte
37e0: 72 20 28 60 52 55 42 4f 55 54 60 29 20 6f 72 20  r (`RUBOUT`) or 
37f0: 74 68 65 20 6c 69 6e 65 20 6b 69 6c 6c 20 63 68  the line kill ch
3800: 61 72 61 63 74 65 72 0a 28 60 43 54 52 4c 2f 55  aracter.(`CTRL/U
3810: 60 29 20 74 6f 20 61 20 74 65 72 6d 69 6e 61 6c  `) to a terminal
3820: 2d 63 6f 6e 6e 65 63 74 65 64 20 53 49 4d 48 20  -connected SIMH 
3830: 4f 53 2f 38 20 73 65 73 73 69 6f 6e 20 67 69 76  OS/8 session giv
3840: 65 73 20 61 20 63 6f 6d 6d 61 6e 64 20 70 72 6f  es a command pro
3850: 6d 70 74 2c 0a 74 68 65 73 65 20 61 63 74 69 6f  mpt,.these actio
3860: 6e 73 20 64 6f 6e 27 74 20 77 6f 72 6b 20 75 6e  ns don't work un
3870: 64 65 72 20 50 79 74 68 6f 6e 20 65 78 70 65 63  der Python expec
3880: 74 2e 20 57 65 20 64 6f 6e 27 74 20 6b 6e 6f 77  t. We don't know
3890: 20 77 68 79 2e 0a 0a 42 6f 6f 74 69 6e 67 20 4f   why...Booting O
38a0: 53 2f 38 20 67 69 76 65 73 20 61 20 66 72 65 73  S/8 gives a fres
38b0: 68 20 70 72 6f 6d 70 74 2e 0a 0a 52 65 73 74 61  h prompt...Resta
38c0: 72 74 69 6e 67 20 74 68 65 20 4f 53 2f 38 20 4d  rting the OS/8 M
38d0: 6f 6e 69 74 6f 72 20 77 69 74 68 20 61 20 53 49  onitor with a SI
38e0: 4d 48 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20  MH command line 
38f0: 6f 66 20 5c 22 60 67 6f 20 37 36 30 30 60 5c 22  of \"`go 7600`\"
3900: 0a 77 6f 72 6b 73 2e 0a 0a 54 68 65 20 6c 65 61  .works...The lea
3910: 73 74 20 64 69 73 72 75 70 74 69 76 65 20 77 61  st disruptive wa
3920: 79 20 77 65 20 68 61 76 65 20 66 6f 75 6e 64 20  y we have found 
3930: 74 6f 20 72 65 73 75 6d 65 20 4f 53 2f 38 20 75  to resume OS/8 u
3940: 6e 64 65 72 20 50 79 74 68 6f 6e 20 65 78 70 65  nder Python expe
3950: 63 74 0a 61 66 74 65 72 20 68 61 76 69 6e 67 20  ct.after having 
3960: 65 73 63 61 70 65 64 20 74 6f 20 53 49 4d 48 20  escaped to SIMH 
3970: 69 73 20 74 6f 20 69 73 73 75 65 20 74 68 65 20  is to issue the 
3980: 53 49 4d 48 20 60 63 6f 6e 74 69 6e 75 65 60 20  SIMH `continue` 
3990: 63 6f 6d 6d 61 6e 64 2c 20 74 68 65 6e 0a 70 61  command, then.pa
39a0: 75 73 65 20 66 6f 72 20 61 6e 20 6b 65 79 62 6f  use for an keybo
39b0: 61 72 64 20 64 65 6c 61 79 2c 20 74 68 65 6e 20  ard delay, then 
39c0: 73 65 6e 64 20 60 43 54 52 4c 2f 43 60 20 74 68  send `CTRL/C` th
39d0: 65 6e 20 70 61 75 73 65 20 61 67 61 69 6e 2c 20  en pause again, 
39e0: 74 68 65 6e 20 73 65 6e 64 0a 60 5c 72 5c 6e 60  then send.`\r\n`
39f0: 2e 20 20 54 68 61 74 20 77 61 6b 65 73 20 4f 53  .  That wakes OS
3a00: 2f 38 20 62 61 63 6b 20 75 70 20 61 6e 64 20 70  /8 back up and p
3a10: 72 6f 64 75 63 65 73 20 61 20 4b 65 79 62 6f 61  roduces a Keyboa
3a20: 72 64 20 4d 6f 6e 69 74 6f 72 20 70 72 6f 6d 70  rd Monitor promp
3a30: 74 2e 0a 0a 54 68 65 20 73 69 6d 68 2e 70 79 20  t...The simh.py 
3a40: 63 6f 64 65 20 74 68 61 74 20 75 6e 64 65 72 6c  code that underl
3a50: 69 65 73 20 61 6c 6c 20 74 68 69 73 20 6b 65 65  ies all this kee
3a60: 70 73 20 74 72 61 63 6b 20 6f 66 20 74 68 65 20  ps track of the 
3a70: 73 77 69 74 63 68 0a 62 65 74 77 65 65 6e 20 74  switch.between t
3a80: 68 65 20 53 49 4d 48 20 61 6e 64 20 4f 53 2f 38  he SIMH and OS/8
3a90: 20 63 6f 6e 74 65 78 74 73 2e 20 20 48 6f 77 65   contexts.  Howe
3aa0: 76 65 72 20 69 74 20 64 6f 65 73 20 6e 6f 74 20  ver it does not 
3ab0: 70 72 65 73 75 6d 65 20 74 6f 0a 64 6f 20 74 68  presume to.do th
3ac0: 69 73 20 72 65 73 75 6d 70 74 69 6f 6e 20 62 65  is resumption be
3ad0: 63 61 75 73 65 20 74 68 65 20 60 43 54 52 4c 2f  cause the `CTRL/
3ae0: 43 60 20 77 69 6c 6c 20 71 75 69 74 20 6f 75 74  C` will quit out
3af0: 20 6f 66 20 61 6e 79 20 70 72 6f 67 72 61 6d 0a   of any program.
3b00: 62 65 69 6e 67 20 72 75 6e 20 75 6e 64 65 72 20  being run under 
3b10: 4f 53 2f 38 2c 20 61 6e 64 20 72 65 74 75 72 6e  OS/8, and return
3b20: 20 74 6f 20 74 68 65 20 6b 65 79 62 6f 61 72 64   to the keyboard
3b30: 20 6d 6f 6e 69 74 6f 72 20 6c 65 76 65 6c 2e 0a   monitor level..
3b40: 0a 42 65 63 61 75 73 65 20 60 6f 73 38 2d 72 75  .Because `os8-ru
3b50: 6e 60 20 63 72 65 61 74 65 73 20 74 68 65 20 60  n` creates the `
3b60: 62 65 67 69 6e 60 20 2f 20 60 65 6e 64 60 20 62  begin` / `end` b
3b70: 6c 6f 63 6b 73 20 77 69 74 68 20 74 68 65 69 72  locks with their
3b80: 20 6f 77 6e 0a 69 6e 74 65 72 70 72 65 74 65 72   own.interpreter
3b90: 20 6c 6f 6f 70 73 2c 20 61 72 6f 75 6e 64 20 63   loops, around c
3ba0: 6f 6d 6d 61 6e 64 73 20 77 69 74 68 20 63 6f 6d  ommands with com
3bb0: 70 6c 65 78 20 63 6f 6d 6d 61 6e 64 20 73 74 72  plex command str
3bc0: 75 63 74 75 72 65 73 2c 0a 69 74 20 67 75 61 72  uctures,.it guar
3bd0: 61 6e 74 65 65 73 20 74 68 61 74 20 74 68 65 20  antees that the 
3be0: 73 77 69 74 63 68 20 69 6e 74 6f 20 53 49 4d 48  switch into SIMH
3bf0: 20 63 6f 6e 74 65 78 74 20 77 69 6c 6c 20 6f 6e   context will on
3c00: 6c 79 20 68 61 70 70 65 6e 0a 77 68 65 6e 20 4f  ly happen.when O
3c10: 53 2f 38 20 69 73 20 71 75 69 65 73 63 65 6e 74  S/8 is quiescent
3c20: 20 69 6e 20 74 68 65 20 4b 65 79 62 6f 61 72 64   in the Keyboard
3c30: 20 4d 6f 6e 69 74 6f 72 2e 0a 0a 41 6c 74 68 6f   Monitor...Altho
3c40: 75 67 68 20 60 6f 73 38 2d 72 75 6e 60 20 70 72  ugh `os8-run` pr
3c50: 6f 76 69 64 65 73 20 61 20 60 72 65 73 75 6d 65  ovides a `resume
3c60: 60 20 63 6f 6d 6d 61 6e 64 20 74 68 61 74 20 63  ` command that c
3c70: 61 6e 20 61 70 70 65 61 72 20 69 6e 0a 73 63 72  an appear in.scr
3c80: 69 70 74 73 20 61 66 74 65 72 20 74 68 65 20 63  ipts after the c
3c90: 6f 6d 6d 61 6e 64 73 20 74 68 61 74 20 65 73 63  ommands that esc
3ca0: 61 70 65 20 6f 75 74 20 74 6f 20 53 49 4d 48 2c  ape out to SIMH,
3cb0: 20 75 73 69 6e 67 20 69 74 20 69 73 20 6f 70 74   using it is opt
3cc0: 69 6f 6e 61 6c 2e 0a 60 6f 73 38 2d 72 75 6e 60  ional..`os8-run`
3cd0: 20 63 68 65 63 6b 73 20 74 68 65 20 63 6f 6e 74   checks the cont
3ce0: 65 78 74 20 61 6e 64 20 69 73 73 75 65 73 20 69  ext and issues i
3cf0: 74 73 20 6f 77 6e 20 72 65 73 75 6d 65 20 63 61  ts own resume ca
3d00: 6c 6c 20 69 66 20 6e 65 65 64 65 64 2e 0a 0a 0a  ll if needed....
3d10: 23 23 20 3c 61 20 69 64 3d 22 75 73 61 67 65 22  ## <a id="usage"
3d20: 3e 3c 2f 61 3e 55 73 61 67 65 0a 0a 3e 20 60 6f  ></a>Usage..> `o
3d30: 73 38 2d 72 75 6e 60 20 5b 60 2d 68 60 5d 20 5b  s8-run` [`-h`] [
3d40: 60 2d 64 60 5d 20 5b 60 2d 76 60 5d 20 5b 60 2d  `-d`] [`-v`] [`-
3d50: 76 76 60 5d 20 5b 60 2d 2d 65 6e 61 62 6c 65 60  vv`] [`--enable`
3d60: 20 5f 65 6e 61 62 6c 65 5f 6f 70 74 69 6f 6e 5f   _enable_option_
3d70: 5d 20 2e 2e 2e 20 5b 60 2d 2d 64 69 73 61 62 6c  ] ... [`--disabl
3d80: 65 60 20 5f 64 69 73 61 62 6c 65 5f 6f 70 74 69  e` _disable_opti
3d90: 6f 6e 5f 5d 20 2e 2e 2e 20 5f 73 63 72 69 70 74  on_] ... _script
3da0: 2d 66 69 6c 65 5f 20 2e 2e 2e 0a 0a 7c 20 20 20  -file_ .....|   
3db0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
3dc0: 20 20 20 20 20 20 20 20 7c 20 2a 2a 50 6f 73 69          | **Posi
3dd0: 74 69 6f 6e 61 6c 20 41 72 67 75 6d 65 6e 74 73  tional Arguments
3de0: 2a 2a 0a 7c 20 5f 73 63 72 69 70 74 2d 66 69 6c  **.| _script-fil
3df0: 65 5f 20 20 20 7c 20 4f 6e 65 20 6f 72 20 6d 6f  e_   | One or mo
3e00: 72 65 20 73 63 72 69 70 74 20 66 69 6c 65 73 20  re script files 
3e10: 74 6f 20 72 75 6e 0a 7c 20 20 20 20 20 20 20 20  to run.|        
3e20: 20 20 20 20 20 20 20 20 20 7c 20 2a 2a 4f 70 74           | **Opt
3e30: 69 6f 6e 61 6c 20 41 72 67 75 6d 65 6e 74 73 2a  ional Arguments*
3e40: 2a 0a 7c 20 60 2d 68 60 20 20 20 20 20 20 20 20  *.| `-h`        
3e50: 20 20 20 20 7c 20 73 68 6f 77 20 74 68 69 73 20      | show this 
3e60: 68 65 6c 70 20 6d 65 73 73 61 67 65 20 61 6e 64  help message and
3e70: 20 65 78 69 74 0a 7c 20 60 2d 64 60 20 20 20 20   exit.| `-d`    
3e80: 20 20 20 20 20 20 20 20 7c 20 61 64 64 20 65 78          | add ex
3e90: 74 72 61 20 64 65 62 75 67 67 69 6e 67 20 6f 75  tra debugging ou
3ea0: 74 70 75 74 2c 20 6e 6f 72 6d 61 6c 6c 79 20 73  tput, normally s
3eb0: 75 70 70 72 65 73 73 65 64 0a 7c 20 60 2d 76 60  uppressed.| `-v`
3ec0: 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 76 65              | ve
3ed0: 72 62 6f 73 65 20 73 63 72 69 70 74 20 73 74 61  rbose script sta
3ee0: 74 75 73 20 6f 75 74 70 75 74 20 69 6e 73 74 65  tus output inste
3ef0: 61 64 20 6f 66 20 74 68 65 20 75 73 75 61 6c 20  ad of the usual 
3f00: 66 65 77 20 70 72 6f 67 72 65 73 73 20 6d 65 73  few progress mes
3f10: 73 61 67 65 73 0a 7c 20 60 2d 76 76 60 20 20 20  sages.| `-vv`   
3f20: 20 20 20 20 20 20 20 20 7c 20 76 65 72 79 20 76          | very v
3f30: 65 72 62 6f 73 65 3a 20 49 6e 63 6c 75 64 65 73  erbose: Includes
3f40: 20 53 49 4d 48 20 65 78 70 65 63 74 20 6f 75 74   SIMH expect out
3f50: 70 75 74 20 77 69 74 68 20 74 68 65 20 76 65 72  put with the ver
3f60: 62 6f 73 65 20 6f 75 74 70 75 74 2e 0a 7c 20 20  bose output..|  
3f70: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c                 |
3f80: 20 2a 2a 4b 6e 6f 77 6e 20 45 6e 61 62 6c 65 20   **Known Enable 
3f90: 4f 70 74 69 6f 6e 73 2a 2a 0a 7c 20 60 66 6f 63  Options**.| `foc
3fa0: 61 6c 36 39 60 20 20 20 20 20 20 20 7c 20 41 64  al69`       | Ad
3fb0: 64 20 60 46 4f 43 41 4c 36 39 60 20 74 6f 20 74  d `FOCAL69` to t
3fc0: 68 65 20 62 75 69 6c 74 20 4f 53 2f 38 20 52 4b  he built OS/8 RK
3fd0: 30 35 20 69 6d 61 67 65 0a 7c 20 60 6d 75 73 69  05 image.| `musi
3fe0: 63 60 20 20 20 20 20 20 20 20 20 7c 20 41 64 64  c`         | Add
3ff0: 20 2a 2e 4d 55 20 66 69 6c 65 73 20 74 6f 20 74   *.MU files to t
4000: 68 65 20 62 75 69 6c 74 20 4f 53 2f 38 20 52 4b  he built OS/8 RK
4010: 30 35 20 69 6d 61 67 65 0a 7c 20 60 76 74 65 64  05 image.| `vted
4020: 69 74 60 20 20 20 20 20 20 20 20 7c 20 41 64 64  it`        | Add
4030: 20 74 68 65 20 54 45 43 4f 20 56 54 45 44 49 54   the TECO VTEDIT
4040: 20 73 65 74 75 70 20 74 6f 20 74 68 65 20 62 75   setup to the bu
4050: 69 6c 74 20 4f 53 2f 38 20 52 4b 30 35 20 69 6d  ilt OS/8 RK05 im
4060: 61 67 65 0a 7c 20 20 20 20 20 20 20 20 20 20 20  age.|           
4070: 20 20 20 20 20 20 7c 20 2a 2a 4b 6e 6f 77 6e 20        | **Known 
4080: 44 69 73 61 62 6c 65 20 4f 70 74 69 6f 6e 73 2a  Disable Options*
4090: 2a 0a 7c 20 60 62 61 60 20 20 20 20 20 20 20 20  *.| `ba`        
40a0: 20 20 20 20 7c 20 4c 65 61 76 65 20 2a 2e 42 41      | Leave *.BA
40b0: 20 60 42 41 53 49 43 60 20 67 61 6d 65 73 20 61   `BASIC` games a
40c0: 6e 64 20 64 65 6d 6f 73 20 6f 66 66 20 74 68 65  nd demos off the
40d0: 20 62 75 69 6c 74 20 4f 53 2f 38 20 52 4b 30 35   built OS/8 RK05
40e0: 20 69 6d 61 67 65 0a 7c 20 60 75 77 66 6f 63 61   image.| `uwfoca
40f0: 6c 60 20 20 20 20 20 20 20 7c 20 4c 65 61 76 65  l`       | Leave
4100: 20 55 2f 57 20 46 4f 43 41 4c 20 28 6f 6e 6c 79   U/W FOCAL (only
4110: 29 20 6f 66 66 20 74 68 65 20 62 75 69 6c 74 20  ) off the built 
4120: 4f 53 2f 38 20 52 4b 30 35 20 69 6d 61 67 65 0a  OS/8 RK05 image.
4130: 7c 20 60 6d 61 63 72 65 6c 60 20 20 20 20 20 20  | `macrel`      
4140: 20 20 7c 20 4c 65 61 76 65 20 74 68 65 20 60 4d    | Leave the `M
4150: 41 43 52 45 4c 60 20 61 73 73 65 6d 62 6c 65 72  ACREL` assembler
4160: 20 6f 66 66 20 74 68 65 20 62 75 69 6c 74 20 4f   off the built O
4170: 53 2f 38 20 52 4b 30 35 20 69 6d 61 67 65 0a 7c  S/8 RK05 image.|
4180: 20 60 64 63 70 60 20 20 20 20 20 20 20 20 20 20   `dcp`          
4190: 20 7c 20 4c 65 61 76 65 20 74 68 65 20 60 44 43   | Leave the `DC
41a0: 50 60 20 64 69 73 61 73 73 65 6d 62 6c 65 72 20  P` disassembler 
41b0: 6f 66 66 20 74 68 65 20 62 75 69 6c 74 20 4f 53  off the built OS
41c0: 2f 38 20 52 4b 30 35 20 69 6d 61 67 65 0a 7c 20  /8 RK05 image.| 
41d0: 60 6b 31 32 60 20 20 20 20 20 20 20 20 20 20 20  `k12`           
41e0: 7c 20 4c 65 61 76 65 20 31 32 2d 62 69 74 20 4b  | Leave 12-bit K
41f0: 65 72 6d 69 74 20 6f 66 66 20 74 68 65 20 62 75  ermit off the bu
4200: 69 6c 74 20 4f 53 2f 38 20 52 4b 30 35 20 69 6d  ilt OS/8 RK05 im
4210: 61 67 65 0a 7c 20 60 63 63 38 60 20 20 20 20 20  age.| `cc8`     
4220: 20 20 20 20 20 20 7c 20 4c 65 61 76 65 20 74 68        | Leave th
4230: 65 20 6e 61 74 69 76 65 20 4f 53 2f 38 20 43 43  e native OS/8 CC
4240: 38 20 63 6f 6d 70 69 6c 65 72 20 6f 66 66 20 74  8 compiler off t
4250: 68 65 20 62 75 69 6c 74 20 4f 53 2f 38 20 52 4b  he built OS/8 RK
4260: 30 35 20 69 6d 61 67 65 0a 7c 20 60 63 72 74 60  05 image.| `crt`
4270: 20 20 20 20 20 20 20 20 20 20 20 7c 20 4c 65 61             | Lea
4280: 76 65 20 43 52 54 2d 73 74 79 6c 65 20 72 75 62  ve CRT-style rub
4290: 6f 75 74 20 70 72 6f 63 65 73 73 69 6e 67 20 6f  out processing o
42a0: 66 66 20 74 68 65 20 62 75 69 6c 74 20 4f 53 2f  ff the built OS/
42b0: 38 20 52 4b 30 35 20 69 6d 61 67 65 0a 7c 20 60  8 RK05 image.| `
42c0: 61 64 76 65 6e 74 60 20 20 20 20 20 20 20 20 7c  advent`        |
42d0: 20 4c 65 61 76 65 20 41 64 76 65 6e 74 75 72 65   Leave Adventure
42e0: 20 6f 66 66 20 74 68 65 20 62 75 69 6c 74 20 4f   off the built O
42f0: 53 2f 38 20 52 4b 30 35 20 69 6d 61 67 65 0a 7c  S/8 RK05 image.|
4300: 20 60 66 6f 72 74 72 61 6e 2d 69 69 60 20 20 20   `fortran-ii`   
4310: 20 7c 20 4c 65 61 76 65 20 46 4f 52 54 52 41 4e   | Leave FORTRAN
4320: 20 49 49 20 6f 66 66 20 74 68 65 20 62 75 69 6c   II off the buil
4330: 74 20 4f 53 2f 38 20 52 4b 30 35 20 69 6d 61 67  t OS/8 RK05 imag
4340: 65 0a 7c 20 60 66 6f 72 74 72 61 6e 2d 69 76 60  e.| `fortran-iv`
4350: 20 20 20 20 7c 20 4c 65 61 76 65 20 46 4f 52 54      | Leave FORT
4360: 52 41 4e 20 49 56 20 6f 66 66 20 74 68 65 20 62  RAN IV off the b
4370: 75 69 6c 74 20 4f 53 2f 38 20 52 4b 30 35 20 69  uilt OS/8 RK05 i
4380: 6d 61 67 65 0a 7c 20 60 69 6e 69 74 60 20 20 20  mage.| `init`   
4390: 20 20 20 20 20 20 20 7c 20 4c 65 61 76 65 20 74         | Leave t
43a0: 68 65 20 4f 53 2f 38 20 49 4e 49 54 20 6d 65 73  he OS/8 INIT mes
43b0: 73 61 67 65 20 6f 66 66 20 74 68 65 20 62 75 69  sage off the bui
43c0: 6c 74 20 4f 53 2f 38 20 52 4b 30 35 20 69 6d 61  lt OS/8 RK05 ima
43d0: 67 65 0a 7c 20 60 63 68 65 73 73 60 20 20 20 20  ge.| `chess`    
43e0: 20 20 20 20 20 7c 20 4c 65 61 76 65 20 74 68 65       | Leave the
43f0: 20 43 48 45 43 4b 4d 4f 2d 49 49 20 67 61 6d 65   CHECKMO-II game
4400: 20 6f 66 20 63 68 65 73 73 20 6f 66 66 20 74 68   of chess off th
4410: 65 20 62 75 69 6c 74 20 4f 53 2f 38 20 52 4b 30  e built OS/8 RK0
4420: 35 20 69 6d 61 67 65 0a 7c 20 60 6c 63 6d 6f 64  5 image.| `lcmod
4430: 60 20 20 20 20 20 20 20 20 20 7c 20 44 69 73 61  `         | Disa
4440: 62 6c 65 20 74 68 65 20 4f 53 2f 38 20 63 6f 6d  ble the OS/8 com
4450: 6d 61 6e 64 20 75 70 63 61 73 69 6e 67 20 70 61  mand upcasing pa
4460: 74 63 68 2e 20 55 73 65 64 20 77 68 65 6e 20 53  tch. Used when S
4470: 49 4d 48 20 68 61 73 20 60 74 74 69 20 6b 73 72  IMH has `tti ksr
4480: 60 20 73 65 74 2e 0a 0a 0a 23 23 20 53 63 72 69  ` set....## Scri
4490: 70 74 20 4c 61 6e 67 75 61 67 65 20 43 6f 6d 6d  pt Language Comm
44a0: 61 6e 64 20 49 6e 76 65 6e 74 6f 72 79 0a 0a 48  and Inventory..H
44b0: 65 72 65 20 69 73 20 61 20 6c 69 73 74 20 6f 66  ere is a list of
44c0: 20 74 68 65 20 60 6f 73 38 2d 72 75 6e 60 20 73   the `os8-run` s
44d0: 63 72 69 70 74 69 6e 67 20 6c 61 6e 67 75 61 67  cripting languag
44e0: 65 20 63 6f 6d 6d 61 6e 64 73 20 69 6e 20 61 6c  e commands in al
44f0: 70 68 61 62 65 74 69 63 61 6c 20 6f 72 64 65 72  phabetical order
4500: 2e 0a 0a 0a 7c 20 5b 60 62 6f 6f 74 60 5d 28 23  ....| [`boot`](#
4510: 62 6f 6f 74 2d 63 6f 6d 6d 29 20 20 20 20 20 20  boot-comm)      
4520: 20 20 20 20 20 7c 20 42 6f 6f 74 20 74 68 65 20       | Boot the 
4530: 6e 61 6d 65 64 20 53 49 4d 48 20 64 65 76 69 63  named SIMH devic
4540: 65 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20  e.              
4550: 20 20 20 20 20 20 20 20 7c 0a 7c 20 5b 60 62 65          |.| [`be
4560: 67 69 6e 60 5d 28 23 62 65 67 69 6e 2d 65 6e 64  gin`](#begin-end
4570: 2d 63 6f 6d 6d 29 20 20 20 20 20 7c 20 42 65 67  -comm)     | Beg
4580: 69 6e 20 63 6f 6d 70 6c 65 78 20 63 6f 6e 64 69  in complex condi
4590: 74 69 6f 6e 61 6c 20 6f 72 20 73 75 62 2d 63 6f  tional or sub-co
45a0: 6d 6d 61 6e 64 20 62 6c 6f 63 6b 2e 20 20 7c 0a  mmand block.  |.
45b0: 7c 20 5b 60 63 6f 6e 66 69 67 75 72 65 60 5d 28  | [`configure`](
45c0: 23 63 6f 6e 66 69 67 75 72 65 2d 63 6f 6d 6d 29  #configure-comm)
45d0: 20 7c 20 50 65 72 66 6f 72 6d 20 73 70 65 63 69   | Perform speci
45e0: 66 69 63 20 53 49 4d 48 20 63 6f 6e 66 69 67 75  fic SIMH configu
45f0: 72 61 74 69 6f 6e 20 61 63 74 69 76 69 74 69 65  ration activitie
4600: 73 2e 20 20 7c 0a 7c 20 5b 60 63 6f 70 79 60 5d  s.  |.| [`copy`]
4610: 28 23 63 6f 70 79 2d 63 6f 6d 29 20 20 20 20 20  (#copy-com)     
4620: 20 20 20 20 20 20 20 7c 20 4d 61 6b 65 20 61 20         | Make a 
4630: 63 6f 70 79 20 6f 66 20 61 20 50 4f 53 49 58 20  copy of a POSIX 
4640: 66 69 6c 65 2e 20 20 20 20 20 20 20 20 20 20 20  file.           
4650: 20 20 20 20 20 20 20 20 20 20 7c 0a 7c 20 5b 60            |.| [`
4660: 63 70 66 72 6f 6d 60 5d 28 23 63 6f 70 79 2d 66  cpfrom`](#copy-f
4670: 72 6f 6d 2d 63 6f 6d 6d 29 20 7c 20 43 6f 70 79  rom-comm) | Copy
4680: 20 2a 66 72 6f 6d 2a 20 4f 53 2f 38 20 69 6e 74   *from* OS/8 int
4690: 6f 20 61 20 66 69 6c 65 20 69 6e 20 50 4f 53 49  o a file in POSI
46a0: 58 20 65 6e 76 69 72 6f 6e 6d 65 6e 74 2e 20 20  X environment.  
46b0: 7c 0a 7c 20 5b 60 63 70 74 6f 60 5d 28 23 63 6f  |.| [`cpto`](#co
46c0: 70 79 2d 74 6f 2d 63 6f 6d 6d 29 20 20 20 20 20  py-to-comm)     
46d0: 7c 20 43 6f 70 79 20 50 4f 53 49 58 20 66 69 6c  | Copy POSIX fil
46e0: 65 20 2a 74 6f 2a 20 4f 53 2f 38 20 65 6e 76 69  e *to* OS/8 envi
46f0: 72 6f 6e 6d 65 6e 74 2e 20 20 20 20 20 20 20 20  ronment.        
4700: 20 20 20 20 20 20 7c 0a 7c 20 5b 60 64 69 73 61        |.| [`disa
4710: 62 6c 65 60 5d 28 23 65 6e 2d 64 69 73 2d 63 6f  ble`](#en-dis-co
4720: 6d 6d 29 20 20 20 20 20 20 7c 20 53 65 74 20 64  mm)      | Set d
4730: 69 73 61 62 6c 65 6d 65 6e 74 20 6f 66 20 61 20  isablement of a 
4740: 66 65 61 74 75 72 65 20 62 79 20 6b 65 79 77 6f  feature by keywo
4750: 72 64 2e 20 20 20 20 20 20 20 20 20 7c 0a 7c 20  rd.         |.| 
4760: 5b 60 65 6e 61 62 6c 65 60 5d 28 23 65 6e 2d 64  [`enable`](#en-d
4770: 69 73 2d 63 6f 6d 6d 29 20 20 20 20 20 20 20 7c  is-comm)       |
4780: 20 53 65 74 20 65 6e 61 62 6c 65 6d 65 6e 74 20   Set enablement 
4790: 6f 66 20 61 20 66 65 61 74 75 72 65 20 62 79 20  of a feature by 
47a0: 6b 65 79 77 6f 72 64 2e 20 20 20 20 20 20 20 20  keyword.        
47b0: 20 20 7c 0a 7c 20 5b 60 65 6e 64 60 5d 28 23 62    |.| [`end`](#b
47c0: 65 67 69 6e 2d 65 6e 64 2d 63 6f 6d 6d 29 20 20  egin-end-comm)  
47d0: 20 20 20 20 20 7c 20 45 6e 64 20 63 6f 6d 70 6c       | End compl
47e0: 65 78 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 20 6f  ex conditional o
47f0: 72 20 73 75 62 2d 63 6f 6d 6d 61 6e 64 20 62 6c  r sub-command bl
4800: 6f 63 6b 2e 20 20 20 20 7c 0a 7c 20 5b 60 65 78  ock.    |.| [`ex
4810: 69 74 60 5d 28 23 65 78 69 74 2d 63 6f 6d 6d 29  it`](#exit-comm)
4820: 20 20 20 20 20 20 20 20 20 20 20 7c 20 45 78 69             | Exi
4830: 74 20 6f 73 38 2d 72 75 6e 20 61 6e 64 20 73 65  t os8-run and se
4840: 6e 64 20 73 74 61 74 75 73 20 20 20 20 20 20 20  nd status       
4850: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a                |.
4860: 7c 20 5b 60 69 6e 63 6c 75 64 65 60 5d 28 23 69  | [`include`](#i
4870: 6e 63 6c 75 64 65 2d 63 6f 6d 6d 29 20 20 20 20  nclude-comm)    
4880: 20 7c 20 45 78 65 63 75 74 65 20 61 20 73 75 62   | Execute a sub
4890: 6f 72 64 69 6e 61 74 65 20 73 63 72 69 70 74 20  ordinate script 
48a0: 66 69 6c 65 2e 20 20 20 20 20 20 20 20 20 20 20  file.           
48b0: 20 20 20 20 7c 0a 7c 20 5b 60 6d 6f 75 6e 74 60      |.| [`mount`
48c0: 5d 28 23 6d 6f 75 6e 74 2d 63 6f 6d 6d 29 20 20  ](#mount-comm)  
48d0: 20 20 20 20 20 20 20 7c 20 4d 6f 75 6e 74 20 61         | Mount a
48e0: 6e 20 69 6d 61 67 65 20 66 69 6c 65 20 61 73 20  n image file as 
48f0: 61 20 53 49 4d 48 20 61 74 74 61 63 68 65 64 20  a SIMH attached 
4900: 64 65 76 69 63 65 2e 20 20 20 7c 0a 7c 20 5b 60  device.   |.| [`
4910: 6f 63 6f 6d 70 60 5d 28 23 6f 63 6f 6d 70 2d 63  ocomp`](#ocomp-c
4920: 6f 6d 20 20 20 20 20 20 20 20 20 20 20 7c 20 52  om           | R
4930: 75 6e 20 74 68 65 20 4f 53 2f 38 20 4f 63 74 61  un the OS/8 Octa
4940: 6c 20 43 6f 6d 70 61 72 65 20 55 74 69 6c 69 74  l Compare Utilit
4950: 79 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20  y.              
4960: 7c 0a 7c 20 5b 60 6f 73 38 60 5d 28 23 6f 73 38  |.| [`os8`](#os8
4970: 2d 63 6f 6d 6d 29 20 20 20 20 20 20 20 20 20 20  -comm)          
4980: 20 20 20 7c 20 52 75 6e 20 61 72 62 69 74 72 61     | Run arbitra
4990: 72 79 20 4f 53 2f 38 20 63 6f 6d 6d 61 6e 64 2e  ry OS/8 command.
49a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
49b0: 20 20 20 20 20 20 7c 0a 7c 20 5b 60 70 61 6c 38        |.| [`pal8
49c0: 60 5d 28 23 70 61 6c 38 2d 63 6f 6d 6d 29 20 20  `](#pal8-comm)  
49d0: 20 20 20 20 20 20 20 20 20 7c 20 52 75 6e 20 4f           | Run O
49e0: 53 2f 38 20 60 50 41 4c 38 60 20 61 73 73 65 6d  S/8 `PAL8` assem
49f0: 62 6c 65 72 2e 20 20 20 20 20 20 20 20 20 20 20  bler.           
4a00: 20 20 20 20 20 20 20 20 20 20 20 20 7c 0a 7c 20              |.| 
4a10: 5b 60 70 61 74 63 68 60 5d 28 23 70 61 74 63 68  [`patch`](#patch
4a20: 2d 63 6f 6d 6d 29 20 20 20 20 20 20 20 20 20 7c  -comm)         |
4a30: 20 52 75 6e 20 61 20 70 61 74 63 68 20 66 69 6c   Run a patch fil
4a40: 65 2e 20 20 20 20 20 20 20 20 20 20 20 20 20 20  e.              
4a50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
4a60: 20 20 7c 0a 7c 20 5b 60 70 72 69 6e 74 60 5d 28    |.| [`print`](
4a70: 23 70 72 69 6e 74 2d 63 6f 6d 6d 29 20 20 20 20  #print-comm)    
4a80: 20 20 20 20 20 7c 20 50 72 69 6e 74 20 69 6e 66       | Print inf
4a90: 6f 72 6d 61 74 69 6f 6e 20 66 72 6f 6d 20 72 75  ormation from ru
4aa0: 6e 6e 69 6e 67 20 73 63 72 69 70 74 2e 20 20 20  nning script.   
4ab0: 20 20 20 20 20 20 20 20 7c 0a 7c 20 5b 60 72 65          |.| [`re
4ac0: 73 75 6d 65 60 5d 28 23 72 65 73 75 6d 65 2d 63  sume`](#resume-c
4ad0: 6f 6d 6d 29 20 20 20 20 20 20 20 7c 20 52 65 73  omm)       | Res
4ae0: 75 6d 65 20 4f 53 2f 38 20 61 74 20 4b 65 79 62  ume OS/8 at Keyb
4af0: 6f 61 72 64 20 4d 6f 6e 69 74 6f 72 20 63 6f 6d  oard Monitor com
4b00: 6d 61 6e 64 20 6c 65 76 65 6c 2e 20 20 20 7c 0a  mand level.   |.
4b10: 7c 20 5b 60 72 65 73 74 61 72 74 60 5d 28 23 72  | [`restart`](#r
4b20: 65 73 74 61 72 74 2d 63 6f 6d 6d 29 20 20 20 20  estart-comm)    
4b30: 20 7c 20 52 65 73 74 61 72 74 20 4f 53 2f 38 2e   | Restart OS/8.
4b40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
4b50: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
4b60: 20 20 20 20 7c 0a 7c 20 5b 60 75 6d 6f 75 6e 74      |.| [`umount
4b70: 60 5d 28 23 75 6d 6f 75 6e 74 2d 63 6f 6d 6d 29  `](#umount-comm)
4b80: 20 20 20 20 20 20 20 7c 20 55 6e 6d 6f 75 6e 74         | Unmount
4b90: 20 61 20 53 49 4d 48 20 61 74 74 61 63 68 65 64   a SIMH attached
4ba0: 20 64 65 76 69 63 65 20 69 6d 61 67 65 2e 20 20   device image.  
4bb0: 20 20 20 20 20 20 20 20 20 20 7c 0a 0a 54 68 65            |..The
4bc0: 73 65 20 63 6f 6d 6d 61 6e 64 73 20 61 72 65 20  se commands are 
4bd0: 64 65 73 63 72 69 62 65 64 20 69 6e 20 73 75 62  described in sub
4be0: 73 65 63 74 69 6f 6e 73 20 6f 66 20 5b 53 63 72  sections of [Scr
4bf0: 69 70 74 20 4c 61 6e 67 75 61 67 65 0a 43 6f 6d  ipt Language.Com
4c00: 6d 61 6e 64 20 52 65 66 65 72 65 6e 63 65 5d 28  mand Reference](
4c10: 23 73 63 72 69 70 74 69 6e 67 29 20 62 65 6c 6f  #scripting) belo
4c20: 77 2e 20 54 68 61 74 20 73 65 63 74 69 6f 6e 20  w. That section 
4c30: 70 72 65 73 65 6e 74 73 20 63 6f 6d 6d 61 6e 64  presents command
4c40: 73 0a 69 6e 20 61 6e 20 6f 72 64 65 72 20 61 70  s.in an order ap
4c50: 70 72 6f 70 72 69 61 74 65 20 74 6f 20 62 75 69  propriate to bui
4c60: 6c 64 69 6e 67 20 75 70 20 61 6e 20 75 6e 64 65  lding up an unde
4c70: 72 73 74 61 6e 64 69 6e 67 20 6f 66 20 6d 61 6b  rstanding of mak
4c80: 69 6e 67 0a 66 69 72 73 74 20 73 69 6d 70 6c 65  ing.first simple
4c90: 20 61 6e 64 20 74 68 65 6e 20 63 6f 6d 70 6c 65   and then comple
4ca0: 78 20 73 63 72 69 70 74 73 20 77 69 74 68 20 60  x scripts with `
4cb0: 6f 73 38 2d 72 75 6e 60 2e 0a 0a 0a 23 23 20 3c  os8-run`....## <
4cc0: 61 20 69 64 3d 22 73 63 72 69 70 74 69 6e 67 22  a id="scripting"
4cd0: 3e 3c 2f 61 3e 53 63 72 69 70 74 20 4c 61 6e 67  ></a>Script Lang
4ce0: 75 61 67 65 20 43 6f 6d 6d 61 6e 64 20 52 65 66  uage Command Ref
4cf0: 65 72 65 6e 63 65 0a 0a 23 23 23 20 3c 61 20 69  erence..### <a i
4d00: 64 3d 22 70 72 69 6e 74 2d 63 6f 6d 6d 22 3e 3c  d="print-comm"><
4d10: 2f 61 3e 60 70 72 69 6e 74 60 20 2d 20 50 72 69  /a>`print` - Pri
4d20: 6e 74 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 66  nt information f
4d30: 72 6f 6d 20 61 20 72 75 6e 6e 69 6e 67 20 73 63  rom a running sc
4d40: 72 69 70 74 2e 0a 0a 60 70 72 69 6e 74 60 20 5f  ript...`print` _
4d50: 6f 75 74 70 75 74 5f 0a 0a 54 68 65 20 73 69 6d  output_..The sim
4d60: 70 6c 65 73 74 20 73 63 72 69 70 74 20 63 6f 6d  plest script com
4d70: 6d 61 6e 64 20 69 73 20 60 70 72 69 6e 74 60 20  mand is `print` 
4d80: 77 68 69 63 68 20 61 6c 6c 6f 77 73 20 64 69 73  which allows dis
4d90: 70 6c 61 79 20 6f 66 20 73 74 61 74 75 73 0a 69  play of status.i
4da0: 6e 66 6f 72 6d 61 74 69 6f 6e 20 66 72 6f 6d 20  nformation from 
4db0: 74 68 65 20 72 75 6e 6e 69 6e 67 20 73 63 72 69  the running scri
4dc0: 70 74 2e 20 20 5f 6f 75 74 70 75 74 5f 20 69 73  pt.  _output_ is
4dd0: 20 73 69 6d 70 6c 79 20 64 69 73 70 6c 61 79 65   simply displaye
4de0: 64 2e 0a 49 66 20 74 68 65 20 60 76 65 72 62 6f  d..If the `verbo
4df0: 73 65 60 20 6f 70 74 69 6f 6e 20 74 6f 20 60 6f  se` option to `o
4e00: 73 38 2d 72 75 6e 60 20 69 73 20 73 65 74 2c 20  s8-run` is set, 
4e10: 74 68 65 20 6c 69 6e 65 20 6e 75 6d 62 65 72 20  the line number 
4e20: 6f 66 20 74 68 65 20 0a 70 72 69 6e 74 20 63 6f  of the .print co
4e30: 6d 6d 61 6e 64 20 69 73 20 69 6e 63 6c 75 64 65  mmand is include
4e40: 64 20 69 6e 20 74 68 65 20 6f 75 74 70 75 74 2e  d in the output.
4e50: 0a 0a 0a 23 23 23 20 3c 61 20 69 64 3d 22 65 78  ...### <a id="ex
4e60: 69 74 2d 63 6f 6d 6d 22 3e 3c 2f 61 3e 60 65 78  it-comm"></a>`ex
4e70: 69 74 60 20 2d 20 45 78 69 74 20 60 6f 73 38 2d  it` - Exit `os8-
4e80: 72 75 6e 60 20 61 6e 64 20 73 65 6e 64 20 73 74  run` and send st
4e90: 61 74 75 73 2e 0a 0a 60 65 78 69 74 60 20 5b 5f  atus...`exit` [_
4ea0: 73 74 61 74 75 73 5f 5d 0a 0a 54 68 65 20 60 65  status_]..The `e
4eb0: 78 69 74 60 20 63 6f 6d 6d 61 6e 64 20 61 6c 6c  xit` command all
4ec0: 6f 77 73 20 69 6d 6d 65 64 69 61 74 65 20 74 65  ows immediate te
4ed0: 72 6d 69 6e 61 74 69 6f 6e 20 6f 66 20 74 68 65  rmination of the
4ee0: 20 60 6f 73 38 2d 72 75 6e 60 20 73 63 72 69 70   `os8-run` scrip
4ef0: 74 2e 20 20 20 0a 0a 54 68 65 20 5f 73 74 61 74  t.   ..The _stat
4f00: 75 73 5f 20 61 72 67 75 6d 65 6e 74 20 69 73 20  us_ argument is 
4f10: 6f 70 74 69 6f 6e 61 6c 2e 20 20 49 66 20 74 68  optional.  If th
4f20: 65 20 61 72 67 75 6d 65 6e 74 20 69 73 20 61 6e  e argument is an
4f30: 20 69 6e 74 65 67 65 72 2c 20 60 6f 73 38 2d 72   integer, `os8-r
4f40: 75 6e 60 0a 77 69 6c 6c 20 72 65 74 75 72 6e 20  un`.will return 
4f50: 74 68 61 74 20 73 74 61 74 75 73 20 74 6f 20 74  that status to t
4f60: 68 65 20 63 61 6c 6c 69 6e 67 20 63 6f 6d 6d 61  he calling comma
4f70: 6e 64 20 73 68 65 6c 6c 2e 20 20 54 68 69 73 20  nd shell.  This 
4f80: 65 6e 61 62 6c 65 73 20 72 69 63 68 0a 73 69 67  enables rich.sig
4f90: 6e 61 6c 6c 69 6e 67 20 6f 66 20 73 74 61 74 75  nalling of statu
4fa0: 73 20 77 68 65 6e 20 60 6f 73 38 2d 72 75 6e 60  s when `os8-run`
4fb0: 20 69 74 73 65 6c 66 20 69 73 20 72 75 6e 20 61   itself is run a
4fc0: 73 20 61 20 73 63 72 69 70 74 2e 0a 0a 54 68 65  s a script...The
4fd0: 20 5f 73 74 61 74 75 73 5f 20 61 72 67 75 6d 65   _status_ argume
4fe0: 6e 74 20 63 61 6e 20 61 6c 73 6f 20 62 65 20 61  nt can also be a
4ff0: 20 73 74 72 69 6e 67 2e 20 20 49 66 20 61 20 73   string.  If a s
5000: 74 72 69 6e 67 20 69 73 20 73 70 65 63 69 66 69  tring is specifi
5010: 65 64 2c 0a 74 68 65 20 73 74 61 74 75 73 20 72  ed,.the status r
5020: 65 74 75 72 6e 65 64 20 62 79 20 60 6f 73 38 2d  eturned by `os8-
5030: 72 75 6e 60 20 74 6f 20 74 68 65 20 63 6f 6d 6d  run` to the comm
5040: 61 6e 64 20 73 68 65 6c 6c 20 69 73 20 31 2c 20  and shell is 1, 
5050: 61 6e 64 20 74 68 65 0a 73 74 72 69 6e 67 20 69  and the.string i
5060: 73 20 70 72 69 6e 74 65 64 20 6f 6e 20 65 78 69  s printed on exi
5070: 74 2e 20 20 28 54 68 69 73 20 69 73 20 74 68 65  t.  (This is the
5080: 20 64 65 66 61 75 6c 74 20 62 65 68 61 76 69 6f   default behavio
5090: 72 20 6f 66 20 74 68 65 20 70 79 74 68 6f 6e 0a  r of the python.
50a0: 60 73 79 73 2e 65 78 69 74 28 29 60 20 70 72 6f  `sys.exit()` pro
50b0: 63 65 64 75 72 65 2e 29 0a 0a 0a 23 23 23 20 3c  cedure.)...### <
50c0: 61 20 69 64 3d 22 69 6e 63 6c 75 64 65 2d 63 6f  a id="include-co
50d0: 6d 6d 22 3e 3c 2f 61 3e 60 69 6e 63 6c 75 64 65  mm"></a>`include
50e0: 60 20 e2 80 94 20 45 78 65 63 75 74 65 20 61 20  ` — Execute a 
50f0: 73 75 62 6f 72 64 69 6e 61 74 65 20 73 63 72 69  subordinate scri
5100: 70 74 20 66 69 6c 65 2e 0a 0a 60 69 6e 63 6c 75  pt file...`inclu
5110: 64 65 60 20 5f 73 63 72 69 70 74 2d 66 69 6c 65  de` _script-file
5120: 2d 70 61 74 68 5f 0a 0a 54 68 65 20 73 63 72 69  -path_..The scri
5130: 70 74 20 66 69 6c 65 20 6e 61 6d 65 64 20 69 6e  pt file named in
5140: 20 5f 73 63 72 69 70 74 2d 66 69 6c 65 2d 70 61   _script-file-pa
5150: 74 68 5f 20 69 73 20 65 78 65 63 75 74 65 64 2e  th_ is executed.
5160: 20 20 49 66 20 6e 6f 20 66 61 74 61 6c 0a 65 72    If no fatal.er
5170: 72 6f 72 73 20 61 72 65 20 65 6e 63 6f 75 6e 74  rors are encount
5180: 65 72 65 64 20 64 75 72 69 6e 67 20 74 68 61 74  ered during that
5190: 20 65 78 65 63 75 74 69 6f 6e 2c 20 74 68 65 6e   execution, then
51a0: 20 74 68 65 20 6d 61 69 6e 20 73 63 72 69 70 74   the main script
51b0: 0a 63 6f 6e 74 69 6e 75 65 73 20 6f 6e 2e 0a 0a  .continues on...
51c0: 41 20 66 61 74 61 6c 20 65 72 72 6f 72 20 69 6e  A fatal error in
51d0: 20 61 6e 20 69 6e 63 6c 75 64 65 64 20 73 63 72   an included scr
51e0: 69 70 74 20 6b 69 6c 6c 73 20 74 68 65 20 77 68  ipt kills the wh
51f0: 6f 6c 65 20 65 78 65 63 75 74 69 6f 6e 20 6f 66  ole execution of
5200: 0a 60 6f 73 38 2d 72 75 6e 60 2e 0a 0a 0a 23 23  .`os8-run`....##
5210: 23 20 3c 61 20 69 64 3d 22 6d 6f 75 6e 74 2d 63  # <a id="mount-c
5220: 6f 6d 6d 22 3e 3c 2f 61 3e 60 6d 6f 75 6e 74 60  omm"></a>`mount`
5230: 20 e2 80 94 20 4d 6f 75 6e 74 20 61 6e 20 69 6d   — Mount an im
5240: 61 67 65 20 66 69 6c 65 20 61 73 20 61 20 53 49  age file as a SI
5250: 4d 48 20 61 74 74 61 63 68 65 64 20 64 65 76 69  MH attached devi
5260: 63 65 2e 0a 0a 60 6d 6f 75 6e 74 60 20 5f 73 69  ce...`mount` _si
5270: 6d 68 2d 64 65 76 5f 20 5f 69 6d 61 67 65 2d 66  mh-dev_ _image-f
5280: 69 6c 65 5f 20 5b 5f 6f 70 74 69 6f 6e 5f 20 2e  ile_ [_option_ .
5290: 2e 2e 5d 0a 0a 42 65 63 61 75 73 65 20 74 68 65  ..]..Because the
52a0: 20 70 72 69 6d 61 72 79 20 65 78 70 65 63 74 61   primary expecta
52b0: 74 69 6f 6e 20 77 69 74 68 20 60 6f 73 38 2d 72  tion with `os8-r
52c0: 75 6e 60 20 73 63 72 69 70 74 73 20 69 73 20 74  un` scripts is t
52d0: 68 61 74 20 69 6d 61 67 65 0a 66 69 6c 65 73 20  hat image.files 
52e0: 61 72 65 20 6d 6f 75 6e 74 65 64 2c 20 62 6f 6f  are mounted, boo
52f0: 74 65 64 20 61 6e 64 20 6f 70 65 72 61 74 65 64  ted and operated
5300: 20 6f 6e 2c 20 74 68 65 20 66 61 69 6c 75 72 65   on, the failure
5310: 20 6f 66 20 61 20 60 6d 6f 75 6e 74 60 0a 63 6f   of a `mount`.co
5320: 6d 6d 61 6e 64 20 69 73 20 66 61 74 61 6c 2e 0a  mmand is fatal..
5330: 0a 0a 23 23 23 23 20 60 6d 6f 75 6e 74 60 20 4f  ..#### `mount` O
5340: 70 74 69 6f 6e 73 0a 0a 7c 20 60 6e 65 77 60 20  ptions..| `new` 
5350: 20 20 20 20 20 7c 20 49 66 20 74 68 65 72 65 20       | If there 
5360: 69 73 20 61 6e 20 65 78 69 73 74 69 6e 67 20 66  is an existing f
5370: 69 6c 65 2c 20 72 65 6e 61 6d 65 20 69 74 20 77  ile, rename it w
5380: 69 74 68 20 61 20 60 2e 73 61 76 65 60 20 65 78  ith a `.save` ex
5390: 74 65 6e 73 69 6f 6e 0a 7c 20 20 20 20 20 20 20  tension.|       
53a0: 20 20 20 20 20 7c 20 62 65 63 61 75 73 65 20 77       | because w
53b0: 65 20 77 61 6e 74 20 74 6f 20 63 72 65 61 74 65  e want to create
53c0: 20 61 20 6e 65 77 20 65 6d 70 74 79 20 69 6d 61   a new empty ima
53d0: 67 65 20 66 69 6c 65 2e 20 49 66 20 74 68 65 72  ge file. If ther
53e0: 65 20 69 73 0a 7c 20 20 20 20 20 20 20 20 20 20  e is.|          
53f0: 20 20 7c 20 61 6c 72 65 61 64 79 20 61 6e 20 65    | already an e
5400: 78 69 73 74 69 6e 67 20 60 2e 73 61 76 65 60 20  xisting `.save` 
5410: 76 65 72 73 69 6f 6e 2c 20 74 68 65 20 65 78 69  version, the exi
5420: 73 74 69 6e 67 20 60 2e 73 61 76 65 60 20 76 65  sting `.save` ve
5430: 72 73 69 6f 6e 20 69 73 20 6c 6f 73 74 2e 0a 7c  rsion is lost..|
5440: 20 60 72 65 71 75 69 72 65 64 60 20 7c 20 5f 69   `required` | _i
5450: 6d 61 67 65 2d 66 69 6c 65 5f 20 69 73 20 72 65  mage-file_ is re
5460: 71 75 69 72 65 64 20 74 6f 20 65 78 69 73 74 2c  quired to exist,
5470: 20 6f 74 68 65 72 77 69 73 65 20 61 62 6f 72 74   otherwise abort
5480: 20 74 68 65 20 73 63 72 69 70 74 2e 0a 7c 20 60   the script..| `
5490: 70 72 65 73 65 72 76 65 60 20 7c 20 49 66 20 5f  preserve` | If _
54a0: 69 6d 61 67 65 2d 66 69 6c 65 5f 20 61 6c 72 65  image-file_ alre
54b0: 61 64 79 20 65 78 69 73 74 73 2c 20 63 72 65 61  ady exists, crea
54c0: 74 65 20 61 20 63 6f 70 79 20 77 69 74 68 20 61  te a copy with a
54d0: 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 20   version number 
54e0: 73 75 66 66 69 78 2e 0a 7c 20 20 20 20 20 20 20  suffix..|       
54f0: 20 20 20 20 20 7c 20 54 68 69 73 20 69 73 20 75       | This is u
5500: 73 65 66 75 6c 20 77 68 65 6e 20 79 6f 75 20 77  seful when you w
5510: 61 6e 74 20 74 6f 20 70 72 65 76 65 6e 74 20 6f  ant to prevent o
5520: 76 65 72 77 72 69 74 65 73 20 6f 66 20 61 20 67  verwrites of a g
5530: 6f 6f 64 20 69 6d 61 67 65 20 66 69 6c 65 0a 7c  ood image file.|
5540: 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 77 69              | wi
5550: 74 68 20 63 68 61 6e 67 65 73 20 74 68 61 74 20  th changes that 
5560: 6d 69 67 68 74 20 6e 6f 74 20 77 6f 72 6b 2e 20  might not work. 
5570: 20 60 6f 73 38 2d 72 75 6e 60 20 70 72 65 73 65   `os8-run` prese
5580: 72 76 65 73 20 61 6c 6c 20 76 65 72 73 69 6f 6e  rves all version
5590: 73 20 73 65 65 6e 0a 7c 20 20 20 20 20 20 20 20  s seen.|        
55a0: 20 20 20 20 7c 20 61 6e 64 20 63 72 65 61 74 65      | and create
55b0: 73 20 6e 65 77 20 76 65 72 73 69 6f 6e 20 74 68  s new version th
55c0: 61 74 20 64 6f 65 73 6e 27 74 20 6f 76 65 72 77  at doesn't overw
55d0: 72 69 74 65 20 61 6e 79 20 6f 66 20 74 68 65 20  rite any of the 
55e0: 70 72 65 76 69 6f 75 73 20 6f 6e 65 73 2e 0a 7c  previous ones..|
55f0: 20 60 72 65 61 64 6f 6e 6c 79 60 20 7c 20 50 61   `readonly` | Pa
5600: 73 73 65 73 20 74 68 65 20 60 2d 72 60 20 6f 70  sses the `-r` op
5610: 74 69 6f 6e 20 74 6f 20 53 49 4d 48 20 61 74 74  tion to SIMH att
5620: 61 63 68 20 74 6f 20 6d 6f 75 6e 74 20 74 68 65  ach to mount the
5630: 20 64 65 76 69 63 65 20 69 6e 20 72 65 61 64 20   device in read 
5640: 6f 6e 6c 79 20 6d 6f 64 65 2e 0a 7c 20 60 72 6f  only mode..| `ro
5650: 60 20 20 20 20 20 20 20 7c 20 41 62 62 72 65 76  `       | Abbrev
5660: 69 61 74 69 6f 6e 20 66 6f 72 20 60 72 65 61 64  iation for `read
5670: 6f 6e 6c 79 60 2e 0a 7c 20 60 73 63 72 61 74 63  only`..| `scratc
5680: 68 60 20 20 7c 20 43 72 65 61 74 65 20 61 20 77  h`  | Create a w
5690: 72 69 74 65 61 62 6c 65 20 73 63 72 61 74 63 68  riteable scratch
56a0: 20 76 65 72 73 69 6f 6e 20 6f 66 20 74 68 65 20   version of the 
56b0: 6e 61 6d 65 64 20 69 6d 61 67 65 20 66 69 6c 65  named image file
56c0: 20 61 6e 64 20 6d 6f 75 6e 74 20 69 74 2e 0a 7c   and mount it..|
56d0: 20 20 20 20 20 20 20 20 20 20 20 20 7c 20 54 68              | Th
56e0: 69 73 20 69 73 20 68 65 6c 70 66 75 6c 20 77 68  is is helpful wh
56f0: 65 6e 20 79 6f 75 20 61 72 65 20 62 6f 6f 74 69  en you are booti
5700: 6e 67 20 61 20 64 69 73 74 72 69 62 75 74 69 6f  ng a distributio
5710: 6e 20 44 45 43 74 61 70 65 2e 0a 7c 20 20 20 20  n DECtape..|    
5720: 20 20 20 20 20 20 20 20 7c 20 42 6f 6f 74 65 64          | Booted
5730: 20 44 45 43 74 61 70 65 20 69 6d 61 67 65 73 20   DECtape images 
5740: 6d 75 73 74 20 62 65 20 77 72 69 74 65 61 62 6c  must be writeabl
5750: 65 2e 20 54 6f 20 70 72 6f 74 65 63 74 20 61 20  e. To protect a 
5760: 64 69 73 74 72 69 62 75 74 69 6f 6e 20 44 45 43  distribution DEC
5770: 74 61 70 65 2c 0a 7c 20 20 20 20 20 20 20 20 20  tape,.|         
5780: 20 20 20 7c 20 75 73 65 20 74 68 65 20 60 73 63     | use the `sc
5790: 72 61 74 63 68 60 20 6f 70 74 69 6f 6e 2e 20 20  ratch` option.  
57a0: 57 68 65 6e 20 61 6c 6c 20 73 63 72 69 70 74 20  When all script 
57b0: 72 75 6e 73 20 61 72 65 20 64 6f 6e 65 2c 20 74  runs are done, t
57c0: 68 65 20 73 63 72 61 74 63 68 20 76 65 72 73 69  he scratch versi
57d0: 6f 6e 0a 7c 20 20 20 20 20 20 20 20 20 20 20 20  on.|            
57e0: 7c 20 69 73 20 64 65 6c 65 74 65 64 2e 0a 0a 4e  | is deleted...N
57f0: 6f 74 65 20 74 68 61 74 20 74 68 65 20 60 70 72  ote that the `pr
5800: 65 73 65 72 76 65 60 20 61 6e 64 20 60 6e 65 77  eserve` and `new
5810: 60 20 6f 70 74 69 6f 6e 73 20 61 70 70 72 6f 61  ` options approa
5820: 63 68 20 70 72 65 73 65 72 76 61 74 69 6f 6e 20  ch preservation 
5830: 69 6e 20 66 75 6e 64 61 6d 65 6e 74 61 6c 6c 79  in fundamentally
5840: 0a 64 69 66 66 65 72 65 6e 74 20 77 61 79 73 3a  .different ways:
5850: 20 60 70 72 65 73 65 72 76 65 60 20 6b 65 65 70   `preserve` keep
5860: 73 20 61 6c 6c 20 6f 6c 64 20 63 6f 70 69 65 73  s all old copies
5870: 2c 20 62 75 74 20 60 6e 65 77 60 20 6f 6e 6c 79  , but `new` only
5880: 20 6b 65 65 70 73 20 74 68 65 20 6d 6f 73 74 20   keeps the most 
5890: 72 65 63 65 6e 74 0a 63 6f 70 79 2e 20 20 54 68  recent.copy.  Th
58a0: 69 73 20 69 73 20 62 65 63 61 75 73 65 20 69 74  is is because it
58b0: 20 69 73 20 65 78 70 65 63 74 65 64 20 74 68 61   is expected tha
58c0: 74 20 74 68 65 20 60 6e 65 77 60 20 6f 70 74 69  t the `new` opti
58d0: 6f 6e 20 69 73 20 75 73 65 64 20 77 69 74 68 20  on is used with 
58e0: 74 68 65 20 65 78 70 65 63 74 61 74 69 6f 6e 0a  the expectation.
58f0: 74 68 61 74 20 6f 6c 64 20 63 6f 6e 74 65 6e 74  that old content
5900: 20 69 73 20 6e 6f 74 20 70 72 65 63 69 6f 75 73   is not precious
5910: 2c 20 62 75 74 20 74 68 61 74 20 77 65 20 68 61  , but that we ha
5920: 76 65 20 61 20 62 61 63 6b 73 74 6f 70 2e 20 20  ve a backstop.  
5930: 57 68 65 72 65 61 73 20 74 68 65 20 65 78 70 65  Whereas the expe
5940: 63 74 61 74 69 6f 6e 0a 6f 66 20 74 68 65 20 75  ctation.of the u
5950: 73 65 20 6f 66 20 60 70 72 65 73 65 72 76 65 60  se of `preserve`
5960: 20 69 73 20 74 68 61 74 20 61 6e 79 20 61 6e 64   is that any and
5970: 20 61 6c 6c 20 6f 6c 64 20 76 65 72 73 69 6f 6e   all old version
5980: 73 20 61 72 65 20 70 72 65 63 69 6f 75 73 20 61  s are precious a
5990: 6e 64 20 73 68 6f 75 6c 64 20 62 65 20 6c 65 66  nd should be lef
59a0: 74 0a 74 6f 20 61 20 70 65 72 73 6f 6e 20 65 78  t.to a person ex
59b0: 70 6c 69 63 69 74 6c 79 20 74 6f 20 64 65 6c 65  plicitly to dele
59c0: 74 65 2e 0a 0a 57 68 65 6e 20 6e 65 77 20 69 6d  te...When new im
59d0: 61 67 65 20 66 69 6c 65 73 20 61 72 65 20 63 72  age files are cr
59e0: 65 61 74 65 64 2c 20 73 6f 6d 65 20 73 6f 72 74  eated, some sort
59f0: 20 6f 66 20 69 6e 69 74 69 61 6c 69 7a 61 74 69   of initializati
5a00: 6f 6e 20 69 73 20 6e 65 63 65 73 73 61 72 79 20  on is necessary 
5a10: 62 65 66 6f 72 65 0a 66 69 6c 65 73 20 63 61 6e  before.files can
5a20: 20 62 65 20 77 72 69 74 74 65 6e 20 74 6f 20 74   be written to t
5a30: 68 65 6d 2e 20 20 41 6c 74 68 6f 75 67 68 20 74  hem.  Although t
5a40: 68 65 20 60 6e 65 77 60 20 61 6e 64 20 60 70 72  he `new` and `pr
5a50: 65 73 65 72 76 65 60 20 6f 70 74 69 6f 6e 73 20  eserve` options 
5a60: 63 6f 75 6c 64 20 68 61 76 65 0a 70 65 72 66 6f  could have.perfo
5a70: 72 6d 65 64 20 61 6e 20 4f 53 2f 38 20 60 5a 45  rmed an OS/8 `ZE
5a80: 52 4f 60 20 63 6f 6d 6d 61 6e 64 20 74 6f 20 69  RO` command to i
5a90: 6e 69 74 69 61 6c 69 7a 65 20 74 68 65 20 64 69  nitialize the di
5aa0: 72 65 63 74 6f 72 69 65 73 2c 20 69 74 20 77 61  rectories, it wa
5ab0: 73 20 64 65 63 69 64 65 64 0a 6e 6f 74 20 74 6f  s decided.not to
5ac0: 20 64 6f 20 73 6f 20 62 65 63 61 75 73 65 20 69   do so because i
5ad0: 6e 20 73 6f 6d 65 20 63 61 73 65 73 2c 20 74 68  n some cases, th
5ae0: 65 20 4f 53 2f 38 20 64 65 76 69 63 65 20 64 72  e OS/8 device dr
5af0: 69 76 65 72 73 20 72 65 71 75 69 72 65 64 20 74  ivers required t
5b00: 6f 20 70 65 72 66 6f 72 6d 0a 73 75 63 68 20 61  o perform.such a
5b10: 63 74 69 6f 6e 73 20 6d 69 67 68 74 20 6e 6f 74  ctions might not
5b20: 20 62 65 20 61 63 74 69 76 65 20 75 6e 74 69 6c   be active until
5b30: 20 66 61 72 74 68 65 72 20 64 6f 77 6e 20 69 6e   farther down in
5b40: 20 61 20 63 6f 6d 70 6c 65 78 20 73 63 72 69 70   a complex scrip
5b50: 74 2e 0a 0a 20 0a 23 23 23 23 20 60 6d 6f 75 6e  t... .#### `moun
5b60: 74 60 20 45 78 61 6d 70 6c 65 73 0a 0a 4d 6f 75  t` Examples..Mou
5b70: 6e 74 20 74 68 65 20 60 76 33 64 2e 72 6b 30 35  nt the `v3d.rk05
5b80: 60 20 69 6d 61 67 65 2c 20 74 6f 20 62 65 20 66  ` image, to be f
5b90: 6f 75 6e 64 20 69 6e 20 69 6e 20 74 68 65 20 69  ound in in the i
5ba0: 6e 73 74 61 6c 6c 20 64 69 72 65 63 74 6f 72 79  nstall directory
5bb0: 0a 66 6f 72 20 72 75 6e 61 62 6c 65 20 69 6d 61  .for runable ima
5bc0: 67 65 20 66 69 6c 65 73 2c 20 77 68 69 63 68 20  ge files, which 
5bd0: 6d 75 73 74 20 65 78 69 73 74 2c 20 6f 6e 20 53  must exist, on S
5be0: 49 4d 48 20 60 72 6b 30 60 2e 0a 0a 20 20 20 20  IMH `rk0`...    
5bf0: 6d 6f 75 6e 74 20 72 6b 30 20 24 62 69 6e 2f 76  mount rk0 $bin/v
5c00: 33 64 2e 72 6b 30 35 20 72 65 71 75 69 72 65 64  3d.rk05 required
5c10: 0a 0a 4d 6f 75 6e 74 20 74 68 65 20 60 61 64 76  ..Mount the `adv
5c20: 65 6e 74 2e 74 75 35 36 60 20 69 6d 61 67 65 2c  ent.tu56` image,
5c30: 20 74 6f 20 62 65 20 66 6f 75 6e 64 20 69 6e 20   to be found in 
5c40: 74 68 65 20 6d 65 64 69 61 20 69 6e 70 75 74 20  the media input 
5c50: 64 69 72 65 63 74 6f 72 79 2c 0a 77 68 69 63 68  directory,.which
5c60: 20 6d 75 73 74 20 65 78 69 73 74 2c 20 6f 6e 20   must exist, on 
5c70: 53 49 4d 48 20 60 64 74 31 60 20 69 6e 20 72 65  SIMH `dt1` in re
5c80: 61 64 20 6f 6e 6c 79 20 6d 6f 64 65 2c 20 77 68  ad only mode, wh
5c90: 69 63 68 20 77 69 6c 6c 20 70 72 6f 74 65 63 74  ich will protect
5ca0: 0a 69 74 20 66 72 6f 6d 20 69 6e 61 64 76 65 72  .it from inadver
5cb0: 74 65 6e 74 20 6d 6f 64 69 66 69 63 61 74 69 6f  tent modificatio
5cc0: 6e 2e 0a 0a 20 20 20 20 6d 6f 75 6e 74 20 64 74  n...    mount dt
5cd0: 31 20 24 6f 73 38 6d 69 2f 73 75 62 73 79 73 2f  1 $os8mi/subsys/
5ce0: 61 64 76 65 6e 74 2e 74 75 35 36 20 72 65 61 64  advent.tu56 read
5cf0: 6f 6e 6c 79 20 72 65 71 75 69 72 65 64 0a 0a 43  only required..C
5d00: 72 65 61 74 65 20 61 20 6e 65 77 20 69 6d 61 67  reate a new imag
5d10: 65 20 66 69 6c 65 20 69 6e 20 74 68 65 20 6d 65  e file in the me
5d20: 64 69 61 20 6f 75 74 70 75 74 20 64 69 72 65 63  dia output direc
5d30: 74 6f 72 79 2c 20 61 6e 64 20 6d 6f 75 6e 74 20  tory, and mount 
5d40: 69 74 20 6f 6e 0a 74 68 65 20 53 49 4d 48 20 60  it on.the SIMH `
5d50: 64 74 30 60 20 64 65 76 69 63 65 2e 0a 0a 20 20  dt0` device...  
5d60: 20 20 6d 6f 75 6e 74 20 64 74 30 20 24 6f 73 38    mount dt0 $os8
5d70: 6d 6f 2f 74 65 73 74 5f 63 6f 70 79 2e 74 75 35  mo/test_copy.tu5
5d80: 36 20 6e 65 77 0a 0a 43 72 65 61 74 65 20 61 20  6 new..Create a 
5d90: 77 72 69 74 65 61 62 6c 65 20 63 6f 70 79 20 6f  writeable copy o
5da0: 66 20 74 68 65 20 64 69 73 74 72 69 62 75 74 69  f the distributi
5db0: 6f 6e 20 44 45 43 74 61 70 65 2c 0a 60 61 6c 2d  on DECtape,.`al-
5dc0: 34 37 31 31 63 2d 62 61 2d 6f 73 38 2d 76 33 64  4711c-ba-os8-v3d
5dd0: 2d 31 2e 31 39 37 38 2e 74 75 35 36 60 2c 20 74  -1.1978.tu56`, t
5de0: 6f 20 62 65 20 66 6f 75 6e 64 20 69 6e 20 74 68  o be found in th
5df0: 65 20 6d 65 64 69 61 20 69 6e 70 75 74 20 64 69  e media input di
5e00: 72 65 63 74 6f 72 79 2c 0a 77 68 69 63 68 20 6d  rectory,.which m
5e10: 75 73 74 20 65 78 69 73 74 2e 20 20 4d 6f 75 6e  ust exist.  Moun
5e20: 74 20 69 74 20 6f 6e 20 53 49 4d 48 20 64 74 30  t it on SIMH dt0
5e30: 20 72 65 61 64 79 20 66 6f 72 20 66 6f 72 20 61   ready for for a
5e40: 20 72 65 61 64 2f 77 72 69 74 65 20 62 6f 6f 74   read/write boot
5e50: 2e 0a 44 65 6c 65 74 65 20 74 68 65 20 63 6f 70  ..Delete the cop
5e60: 79 20 77 68 65 6e 20 74 68 65 20 73 63 72 69 70  y when the scrip
5e70: 74 20 69 73 20 64 6f 6e 65 2e 0a 0a 20 20 20 20  t is done...    
5e80: 20 6d 6f 75 6e 74 20 64 74 30 20 24 6f 73 38 6d   mount dt0 $os8m
5e90: 69 2f 61 6c 2d 34 37 31 31 63 2d 62 61 2d 6f 73  i/al-4711c-ba-os
5ea0: 38 2d 76 33 64 2d 31 2e 31 39 37 38 2e 74 75 35  8-v3d-1.1978.tu5
5eb0: 36 20 72 65 71 75 69 72 65 64 20 73 63 72 61 74  6 required scrat
5ec0: 63 68 0a 0a 43 72 65 61 74 65 20 61 20 6e 65 77  ch..Create a new
5ed0: 20 69 6d 61 67 65 20 66 69 6c 65 20 60 73 79 73   image file `sys
5ee0: 74 65 6d 2e 74 75 35 36 60 20 69 6e 20 74 68 65  tem.tu56` in the
5ef0: 20 69 6e 73 74 61 6c 6c 20 64 69 72 65 63 74 6f   install directo
5f00: 72 20 66 6f 72 0a 72 75 6e 61 62 6c 65 20 69 6d  r for.runable im
5f10: 61 67 65 20 66 69 6c 65 73 2e 20 20 49 66 20 74  age files.  If t
5f20: 68 65 20 66 69 6c 65 20 61 6c 72 65 61 64 79 20  he file already 
5f30: 65 78 69 73 74 73 2c 20 63 72 65 61 74 65 20 61  exists, create a
5f40: 20 6e 65 77 0a 76 65 72 73 69 6f 6e 2e 20 20 49   new.version.  I
5f50: 66 20 74 68 65 20 6e 75 6d 62 65 72 65 64 20 76  f the numbered v
5f60: 65 72 73 69 6f 6e 20 66 69 6c 65 20 65 78 69 73  ersion file exis
5f70: 74 73 2c 20 6b 65 65 70 20 69 6e 63 72 65 6d 65  ts, keep increme
5f80: 6e 74 69 6e 67 20 74 68 65 0a 76 65 72 73 69 6f  nting the.versio
5f90: 6e 20 6e 75 6d 62 65 72 20 66 6f 72 20 74 68 65  n number for the
5fa0: 20 6e 65 77 20 66 69 6c 65 20 75 6e 74 69 6c 20   new file until 
5fb0: 61 20 70 72 65 2d 65 78 69 73 74 69 6e 67 20 66  a pre-existing f
5fc0: 69 6c 65 20 69 73 20 6e 6f 74 0a 66 6f 75 6e 64  ile is not.found
5fd0: 2e 0a 0a 46 6f 72 20 65 78 61 6d 70 6c 65 2c 20  ...For example, 
5fe0: 69 66 20 60 73 79 73 74 65 6d 2e 74 75 35 36 60  if `system.tu56`
5ff0: 20 77 61 73 20 6e 6f 74 20 66 6f 75 6e 64 2c 20   was not found, 
6000: 74 68 65 20 6e 65 77 20 66 69 6c 65 20 77 6f 75  the new file wou
6010: 6c 64 20 62 65 0a 63 61 6c 6c 65 64 20 60 73 79  ld be.called `sy
6020: 73 74 65 6d 2e 74 75 35 36 60 2e 20 20 49 66 20  stem.tu56`.  If 
6030: 69 74 20 77 61 73 20 66 6f 75 6e 64 20 74 68 65  it was found the
6040: 20 6e 65 78 74 20 76 65 72 73 69 6f 6e 20 77 6f   next version wo
6050: 75 6c 64 20 62 65 0a 63 61 6c 6c 65 64 20 60 73  uld be.called `s
6060: 79 73 74 65 6d 5f 31 2e 74 75 35 36 60 2e 20 20  ystem_1.tu56`.  
6070: 49 66 20 60 73 79 73 74 65 6d 5f 31 2e 74 75 35  If `system_1.tu5
6080: 36 60 20 61 6e 64 20 60 73 79 73 74 65 6d 5f 32  6` and `system_2
6090: 2e 74 75 35 36 60 20 77 65 72 65 0a 66 6f 75 6e  .tu56` were.foun
60a0: 64 20 74 68 65 20 6e 65 77 20 66 69 6c 65 20 77  d the new file w
60b0: 6f 75 6c 64 20 62 65 20 63 61 6c 6c 65 64 20 60  ould be called `
60c0: 73 79 73 74 65 6d 5f 33 2e 74 75 35 36 60 2c 20  system_3.tu56`, 
60d0: 61 6e 64 20 73 6f 20 6f 6e 2e 0a 0a 20 20 20 20  and so on...    
60e0: 20 6d 6f 75 6e 74 20 64 74 30 20 24 62 69 6e 2f   mount dt0 $bin/
60f0: 73 79 73 74 65 6d 2e 74 75 35 36 20 70 72 65 73  system.tu56 pres
6100: 65 72 76 65 0a 0a 54 68 65 20 60 70 72 65 73 65  erve..The `prese
6110: 72 76 65 60 20 6f 70 74 69 6f 6e 20 69 73 20 68  rve` option is h
6120: 65 6c 70 66 75 6c 20 77 68 65 6e 20 65 78 70 65  elpful when expe
6130: 72 69 6d 65 6e 74 69 6e 67 20 77 69 74 68 20 73  rimenting with s
6140: 63 72 69 70 74 73 20 74 68 61 74 20 6d 61 79 0a  cripts that may.
6150: 6e 6f 74 20 77 6f 72 6b 20 74 68 65 20 66 69 72  not work the fir
6160: 73 74 20 74 69 6d 65 2e 0a 0a 0a 23 23 23 20 3c  st time....### <
6170: 61 20 69 64 3d 22 75 6d 6f 75 6e 74 2d 63 6f 6d  a id="umount-com
6180: 6d 22 3e 3c 2f 61 3e 75 6d 6f 75 6e 74 20 e2 80  m"></a>umount â€
6190: 94 20 55 6e 6d 6f 75 6e 74 20 61 20 53 49 4d 48  ” Unmount a SIMH
61a0: 20 61 74 74 61 63 68 65 64 20 64 65 76 69 63 65   attached device
61b0: 20 69 6d 61 67 65 2e 0a 0a 60 75 6d 6f 75 6e 74   image...`umount
61c0: 60 20 5f 73 69 6d 68 2d 64 65 76 69 63 65 5f 0a  ` _simh-device_.
61d0: 0a 54 68 69 73 20 69 73 20 6a 75 73 74 20 61 20  .This is just a 
61e0: 77 72 61 70 70 65 72 20 66 6f 72 20 74 68 65 20  wrapper for the 
61f0: 53 49 4d 48 20 60 64 65 74 61 63 68 60 20 63 6f  SIMH `detach` co
6200: 6d 6d 61 6e 64 2e 0a 0a 48 65 72 65 20 69 73 20  mmand...Here is 
6210: 74 68 65 20 72 61 74 69 6f 6e 61 6c 65 20 66 6f  the rationale fo
6220: 72 20 68 61 76 69 6e 67 20 61 64 64 65 64 20 61  r having added a
6230: 20 60 75 6d 6f 75 6e 74 60 20 63 6f 6d 6d 61 6e   `umount` comman
6240: 64 20 69 6e 73 74 65 61 64 20 6f 66 0a 6a 75 73  d instead of.jus
6250: 74 20 63 61 6c 6c 69 6e 67 20 74 68 65 20 60 64  t calling the `d
6260: 65 74 61 63 68 60 20 63 6f 6d 6d 61 6e 64 20 66  etach` command f
6270: 72 6f 6d 20 53 49 4d 48 20 62 79 20 69 74 73 20  rom SIMH by its 
6280: 6f 77 6e 20 73 61 6d 65 20 6e 61 6d 65 3a 0a 0a  own same name:..
6290: 53 74 61 72 74 69 6e 67 20 66 72 6f 6d 20 74 68  Starting from th
62a0: 65 20 69 64 65 61 20 6f 66 20 70 72 6f 76 69 64  e idea of provid
62b0: 69 6e 67 20 73 6f 6d 65 20 61 62 73 74 72 61 63  ing some abstrac
62c0: 74 20 62 75 74 20 75 73 65 66 75 6c 20 61 63 74  t but useful act
62d0: 69 6f 6e 73 0a 74 6f 20 74 61 6b 65 20 61 72 6f  ions.to take aro
62e0: 75 6e 64 20 74 68 65 20 53 49 4d 48 20 60 61 74  und the SIMH `at
62f0: 74 61 63 68 60 20 63 6f 6d 6d 61 6e 64 2c 20 74  tach` command, t
6300: 68 65 20 64 65 63 69 73 69 6f 6e 20 77 61 73 20  he decision was 
6310: 6d 61 64 65 20 74 6f 0a 6c 65 61 6e 20 6f 6e 20  made to.lean on 
6320: 74 68 65 20 50 4f 53 49 58 20 20 60 6d 6f 75 6e  the POSIX  `moun
6330: 74 60 20 63 6f 6d 6d 61 6e 64 20 62 65 63 61 75  t` command becau
6340: 73 65 20 70 65 6f 70 6c 65 20 66 61 6d 69 6c 69  se people famili
6350: 61 72 20 77 69 74 68 0a 60 6d 6f 75 6e 74 60 20  ar with.`mount` 
6360: 77 65 72 65 20 75 73 65 64 20 74 6f 20 68 61 6e  were used to han
6370: 67 69 6e 67 20 6c 6f 74 73 20 6f 66 20 64 69 66  ging lots of dif
6380: 66 65 72 65 6e 74 20 61 62 73 74 72 61 63 74 20  ferent abstract 
6390: 62 75 74 20 75 73 65 66 75 6c 0a 61 63 74 69 6f  but useful.actio
63a0: 6e 73 20 6f 66 66 20 6f 66 20 69 74 2e 0a 0a 60  ns off of it...`
63b0: 75 6d 6f 75 6e 74 60 20 77 61 73 20 61 64 6f 70  umount` was adop
63c0: 74 65 64 20 61 73 20 5f 77 68 61 74 20 70 65 6f  ted as _what peo
63d0: 70 6c 65 20 66 61 6d 69 6c 69 61 72 20 77 69 74  ple familiar wit
63e0: 68 20 60 6d 6f 75 6e 74 60 20 77 6f 75 6c 64 0a  h `mount` would.
63f0: 65 78 70 65 63 74 20 61 73 20 74 68 65 20 63 6f  expect as the co
6400: 6d 6d 61 6e 64 20 74 6f 20 75 6e 64 6f 20 77 68  mmand to undo wh
6410: 61 74 20 60 6d 6f 75 6e 74 60 20 68 61 64 20 64  at `mount` had d
6420: 6f 6e 65 5f 2e 20 54 68 69 73 20 73 65 65 6d 65  one_. This seeme
6430: 64 0a 70 72 65 66 65 72 61 62 6c 65 20 74 6f 20  d.preferable to 
6440: 69 6e 76 65 6e 74 69 6e 67 20 5f 60 61 74 74 61  inventing _`atta
6450: 63 68 60 20 77 69 74 68 20 6d 6f 72 65 20 66 65  ch` with more fe
6460: 61 74 75 72 65 73 5f 20 61 73 20 61 20 77 68 6f  atures_ as a who
6470: 6c 6c 79 0a 6e 65 77 20 73 79 6e 74 61 63 74 69  lly.new syntacti
6480: 63 2f 73 65 6d 61 6e 74 69 63 20 64 65 73 69 67  c/semantic desig
6490: 6e 2e 0a 0a 0a 23 23 23 20 3c 61 20 69 64 3d 22  n....### <a id="
64a0: 62 6f 6f 74 2d 63 6f 6d 6d 22 3e 3c 2f 61 3e 60  boot-comm"></a>`
64b0: 62 6f 6f 74 60 20 e2 80 94 20 42 6f 6f 74 20 74  boot` — Boot t
64c0: 68 65 20 6e 61 6d 65 64 20 53 49 4d 48 20 64 65  he named SIMH de
64d0: 76 69 63 65 2e 0a 0a 60 62 6f 6f 74 60 20 5f 73  vice...`boot` _s
64e0: 69 6d 68 2d 64 65 76 69 63 65 5f 0a 0a 42 6f 6f  imh-device_..Boo
64f0: 74 20 4f 53 2f 38 20 6f 6e 20 74 68 65 20 6e 61  t OS/8 on the na
6500: 6d 65 64 20 5f 73 69 6d 68 2d 64 65 76 69 63 65  med _simh-device
6510: 5f 20 61 6e 64 20 65 6e 74 65 72 20 74 68 65 20  _ and enter the 
6520: 4f 53 2f 38 20 72 75 6e 2d 74 69 6d 65 20 63 6f  OS/8 run-time co
6530: 6e 74 65 78 74 2e 0a 0a 54 68 65 20 60 62 6f 6f  ntext...The `boo
6540: 74 60 20 63 6f 6d 6d 61 6e 64 20 74 65 73 74 73  t` command tests
6550: 20 74 6f 20 73 65 65 20 69 66 20 73 6f 6d 65 74   to see if somet
6560: 68 69 6e 67 20 69 73 20 61 74 74 61 63 68 65 64  hing is attached
6570: 20 74 6f 20 74 68 65 0a 53 49 4d 48 20 62 65 69   to the.SIMH bei
6580: 6e 67 20 62 6f 6f 74 65 64 2e 20 20 49 66 20 6e  ng booted.  If n
6590: 6f 74 68 69 6e 67 20 69 73 20 61 74 74 61 63 68  othing is attach
65a0: 65 64 2c 20 74 68 65 20 63 6f 6d 6d 61 6e 64 20  ed, the command 
65b0: 66 61 69 6c 73 20 77 69 74 68 20 61 0a 66 61 74  fails with a.fat
65c0: 61 6c 20 65 72 72 6f 72 2e 0a 0a 54 68 69 73 20  al error...This 
65d0: 74 65 73 74 20 64 6f 65 73 20 6e 6f 74 20 70 72  test does not pr
65e0: 6f 74 65 63 74 20 61 67 61 69 6e 73 74 20 74 72  otect against tr
65f0: 79 69 6e 67 20 74 6f 20 62 6f 6f 74 20 61 6e 20  ying to boot an 
6600: 69 6d 61 67 65 20 6c 61 63 6b 69 6e 67 20 61 0a  image lacking a.
6610: 73 79 73 74 65 6d 20 61 72 65 61 20 61 6e 64 20  system area and 
6620: 74 68 75 73 20 6e 6f 74 20 62 6f 6f 74 61 62 6c  thus not bootabl
6630: 65 2e 20 20 54 68 69 73 20 63 61 6e 27 74 20 62  e.  This can't b
6640: 65 20 74 65 73 74 65 64 20 69 6e 20 61 64 76 61  e tested in adva
6650: 6e 63 65 0a 62 65 63 61 75 73 65 20 62 6f 6f 74  nce.because boot
6660: 69 6e 67 20 61 20 6e 6f 6e 2d 62 6f 6f 74 61 62  ing a non-bootab
6670: 6c 65 20 69 6d 61 67 65 20 73 69 6d 70 6c 79 20  le image simply 
6680: 68 61 6e 67 73 20 74 68 65 20 76 69 72 74 75 61  hangs the virtua
6690: 6c 20 6d 61 63 68 69 6e 65 2e 0a 48 65 72 6f 69  l machine..Heroi
66a0: 63 20 6d 65 61 73 75 72 65 73 2c 20 6c 69 6b 65  c measures, like
66b0: 20 6c 6f 6f 6b 69 6e 67 20 66 6f 72 20 6d 61 67   looking for mag
66c0: 69 63 20 73 79 73 74 65 6d 20 61 72 65 61 20 62  ic system area b
66d0: 69 74 73 20 69 6e 20 74 68 65 20 69 6d 61 67 65  its in the image
66e0: 0a 66 69 6c 65 20 77 65 72 65 20 64 65 65 6d 65  .file were deeme
66f0: 64 20 74 6f 6f 20 6d 75 63 68 20 77 6f 72 6b 2e  d too much work.
6700: 0a 0a 49 66 20 61 6e 20 61 74 74 65 6d 70 74 20  ..If an attempt 
6710: 69 73 20 6d 61 64 65 20 74 6f 20 62 6f 6f 74 20  is made to boot 
6720: 61 6e 20 69 6d 61 67 65 20 77 69 74 68 20 6e 6f  an image with no
6730: 20 73 79 73 74 65 6d 20 61 72 65 61 2c 20 60 6f   system area, `o
6740: 73 38 2d 72 75 6e 60 0a 68 61 6e 67 73 20 66 6f  s8-run`.hangs fo
6750: 72 20 61 20 77 68 69 6c 65 20 61 6e 64 20 74 68  r a while and th
6760: 65 6e 20 67 69 76 65 73 20 61 20 74 69 6d 65 6f  en gives a timeo
6770: 75 74 20 62 61 63 6b 74 72 61 63 65 2e 0a 0a 0a  ut backtrace....
6780: 23 23 23 20 3c 61 20 69 64 3d 22 72 65 73 75 6d  ### <a id="resum
6790: 65 2d 63 6f 6d 6d 22 3e 3c 2f 61 3e 60 72 65 73  e-comm"></a>`res
67a0: 75 6d 65 60 20 e2 80 94 20 52 65 73 75 6d 65 20  ume` — Resume 
67b0: 4f 53 2f 38 20 61 74 20 4b 65 79 62 6f 61 72 64  OS/8 at Keyboard
67c0: 20 4d 6f 6e 69 74 6f 72 20 63 6f 6d 6d 61 6e 64   Monitor command
67d0: 20 6c 65 76 65 6c 2e 0a 0a 60 72 65 73 75 6d 65   level...`resume
67e0: 60 0a 0a 54 68 65 20 6c 65 61 73 74 20 64 69 73  `..The least dis
67f0: 72 75 70 74 69 76 65 20 77 61 79 20 74 6f 20 72  ruptive way to r
6800: 65 73 75 6d 65 20 6f 70 65 72 61 74 69 6f 6e 73  esume operations
6810: 20 75 6e 64 65 72 20 53 49 4d 48 20 69 73 20 74   under SIMH is t
6820: 6f 20 69 73 73 75 65 0a 74 68 65 20 60 63 6f 6e  o issue.the `con
6830: 74 69 6e 75 65 60 20 63 6f 6d 6d 61 6e 64 2e 20  tinue` command. 
6840: 41 6c 74 68 6f 75 67 68 20 69 74 20 74 6f 6f 6b  Although it took
6850: 20 61 20 77 68 69 6c 65 2c 20 77 65 20 66 69 6e   a while, we fin
6860: 61 6c 6c 79 20 67 6f 74 20 74 68 69 73 0a 63 6f  ally got this.co
6870: 6d 6d 61 6e 64 20 77 6f 72 6b 69 6e 67 20 72 65  mmand working re
6880: 6c 69 61 62 6c 79 2e 20 20 54 68 65 72 65 20 77  liably.  There w
6890: 65 72 65 20 74 69 6d 69 6e 67 20 61 6e 64 20 77  ere timing and w
68a0: 6f 72 6b 66 6c 6f 77 20 69 73 73 75 65 73 0a 74  orkflow issues.t
68b0: 68 61 74 20 68 61 64 20 74 6f 20 62 65 20 72 65  hat had to be re
68c0: 73 6f 6c 76 65 64 2e 0a 0a 54 68 65 20 60 72 65  solved...The `re
68d0: 73 75 6d 65 60 20 63 6f 6d 6d 61 6e 64 20 63 68  sume` command ch
68e0: 65 63 6b 73 20 74 6f 20 73 65 65 20 69 66 20 4f  ecks to see if O
68f0: 53 2f 38 20 68 61 73 20 62 65 65 6e 20 62 6f 6f  S/8 has been boo
6900: 74 65 64 20 61 6e 64 20 72 65 66 75 73 65 73 0a  ted and refuses.
6910: 74 6f 20 61 63 74 20 69 66 20 69 74 20 68 61 73  to act if it has
6920: 20 6e 6f 74 2e 0a 0a 0a 23 23 23 20 3c 61 20 69   not....### <a i
6930: 64 3d 22 72 65 73 74 61 72 74 2d 63 6f 6d 6d 22  d="restart-comm"
6940: 3e 3c 2f 61 3e 60 72 65 73 74 61 72 74 60 20 e2  ></a>`restart` â
6950: 80 94 20 52 65 73 74 61 72 74 20 4f 53 2f 38 2e  €” Restart OS/8.
6960: 0a 0a 60 72 65 73 74 61 72 74 60 0a 0a 45 71 75  ..`restart`..Equ
6970: 69 76 61 6c 65 6e 74 20 74 6f 20 74 68 65 20 53  ivalent to the S
6980: 49 4d 48 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65  IMH command line
6990: 20 6f 66 20 5c 22 60 67 6f 20 37 36 30 30 60 5c   of \"`go 7600`\
69a0: 22 2c 20 62 75 74 20 77 68 69 63 68 20 63 6f 6e  ", but which con
69b0: 66 69 72 6d 73 0a 77 65 20 67 6f 74 20 6f 75 72  firms.we got our
69c0: 20 4d 6f 6e 69 74 6f 72 20 70 72 6f 6d 70 74 2e   Monitor prompt.
69d0: 0a 0a 42 65 66 6f 72 65 20 60 72 65 73 75 6d 65  ..Before `resume
69e0: 60 20 77 61 73 20 64 65 76 65 6c 6f 70 65 64 2c  ` was developed,
69f0: 20 74 68 65 20 6e 65 78 74 20 6c 65 73 73 20 64   the next less d
6a00: 69 73 72 75 70 74 69 76 65 20 77 61 79 20 74 6f  isruptive way to
6a10: 20 67 65 74 20 61 6e 0a 4f 53 2f 38 20 4b 65 79   get an.OS/8 Key
6a20: 62 6f 61 72 64 20 4d 6f 6e 69 74 6f 72 20 70 72  board Monitor pr
6a30: 6f 6d 70 74 20 77 61 73 20 74 6f 20 72 65 73 74  ompt was to rest
6a40: 61 72 74 20 53 49 4d 48 20 61 74 20 61 64 64 72  art SIMH at addr
6a50: 65 73 73 20 30 37 36 30 30 2e 0a 54 68 69 73 20  ess 07600..This 
6a60: 69 73 20 63 6f 6e 73 69 64 65 72 65 64 20 61 20  is considered a 
6a70: 73 6f 66 74 2d 72 65 73 74 61 72 74 20 6f 66 20  soft-restart of 
6a80: 4f 53 2f 38 2e 20 20 49 74 20 69 73 20 6c 65 73  OS/8.  It is les
6a90: 73 20 64 69 73 72 75 70 74 69 76 65 20 74 68 61  s disruptive tha
6aa0: 6e 0a 61 20 60 62 6f 6f 74 60 20 63 6f 6d 6d 61  n.a `boot` comma
6ab0: 6e 64 2c 20 62 65 63 61 75 73 65 20 74 68 65 20  nd, because the 
6ac0: 60 62 6f 6f 74 60 20 63 6f 6d 6d 61 6e 64 20 6c  `boot` command l
6ad0: 6f 61 64 73 20 4f 53 2f 38 20 69 6e 74 6f 20 6d  oads OS/8 into m
6ae0: 61 69 6e 0a 6d 65 6d 6f 72 79 20 66 72 6f 6d 20  ain.memory from 
6af0: 74 68 65 20 62 6f 6f 74 20 64 65 76 69 63 65 2c  the boot device,
6b00: 20 77 68 65 72 65 61 73 20 72 65 73 74 61 72 74   whereas restart
6b10: 69 6e 67 20 61 74 20 6c 6f 63 61 74 69 6f 6e 20  ing at location 
6b20: 30 37 36 30 30 20 69 73 0a 6a 75 73 74 20 61 20  07600 is.just a 
6b30: 72 65 73 61 72 74 20 77 69 74 68 6f 75 74 20 61  resart without a
6b40: 20 72 65 6c 6f 61 64 2e 0a 0a 54 68 65 20 60 72   reload...The `r
6b50: 65 73 74 61 72 74 60 20 63 6f 6d 6d 61 6e 64 20  estart` command 
6b60: 63 68 65 63 6b 73 20 74 6f 20 73 65 65 20 69 66  checks to see if
6b70: 20 4f 53 2f 38 20 68 61 73 20 62 65 65 6e 20 62   OS/8 has been b
6b80: 6f 6f 74 65 64 20 61 6e 64 20 72 65 66 75 73 65  ooted and refuse
6b90: 73 0a 74 6f 20 61 63 74 20 69 66 20 69 74 20 68  s.to act if it h
6ba0: 61 73 20 6e 6f 74 2e 0a 0a 0a 23 23 23 20 3c 61  as not....### <a
6bb0: 20 69 64 3d 22 63 6f 70 79 2d 63 6f 6d 6d 22 3e   id="copy-comm">
6bc0: 3c 2f 61 3e 60 63 6f 70 79 60 20 e2 80 94 20 4d  </a>`copy` — M
6bd0: 61 6b 65 20 61 20 63 6f 70 79 20 6f 66 20 61 20  ake a copy of a 
6be0: 50 4f 53 49 58 20 66 69 6c 65 2e 0a 0a 60 63 6f  POSIX file...`co
6bf0: 70 79 60 20 5f 73 6f 75 72 63 65 2d 70 61 74 68  py` _source-path
6c00: 5f 20 5f 64 65 73 74 69 6e 61 74 69 6f 6e 2d 70  _ _destination-p
6c10: 61 74 68 5f 0a 0a 54 68 65 20 6d 6f 73 74 20 63  ath_..The most c
6c20: 6f 6d 6d 6f 6e 20 61 63 74 69 76 69 74 79 20 66  ommon activity f
6c30: 6f 72 20 60 6f 73 38 2d 72 75 6e 60 20 69 73 20  or `os8-run` is 
6c40: 74 6f 20 6d 6f 64 69 66 79 20 61 20 73 79 73 74  to modify a syst
6c50: 65 6d 20 69 6d 61 67 65 2e 0a 0a 48 6f 77 65 76  em image...Howev
6c60: 65 72 2c 20 77 65 20 6f 66 74 65 6e 20 77 61 6e  er, we often wan
6c70: 74 20 74 6f 20 6b 65 65 70 20 74 68 65 20 6f 72  t to keep the or
6c80: 69 67 69 6e 61 6c 20 61 6e 64 20 6d 6f 64 69 66  iginal and modif
6c90: 79 20 61 20 63 6f 70 79 2e 0a 46 6f 72 20 65 78  y a copy..For ex
6ca0: 61 6d 70 6c 65 2c 20 74 68 65 20 50 69 44 50 2d  ample, the PiDP-
6cb0: 38 2f 49 20 73 6f 66 74 77 61 72 65 20 62 75 69  8/I software bui
6cc0: 6c 64 20 73 79 73 74 65 6d 20 63 72 65 61 74 65  ld system create
6cd0: 73 20 74 68 65 20 64 65 66 61 75 6c 74 0a 4f 53  s the default.OS
6ce0: 2f 38 20 52 4b 30 35 20 64 69 73 6b 20 69 6d 61  /8 RK05 disk ima
6cf0: 67 65 20 60 76 33 64 2e 72 6b 30 35 60 2c 20 77  ge `v3d.rk05`, w
6d00: 68 69 63 68 20 69 6e 20 74 75 72 6e 20 69 73 20  hich in turn is 
6d10: 61 20 6d 6f 64 69 66 69 65 64 20 76 65 72 73 69  a modified versi
6d20: 6f 6e 0a 6f 66 20 60 76 33 64 2d 64 69 73 74 2e  on.of `v3d-dist.
6d30: 72 6b 30 35 60 2e 20 20 57 65 20 6b 65 65 70 20  rk05`.  We keep 
6d40: 74 68 65 20 6c 61 74 74 65 72 20 61 72 6f 75 6e  the latter aroun
6d50: 64 20 73 6f 20 77 65 20 64 6f 6e 27 74 20 68 61  d so we don't ha
6d60: 76 65 20 74 6f 0a 6b 65 65 70 20 72 65 62 75 69  ve to.keep rebui
6d70: 6c 64 69 6e 67 20 74 68 65 20 62 61 73 65 6c 69  lding the baseli
6d80: 6e 65 2e 0a 0a 49 6e 73 74 65 61 64 20 6f 66 20  ne...Instead of 
6d90: 72 65 71 75 69 72 69 6e 67 20 73 6f 6d 65 20 65  requiring some e
6da0: 78 74 65 72 6e 61 6c 20 63 61 6c 6c 65 72 20 74  xternal caller t
6db0: 6f 20 63 61 72 65 66 75 6c 6c 79 20 70 72 65 73  o carefully pres
6dc0: 65 72 76 65 20 74 68 65 0a 6f 6c 64 20 66 69 6c  erve the.old fil
6dd0: 65 2c 20 74 68 65 20 22 6d 61 6b 65 20 61 20 63  e, the "make a c
6de0: 6f 70 79 20 77 69 74 68 20 61 72 62 69 74 72 61  opy with arbitra
6df0: 72 79 20 6e 61 6d 65 22 20 66 75 6e 63 74 69 6f  ry name" functio
6e00: 6e 61 6c 69 74 79 20 77 61 73 0a 61 64 64 65 64  nality was.added
6e10: 20 62 79 20 77 61 79 20 6f 66 20 74 68 69 73 20   by way of this 
6e20: 63 6f 6d 6d 61 6e 64 2e 0a 0a 41 64 64 69 6e 67  command...Adding
6e30: 20 61 6e 20 6f 70 74 69 6f 6e 20 74 6f 20 60 6d   an option to `m
6e40: 6f 75 6e 74 60 20 77 61 73 20 63 6f 6e 73 69 64  ount` was consid
6e50: 65 72 65 64 2c 20 62 75 74 20 69 6e 20 74 68 65  ered, but in the
6e60: 20 69 6e 74 65 72 65 73 74 73 0a 6f 66 20 61 6c   interests.of al
6e70: 6c 6f 77 69 6e 67 20 61 6e 20 61 72 62 69 74 72  lowing an arbitr
6e80: 61 72 79 20 6e 61 6d 65 20 66 6f 72 20 74 68 65  ary name for the
6e90: 20 6d 6f 64 69 66 69 65 64 20 69 6d 61 67 65 2c   modified image,
6ea0: 20 61 20 73 65 70 61 72 61 74 65 0a 63 6f 6d 6d   a separate.comm
6eb0: 61 6e 64 20 77 61 73 20 63 72 65 61 74 65 64 2e  and was created.
6ec0: 0a 0a 0a 23 23 23 20 3c 61 20 69 64 3d 22 63 6f  ...### <a id="co
6ed0: 70 79 2d 74 6f 2d 63 6f 6d 6d 22 3e 3c 2f 61 3e  py-to-comm"></a>
6ee0: 60 63 70 74 6f 60 20 e2 80 94 20 43 6f 70 79 20  `cpto` — Copy 
6ef0: 50 4f 53 49 58 20 66 69 6c 65 20 2a 74 6f 2a 20  POSIX file *to* 
6f00: 4f 53 2f 38 20 65 6e 76 69 72 6f 6e 6d 65 6e 74  OS/8 environment
6f10: 2e 0a 0a 60 63 70 74 6f 60 20 5f 70 6f 73 69 78  ...`cpto` _posix
6f20: 2d 70 61 74 68 5f 20 5b 5f 6f 70 74 69 6f 6e 5f  -path_ [_option_
6f30: 5d 0a 0a 60 63 70 74 6f 60 20 5f 70 6f 73 69 78  ]..`cpto` _posix
6f40: 2d 70 61 74 68 5f 20 5f 6f 73 38 2d 66 69 6c 65  -path_ _os8-file
6f50: 73 70 65 63 5f 20 5b 5f 6f 70 74 69 6f 6e 5f 5d  spec_ [_option_]
6f60: 0a 0a 54 68 65 20 6f 70 74 69 6f 6e 20 69 73 20  ..The option is 
6f70: 65 69 74 68 65 72 20 65 6d 70 74 79 20 6f 72 20  either empty or 
6f80: 65 78 61 63 74 6c 79 20 6f 6e 65 20 6f 66 0a 0a  exactly one of..
6f90: 7c 20 60 2f 41 60 20 7c 20 4f 53 2f 38 20 60 50  | `/A` | OS/8 `P
6fa0: 49 50 60 20 41 53 43 49 49 20 66 6f 72 6d 61 74  IP` ASCII format
6fb0: 2e 20 50 4f 53 49 58 20 6e 65 77 6c 69 6e 65 73  . POSIX newlines
6fc0: 20 61 72 65 20 63 6f 6e 76 65 72 74 65 64 20 74   are converted t
6fd0: 6f 20 4f 53 2f 38 20 6e 65 77 6c 69 6e 65 73 2e  o OS/8 newlines.
6fe0: 0a 7c 20 60 2f 42 60 20 7c 20 4f 53 2f 38 20 60  .| `/B` | OS/8 `
6ff0: 50 49 50 60 20 60 42 49 4e 60 20 66 6f 72 6d 61  PIP` `BIN` forma
7000: 74 2e 20 50 61 70 65 72 20 74 61 70 65 20 6c 65  t. Paper tape le
7010: 61 64 65 72 2f 74 72 61 69 6c 65 72 20 6d 61 79  ader/trailer may
7020: 20 62 65 20 61 64 64 65 64 2e 0a 7c 20 60 2f 49   be added..| `/I
7030: 60 20 7c 20 4f 53 2f 38 20 60 50 49 50 60 20 69  ` | OS/8 `PIP` i
7040: 6d 61 67 65 20 66 6f 72 6d 61 74 2e 20 42 69 74  mage format. Bit
7050: 20 66 6f 72 20 42 69 74 20 63 6f 70 79 2e 0a 0a   for Bit copy...
7060: 49 66 20 6e 6f 20 6f 70 74 69 6f 6e 20 69 73 20  If no option is 
7070: 73 70 65 63 69 66 69 65 64 2c 20 60 2f 41 60 20  specified, `/A` 
7080: 69 73 20 61 73 73 75 6d 65 64 2e 0a 0a 2a 2a 49  is assumed...**I
7090: 4d 50 4f 52 54 41 4e 54 3a 2a 2a 20 42 65 63 61  MPORTANT:** Beca
70a0: 75 73 65 20 77 65 20 61 72 65 20 70 61 72 73 69  use we are parsi
70b0: 6e 67 20 62 6f 74 68 20 4f 53 2f 38 20 61 6e 64  ng both OS/8 and
70c0: 20 50 4f 53 49 58 20 66 69 6c 65 20 73 70 65 63   POSIX file spec
70d0: 69 66 69 63 61 74 69 6f 6e 73 2c 0a 77 65 20 63  ifications,.we c
70e0: 61 6e 27 74 20 6a 75 73 74 20 70 61 72 73 65 20  an't just parse 
70f0: 6f 75 74 20 74 68 65 20 73 6c 61 73 68 20 69 6e  out the slash in
7100: 20 74 68 65 20 6f 70 74 69 6f 6e 73 2e 20 4f 70   the options. Op
7110: 74 69 6f 6e 73 20 6d 75 73 74 20 62 65 20 70 72  tions must be pr
7120: 65 63 65 64 65 64 20 77 69 74 68 0a 77 68 69 74  eceded with.whit
7130: 65 73 70 61 63 65 2e 20 4f 74 68 65 72 77 69 73  espace. Otherwis
7140: 65 20 69 74 20 77 6f 75 6c 64 20 62 65 20 6d 69  e it would be mi
7150: 73 2d 70 61 72 73 65 64 20 61 73 20 70 61 72 74  s-parsed as part
7160: 20 6f 66 20 61 20 66 69 6c 65 20 73 70 65 63 2e   of a file spec.
7170: 0a 0a 49 6e 20 74 68 65 20 66 69 72 73 74 20 66  ..In the first f
7180: 6f 72 6d 20 6f 66 20 74 68 65 20 63 6f 6d 6d 61  orm of the comma
7190: 6e 64 2c 20 74 68 65 20 4f 53 2f 38 20 66 69 6c  nd, the OS/8 fil
71a0: 65 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 20  e specification 
71b0: 69 73 20 6c 65 66 74 0a 6f 75 74 2c 20 61 6e 64  is left.out, and
71c0: 20 6f 6e 65 20 69 73 20 73 79 6e 74 68 65 73 69   one is synthesi
71d0: 7a 65 64 20 66 72 6f 6d 20 74 68 65 20 66 69 6c  zed from the fil
71e0: 65 20 63 6f 6d 70 6f 6e 65 6e 74 20 6f 66 20 74  e component of t
71f0: 68 65 20 5f 70 6f 73 69 78 2d 70 61 74 68 5f 2e  he _posix-path_.
7200: 0a 0a 54 68 69 73 20 69 73 20 68 6f 77 20 79 6f  ..This is how yo
7210: 75 20 67 65 74 20 66 69 6c 65 73 20 2a 74 6f 2a  u get files *to*
7220: 20 4f 53 2f 38 20 66 72 6f 6d 20 74 68 65 20 6f   OS/8 from the o
7230: 75 74 73 69 64 65 20 77 6f 72 6c 64 2e 20 20 46  utside world.  F
7240: 6f 72 0a 65 78 61 6d 70 6c 65 2c 20 74 68 69 73  or.example, this
7250: 20 65 6e 61 62 6c 65 73 20 73 6f 75 72 63 65 20   enables source 
7260: 63 6f 64 65 20 6d 61 6e 61 67 65 6d 65 6e 74 20  code management 
7270: 75 73 69 6e 67 20 6d 6f 64 65 72 6e 20 74 6f 6f  using modern too
7280: 6c 73 2e 20 20 54 68 65 0a 62 75 69 6c 64 65 72  ls.  The.builder
7290: 20 73 63 72 69 70 74 20 77 6f 75 6c 64 20 63 68   script would ch
72a0: 65 63 6b 20 6f 75 74 20 74 68 65 20 6c 61 74 65  eck out the late
72b0: 73 74 20 73 6f 75 72 63 65 20 61 6e 64 20 75 73  st source and us
72c0: 65 20 61 6e 20 60 6f 73 38 2d 72 75 6e 60 0a 73  e an `os8-run`.s
72d0: 63 72 69 70 74 20 62 65 67 69 6e 6e 69 6e 67 20  cript beginning 
72e0: 77 69 74 68 20 61 20 60 63 70 74 6f 60 20 63 6f  with a `cpto` co
72f0: 6d 6d 61 6e 64 20 74 6f 20 73 65 6e 64 20 69 74  mmand to send it
7300: 20 74 6f 20 4f 53 2f 38 20 66 6f 72 0a 61 73 73   to OS/8 for.ass
7310: 65 6d 62 6c 79 2c 20 6c 69 6e 6b 69 6e 67 2c 20  embly, linking, 
7320: 69 6e 73 74 61 6c 6c 61 74 69 6f 6e 2c 20 65 74  installation, et
7330: 63 2e 0a 0a 45 78 61 6d 70 6c 65 3a 0a 0a 43 6f  c...Example:..Co
7340: 70 79 20 61 20 50 4f 53 49 58 20 66 69 6c 65 20  py a POSIX file 
7350: 69 6e 69 74 2e 63 6d 20 6f 6e 74 6f 20 74 68 65  init.cm onto the
7360: 20 64 65 66 61 75 6c 74 20 4f 53 2f 38 20 64 65   default OS/8 de
7370: 76 69 63 65 20 60 44 53 4b 3a 60 20 75 6e 64 65  vice `DSK:` unde
7380: 72 20 74 68 65 20 6e 61 6d 65 20 60 49 4e 49 54  r the name `INIT
7390: 2e 43 4d 60 3a 0a 0a 20 20 20 20 20 63 70 74 6f  .CM`:..     cpto
73a0: 20 2e 2e 2f 6d 65 64 69 61 2f 6f 73 38 2f 69 6e   ../media/os8/in
73b0: 69 74 2e 63 6d 0a 0a 0a 23 23 23 20 3c 61 20 69  it.cm...### <a i
73c0: 64 3d 22 63 6f 70 79 2d 66 72 6f 6d 2d 63 6f 6d  d="copy-from-com
73d0: 6d 22 3e 3c 2f 61 3e 60 63 70 66 72 6f 6d 60 20  m"></a>`cpfrom` 
73e0: e2 80 94 20 43 6f 70 79 20 2a 66 72 6f 6d 2a 20  — Copy *from* 
73f0: 4f 53 2f 38 20 74 6f 20 61 20 66 69 6c 65 20 69  OS/8 to a file i
7400: 6e 20 50 4f 53 49 58 20 65 6e 76 69 72 6f 6e 6d  n POSIX environm
7410: 65 6e 74 2e 20 0a 0a 60 63 70 66 72 6f 6d 60 5f  ent. ..`cpfrom`_
7420: 6f 73 38 2d 66 69 6c 65 73 70 65 63 5f 20 5f 70  os8-filespec_ _p
7430: 6f 73 69 78 2d 70 61 74 68 5f 20 5b 5f 6f 70 74  osix-path_ [_opt
7440: 69 6f 6e 5f 5d 0a 0a 54 68 65 20 6f 70 74 69 6f  ion_]..The optio
7450: 6e 20 69 73 20 65 69 74 68 65 72 20 65 6d 70 74  n is either empt
7460: 79 20 6f 72 20 65 78 61 63 74 6c 79 20 6f 6e 65  y or exactly one
7470: 20 6f 66 0a 0a 7c 20 60 2f 41 60 20 7c 20 4f 53   of..| `/A` | OS
7480: 2f 38 20 60 50 49 50 60 20 41 53 43 49 49 20 66  /8 `PIP` ASCII f
7490: 6f 72 6d 61 74 2e 20 50 4f 53 49 58 20 6e 65 77  ormat. POSIX new
74a0: 6c 69 6e 65 73 20 61 72 65 20 63 6f 6e 76 65 72  lines are conver
74b0: 74 65 64 20 74 6f 20 4f 53 2f 38 20 6e 65 77 6c  ted to OS/8 newl
74c0: 69 6e 65 73 2e 0a 7c 20 60 2f 42 60 20 7c 20 4f  ines..| `/B` | O
74d0: 53 2f 38 20 60 50 49 50 60 20 60 42 49 4e 60 20  S/8 `PIP` `BIN` 
74e0: 66 6f 72 6d 61 74 2e 20 50 61 70 65 72 20 74 61  format. Paper ta
74f0: 70 65 20 6c 65 61 64 65 72 2f 74 72 61 69 6c 65  pe leader/traile
7500: 72 20 6d 61 79 20 62 65 20 61 64 64 65 64 2e 0a  r may be added..
7510: 7c 20 60 2f 49 60 20 7c 20 4f 53 2f 38 20 60 50  | `/I` | OS/8 `P
7520: 49 50 60 20 69 6d 61 67 65 20 66 6f 72 6d 61 74  IP` image format
7530: 2e 20 42 69 74 20 66 6f 72 20 42 69 74 20 63 6f  . Bit for Bit co
7540: 70 79 2e 0a 0a 49 66 20 6e 6f 20 6f 70 74 69 6f  py...If no optio
7550: 6e 20 69 73 20 73 70 65 63 69 66 69 65 64 2c 20  n is specified, 
7560: 60 2f 41 60 20 69 73 20 61 73 73 75 6d 65 64 2e  `/A` is assumed.
7570: 0a 0a 2a 2a 49 4d 50 4f 52 54 41 4e 54 3a 2a 2a  ..**IMPORTANT:**
7580: 20 42 65 63 61 75 73 65 20 77 65 20 61 72 65 20   Because we are 
7590: 70 61 72 73 69 6e 67 20 62 6f 74 68 20 4f 53 2f  parsing both OS/
75a0: 38 20 61 6e 64 20 50 4f 53 49 58 20 66 69 6c 65  8 and POSIX file
75b0: 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 73 2c   specifications,
75c0: 0a 77 65 20 63 61 6e 27 74 20 6a 75 73 74 20 70  .we can't just p
75d0: 61 72 73 65 20 6f 75 74 20 74 68 65 20 73 6c 61  arse out the sla
75e0: 73 68 20 69 6e 20 74 68 65 20 6f 70 74 69 6f 6e  sh in the option
75f0: 73 2e 20 4f 70 74 69 6f 6e 73 20 6d 75 73 74 20  s. Options must 
7600: 62 65 20 70 72 65 63 65 64 65 64 20 77 69 74 68  be preceded with
7610: 0a 77 68 69 74 65 73 70 61 63 65 2e 20 4f 74 68  .whitespace. Oth
7620: 65 72 77 69 73 65 20 69 74 20 77 6f 75 6c 64 20  erwise it would 
7630: 62 65 20 6d 69 73 2d 70 61 72 73 65 64 20 61 73  be mis-parsed as
7640: 20 70 61 72 74 20 6f 66 20 61 20 66 69 6c 65 20   part of a file 
7650: 73 70 65 63 2e 0a 0a 55 6e 6c 69 6b 65 20 60 63  spec...Unlike `c
7660: 70 74 6f 60 20 74 68 65 72 65 20 69 73 20 6f 6e  pto` there is on
7670: 6c 79 20 6f 6e 65 20 66 6f 72 6d 20 6f 66 20 74  ly one form of t
7680: 68 65 20 63 6f 6d 6d 61 6e 64 2e 20 20 42 6f 74  he command.  Bot
7690: 68 20 74 68 65 0a 5f 6f 73 38 2d 66 69 6c 65 73  h the._os8-files
76a0: 70 65 63 5f 20 61 6e 64 20 74 68 65 20 5f 70 6f  pec_ and the _po
76b0: 73 69 78 2d 70 61 74 68 5f 20 6d 75 73 74 20 62  six-path_ must b
76c0: 65 20 73 70 65 63 69 66 69 65 64 2e 20 20 54 68  e specified.  Th
76d0: 65 20 6f 70 74 69 6f 6e 73 0a 61 72 65 20 74 68  e options.are th
76e0: 65 20 73 61 6d 65 20 66 6f 72 20 62 6f 74 68 20  e same for both 
76f0: 60 63 70 66 72 6f 6d 60 20 61 6e 64 20 60 63 70  `cpfrom` and `cp
7700: 74 6f 60 2e 0a 0a 43 6f 70 79 20 66 69 6c 65 73  to`...Copy files
7710: 20 66 72 6f 6d 20 74 68 65 20 72 75 6e 6e 69 6e   from the runnin
7720: 67 20 4f 53 2f 38 20 65 6e 76 69 72 6f 6e 6d 65  g OS/8 environme
7730: 6e 74 20 74 6f 20 74 68 65 20 50 4f 53 49 58 20  nt to the POSIX 
7740: 65 6e 76 69 72 6f 6e 6d 65 6e 74 20 72 75 6e 6e  environment runn
7750: 69 6e 67 20 53 49 4d 48 2e 0a 0a 45 78 61 6d 70  ing SIMH...Examp
7760: 6c 65 3a 0a 0a 43 6f 70 79 20 61 20 6c 69 73 74  le:..Copy a list
7770: 69 6e 67 20 66 69 6c 65 20 69 6e 74 6f 20 74 68  ing file into th
7780: 65 20 63 75 72 72 65 6e 74 20 77 6f 72 6b 69 6e  e current workin
7790: 67 20 64 69 72 65 63 74 6f 72 79 20 6f 66 20 74  g directory of t
77a0: 68 65 0a 65 78 65 63 75 74 69 6e 67 20 60 6f 73  he.executing `os
77b0: 38 2d 72 75 6e 60 3a 0a 0a 20 20 20 20 63 70 66  8-run`:..    cpf
77c0: 72 6f 6d 20 44 53 4b 3a 4f 53 38 2e 4c 53 20 2e  rom DSK:OS8.LS .
77d0: 2f 6f 73 38 2e 6c 73 20 2f 41 0a 0a 0a 23 23 23  /os8.ls /A...###
77e0: 20 3c 61 20 69 64 3d 22 6f 73 38 2d 63 6f 6d 6d   <a id="os8-comm
77f0: 22 3e 3c 2f 61 3e 60 6f 73 38 60 20 e2 80 94 20  "></a>`os8` — 
7800: 52 75 6e 20 61 72 62 69 74 72 61 72 79 20 4f 53  Run arbitrary OS
7810: 2f 38 20 63 6f 6d 6d 61 6e 64 2e 0a 0a 60 6f 73  /8 command...`os
7820: 38 60 20 5f 6f 73 38 2d 63 6f 6d 6d 61 6e 64 2d  8` _os8-command-
7830: 6c 69 6e 65 5f 0a 0a 45 76 65 72 79 74 68 69 6e  line_..Everythin
7840: 67 20 6f 6e 20 74 68 65 20 73 63 72 69 70 74 20  g on the script 
7850: 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 61 66 74  command line aft
7860: 65 72 20 5c 22 6f 73 38 20 5c 22 20 69 73 20 70  er \"os8 \" is p
7870: 61 73 73 65 64 2c 0a 75 6e 69 6e 74 65 72 70 72  assed,.uninterpr
7880: 65 74 65 64 2c 20 74 6f 20 74 68 65 20 4f 53 2f  eted, to the OS/
7890: 38 20 6b 65 79 62 6f 61 72 64 20 6d 6f 6e 69 74  8 keyboard monit
78a0: 6f 72 20 77 69 74 68 20 74 68 65 20 65 78 70 65  or with the expe
78b0: 63 74 61 74 69 6f 6e 20 74 68 61 74 0a 74 68 65  ctation that.the
78c0: 20 63 6f 6d 6d 61 6e 64 20 77 69 6c 6c 20 72 65   command will re
78d0: 74 75 72 6e 20 74 6f 20 74 68 65 20 6d 6f 6e 69  turn to the moni
78e0: 74 6f 72 20 63 6f 6d 6d 61 6e 64 20 6c 65 76 65  tor command leve
78f0: 6c 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e  l and the comman
7900: 64 0a 70 72 6f 6d 70 74 2c 20 22 60 2e 60 22 20  d.prompt, "`.`" 
7910: 77 69 6c 6c 20 62 65 20 70 72 6f 64 75 63 65 64  will be produced
7920: 2e 0a 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20  ...This command 
7930: 73 68 6f 75 6c 64 20 62 65 20 75 73 65 64 20 4f  should be used O
7940: 4e 4c 59 20 66 6f 72 20 4f 53 2f 38 20 63 6f 6d  NLY for OS/8 com
7950: 6d 61 6e 64 73 20 74 68 61 74 20 72 65 74 75 72  mands that retur
7960: 6e 0a 69 6d 6d 65 64 69 61 74 65 6c 79 20 74 6f  n.immediately to
7970: 20 63 6f 6d 6d 61 6e 64 20 6c 65 76 65 6c 2e 20   command level. 
7980: 20 60 42 41 54 43 48 60 20 73 63 72 69 70 74 73   `BATCH` scripts
7990: 20 64 6f 20 74 68 69 73 2c 20 61 6e 64 20 74 68   do this, and th
79a0: 65 79 20 63 61 6e 0a 62 65 20 72 75 6e 20 66 72  ey can.be run fr
79b0: 6f 6d 20 68 65 72 65 2e 0a 0a 54 68 65 20 60 6f  om here...The `o
79c0: 73 38 60 20 63 6f 6d 6d 61 6e 64 20 69 73 20 61  s8` command is a
79d0: 77 61 72 65 20 6f 66 20 61 20 73 70 65 63 69 61  ware of a specia
79e0: 6c 20 65 6e 61 62 6c 65 6d 65 6e 74 20 6b 65 79  l enablement key
79f0: 77 6f 72 64 3a 20 60 74 72 61 6e 73 63 72 69 70  word: `transcrip
7a00: 74 60 2e 0a 28 53 65 65 20 74 68 65 20 5b 60 65  t`..(See the [`e
7a10: 6e 61 62 6c 65 60 20 5c 20 60 64 69 73 61 62 6c  nable` \ `disabl
7a20: 65 60 5d 28 23 65 6e 2d 64 69 73 2d 63 6f 6d 6d  e`](#en-dis-comm
7a30: 29 20 73 65 63 74 69 6f 6e 20 62 65 6c 6f 77 2e  ) section below.
7a40: 29 0a 49 66 20 60 74 72 61 6e 73 63 72 69 70 74  ).If `transcript
7a50: 60 20 69 73 20 65 6e 61 62 6c 65 64 2c 20 74 68  ` is enabled, th
7a60: 65 20 6f 75 74 70 75 74 20 66 72 6f 6d 20 72 75  e output from ru
7a70: 6e 6e 69 6e 67 20 74 68 65 20 4f 53 2f 38 0a 63  nning the OS/8.c
7a80: 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 69 73 20 70  ommand line is p
7a90: 72 69 6e 74 65 64 2e 20 20 0a 0a 46 6f 72 20 65  rinted.  ..For e
7aa0: 78 61 6d 70 6c 65 2c 20 69 66 20 79 6f 75 20 77  xample, if you w
7ab0: 61 6e 74 65 64 20 74 6f 20 64 69 73 70 6c 61 79  anted to display
7ac0: 20 74 68 65 20 63 6f 6e 74 65 6e 74 73 20 6f 66   the contents of
7ad0: 20 61 20 44 45 43 74 61 70 65 20 69 6d 61 67 65   a DECtape image
7ae0: 0a 79 6f 75 20 61 72 65 20 63 6f 6e 73 74 72 75  .you are constru
7af0: 63 74 69 6e 67 20 62 75 74 20 6e 6f 20 6f 74 68  cting but no oth
7b00: 65 72 20 63 6f 6d 6d 61 6e 64 20 6c 69 6e 65 73  er command lines
7b10: 20 66 65 64 20 74 6f 20 74 68 65 20 60 6f 73 38   fed to the `os8
7b20: 60 0a 63 6f 6d 6d 61 6e 64 20 79 6f 75 20 77 6f  `.command you wo
7b30: 75 6c 64 20 64 6f 20 74 68 69 73 3a 0a 0a 60 60  uld do this:..``
7b40: 60 0a 65 6e 61 62 6c 65 20 74 72 61 6e 73 63 72  `.enable transcr
7b50: 69 70 74 0a 6f 73 38 20 44 49 52 20 44 54 41 30  ipt.os8 DIR DTA0
7b60: 3a 0a 64 69 73 61 62 6c 65 20 74 72 61 6e 73 63  :.disable transc
7b70: 72 69 70 74 0a 60 60 60 0a 0a 54 68 69 73 20 74  ript.```..This t
7b80: 72 61 6e 73 63 72 69 70 74 20 63 61 70 61 62 69  ranscript capabi
7b90: 6c 69 74 79 20 70 72 6f 76 69 64 65 73 20 61 20  lity provides a 
7ba0: 66 69 6e 65 20 67 72 61 69 6e 65 64 20 64 65 62  fine grained deb
7bb0: 75 67 67 69 6e 67 20 61 69 64 2e 0a 0a 0a 23 23  ugging aid....##
7bc0: 23 20 3c 61 20 69 64 3d 22 70 61 6c 38 2d 63 6f  # <a id="pal8-co
7bd0: 6d 6d 22 3e 3c 2f 61 3e 60 70 61 6c 38 60 20 e2  mm"></a>`pal8` â
7be0: 80 94 20 52 75 6e 20 4f 53 2f 38 20 60 50 41 4c  €” Run OS/8 `PAL
7bf0: 38 60 20 61 73 73 65 6d 62 6c 65 72 2e 0a 0a 41  8` assembler...A
7c00: 63 74 75 61 6c 6c 79 2c 20 74 68 65 20 60 50 41  ctually, the `PA
7c10: 4c 38 60 20 61 73 73 65 6d 62 6c 65 72 20 63 61  L8` assembler ca
7c20: 6e 20 62 65 20 63 61 6c 6c 65 64 20 6a 75 73 74  n be called just
7c30: 20 66 69 6e 65 0a 62 79 20 75 73 69 6e 67 20 74   fine.by using t
7c40: 68 65 20 60 6f 73 38 60 20 63 6f 6d 6d 61 6e 64  he `os8` command
7c50: 2c 20 66 6f 72 20 65 78 61 6d 70 6c 65 3a 0a 0a  , for example:..
7c60: 20 20 20 20 6f 73 38 20 50 41 4c 38 20 52 4b 42      os8 PAL8 RKB
7c70: 31 3a 52 4c 30 2e 42 4e 3c 52 4b 41 31 3a 52 4c  1:RL0.BN<RKA1:RL
7c80: 30 2e 50 41 0a 20 20 20 0a 48 6f 77 65 76 65 72  0.PA.   .However
7c90: 2c 20 61 6e 20 73 65 70 61 72 61 74 65 20 70 61  , an separate pa
7ca0: 6c 38 20 63 6f 6d 6d 61 6e 64 20 77 61 73 20 63  l8 command was c
7cb0: 72 65 61 74 65 64 20 74 6f 20 65 6e 61 62 6c 65  reated to enable
7cc0: 20 72 69 63 68 65 72 20 64 69 73 70 6c 61 79 0a   richer display.
7cd0: 6f 66 20 65 72 72 6f 72 73 2e 0a 0a 45 78 61 6d  of errors...Exam
7ce0: 70 6c 65 73 3a 0a 0a 43 72 65 61 74 65 20 61 20  ples:..Create a 
7cf0: 62 69 6e 61 72 79 20 60 4f 53 38 2e 42 4e 60 20  binary `OS8.BN` 
7d00: 6f 6e 20 70 61 72 74 69 74 69 6f 6e 20 42 20 6f  on partition B o
7d10: 66 20 72 6b 30 35 20 64 72 69 76 65 20 31 20 66  f rk05 drive 1 f
7d20: 72 6f 6d 20 60 4f 53 38 2e 50 41 60 0a 73 6f 75  rom `OS8.PA`.sou
7d30: 72 63 65 20 66 69 6c 65 20 66 6f 75 6e 64 20 6f  rce file found o
7d40: 6e 20 70 61 72 74 69 74 69 6f 6e 20 41 20 6f 66  n partition A of
7d50: 20 72 6b 30 35 20 64 72 69 76 65 20 31 2e 0a 0a   rk05 drive 1...
7d60: 20 20 20 20 70 61 6c 38 20 52 4b 42 31 3a 4f 53      pal8 RKB1:OS
7d70: 38 2e 42 4e 3c 52 4b 41 31 3a 4f 53 38 2e 50 41  8.BN<RKA1:OS8.PA
7d80: 0a 0a 43 72 65 61 74 65 20 61 20 62 69 6e 61 72  ..Create a binar
7d90: 79 20 60 4f 53 38 2e 42 4e 60 20 6f 6e 20 70 61  y `OS8.BN` on pa
7da0: 72 74 69 74 69 6f 6e 20 42 20 6f 66 20 72 6b 30  rtition B of rk0
7db0: 35 20 64 72 69 76 65 20 31 20 61 6e 64 20 61 20  5 drive 1 and a 
7dc0: 6c 69 73 74 69 6e 67 0a 66 69 6c 65 20 60 4f 53  listing.file `OS
7dd0: 38 2e 4c 53 60 20 6f 6e 20 74 68 65 20 64 65 66  8.LS` on the def
7de0: 61 75 6c 74 20 64 65 76 69 63 65 20 60 44 53 4b  ault device `DSK
7df0: 3a 60 20 66 72 6f 6d 20 60 4f 53 38 2e 50 41 60  :` from `OS8.PA`
7e00: 20 73 6f 75 72 63 65 20 66 69 6c 65 0a 66 6f 75   source file.fou
7e10: 6e 64 20 6f 6e 20 70 61 72 74 69 74 69 6f 6e 20  nd on partition 
7e20: 41 20 6f 66 20 72 6b 30 35 20 64 72 69 76 65 20  A of rk05 drive 
7e30: 31 2e 0a 0a 20 20 20 20 70 61 6c 38 20 52 4b 42  1...    pal8 RKB
7e40: 31 3a 4f 53 38 2e 42 4e 2c 4f 53 38 2e 4c 53 3c  1:OS8.BN,OS8.LS<
7e50: 52 4b 41 31 3a 4f 53 38 2e 50 41 0a 0a 0a 23 23  RKA1:OS8.PA...##
7e60: 23 20 3c 61 20 69 64 3d 22 6f 63 6f 6d 70 2d 63  # <a id="ocomp-c
7e70: 6f 6d 6d 22 3e 3c 2f 61 3e 60 6f 63 6f 6d 70 60  omm"></a>`ocomp`
7e80: 20 e2 80 94 20 52 75 6e 20 4f 53 2f 38 20 60 4f   — Run OS/8 `O
7e90: 43 4f 4d 50 60 20 4f 63 74 61 6c 20 43 6f 6d 70  COMP` Octal Comp
7ea0: 61 72 65 20 61 6e 64 20 44 75 6d 70 20 55 74 69  are and Dump Uti
7eb0: 6c 69 74 79 2e 0a 0a 54 68 69 73 20 63 6f 6d 6d  lity...This comm
7ec0: 61 6e 64 20 77 61 73 20 61 64 64 65 64 20 74 6f  and was added to
7ed0: 20 61 6c 6c 6f 77 20 66 69 6c 65 20 76 65 72 69   allow file veri
7ee0: 66 69 63 61 74 69 6f 6e 2e 20 20 49 74 20 77 72  fication.  It wr
7ef0: 61 70 73 20 61 20 63 61 6c 6c 20 74 6f 20 74 68  aps a call to th
7f00: 65 0a 4f 53 2f 38 20 60 4f 43 4f 4d 50 60 20 75  e.OS/8 `OCOMP` u
7f10: 74 69 6c 69 74 79 20 77 69 74 68 20 73 6f 6d 65  tility with some
7f20: 20 65 78 70 65 63 74 20 70 61 72 73 69 6e 67 20   expect parsing 
7f30: 74 6f 20 72 65 63 6f 67 6e 69 7a 65 20 77 68 65  to recognize whe
7f40: 6e 20 74 77 6f 20 66 69 6c 65 73 0a 61 72 65 20  n two files.are 
7f50: 69 64 65 6e 74 69 63 61 6c 2c 20 6f 72 20 77 68  identical, or wh
7f60: 65 6e 20 6f 6e 65 20 69 73 20 6d 69 73 73 69 6e  en one is missin
7f70: 67 2e 0a 0a 41 20 74 79 70 69 63 61 6c 20 63 6f  g...A typical co
7f80: 6d 6d 61 6e 64 20 6c 69 6e 65 20 77 6f 75 6c 64  mmand line would
7f90: 20 6c 6f 6f 6b 20 6c 69 6b 65 20 74 68 69 73 3a   look like this:
7fa0: 0a 0a 20 20 20 20 6f 63 6f 6d 70 20 54 54 59 3a  ..    ocomp TTY:
7fb0: 3c 44 54 41 31 3a 45 38 2e 53 56 2c 53 59 53 3a  <DTA1:E8.SV,SYS:
7fc0: 45 38 2e 53 56 0a 0a 54 6f 20 63 6f 6e 66 69 72  E8.SV..To confir
7fd0: 6d 20 74 68 61 74 20 74 68 65 20 60 45 38 60 20  m that the `E8` 
7fe0: 65 78 65 63 75 74 61 62 6c 65 20 6f 6e 20 60 53  executable on `S
7ff0: 59 53 3a 60 20 6d 61 74 63 68 65 73 20 74 68 65  YS:` matches the
8000: 20 6f 6e 65 20 66 6f 75 6e 64 20 6f 6e 20 74 68   one found on th
8010: 65 0a 69 6d 61 67 65 20 6d 6f 75 6e 74 65 64 20  e.image mounted 
8020: 6f 6e 20 60 44 54 41 31 3a 60 0a 0a 4e 6f 74 65  on `DTA1:`..Note
8030: 20 74 68 61 74 2c 20 61 6c 74 68 6f 75 67 68 20   that, although 
8040: 6f 6e 65 20 63 61 6e 20 75 73 65 20 74 68 65 20  one can use the 
8050: 66 75 6c 6c 20 70 6f 77 65 72 20 6f 66 20 74 68  full power of th
8060: 65 20 60 4f 43 4f 4d 50 60 20 75 74 69 6c 69 74  e `OCOMP` utilit
8070: 79 2c 20 74 68 65 20 73 65 74 75 70 0a 68 65 72  y, the setup.her
8080: 65 20 69 6e 20 60 6f 73 38 2d 72 75 6e 60 20 63  e in `os8-run` c
8090: 6f 6e 73 69 64 65 72 73 20 61 6e 79 74 68 69 6e  onsiders anythin
80a0: 67 20 6f 74 68 65 72 20 74 68 61 6e 20 74 68 65  g other than the
80b0: 20 22 4e 4f 54 48 49 4e 47 20 4f 55 54 50 55 54   "NOTHING OUTPUT
80c0: 22 20 69 6e 64 69 63 61 74 69 6e 67 0a 69 64 65  " indicating.ide
80d0: 6e 74 69 63 61 6c 20 66 69 6c 65 73 20 74 6f 20  ntical files to 
80e0: 62 65 20 61 20 22 66 61 69 6c 75 72 65 22 2e 0a  be a "failure"..
80f0: 0a 48 6f 77 65 76 65 72 2c 20 74 68 65 20 60 74  .However, the `t
8100: 72 61 6e 73 63 72 69 70 74 60 20 6f 70 74 69 6f  ranscript` optio
8110: 6e 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 73  n is available s
8120: 6f 20 74 68 61 74 20 6f 63 74 61 6c 20 64 75 6d  o that octal dum
8130: 70 73 20 63 61 6e 20 62 65 0a 70 72 6f 64 75 63  ps can be.produc
8140: 65 64 2e 20 46 6f 72 20 65 78 61 6d 70 6c 65 2c  ed. For example,
8150: 20 74 68 65 20 73 63 72 69 70 74 3a 0a 0a 20 20   the script:..  
8160: 20 20 6d 6f 75 6e 74 20 72 6b 30 20 24 62 69 6e    mount rk0 $bin
8170: 2f 76 33 64 2e 72 6b 30 35 20 72 65 71 75 69 72  /v3d.rk05 requir
8180: 65 64 20 73 63 72 61 74 63 68 0a 20 20 20 20 62  ed scratch.    b
8190: 6f 6f 74 20 72 6b 30 0a 0a 20 20 20 20 65 6e 61  oot rk0..    ena
81a0: 62 6c 65 20 74 72 61 6e 73 63 72 69 70 74 0a 20  ble transcript. 
81b0: 20 20 20 6f 63 6f 6d 70 20 54 54 59 3a 3c 50 53     ocomp TTY:<PS
81c0: 2e 43 0a 0a 70 72 6f 64 75 63 65 73 20 74 68 65  .C..produces the
81d0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6f 75 74 70 75   following outpu
81e0: 74 0a 0a 20 20 20 20 24 20 62 69 6e 2f 6f 73 38  t..    $ bin/os8
81f0: 2d 72 75 6e 20 73 63 72 69 70 74 73 2f 74 65 73  -run scripts/tes
8200: 74 2f 6f 63 6f 6d 70 2e 6f 73 38 20 0a 20 20 20  t/ocomp.os8 .   
8210: 20 52 75 6e 6e 69 6e 67 20 73 63 72 69 70 74 20   Running script 
8220: 66 69 6c 65 3a 20 73 63 72 69 70 74 73 2f 74 65  file: scripts/te
8230: 73 74 2f 6f 63 6f 6d 70 2e 6f 73 38 0a 20 20 20  st/ocomp.os8.   
8240: 20 54 54 59 3a 3c 50 53 2e 43 0a 20 20 20 20 30   TTY:<PS.C.    0
8250: 30 30 30 20 20 20 28 20 41 42 53 4f 4c 55 54 45  000   ( ABSOLUTE
8260: 20 42 4c 4f 43 4b 20 32 33 30 32 20 29 0a 20 20   BLOCK 2302 ).  
8270: 20 20 30 30 30 30 20 20 35 32 35 37 20 30 32 35    0000  5257 025
8280: 32 20 37 33 32 30 20 34 37 36 32 20 20 35 33 35  2 7320 4762  535
8290: 36 20 30 33 36 34 20 37 37 32 30 20 31 37 34 31  6 0364 7720 1741
82a0: 20 20 37 33 34 33 20 36 33 34 31 20 35 32 34 37    7343 6341 5247
82b0: 20 30 33 36 33 0a 20 20 20 20 30 30 31 34 20 20   0363.    0014  
82c0: 37 33 36 34 20 34 37 36 32 20 37 33 34 31 20 33  7364 4762 7341 3
82d0: 37 35 36 20 20 35 33 35 34 20 30 33 34 35 20 34  756  5354 0345 4
82e0: 32 35 32 20 36 36 35 37 20 20 35 32 31 32 20 35  252 6657  5212 5
82f0: 32 35 37 20 37 32 34 30 20 37 33 31 31 0a 20 20  257 7240 7311.  
8300: 20 20 30 30 33 30 20 20 37 33 36 36 20 35 37 35    0030  7366 575
8310: 37 20 37 37 34 35 20 33 36 34 30 20 20 37 33 35  7 7745 3640  735
8320: 31 20 34 33 36 34 20 36 32 34 30 20 32 36 35 36  1 4364 6240 2656
8330: 20 20 35 33 33 30 20 30 33 30 35 20 36 37 30 33    5330 0305 6703
8340: 20 31 33 30 33 0a 20 20 20 20 30 30 34 34 20 20   1303.    0044  
8350: 37 32 34 30 20 37 33 34 31 20 37 33 34 34 20 32  7240 7341 7344 2
8360: 36 34 30 20 20 37 33 35 36 20 32 37 36 34 20 37  640  7356 2764 7
8370: 37 36 32 20 32 32 34 30 20 20 37 37 35 30 20 31  762 2240  7750 1
8380: 37 35 31 20 37 32 34 30 20 34 37 34 36 0a 20 20  751 7240 4746.  
8390: 20 20 30 30 36 30 20 20 37 33 35 34 20 37 33 34    0060  7354 734
83a0: 35 20 35 33 35 35 20 30 33 34 35 20 20 34 32 35  5 5355 0345  425
83b0: 32 20 36 36 35 37 20 34 32 31 32 20 35 32 31 35  2 6657 4212 5215
83c0: 20 20 35 32 31 35 20 31 36 31 32 20 37 33 34 34    5215 1612 7344
83d0: 20 33 33 34 35 0a 20 20 20 20 30 30 37 34 20 20   3345.    0074  
83e0: 37 33 35 31 20 32 37 35 36 20 36 32 34 30 20 37  7351 2756 6240 7
83f0: 37 30 33 20 20 36 37 32 35 20 32 33 31 36 20 35  703  6725 2316 5
8400: 36 34 30 20 32 32 36 31 20 20 34 32 31 35 20 36  640 2261  4215 6
8410: 36 31 32 20 37 32 31 32 20 34 36 31 31 0a 20 20  612 7212 4611.  
8420: 20 20 30 31 31 30 20 20 35 33 35 36 20 30 33 36    0110  5356 036
8430: 34 20 36 37 34 31 20 35 37 36 32 20 20 36 36 36  4 6741 5762  666
8440: 32 20 36 36 36 30 20 35 32 35 34 20 36 33 35 31  2 6660 5254 6351
8450: 20 20 34 33 35 32 20 36 36 37 33 20 34 32 31 32    4352 6673 4212
8460: 20 35 32 31 35 0a 20 20 20 20 30 31 32 34 20 20   5215.    0124  
8470: 37 37 35 31 20 32 33 35 36 20 37 32 34 30 20 30  7751 2356 7240 0
8480: 37 35 35 20 20 35 33 35 31 20 34 33 35 36 20 34  755  5351 4356 4
8490: 32 35 31 20 35 32 31 35 20 20 34 33 37 33 20 35  251 5215  4373 5
84a0: 32 31 35 20 37 32 31 31 20 37 37 34 36 0a 20 20  215 7211 7746.  
84b0: 20 20 30 31 34 30 20 20 35 33 36 32 20 34 32 34    0140  5362 424
84c0: 30 20 35 37 35 31 20 30 36 37 35 20 20 35 36 37  0 5751 0675  567
84d0: 33 20 36 33 35 31 20 36 37 30 33 20 32 37 31 37  3 6351 6703 2717
84e0: 20 20 35 37 31 36 20 35 37 32 34 20 35 33 35 31    5716 5724 5351
84f0: 20 35 36 35 33 0a 20 20 20 20 30 31 35 34 20 20   5653.    0154  
8500: 37 36 35 31 20 35 36 34 30 20 34 32 31 35 20 34  7651 5640 4215 4
8510: 36 31 32 20 20 37 36 31 31 20 31 33 34 31 20 36  612  7611 1341 6
8520: 37 33 33 20 36 37 35 31 20 20 35 36 37 35 20 35  733 6751  5675 5
8530: 36 36 31 20 34 32 31 35 20 34 36 31 32 0a 20 20  661 4215 4612.  
8540: 20 20 30 31 37 30 20 20 37 32 31 31 20 37 37 34    0170  7211 774
8550: 36 20 35 33 36 32 20 34 32 34 30 20 20 37 33 35  6 5362 4240  735
8560: 32 20 34 36 37 35 20 35 36 35 35 20 35 36 36 31  2 4675 5655 5661
8570: 20 20 35 37 35 32 20 30 36 37 36 20 35 32 37 33    5752 0676 5273
8580: 20 36 37 35 32 0a 20 20 20 20 30 32 30 34 20 20   6752.    0204  
8590: 34 32 35 35 20 36 36 35 31 20 34 32 31 32 20 34  4255 6651 4212 4
85a0: 36 31 31 20 20 37 36 31 31 20 31 33 34 31 20 36  611  7611 1341 6
85b0: 37 33 33 20 36 37 35 32 20 20 37 36 37 35 20 31  733 6752  7675 1
85c0: 33 34 31 20 35 33 33 33 20 36 37 35 32 0a 20 20  341 5333 6752.  
85d0: 20 20 30 32 32 30 20 20 35 32 36 31 20 35 37 33    0220  5261 573
85e0: 35 20 36 37 34 31 20 35 37 36 32 20 20 35 37 35  5 6741 5762  575
85f0: 32 20 35 37 33 35 20 34 32 31 35 20 34 36 31 32  2 5735 4215 4612
8600: 20 20 37 32 31 31 20 37 37 34 36 20 35 33 36 32    7211 7746 5362
8610: 20 34 32 34 30 0a 20 20 20 20 30 32 33 34 20 20   4240.    0234  
8620: 35 37 35 32 20 30 32 37 35 20 35 36 37 33 20 36  5752 0275 5673 6
8630: 33 35 32 20 20 35 32 36 32 20 34 32 35 32 20 36  352  5262 4252 6
8640: 37 30 33 20 32 37 31 37 20 20 35 33 31 36 20 36  703 2717  5316 6
8650: 37 32 34 20 35 37 35 31 20 30 36 35 35 0a 20 20  724 5751 0655.  
8660: 20 20 30 32 35 30 20 20 37 32 35 31 20 35 32 37    0250  7251 527
8670: 33 20 35 32 35 33 20 34 36 35 33 20 20 34 32 31  3 5253 4653  421
8680: 35 20 34 36 31 32 20 37 36 31 31 20 30 32 31 31  5 4612 7611 0211
8690: 20 20 37 33 36 35 20 31 37 36 34 20 35 32 35 30    7365 1764 5250
86a0: 20 30 32 34 37 0a 20 20 20 20 30 32 36 34 20 20   0247.    0264  
86b0: 35 36 34 37 20 35 36 35 31 20 34 32 31 35 20 34  5647 5651 4215 4
86c0: 36 31 32 20 20 37 32 31 31 20 37 37 34 36 20 35  612  7211 7746 5
86d0: 33 36 32 20 34 32 34 30 20 20 35 37 35 32 20 30  362 4240  5752 0
86e0: 36 37 35 20 35 36 37 33 20 36 33 35 32 0a 20 20  675 5673 6352.  
86f0: 20 20 30 33 30 30 20 20 35 37 35 31 20 30 36 35    0300  5751 065
8700: 33 20 35 32 37 33 20 35 37 35 32 20 20 34 32 35  3 5273 5752  425
8710: 33 20 36 36 35 31 20 34 32 31 32 20 34 36 31 31  3 6651 4212 4611
8720: 20 20 37 36 31 31 20 31 33 36 30 20 37 37 35 31    7611 1360 7751
8730: 20 32 33 35 36 0a 20 20 20 20 30 33 31 34 20 20   2356.    0314  
8740: 35 33 34 36 20 31 32 35 30 20 37 32 34 35 20 32  5346 1250 7245 2
8750: 32 36 34 20 20 37 32 34 32 20 30 36 35 34 20 37  264  7242 0654 7
8760: 33 36 32 20 35 33 33 33 20 20 35 37 33 35 20 35  362 5333  5735 5
8770: 36 35 31 20 34 32 31 35 20 34 36 31 32 0a 20 20  651 4215 4612.  
8780: 20 20 30 33 33 30 20 20 37 36 31 31 20 31 33 36    0330  7611 136
8790: 30 20 37 37 35 31 20 32 33 35 36 20 20 35 33 34  0 7751 2356  534
87a0: 36 20 31 32 35 30 20 36 37 33 34 20 36 33 36 32  6 1250 6734 6362
87b0: 20 20 35 33 35 36 20 34 36 34 32 20 34 32 37 33    5356 4642 4273
87c0: 20 35 32 31 35 0a 20 20 20 20 30 33 34 34 20 20   5215.    0344  
87d0: 34 32 31 31 20 36 37 37 35 20 37 36 31 32 20 30  4211 6775 7612 0
87e0: 32 31 31 20 20 37 33 36 32 20 37 33 35 31 20 35  211  7362 7351 5
87f0: 33 36 34 20 34 33 34 36 20 20 37 32 34 32 20 37  364 4346  7242 7
8800: 37 30 33 20 37 33 35 35 20 36 33 36 30 0a 20 20  703 7355 6360.  
8810: 20 20 30 33 36 30 20 20 37 33 34 35 20 32 37 36    0360  7345 276
8820: 34 20 37 37 34 34 20 31 33 33 34 20 20 35 33 33  4 7744 1334  533
8830: 34 20 31 33 35 36 20 34 32 35 31 20 36 36 37 33  4 1356 4251 6673
8840: 20 20 34 32 31 32 20 36 37 37 35 20 30 32 31 32    4212 6775 0212
8850: 20 30 32 33 32 0a 20 20 20 20 30 33 37 34 20 20   0232.    0374  
8860: 30 30 30 30 20 30 30 30 30 20 30 30 30 30 20 30  0000 0000 0000 0
8870: 30 30 30 0a 20 20 20 20 4e 6f 6e 2d 66 61 74 61  000.    Non-fata
8880: 6c 20 65 72 72 6f 72 20 65 6e 63 6f 75 6e 74 65  l error encounte
8890: 72 65 64 20 69 6e 20 73 63 72 69 70 74 73 2f 74  red in scripts/t
88a0: 65 73 74 2f 6f 63 6f 6d 70 2e 6f 73 38 20 61 74  est/ocomp.os8 at
88b0: 20 6c 69 6e 65 20 35 3a 0a 20 20 20 20 09 6f 63   line 5:.    .oc
88c0: 6f 6d 70 20 54 54 59 3a 3c 50 53 2e 43 0a 0a 4e  omp TTY:<PS.C..N
88d0: 6f 74 65 20 68 6f 77 20 60 6f 73 38 2d 72 75 6e  ote how `os8-run
88e0: 60 20 63 6f 6d 70 6c 61 69 6e 73 20 61 62 6f 75  ` complains abou
88f0: 74 20 61 20 6e 6f 6e 2d 66 61 74 61 6c 20 65 72  t a non-fatal er
8900: 72 6f 72 2e 20 20 41 67 61 69 6e 2c 20 74 68 69  ror.  Again, thi
8910: 73 20 69 73 20 62 65 63 61 75 73 65 0a 74 68 65  s is because.the
8920: 20 75 73 65 2d 63 61 73 65 20 69 73 20 66 6f 72   use-case is for
8930: 20 64 65 74 65 63 74 69 6e 67 20 74 77 6f 20 69   detecting two i
8940: 64 65 6e 74 69 63 61 6c 20 66 69 6c 65 73 2c 20  dentical files, 
8950: 61 6e 64 20 63 61 6c 6c 69 6e 67 20 65 76 65 72  and calling ever
8960: 79 74 68 69 6e 67 20 65 6c 73 65 0a 61 20 66 61  ything else.a fa
8970: 69 6c 75 72 65 2e 0a 0a 23 23 23 20 3c 61 20 69  ilure...### <a i
8980: 64 3d 22 62 65 67 69 6e 2d 65 6e 64 2d 63 6f 6d  d="begin-end-com
8990: 6d 22 3e 3c 2f 61 3e 60 62 65 67 69 6e 60 20 2f  m"></a>`begin` /
89a0: 20 60 65 6e 64 60 20 e2 80 94 20 43 6f 6d 70 6c   `end` — Compl
89b0: 65 78 20 63 6f 6e 64 69 74 69 6f 6e 61 6c 73 20  ex conditionals 
89c0: 61 6e 64 20 73 75 62 2d 63 6f 6d 6d 61 6e 64 20  and sub-command 
89d0: 62 6c 6f 63 6b 73 2e 0a 0a 60 62 65 67 69 6e 60  blocks...`begin`
89e0: 20 5f 6b 65 79 77 6f 72 64 5f 20 5f 61 72 67 75   _keyword_ _argu
89f0: 6d 65 6e 74 5f 0a 0a 60 65 6e 64 60 20 5f 6b 65  ment_..`end` _ke
8a00: 79 77 6f 72 64 5f 0a 0a 5f 6b 65 79 77 6f 72 64  yword_.._keyword
8a10: 5f 20 69 73 20 65 69 74 68 65 72 20 6f 6e 65 20  _ is either one 
8a20: 6f 66 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67  of the following
8a30: 3a 0a 0a 7c 20 60 63 64 70 72 6f 67 60 20 20 7c  :..| `cdprog`  |
8a40: 20 43 6f 6d 6d 61 6e 64 20 6c 6f 6f 70 20 74 68   Command loop th
8a50: 72 6f 75 67 68 20 4f 53 2f 38 20 43 6f 6d 6d 61  rough OS/8 Comma
8a60: 6e 64 20 44 65 63 6f 64 65 72 20 77 69 74 68 20  nd Decoder with 
8a70: 5f 61 72 67 75 6d 65 6e 74 5f 20 73 70 65 63 69  _argument_ speci
8a80: 66 79 69 6e 67 20 7c 0a 7c 20 20 20 20 20 20 20  fying |.|       
8a90: 20 20 20 20 7c 20 61 6e 20 4f 53 2f 38 20 65 78      | an OS/8 ex
8aa0: 65 63 75 74 61 62 6c 65 20 70 72 6f 67 72 61 6d  ecutable program
8ab0: 20 62 79 20 6e 61 6d 65 20 61 6e 64 20 28 6f 70   by name and (op
8ac0: 74 69 6f 6e 61 6c 6c 79 29 20 64 65 76 69 63 65  tionally) device
8ad0: 2e 7c 0a 7c 20 60 62 75 69 6c 64 60 20 20 20 20  .|.| `build`    
8ae0: 20 20 20 20 7c 20 60 42 55 49 4c 44 60 20 63 6f      | `BUILD` co
8af0: 6d 6d 61 6e 64 20 69 6e 74 65 72 70 72 65 74 65  mmand interprete
8b00: 72 20 77 69 74 68 20 64 69 61 6c 6f 67 73 20 6d  r with dialogs m
8b10: 61 6e 67 65 64 20 77 69 74 68 20 50 79 74 68 6f  anged with Pytho
8b20: 6e 20 65 78 70 65 63 74 2e 20 20 20 20 7c 0a 7c  n expect.    |.|
8b30: 20 60 65 6e 61 62 6c 65 64 60 20 20 20 20 20 20   `enabled`      
8b40: 7c 20 45 78 65 63 75 74 69 6f 6e 20 62 6c 6f 63  | Execution bloc
8b50: 6b 20 6f 6e 6c 79 20 69 66 20 5f 61 72 67 75 6d  k only if _argum
8b60: 65 6e 74 5f 20 69 73 20 65 6e 61 62 6c 65 64 2e  ent_ is enabled.
8b70: 20 28 53 65 65 20 74 68 65 20 5b 60 65 6e 61 62   (See the [`enab
8b80: 6c 65 60 20 5c 20 60 64 69 73 61 62 6c 65 60 5d  le` \ `disable`]
8b90: 28 23 65 6e 2d 64 69 73 2d 63 6f 6d 6d 29 29 20  (#en-dis-comm)) 
8ba0: 73 65 63 74 69 6f 6e 20 62 65 6c 6f 77 2e 20 7c  section below. |
8bb0: 0a 7c 20 60 64 65 66 61 75 6c 74 60 20 7c 20 45  .| `default` | E
8bc0: 78 65 63 75 74 69 6f 6e 20 62 6c 6f 63 6b 20 74  xecution block t
8bd0: 68 61 74 20 72 75 6e 73 20 62 79 20 64 65 66 61  hat runs by defa
8be0: 75 6c 74 20 62 75 74 20 69 73 20 69 67 6e 6f 72  ult but is ignor
8bf0: 65 64 20 69 66 20 5f 61 72 67 75 6d 65 6e 74 5f  ed if _argument_
8c00: 20 69 73 20 64 69 73 61 62 6c 65 64 2e 20 7c 0a   is disabled. |.
8c10: 7c 20 20 20 20 20 20 20 20 20 20 20 7c 20 28 53  |           | (S
8c20: 65 65 20 74 68 65 20 5b 60 65 6e 61 62 6c 65 60  ee the [`enable`
8c30: 20 5c 20 60 64 69 73 61 62 6c 65 60 5d 28 23 65   \ `disable`](#e
8c40: 6e 2d 64 69 73 2d 63 6f 6d 6d 29 20 73 65 63 74  n-dis-comm) sect
8c50: 69 6f 6e 20 62 65 6c 6f 77 2e 29 20 7c 0a 7c 20  ion below.) |.| 
8c60: 60 76 65 72 73 69 6f 6e 60 20 7c 20 45 78 65 63  `version` | Exec
8c70: 75 74 69 6f 6e 20 62 6c 6f 63 6b 20 74 68 61 74  ution block that
8c80: 20 72 75 6e 73 20 69 66 20 74 68 65 20 63 75 72   runs if the cur
8c90: 72 65 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20  rent version of 
8ca0: 74 68 65 20 60 6f 73 38 2d 72 75 6e 60 20 7c 0a  the `os8-run` |.
8cb0: 7c 20 20 20 20 20 20 20 20 20 20 20 7c 20 73 63  |           | sc
8cc0: 72 69 70 74 69 6e 67 20 6c 61 6e 67 75 61 67 65  ripting language
8cd0: 20 69 73 20 65 71 75 61 6c 20 74 6f 20 6f 72 20   is equal to or 
8ce0: 67 72 65 61 74 65 72 20 74 68 61 6e 20 74 68 65  greater than the
8cf0: 20 73 70 65 63 69 66 69 65 64 20 76 65 72 73 69   specified versi
8d00: 6f 6e 20 73 74 72 69 6e 67 2e 20 7c 0a 7c 20 20  on string. |.|  
8d10: 20 20 20 20 20 20 20 20 20 7c 20 28 53 65 65 20           | (See 
8d20: 5b 76 65 72 73 69 6f 6e 20 74 65 73 74 5d 28 23  [version test](#
8d30: 76 65 72 73 2d 74 65 73 74 29 20 62 65 6c 6f 77  vers-test) below
8d40: 2e 29 7c 0a 0a 46 6f 72 20 60 63 64 70 72 6f 67  .)|..For `cdprog
8d50: 60 2c 20 61 6e 64 20 60 62 75 69 6c 64 60 2c 20  `, and `build`, 
8d60: 5f 61 72 67 75 6d 65 6e 74 5f 20 69 73 20 70 61  _argument_ is pa
8d70: 73 73 65 64 20 75 6e 69 6e 74 65 72 70 72 65 74  ssed uninterpret
8d80: 65 64 20 74 6f 20 74 68 65 0a 4f 53 2f 38 20 60  ed to the.OS/8 `
8d90: 52 55 4e 60 20 63 6f 6d 6d 61 6e 64 2e 20 20 49  RUN` command.  I
8da0: 74 20 69 73 20 65 78 70 65 63 74 65 64 20 74 68  t is expected th
8db0: 61 74 20 5f 61 72 67 75 6d 65 6e 74 5f 20 77 69  at _argument_ wi
8dc0: 6c 6c 20 62 65 20 74 68 65 20 6e 61 6d 65 0a 6f  ll be the name.o
8dd0: 66 20 61 6e 20 65 78 65 63 75 74 61 62 6c 65 2c  f an executable,
8de0: 20 6f 70 74 69 6f 6e 61 6c 6c 79 20 70 72 65 66   optionally pref
8df0: 69 78 65 64 20 62 79 20 61 20 64 65 76 69 63 65  ixed by a device
8e00: 20 73 70 65 63 69 66 69 63 61 74 69 6f 6e 2e 20   specification. 
8e10: 54 68 69 73 0a 65 6e 61 62 6c 65 73 20 72 75 6e  This.enables run
8e20: 6e 69 6e 67 20 74 68 65 20 4f 53 2f 38 20 63 6f  ning the OS/8 co
8e30: 6d 6d 61 6e 64 20 66 72 6f 6d 20 73 70 65 63 69  mmand from speci
8e40: 66 69 63 20 64 65 76 69 63 65 73 2e 20 54 68 69  fic devices. Thi
8e50: 73 20 69 73 0a 6e 65 63 65 73 73 61 72 79 20 66  s is.necessary f
8e60: 6f 72 20 72 75 6e 6e 69 6e 67 20 73 70 65 63 69  or running speci
8e70: 66 69 63 20 60 42 55 49 4c 44 60 20 63 6f 6d 6d  fic `BUILD` comm
8e80: 61 6e 64 20 66 6f 72 20 63 6f 6e 73 74 72 75 63  and for construc
8e90: 74 69 6f 6e 20 6f 66 0a 73 79 73 74 65 6d 20 69  tion of.system i
8ea0: 6d 61 67 65 73 20 66 6f 72 20 73 70 65 63 69 66  mages for specif
8eb0: 69 63 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 4f  ic versions of O
8ec0: 53 2f 38 20 74 68 61 74 20 61 72 65 20 5f 5f 64  S/8 that are __d
8ed0: 69 66 66 65 72 65 6e 74 5f 5f 0a 66 72 6f 6d 20  ifferent__.from 
8ee0: 74 68 65 20 64 65 66 61 75 6c 74 20 72 75 6e 20  the default run 
8ef0: 69 6d 61 67 65 2e 0a 0a 45 78 61 6d 70 6c 65 3a  image...Example:
8f00: 0a 0a 52 75 6e 20 60 46 4f 54 50 2e 53 56 60 20  ..Run `FOTP.SV` 
8f10: 66 72 6f 6d 20 64 65 76 69 63 65 20 60 52 4b 41  from device `RKA
8f20: 30 60 20 61 6e 64 20 63 79 63 6c 65 20 74 68 72  0` and cycle thr
8f30: 6f 75 67 68 20 74 68 65 20 63 6f 6d 6d 61 6e 64  ough the command
8f40: 20 64 65 63 6f 64 65 72 0a 74 6f 20 63 6f 70 79   decoder.to copy
8f50: 20 66 69 6c 65 73 20 6f 6e 74 6f 20 61 20 44 45   files onto a DE
8f60: 43 74 61 70 65 20 75 6e 64 65 72 20 63 6f 6e 73  Ctape under cons
8f70: 74 72 75 63 74 69 6f 6e 20 66 72 6f 6d 20 74 77  truction from tw
8f80: 6f 20 64 69 66 66 65 72 65 6e 74 0a 70 6c 61 63  o different.plac
8f90: 65 73 3a 20 74 68 65 20 6f 6c 64 20 73 79 73 74  es: the old syst
8fa0: 65 6d 20 6f 6e 20 60 52 4b 41 30 3a 60 20 61 6e  em on `RKA0:` an
8fb0: 64 20 74 68 65 20 6e 65 77 6c 79 20 62 75 69 6c  d the newly buil
8fc0: 74 20 63 6f 6d 70 6f 6e 65 6e 74 73 20 66 72 6f  t components fro
8fd0: 6d 0a 60 52 4b 42 31 3a 60 2e 0a 0a 20 20 20 20  m.`RKB1:`...    
8fe0: 62 65 67 69 6e 20 63 64 70 72 6f 67 20 52 4b 41  begin cdprog RKA
8ff0: 30 3a 46 4f 54 50 2e 53 56 0a 20 20 20 20 44 54  0:FOTP.SV.    DT
9000: 41 30 3a 3c 52 4b 41 30 3a 46 4f 54 50 2e 53 56  A0:<RKA0:FOTP.SV
9010: 0a 20 20 20 20 44 54 41 30 3a 3c 52 4b 41 30 3a  .    DTA0:<RKA0:
9020: 44 49 52 45 43 54 2e 53 56 0a 20 20 20 20 44 54  DIRECT.SV.    DT
9030: 41 30 3a 3c 52 4b 42 31 3a 43 43 4c 2e 53 56 0a  A0:<RKB1:CCL.SV.
9040: 20 20 20 20 44 54 41 30 3a 3c 52 4b 42 31 3a 52      DTA0:<RKB1:R
9050: 45 53 4f 52 43 2e 53 56 0a 20 20 20 20 65 6e 64  ESORC.SV.    end
9060: 20 63 64 70 72 6f 67 20 52 4b 41 30 3a 46 4f 54   cdprog RKA0:FOT
9070: 50 2e 53 56 0a 0a 54 68 65 20 60 62 75 69 6c 64  P.SV..The `build
9080: 60 20 63 6f 6d 6d 61 6e 64 20 68 61 73 20 68 61  ` command has ha
9090: 64 20 61 20 6c 6f 74 20 6f 66 20 77 6f 72 6b 20  d a lot of work 
90a0: 70 75 74 20 69 6e 74 6f 20 70 61 72 73 69 6e 67  put into parsing
90b0: 20 64 69 61 6c 6f 67 73 2e 0a 54 68 69 73 20 65   dialogs..This e
90c0: 6e 61 62 6c 65 73 20 6e 6f 74 20 6f 6e 6c 79 20  nables not only 
90d0: 64 65 76 69 63 65 20 64 72 69 76 65 72 20 72 65  device driver re
90e0: 6c 61 74 65 64 20 60 42 55 49 4c 44 60 20 63 6f  lated `BUILD` co
90f0: 6d 6d 61 6e 64 73 20 6f 66 0a 60 4c 4f 41 44 60  mmands of.`LOAD`
9100: 2c 20 60 55 4e 4c 4f 41 44 60 2c 20 60 45 4e 41  , `UNLOAD`, `ENA
9110: 42 4c 45 60 20 61 6e 64 20 60 44 49 53 41 42 4c  BLE` and `DISABL
9120: 45 60 2c 20 62 75 74 20 61 6c 73 6f 20 61 6e 73  E`, but also ans
9130: 77 65 72 73 20 22 79 65 73 22 20 74 6f 0a 74 68  wers "yes" to.th
9140: 65 20 22 5a 45 52 4f 20 53 59 53 22 20 71 75 65  e "ZERO SYS" que
9150: 73 74 69 6f 6e 20 77 68 65 6e 20 74 68 65 20 60  stion when the `
9160: 42 4f 4f 54 60 20 63 6f 6d 6d 61 6e 64 20 69 73  BOOT` command is
9170: 20 69 73 73 75 65 64 20 6f 6e 20 61 20 62 72 61   issued on a bra
9180: 6e 64 0a 6e 65 77 20 69 6d 61 67 65 20 66 69 6c  nd.new image fil
9190: 65 2e 0a 0a 45 78 61 6d 70 6c 65 3a 0a 0a 42 75  e...Example:..Bu
91a0: 69 6c 64 20 61 20 72 75 64 69 6d 65 6e 74 61 72  ild a rudimentar
91b0: 79 20 73 79 73 74 65 6d 20 66 6f 72 20 61 20 54  y system for a T
91c0: 43 30 38 20 44 45 43 74 61 70 65 2e 0a 0a 20 20  C08 DECtape...  
91d0: 20 20 62 65 67 69 6e 20 62 75 69 6c 64 20 53 59    begin build SY
91e0: 53 3a 42 55 49 4c 44 0a 20 20 20 20 44 45 4c 45  S:BUILD.    DELE
91f0: 54 45 20 53 59 53 2c 52 4b 41 30 2c 52 4b 42 30  TE SYS,RKA0,RKB0
9200: 0a 20 20 20 20 44 45 4c 45 54 45 20 52 58 41 30  .    DELETE RXA0
9210: 0a 20 20 20 20 49 4e 53 45 52 54 20 52 4b 30 35  .    INSERT RK05
9220: 2c 52 4b 41 30 2c 52 4b 42 30 0a 20 20 20 20 53  ,RKA0,RKB0.    S
9230: 59 53 54 45 4d 20 54 43 30 38 0a 20 20 20 20 49  YSTEM TC08.    I
9240: 4e 53 45 52 54 20 54 43 30 38 2c 44 54 41 30 0a  NSERT TC08,DTA0.
9250: 20 20 20 20 49 4e 53 45 52 54 20 54 43 2c 44 54      INSERT TC,DT
9260: 41 31 0a 20 20 20 20 44 53 4b 20 54 43 30 38 3a  A1.    DSK TC08:
9270: 44 54 41 30 0a 20 20 20 20 42 4f 4f 54 0a 20 20  DTA0.    BOOT.  
9280: 20 20 65 6e 64 20 62 75 69 6c 64 0a 0a 0a 4d 6f    end build...Mo
9290: 73 74 20 69 6d 70 6f 72 74 61 6e 74 6c 79 20 74  st importantly t
92a0: 68 65 72 65 20 69 73 20 66 75 6c 6c 20 73 75 70  here is full sup
92b0: 70 6f 72 74 20 66 6f 72 20 74 68 65 20 64 69 61  port for the dia
92c0: 6c 6f 67 20 77 69 74 68 20 74 68 65 20 60 42 55  log with the `BU
92d0: 49 4c 44 60 0a 63 6f 6d 6d 61 6e 64 20 77 69 74  ILD`.command wit
92e0: 68 69 6e 20 74 68 65 20 60 42 55 49 4c 44 60 20  hin the `BUILD` 
92f0: 70 72 6f 67 72 61 6d 20 74 6f 20 63 72 65 61 74  program to creat
9300: 65 20 61 20 6e 65 77 20 4f 53 2f 38 20 73 79 73  e a new OS/8 sys
9310: 74 65 6d 20 68 65 61 64 0a 77 69 74 68 20 6e 65  tem head.with ne
9320: 77 20 76 65 72 73 69 6f 6e 73 20 6f 66 20 60 4f  w versions of `O
9330: 53 38 2e 42 4e 60 20 61 6e 64 20 60 43 44 2e 42  S8.BN` and `CD.B
9340: 4e 60 20 61 73 73 65 6d 62 6c 65 64 20 66 72 6f  N` assembled fro
9350: 6d 20 73 6f 75 72 63 65 2e 0a 0a 45 78 61 6d 70  m source...Examp
9360: 6c 65 3a 0a 0a 54 6f 20 63 72 65 61 74 65 20 61  le:..To create a
9370: 20 73 79 73 74 65 6d 20 74 61 70 65 20 77 69 74   system tape wit
9380: 68 20 6e 65 77 20 4f 53 2f 38 20 4b 65 79 62 6f  h new OS/8 Keybo
9390: 61 72 64 20 4d 6f 6e 69 74 6f 72 20 61 6e 64 20  ard Monitor and 
93a0: 43 6f 6d 6d 61 6e 64 0a 44 65 63 6f 64 65 72 2c  Command.Decoder,
93b0: 20 74 68 65 20 61 62 6f 76 65 20 65 78 61 6d 70   the above examp
93c0: 6c 65 20 77 6f 75 6c 64 20 61 64 64 20 74 68 65  le would add the
93d0: 20 66 6f 6c 6c 6f 77 69 6e 67 20 6a 75 73 74 20   following just 
93e0: 62 65 66 6f 72 65 20 74 68 65 0a 60 42 4f 4f 54  before the.`BOOT
93f0: 60 20 6c 69 6e 65 3a 0a 0a 20 20 20 20 42 55 49  ` line:..    BUI
9400: 4c 44 20 44 53 4b 3a 4f 53 38 2e 42 4e 20 44 53  LD DSK:OS8.BN DS
9410: 4b 3a 43 44 2e 42 4e 0a 0a 4e 6f 74 65 3a 20 4f  K:CD.BN..Note: O
9420: 53 2f 38 20 64 69 73 61 62 6c 65 73 20 74 68 65  S/8 disables the
9430: 20 60 42 55 49 4c 44 60 20 63 6f 6d 6d 61 6e 64   `BUILD` command
9440: 20 77 69 74 68 69 6e 20 74 68 65 20 60 42 55 49   within the `BUI
9450: 4c 44 60 0a 70 72 6f 67 72 61 6d 20 61 66 74 65  LD`.program afte
9460: 72 20 69 74 20 68 61 73 20 62 65 65 6e 20 69 73  r it has been is
9470: 73 75 65 64 20 64 75 72 69 6e 67 20 61 20 72 75  sued during a ru
9480: 6e 2e 20 20 54 72 61 64 69 74 69 6f 6e 61 6c 6c  n.  Traditionall
9490: 79 2c 20 74 68 65 0a 66 69 72 73 74 20 61 63 74  y, the.first act
94a0: 69 6f 6e 20 61 66 74 65 72 20 61 20 60 42 4f 4f  ion after a `BOO
94b0: 54 60 20 6f 66 20 61 20 6e 65 77 6c 79 20 62 75  T` of a newly bu
94c0: 69 6c 74 20 73 79 73 74 65 6d 20 69 73 20 74 6f  ilt system is to
94d0: 20 60 53 41 56 45 60 20 74 68 65 0a 6a 75 73 74   `SAVE` the.just
94e0: 20 65 78 65 63 75 74 65 64 20 6d 65 6d 6f 72 79   executed memory
94f0: 20 69 6d 61 67 65 20 6f 66 20 60 42 55 49 4c 44   image of `BUILD
9500: 60 2e 20 20 54 68 61 74 20 73 61 76 65 73 20 61  `.  That saves a
9510: 6c 6c 20 74 68 65 20 64 65 76 69 63 65 0a 63 6f  ll the device.co
9520: 6e 66 69 67 75 72 61 74 69 6f 6e 73 2c 20 62 75  nfigurations, bu
9530: 74 20 61 6c 73 6f 20 73 61 76 65 73 20 61 20 76  t also saves a v
9540: 65 72 73 69 6f 6e 20 77 69 74 68 20 74 68 65 20  ersion with the 
9550: 60 42 55 49 4c 44 60 20 63 6f 6d 6d 61 6e 64 0a  `BUILD` command.
9560: 77 69 74 68 69 6e 20 74 68 65 20 60 42 55 49 4c  within the `BUIL
9570: 44 60 20 70 72 6f 67 72 61 6d 20 64 69 73 61 62  D` program disab
9580: 6c 65 64 2e 0a 0a 46 6f 72 20 74 68 69 73 20 72  led...For this r
9590: 65 61 73 6f 6e 2c 20 79 6f 75 20 68 61 76 65 20  eason, you have 
95a0: 74 6f 20 72 75 6e 20 61 20 66 72 65 73 68 20 76  to run a fresh v
95b0: 65 72 73 69 6f 6e 20 6f 66 20 60 42 55 49 4c 44  ersion of `BUILD
95c0: 60 20 66 72 6f 6d 0a 64 69 73 74 72 69 62 75 74  ` from.distribut
95d0: 69 6f 6e 20 6d 65 64 69 61 20 72 61 74 68 65 72  ion media rather
95e0: 20 74 68 61 6e 20 6f 6e 65 20 73 61 76 65 64 20   than one saved 
95f0: 66 72 6f 6d 20 61 20 70 72 65 76 69 6f 75 73 20  from a previous 
9600: 72 75 6e 2e 20 20 54 68 69 73 0a 73 69 74 75 61  run.  This.situa
9610: 74 69 6f 6e 20 69 73 20 77 68 61 74 20 64 72 6f  tion is what dro
9620: 76 65 20 73 75 70 70 6f 72 74 20 66 6f 72 20 74  ve support for t
9630: 68 65 20 5f 61 72 67 75 6d 65 6e 74 5f 20 73 70  he _argument_ sp
9640: 65 63 69 66 69 65 72 20 74 6f 20 6e 61 6d 65 0a  ecifier to name.
9650: 74 68 65 20 6c 6f 63 61 74 69 6f 6e 20 6f 66 20  the location of 
9660: 74 68 65 20 70 72 6f 67 72 61 6d 20 74 6f 20 72  the program to r
9670: 75 6e 20 72 61 74 68 65 72 20 74 68 61 6e 20 61  un rather than a
9680: 6c 77 61 79 73 20 72 75 6e 6e 69 6e 67 20 66 72  lways running fr
9690: 6f 6d 20 61 0a 64 65 66 61 75 6c 74 20 6c 6f 63  om a.default loc
96a0: 61 74 69 6f 6e 2e 0a 0a 41 6c 73 6f 2c 20 60 42  ation...Also, `B
96b0: 55 49 4c 44 60 20 69 73 20 74 6f 6f 20 73 65 6e  UILD` is too sen
96c0: 73 69 74 69 76 65 20 74 6f 20 74 68 65 20 6c 6f  sitive to the lo
96d0: 63 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 60 4f  cation of the `O
96e0: 53 38 2e 42 4e 60 20 61 6e 64 0a 60 43 44 2e 42  S8.BN` and.`CD.B
96f0: 4e 60 20 66 69 6c 65 73 2e 20 49 74 20 70 72 65  N` files. It pre
9700: 74 74 79 20 6d 75 63 68 20 6f 6e 6c 79 20 77 6f  tty much only wo
9710: 72 6b 73 20 69 66 20 79 6f 75 20 75 73 65 20 60  rks if you use `
9720: 50 54 52 3a 60 20 6f 72 20 60 44 53 4b 3a 60 2e  PTR:` or `DSK:`.
9730: 0a 41 6e 79 74 68 69 6e 67 20 65 6c 73 65 20 73  .Anything else s
9740: 65 65 6d 73 20 74 6f 20 6a 75 73 74 20 68 61 6e  eems to just han
9750: 67 2e 20 20 49 20 62 65 6c 69 65 76 65 20 74 68  g.  I believe th
9760: 65 20 72 6f 6f 74 20 63 61 75 73 65 20 69 73 20  e root cause is 
9770: 74 68 61 74 2c 0a 61 6c 74 68 6f 75 67 68 20 74  that,.although t
9780: 68 65 20 64 65 76 69 63 65 20 61 6e 64 20 66 69  he device and fi
9790: 6c 65 20 61 72 65 20 70 61 72 73 65 64 2c 20 74  le are parsed, t
97a0: 68 65 20 61 63 74 75 61 6c 20 64 65 76 69 63 65  he actual device
97b0: 20 68 61 73 20 74 6f 20 62 65 0a 65 69 74 68 65   has to be.eithe
97c0: 72 20 60 50 54 52 3a 60 20 6f 72 20 74 68 65 20  r `PTR:` or the 
97d0: 61 63 74 69 76 65 20 73 79 73 74 65 6d 20 64 65  active system de
97e0: 76 69 63 65 2e 0a 0a 60 6f 73 38 2d 72 75 6e 60  vice...`os8-run`
97f0: 20 63 6f 6e 74 61 69 6e 73 20 74 77 6f 20 6c 69   contains two li
9800: 73 74 73 20 6f 66 20 6b 65 79 77 6f 72 64 73 20  sts of keywords 
9810: 74 68 61 74 20 68 61 76 65 20 62 65 65 6e 20 73  that have been s
9820: 65 74 20 61 73 20 65 6e 61 62 6c 65 64 0a 6f 72  et as enabled.or
9830: 20 64 69 73 61 62 6c 65 64 2e 20 20 54 68 65 20   disabled.  The 
9840: 73 65 74 74 69 6e 67 20 69 73 20 64 6f 6e 65 20  setting is done 
9850: 65 69 74 68 65 72 20 77 69 74 68 20 60 6f 73 38  either with `os8
9860: 2d 72 75 6e 60 20 63 6f 6d 6d 61 6e 64 20 6c 69  -run` command li
9870: 6e 65 0a 61 72 67 75 6d 65 6e 74 73 20 6f 72 20  ne.arguments or 
9880: 77 69 74 68 20 74 68 65 20 60 65 6e 61 62 6c 65  with the `enable
9890: 60 20 61 6e 64 20 60 64 69 73 61 62 6c 65 60 20  ` and `disable` 
98a0: 63 6f 6d 6d 61 6e 64 73 20 28 64 6f 63 75 6d 65  commands (docume
98b0: 6e 74 65 64 0a 62 65 6c 6f 77 2e 29 0a 0a 54 77  nted.below.)..Tw
98c0: 6f 20 6c 69 73 74 73 20 61 72 65 20 72 65 71 75  o lists are requ
98d0: 69 72 65 64 20 62 65 63 61 75 73 65 20 64 65 66  ired because def
98e0: 61 75 6c 74 20 62 65 68 61 76 69 6f 72 20 69 73  ault behavior is
98f0: 20 64 69 66 66 65 72 65 6e 74 20 66 6f 72 0a 65   different for.e
9900: 6e 61 62 6c 65 6d 65 6e 74 20 76 65 72 73 75 73  nablement versus
9910: 20 64 69 73 61 62 6c 65 6d 65 6e 74 2e 0a 0a 54   disablement...T
9920: 68 65 20 60 62 65 67 69 6e 20 65 6e 61 62 6c 65  he `begin enable
9930: 64 60 20 62 6c 6f 63 6b 20 69 73 20 6f 6e 6c 79  d` block is only
9940: 20 65 78 65 63 75 74 65 64 20 69 66 20 74 68 65   executed if the
9950: 20 60 65 6e 61 62 6c 65 64 60 20 6c 69 73 74 0a   `enabled` list.
9960: 63 6f 6e 74 61 69 6e 73 20 74 68 65 20 6b 65 79  contains the key
9970: 77 6f 72 64 2e 20 49 66 20 6e 6f 20 73 75 63 68  word. If no such
9980: 20 6b 65 79 77 6f 72 64 20 69 73 20 66 6f 75 6e   keyword is foun
9990: 64 2c 20 74 68 65 20 62 6c 6f 63 6b 20 69 73 20  d, the block is 
99a0: 69 67 6e 6f 72 65 64 2e 0a 0a 54 68 65 20 60 62  ignored...The `b
99b0: 65 67 69 6e 20 64 65 66 61 75 6c 74 60 20 62 6c  egin default` bl
99c0: 6f 63 6b 20 69 73 20 65 78 65 63 75 74 65 64 20  ock is executed 
99d0: 62 79 20 64 65 66 61 75 6c 74 20 75 6e 6c 65 73  by default unles
99e0: 73 20 74 68 65 20 60 64 69 73 61 62 6c 65 64 60  s the `disabled`
99f0: 0a 6c 69 73 74 20 63 6f 6e 74 61 69 6e 73 20 74  .list contains t
9a00: 68 65 20 6b 65 79 77 6f 72 64 2e 20 49 66 20 73  he keyword. If s
9a10: 75 63 68 20 61 20 6b 65 79 77 6f 72 64 20 69 73  uch a keyword is
9a20: 20 66 6f 75 6e 64 2c 20 74 68 65 20 62 6c 6f 63   found, the bloc
9a30: 6b 20 69 73 20 69 67 6e 6f 72 65 64 2e 0a 0a 54  k is ignored...T
9a40: 68 65 20 60 64 65 66 61 75 6c 74 60 20 63 6f 6e  he `default` con
9a50: 73 74 72 75 63 74 20 61 6c 6c 6f 77 73 20 63 72  struct allows cr
9a60: 65 61 74 69 6f 6e 20 6f 66 20 73 63 72 69 70 74  eation of script
9a70: 73 20 77 69 74 68 20 63 6f 6e 64 69 74 69 6f 6e  s with condition
9a80: 61 6c 0a 65 78 65 63 75 74 69 6f 6e 20 20 77 69  al.execution  wi
9a90: 74 68 6f 75 74 20 77 6f 72 72 79 69 6e 67 20 61  thout worrying a
9aa0: 62 6f 75 74 20 69 6e 66 6f 72 6d 69 6e 67 20 74  bout informing t
9ab0: 68 65 20 62 75 69 6c 64 20 73 79 73 74 65 6d 20  he build system 
9ac0: 61 62 6f 75 74 20 6e 65 77 0a 65 6e 61 62 6c 65  about new.enable
9ad0: 6d 65 6e 74 20 6b 65 79 77 6f 72 64 73 2e 0a 20  ment keywords.. 
9ae0: 0a 41 6c 6c 20 74 68 65 73 65 20 63 6f 6e 64 69  .All these condi
9af0: 74 69 6f 6e 61 6c 20 61 6e 64 20 73 75 62 2d 63  tional and sub-c
9b00: 6f 6d 6d 61 6e 64 20 62 6c 6f 63 6b 73 20 6d 75  ommand blocks mu
9b10: 73 74 20 74 65 72 6d 69 6e 61 74 65 20 77 69 74  st terminate wit
9b20: 68 20 61 6e 0a 60 65 6e 64 60 20 63 6f 6d 6d 61  h an.`end` comma
9b30: 6e 64 2e 20 20 54 68 65 20 5f 6b 65 79 77 6f 72  nd.  The _keywor
9b40: 64 5f 20 6f 66 20 74 68 65 20 65 6e 64 20 63 6f  d_ of the end co
9b50: 6d 6d 61 6e 64 20 6d 75 73 74 20 61 6c 77 61 79  mmand must alway
9b60: 73 20 6d 61 74 63 68 20 74 68 65 0a 5f 62 65 67  s match the._beg
9b70: 69 6e 5f 20 63 6f 6d 6d 61 6e 64 2e 20 20 54 68  in_ command.  Th
9b80: 65 20 61 72 67 75 6d 65 6e 74 20 6f 66 20 60 65  e argument of `e
9b90: 6e 61 62 6c 65 64 60 20 61 6e 64 20 60 64 65 66  nabled` and `def
9ba0: 61 75 6c 74 60 20 62 6c 6f 63 6b 73 0a 6d 75 73  ault` blocks.mus
9bb0: 74 20 61 6c 73 6f 20 6d 61 74 63 68 2e 20 4e 65  t also match. Ne
9bc0: 73 74 69 6e 67 20 69 73 20 70 6f 73 73 69 62 6c  sting is possibl
9bd0: 65 2c 20 62 75 74 20 63 61 72 65 20 73 68 6f 75  e, but care shou
9be0: 6c 64 20 62 65 20 65 78 65 72 63 69 73 65 64 20  ld be exercised 
9bf0: 74 6f 0a 61 76 6f 69 64 20 63 72 6f 73 73 69 6e  to.avoid crossin
9c00: 67 20 6e 65 73 74 69 6e 67 20 62 6f 75 6e 64 61  g nesting bounda
9c10: 72 69 65 73 2e 0a 0a 46 6f 72 20 65 78 61 6d 70  ries...For examp
9c20: 6c 65 3a 0a 0a 20 20 20 20 62 65 67 69 6e 20 65  le:..    begin e
9c30: 6e 61 62 6c 65 64 20 6f 75 74 65 72 0a 20 20 20  nabled outer.   
9c40: 20 62 65 67 69 6e 20 65 6e 61 62 6c 65 64 20 69   begin enabled i
9c50: 6e 6e 65 72 0a 20 20 20 20 65 6e 64 20 65 6e 61  nner.    end ena
9c60: 62 6c 65 64 20 69 6e 6e 65 72 0a 20 20 20 20 65  bled inner.    e
9c70: 6e 64 20 65 6e 61 62 6c 65 64 20 6f 75 74 65 72  nd enabled outer
9c80: 0a 0a 69 73 20 63 6f 72 72 65 63 74 2c 20 62 75  ..is correct, bu
9c90: 74 3a 0a 0a 20 20 20 20 62 65 67 69 6e 20 65 6e  t:..    begin en
9ca0: 61 62 6c 65 64 20 66 69 72 73 74 0a 20 20 20 20  abled first.    
9cb0: 62 65 67 69 6e 20 65 6e 61 62 6c 65 64 20 73 65  begin enabled se
9cc0: 63 6f 6e 64 0a 20 20 20 20 65 6e 64 20 65 6e 61  cond.    end ena
9cd0: 62 6c 65 64 20 66 69 72 73 74 0a 20 20 20 20 65  bled first.    e
9ce0: 6e 64 20 65 6e 61 62 6c 65 64 20 73 65 63 6f 6e  nd enabled secon
9cf0: 64 0a 0a 69 73 20 61 6e 20 65 72 72 6f 72 2e 0a  d..is an error..
9d00: 0a 0a 23 23 23 20 3c 61 20 69 64 3d 22 65 6e 2d  ..### <a id="en-
9d10: 64 69 73 2d 63 6f 6d 6d 22 3e 3c 2f 61 3e 60 65  dis-comm"></a>`e
9d20: 6e 61 62 6c 65 60 20 2f 20 60 64 69 73 61 62 6c  nable` / `disabl
9d30: 65 60 20 e2 80 94 20 53 65 74 20 61 6e 20 65 6e  e` — Set an en
9d40: 61 62 6c 65 6d 65 6e 74 20 6f 72 20 64 69 73 61  ablement or disa
9d50: 62 6c 65 6d 65 6e 74 2e 0a 0a 60 65 6e 61 62 6c  blement...`enabl
9d60: 65 60 20 5f 6b 65 79 77 6f 72 64 5f 0a 0a 60 64  e` _keyword_..`d
9d70: 69 73 61 62 6c 65 60 20 5f 6b 65 79 77 6f 72 64  isable` _keyword
9d80: 5f 0a 0a 54 68 65 20 60 65 6e 61 62 6c 65 60 20  _..The `enable` 
9d90: 61 6e 64 20 60 64 69 73 61 62 6c 65 60 20 63 6f  and `disable` co
9da0: 6d 6d 61 6e 64 73 20 61 72 65 20 75 73 65 64 20  mmands are used 
9db0: 77 69 74 68 69 6e 20 73 63 72 69 70 74 73 20 74  within scripts t
9dc0: 6f 0a 64 79 6e 61 6d 69 63 61 6c 6c 79 20 73 65  o.dynamically se
9dd0: 74 20 65 6e 61 62 6c 65 6d 65 6e 74 20 61 6e 64  t enablement and
9de0: 20 64 69 73 61 62 6c 65 6d 65 6e 74 2e 20 20 54   disablement.  T
9df0: 68 69 73 20 65 78 70 61 6e 64 73 20 74 68 65 20  his expands the 
9e00: 73 63 6f 70 65 20 6f 66 0a 63 6f 6e 64 69 74 69  scope of.conditi
9e10: 6f 6e 61 6c 20 65 78 65 63 75 74 69 6f 6e 20 62  onal execution b
9e20: 65 79 6f 6e 64 20 73 65 74 74 69 6e 67 20 70 61  eyond setting pa
9e30: 73 73 65 64 20 69 6e 20 66 72 6f 6d 20 74 68 65  ssed in from the
9e40: 20 60 6f 73 38 2d 72 75 6e 60 0a 63 6f 6d 6d 61   `os8-run`.comma
9e50: 6e 64 20 6c 69 6e 65 2e 0a 0a 41 73 20 6d 65 6e  nd line...As men
9e60: 74 69 6f 6e 65 64 20 61 62 6f 76 65 2c 20 74 68  tioned above, th
9e70: 65 72 65 20 61 72 65 20 74 77 6f 20 6c 69 73 74  ere are two list
9e80: 73 20 6f 66 20 6b 65 79 77 6f 72 64 73 2c 20 6f  s of keywords, o
9e90: 6e 65 20 66 6f 72 20 60 65 6e 61 62 6c 65 64 60  ne for `enabled`
9ea0: 0a 6b 65 79 77 6f 72 64 73 20 61 6e 64 20 6f 6e  .keywords and on
9eb0: 65 20 66 6f 72 20 60 64 69 73 61 62 6c 65 64 60  e for `disabled`
9ec0: 20 6b 65 79 77 6f 72 64 73 2e 0a 0a 54 68 65 20   keywords...The 
9ed0: 60 65 6e 61 62 6c 65 60 20 63 6f 6d 6d 61 6e 64  `enable` command
9ee0: 20 6e 6f 74 20 6f 6e 6c 79 20 61 64 64 73 20 74   not only adds t
9ef0: 68 65 20 6b 65 79 77 6f 72 64 20 74 6f 20 74 68  he keyword to th
9f00: 65 20 60 65 6e 61 62 6c 65 64 60 0a 6c 69 73 74  e `enabled`.list
9f10: 2e 20 49 74 20 61 6c 73 6f 20 6c 6f 6f 6b 73 20  . It also looks 
9f20: 66 6f 72 20 74 68 65 20 6b 65 79 77 6f 72 64 20  for the keyword 
9f30: 6f 6e 20 74 68 65 20 60 64 69 73 61 62 6c 65 64  on the `disabled
9f40: 60 20 6c 69 73 74 2e 20 20 49 66 20 74 68 65 0a  ` list.  If the.
9f50: 6b 65 79 77 6f 72 64 20 69 73 20 66 6f 75 6e 64  keyword is found
9f60: 20 6f 6e 20 74 68 65 20 60 64 69 73 61 62 6c 65   on the `disable
9f70: 64 60 20 6c 69 73 74 2c 20 69 74 20 69 73 20 2a  d` list, it is *
9f80: 2a 72 65 6d 6f 76 65 64 2a 2a 2e 0a 0a 53 69 6d  *removed**...Sim
9f90: 69 6c 61 72 6c 79 2c 20 74 68 65 20 60 64 69 73  ilarly, the `dis
9fa0: 61 62 6c 65 60 20 63 6f 6d 6d 61 6e 64 20 61 64  able` command ad
9fb0: 64 73 20 74 68 65 20 6b 65 79 77 6f 72 64 20 74  ds the keyword t
9fc0: 6f 20 74 68 65 20 60 64 69 73 61 62 6c 65 64 60  o the `disabled`
9fd0: 0a 6c 69 73 74 2c 20 61 6e 64 20 73 65 61 72 63  .list, and searc
9fe0: 68 65 73 20 74 68 65 20 60 65 6e 61 62 6c 65 64  hes the `enabled
9ff0: 60 20 6c 69 73 74 20 66 6f 72 20 74 68 65 20 6b  ` list for the k
a000: 65 79 77 6f 72 64 2e 20 20 49 66 20 69 74 20 69  eyword.  If it i
a010: 73 20 66 6f 75 6e 64 0a 6f 6e 20 74 68 65 20 60  s found.on the `
a020: 65 6e 61 62 6c 65 64 60 20 6c 69 73 74 2c 20 69  enabled` list, i
a030: 74 20 69 73 20 72 65 6d 6f 76 65 64 2e 0a 0a 41  t is removed...A
a040: 20 6b 65 79 77 6f 72 64 2c 20 77 69 6c 6c 20 61   keyword, will a
a050: 70 70 65 61 72 20 6f 6e 6c 79 20 6f 6e 63 65 2c  ppear only once,
a060: 20 69 66 20 70 72 65 73 65 6e 74 20 61 74 20 61   if present at a
a070: 6c 6c 2c 20 61 6e 64 20 77 69 6c 6c 20 62 65 20  ll, and will be 
a080: 6f 6e 0a 6f 6e 6c 79 20 6f 6e 65 20 6f 66 20 74  on.only one of t
a090: 68 65 20 74 77 6f 20 6c 69 73 74 73 2e 0a 0a 54  he two lists...T
a0a0: 68 65 20 72 75 6c 65 20 69 73 3a 20 4c 61 73 74  he rule is: Last
a0b0: 20 61 63 74 69 6f 6e 20 77 69 6e 73 2e 0a 0a 57   action wins...W
a0c0: 68 79 20 61 6c 6c 20 74 68 69 73 20 63 6f 6d 70  hy all this comp
a0d0: 6c 65 78 69 74 79 3f 20 48 65 72 65 20 69 73 20  lexity? Here is 
a0e0: 61 6e 20 65 78 61 6d 70 6c 65 20 77 65 20 74 72  an example we tr
a0f0: 69 70 70 65 64 20 6f 76 65 72 20 61 6e 64 20 68  ipped over and h
a100: 61 64 20 74 6f 0a 69 6d 70 6c 65 6d 65 6e 74 3a  ad to.implement:
a110: 20 20 57 65 20 6e 6f 72 6d 61 6c 6c 79 20 61 70    We normally ap
a120: 70 6c 79 20 70 61 74 63 68 65 73 20 74 6f 20 74  ply patches to t
a130: 68 65 20 76 65 72 73 69 6f 6e 20 6f 66 20 60 46  he version of `F
a140: 55 54 49 4c 60 20 74 68 61 74 0a 63 61 6d 65 20  UTIL` that.came 
a150: 6f 6e 20 74 68 65 20 4f 53 2f 38 20 76 33 64 20  on the OS/8 v3d 
a160: 64 69 73 74 72 69 62 75 74 69 6f 6e 20 44 45 43  distribution DEC
a170: 74 61 70 65 73 2e 20 20 57 65 20 61 6c 73 6f 20  tapes.  We also 
a180: 68 61 76 65 20 61 6e 20 61 64 64 2d 6f 6e 0a 66  have an add-on.f
a190: 6f 72 20 74 68 65 20 60 4d 41 43 52 45 4c 60 20  or the `MACREL` 
a1a0: 61 73 73 65 6d 62 6c 65 72 2e 20 20 54 68 61 74  assembler.  That
a1b0: 20 61 64 64 2d 6f 6e 20 63 6f 6e 74 61 69 6e 73   add-on contains
a1c0: 20 61 20 76 65 72 73 69 6f 6e 20 6f 66 20 60 46   a version of `F
a1d0: 55 54 49 4c 60 0a 77 69 74 68 20 75 70 64 61 74  UTIL`.with updat
a1e0: 65 73 20 72 65 71 75 69 72 65 64 20 74 6f 20 77  es required to w
a1f0: 6f 72 6b 20 77 69 74 68 20 62 69 6e 61 72 69 65  ork with binarie
a200: 73 20 61 73 73 65 6d 62 6c 65 64 20 77 69 74 68  s assembled with
a210: 20 60 4d 41 43 52 45 4c 60 20 76 32 2e 0a 54 68   `MACREL` v2..Th
a220: 65 20 60 76 33 64 2d 72 6b 30 35 2e 6f 73 38 60  e `v3d-rk05.os8`
a230: 20 73 63 72 69 70 74 20 6e 65 65 64 65 64 20 74   script needed t
a240: 6f 20 65 69 74 68 65 72 20 61 76 6f 69 64 20 74  o either avoid t
a250: 72 79 69 6e 67 20 74 6f 0a 70 61 74 63 68 20 61  rying to.patch a
a260: 6e 20 75 70 64 61 74 65 64 20 60 46 55 54 49 4c  n updated `FUTIL
a270: 60 20 69 66 20 60 4d 41 43 52 45 4c 60 20 77 61  ` if `MACREL` wa
a280: 73 20 70 72 65 73 65 6e 74 2c 20 6f 72 20 74 6f  s present, or to
a290: 20 70 65 72 66 6f 72 6d 20 74 68 65 0a 70 61 74   perform the.pat
a2a0: 63 68 69 6e 67 20 61 63 74 69 6f 6e 20 69 66 20  ching action if 
a2b0: 60 4d 41 43 52 45 4c 60 20 77 61 73 20 6e 6f 74  `MACREL` was not
a2c0: 20 70 72 65 73 65 6e 74 2e 0a 0a 41 20 66 75 72   present...A fur
a2d0: 74 68 65 72 20 63 6f 6d 70 6c 69 63 61 74 69 6f  ther complicatio
a2e0: 6e 20 69 73 20 74 68 61 74 20 77 65 20 6f 70 74  n is that we opt
a2f0: 20 69 6e 20 74 6f 20 69 6e 63 6c 75 64 69 6e 67   in to including
a300: 20 74 68 65 20 60 4d 41 43 52 45 4c 60 0a 61 64   the `MACREL`.ad
a310: 64 2d 6f 6e 20 62 79 20 64 65 66 61 75 6c 74 2e  d-on by default.
a320: 20 20 57 65 20 64 65 61 6c 20 77 69 74 68 20 74    We deal with t
a330: 68 69 73 20 74 72 69 70 6c 65 20 6e 65 67 61 74  his triple negat
a340: 69 76 65 20 62 79 20 73 65 74 74 69 6e 67 0a 60  ive by setting.`
a350: 64 69 73 61 62 6c 65 20 66 75 74 69 6c 5f 70 61  disable futil_pa
a360: 74 63 68 60 20 62 79 20 64 65 66 61 75 6c 74 2c  tch` by default,
a370: 20 75 6e 6c 65 73 73 20 60 6d 61 63 72 65 6c 60   unless `macrel`
a380: 20 67 65 74 73 20 64 69 73 61 62 6c 65 64 3a 0a   gets disabled:.
a390: 0a 20 20 20 20 23 20 4d 41 43 52 45 4c 20 69 73  .    # MACREL is
a3a0: 20 65 6e 61 62 6c 65 64 20 62 79 20 64 65 66 61   enabled by defa
a3b0: 75 6c 74 20 77 69 74 68 20 6e 6f 20 73 65 74 74  ult with no sett
a3c0: 69 6e 67 73 2e 0a 20 20 20 20 23 20 57 65 20 6e  ings..    # We n
a3d0: 65 65 64 20 74 6f 20 61 76 6f 69 64 20 70 61 74  eed to avoid pat
a3e0: 63 68 69 6e 67 20 46 55 54 49 4c 20 69 6e 20 74  ching FUTIL in t
a3f0: 68 61 74 20 64 65 66 61 75 6c 74 20 63 61 73 65  hat default case
a400: 0a 20 20 20 20 23 20 53 6f 20 77 65 20 68 61 76  .    # So we hav
a410: 65 20 74 6f 20 73 65 74 20 61 20 64 69 73 61 62  e to set a disab
a420: 6c 65 6d 65 6e 74 20 6f 66 20 74 68 61 74 20 61  lement of that a
a430: 63 74 69 6f 6e 0a 20 20 20 20 23 20 43 6f 6e 64  ction.    # Cond
a440: 69 74 69 6f 6e 61 6c 20 6f 6e 20 6d 61 63 72 65  itional on macre
a450: 6c 20 64 65 66 61 75 6c 74 20 61 73 20 77 65 6c  l default as wel
a460: 6c 2e 0a 20 20 20 20 0a 20 20 20 20 62 65 67 69  l..    .    begi
a470: 6e 20 64 65 66 61 75 6c 74 20 6d 61 63 72 65 6c  n default macrel
a480: 0a 20 20 20 20 64 69 73 61 62 6c 65 20 66 75 74  .    disable fut
a490: 69 6c 5f 70 61 74 63 68 0a 20 20 20 20 65 6e 64  il_patch.    end
a4a0: 20 64 65 66 61 75 6c 74 20 6d 61 63 72 65 6c 0a   default macrel.
a4b0: 20 20 20 20 0a 20 20 20 20 62 65 67 69 6e 20 64      .    begin d
a4c0: 65 66 61 75 6c 74 20 66 75 74 69 6c 5f 70 61 74  efault futil_pat
a4d0: 63 68 0a 20 20 20 20 23 20 54 68 65 20 74 77 6f  ch.    # The two
a4e0: 20 46 55 54 49 4c 20 70 61 74 63 68 65 73 20 6f   FUTIL patches o
a4f0: 6e 6c 79 20 67 65 74 20 61 70 70 6c 69 65 64 20  nly get applied 
a500: 74 6f 20 46 55 54 49 4c 20 56 37 20 77 68 69 63  to FUTIL V7 whic
a510: 68 20 63 6f 6d 65 73 20 77 69 74 68 0a 20 20 20  h comes with.   
a520: 20 23 20 4f 53 2f 38 20 56 33 44 20 74 6f 20 62   # OS/8 V3D to b
a530: 72 69 6e 67 20 69 74 20 75 70 20 74 6f 20 56 37  ring it up to V7
a540: 44 2e 0a 20 20 20 20 23 20 4d 41 43 52 45 4c 20  D..    # MACREL 
a550: 56 32 20 63 6f 6d 65 73 20 77 69 74 68 20 46 55  V2 comes with FU
a560: 54 49 4c 20 56 38 42 2c 20 73 6f 20 74 68 65 73  TIL V8B, so thes
a570: 65 20 70 61 74 63 68 65 73 20 61 72 65 20 73 6b  e patches are sk
a580: 69 70 70 65 64 0a 20 20 20 20 23 20 75 6e 6c 65  ipped.    # unle
a590: 73 73 20 77 65 20 70 61 73 73 20 2d 2d 64 69 73  ss we pass --dis
a5a0: 61 62 6c 65 20 6f 73 38 2d 6d 61 63 72 65 6c 20  able os8-macrel 
a5b0: 74 6f 20 63 6f 6e 66 69 67 75 72 65 2e 0a 20 20  to configure..  
a5c0: 20 20 70 61 74 63 68 20 2e 2e 2f 6d 65 64 69 61    patch ../media
a5d0: 2f 6f 73 38 2f 70 61 74 63 68 65 73 2f 46 55 54  /os8/patches/FUT
a5e0: 49 4c 2d 33 31 2e 32 31 2e 31 4d 2d 76 37 42 2e  IL-31.21.1M-v7B.
a5f0: 70 61 74 63 68 38 0a 20 20 20 20 70 61 74 63 68  patch8.    patch
a600: 20 2e 2e 2f 6d 65 64 69 61 2f 6f 73 38 2f 70 61   ../media/os8/pa
a610: 74 63 68 65 73 2f 46 55 54 49 4c 2d 33 31 2e 32  tches/FUTIL-31.2
a620: 31 2e 32 4d 2d 76 37 44 2e 70 61 74 63 68 38 0a  1.2M-v7D.patch8.
a630: 20 20 20 20 65 6e 64 20 64 65 66 61 75 6c 74 20      end default 
a640: 66 75 74 69 6c 5f 70 61 74 63 68 0a 0a 0a 23 23  futil_patch...##
a650: 23 20 3c 61 20 69 64 3d 22 76 65 72 73 2d 74 65  # <a id="vers-te
a660: 73 74 22 3e 3c 2f 61 3e 20 76 65 72 73 69 6f 6e  st"></a> version
a670: 20 74 65 73 74 0a 0a 54 68 65 20 60 6f 73 38 2d   test..The `os8-
a680: 72 75 6e 60 20 73 63 72 69 70 74 69 6e 67 20 6c  run` scripting l
a690: 61 6e 67 75 61 67 65 20 69 73 20 65 78 70 65 63  anguage is expec
a6a0: 74 65 64 20 74 6f 20 65 76 6f 6c 76 65 20 6f 76  ted to evolve ov
a6b0: 65 72 20 74 69 6d 65 2e 20 20 41 6e 20 69 6e 74  er time.  An int
a6c0: 65 72 6e 61 6c 0a 6c 61 6e 67 75 61 67 65 20 76  ernal.language v
a6d0: 65 72 73 69 6f 6e 20 6e 75 6d 62 65 72 20 69 73  ersion number is
a6e0: 20 6b 65 70 74 2c 20 61 6e 64 20 69 6e 63 72 65   kept, and incre
a6f0: 6d 65 6e 74 65 64 20 77 68 65 6e 20 6d 61 6a 6f  mented when majo
a700: 72 20 6f 72 20 6d 69 6e 6f 72 20 63 68 61 6e 67  r or minor chang
a710: 65 73 0a 61 72 65 20 6d 61 64 65 20 74 6f 20 74  es.are made to t
a720: 68 65 20 6c 61 6e 67 75 61 67 65 2e 0a 0a 54 68  he language...Th
a730: 69 73 20 76 65 72 73 69 6f 6e 20 6e 75 6d 62 65  is version numbe
a740: 72 69 6e 67 20 73 63 68 65 6d 65 20 63 61 6e 20  ring scheme can 
a750: 62 65 20 64 65 74 65 63 74 65 64 20 61 6e 64 20  be detected and 
a760: 61 63 74 65 64 20 75 70 6f 6e 20 77 69 74 68 69  acted upon withi
a770: 6e 20 61 20 73 63 72 69 70 74 0a 62 79 20 73 70  n a script.by sp
a780: 65 63 69 66 79 69 6e 67 20 61 20 60 76 65 72 73  ecifying a `vers
a790: 69 6f 6e 60 20 6d 61 74 63 68 20 73 74 72 69 6e  ion` match strin
a7a0: 67 20 69 6e 20 61 20 60 62 65 67 69 6e 60 20 2f  g in a `begin` /
a7b0: 20 60 65 6e 64 60 20 62 6c 6f 63 6b 2e 0a 0a 54   `end` block...T
a7c0: 68 65 20 6c 61 6e 67 75 61 67 65 20 76 65 72 73  he language vers
a7d0: 69 6f 6e 20 73 74 72 69 6e 67 20 69 73 20 73 65  ion string is se
a7e0: 71 75 65 6e 63 65 20 6f 66 20 6e 75 6d 65 72 69  quence of numeri
a7f0: 63 61 6c 20 73 75 62 20 76 65 72 73 69 6f 6e 20  cal sub version 
a800: 6e 75 6d 62 65 72 73 20 6f 66 20 61 72 62 69 74  numbers of arbit
a810: 72 61 72 79 0a 64 65 70 74 68 20 73 65 70 61 72  rary.depth separ
a820: 61 74 65 64 20 62 79 20 70 65 72 69 6f 64 73 2e  ated by periods.
a830: 20 45 78 61 6d 70 6c 65 73 20 6f 66 20 76 61 6c   Examples of val
a840: 69 64 20 6c 61 6e 67 75 61 67 65 20 76 65 72 73  id language vers
a850: 69 6f 6e 20 73 74 72 69 6e 67 73 3a 0a 0a 20 20  ion strings:..  
a860: 20 20 33 0a 20 20 20 20 33 2e 31 0a 20 20 20 20    3.    3.1.    
a870: 33 2e 31 30 0a 20 20 20 20 33 2e 31 30 2e 31 0a  3.10.    3.10.1.
a880: 0a 45 61 63 68 20 73 75 62 20 76 65 72 73 69 6f  .Each sub versio
a890: 6e 20 69 73 20 61 6e 20 69 6e 74 65 67 65 72 20  n is an integer 
a8a0: 6f 66 20 61 72 62 69 74 72 61 72 79 20 70 72 65  of arbitrary pre
a8b0: 63 69 73 69 6f 6e 2e 0a 0a 43 6c 61 72 69 66 79  cision...Clarify
a8c0: 69 6e 67 20 65 78 6d 70 6c 65 3a 20 20 33 2e 31  ing exmple:  3.1
a8d0: 30 20 69 73 20 68 69 67 68 65 72 20 74 68 61 6e  0 is higher than
a8e0: 20 33 2e 31 2e 30 2e 0a 0a 4e 6f 20 77 68 69 74   3.1.0...No whit
a8f0: 65 73 70 61 63 65 20 69 73 20 61 6c 6c 6f 77 65  espace is allowe
a900: 64 20 77 69 74 68 69 6e 20 61 20 76 65 72 73 69  d within a versi
a910: 6f 6e 20 6d 61 74 63 68 20 73 74 72 69 6e 67 2e  on match string.
a920: 0a 0a 0a 54 68 65 72 65 66 6f 72 65 20 61 20 63  ...Therefore a c
a930: 6f 6e 64 69 74 69 6f 6e 61 6c 20 62 6c 6f 63 6b  onditional block
a940: 20 72 65 71 75 69 72 69 6e 67 20 6c 61 6e 67 75   requiring langu
a950: 61 67 65 20 76 65 72 73 69 6f 6e 20 32 2e 30 20  age version 2.0 
a960: 61 6e 64 20 68 69 67 68 65 72 0a 77 6f 75 6c 64  and higher.would
a970: 20 6c 6f 6f 6b 20 6c 69 6b 65 20 74 68 69 73 3a   look like this:
a980: 0a 0a 20 20 20 20 62 65 67 69 6e 20 76 65 72 73  ..    begin vers
a990: 69 6f 6e 20 32 2e 30 0a 20 20 20 20 23 20 54 68  ion 2.0.    # Th
a9a0: 65 20 73 79 6d 70 72 69 6e 69 20 63 6f 6d 6d 61  e symprini comma
a9b0: 6e 64 20 65 78 69 73 74 73 20 6f 6e 6c 79 20 69  nd exists only i
a9c0: 6e 20 76 65 72 73 69 6f 6e 20 32 20 61 6e 64 20  n version 2 and 
a9d0: 61 62 6f 76 65 2e 0a 20 20 20 20 73 79 6d 70 72  above..    sympr
a9e0: 69 6e 69 0a 20 20 20 20 65 6e 64 20 76 65 72 73  ini.    end vers
a9f0: 69 6f 6e 20 32 2e 30 0a 0a 0a 23 23 23 20 3c 61  ion 2.0...### <a
aa00: 20 69 64 3d 22 70 61 74 63 68 2d 63 6f 6d 6d 22   id="patch-comm"
aa10: 3e 3c 2f 61 3e 60 70 61 74 63 68 60 20 e2 80 94  ></a>`patch` —
aa20: 20 52 75 6e 20 61 20 70 61 74 63 68 20 66 69 6c   Run a patch fil
aa30: 65 2e 0a 0a 60 70 61 74 63 68 60 20 5f 70 61 74  e...`patch` _pat
aa40: 63 68 2d 66 69 6c 65 2d 70 61 74 68 5f 0a 0a 52  ch-file-path_..R
aa50: 75 6e 20 5f 70 61 74 63 68 2d 66 69 6c 65 2d 70  un _patch-file-p
aa60: 61 74 68 5f 20 66 69 6c 65 20 61 73 20 61 20 73  ath_ file as a s
aa70: 63 72 69 70 74 20 74 68 61 74 20 75 73 65 73 20  cript that uses 
aa80: 60 4f 44 54 60 20 6f 72 20 60 46 55 54 49 4c 60  `ODT` or `FUTIL`
aa90: 20 74 6f 0a 70 61 74 63 68 20 74 68 65 20 62 6f   to.patch the bo
aaa0: 6f 74 65 64 20 73 79 73 74 65 6d 20 69 6d 61 67  oted system imag
aab0: 65 2e 0a 0a 0a 23 23 23 20 60 63 6f 6e 66 69 67  e....### `config
aac0: 75 72 65 60 20 e2 80 94 20 50 65 72 66 6f 72 6d  ure` — Perform
aad0: 20 73 70 65 63 69 66 69 63 20 53 49 4d 48 20 63   specific SIMH c
aae0: 6f 6e 66 69 67 75 72 61 74 69 6f 6e 20 61 63 74  onfiguration act
aaf0: 69 76 69 74 69 65 73 2e 0a 0a 60 63 6f 6e 66 69  ivities...`confi
ab00: 67 75 72 65 60 20 5f 64 65 76 69 63 65 5f 20 5f  gure` _device_ _
ab10: 73 65 74 74 69 6e 67 5f 0a 0a 54 68 65 20 73 65  setting_..The se
ab20: 74 74 69 6e 67 73 20 61 72 65 20 64 65 76 69 63  ttings are devic
ab30: 65 20 73 70 65 63 69 66 69 63 3a 0a 0a 7c 20 2d  e specific:..| -
ab40: 2d 2d 2d 2d 2d 2d 2d 20 7c 20 2d 2d 2d 2d 2d 2d  ------- | ------
ab50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ab60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ab70: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ab80: 2d 2d 2d 2d 2d 2d 2d 2d 2d 20 7c 0a 7c 20 2a 2a  --------- |.| **
ab90: 74 61 70 65 2a 2a 20 7c 20 2a 2a 44 45 43 74 61  tape** | **DECta
aba0: 70 65 20 64 65 76 69 63 65 20 73 65 74 74 69 6e  pe device settin
abb0: 67 73 2a 2a 20 20 20 20 20 20 20 20 20 20 20 20  gs**            
abc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
abd0: 20 20 20 20 7c 0a 7c 20 60 64 74 60 20 20 20 20      |.| `dt`    
abe0: 20 7c 20 53 65 74 20 54 43 30 38 20 6f 70 65 72   | Set TC08 oper
abf0: 61 74 69 6f 6e 20 62 79 20 65 6e 61 62 6c 69 6e  ation by enablin
ac00: 67 20 60 64 74 60 20 61 73 20 74 68 65 20 53 49  g `dt` as the SI
ac10: 4d 48 20 44 45 43 74 61 70 65 20 64 65 76 69 63  MH DECtape devic
ac20: 65 2e 20 7c 0a 7c 20 60 74 64 60 20 20 20 20 20  e. |.| `td`     
ac30: 7c 20 53 65 74 20 54 44 38 65 20 6f 70 65 72 61  | Set TD8e opera
ac40: 74 69 6f 6e 20 62 79 20 65 6e 61 62 6c 69 6e 67  tion by enabling
ac50: 20 60 74 64 60 20 61 73 20 74 68 65 20 53 49 4d   `td` as the SIM
ac60: 48 20 44 45 43 54 61 70 65 20 64 65 76 69 63 65  H DECTape device
ac70: 2e 20 7c 0a 7c 20 2d 2d 2d 2d 2d 2d 2d 2d 20 7c  . |.| -------- |
ac80: 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d   ---------------
ac90: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
aca0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
acb0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
acc0: 20 7c 0a 7c 20 2a 2a 74 74 69 2a 2a 20 20 7c 20   |.| **tti**  | 
acd0: 2a 2a 43 6f 6e 73 6f 6c 65 20 74 65 72 6d 69 6e  **Console termin
ace0: 61 6c 20 69 6e 70 75 74 20 64 65 76 69 63 65 20  al input device 
acf0: 73 65 74 74 69 6e 67 73 2a 2a 20 20 20 20 20 20  settings**      
ad00: 20 20 20 20 20 20 20 20 20 7c 0a 7c 20 60 4b 53           |.| `KS
ad10: 52 60 20 20 20 20 7c 20 55 70 70 65 72 20 63 61  R`    | Upper ca
ad20: 73 65 20 6f 6e 6c 79 20 6f 70 65 72 61 74 69 6f  se only operatio
ad30: 6e 2e 20 54 79 70 65 64 20 6c 6f 77 65 72 20 63  n. Typed lower c
ad40: 61 73 65 20 63 68 61 72 61 63 74 65 72 73 20 20  ase characters  
ad50: 20 20 7c 0a 7c 20 20 20 20 20 20 20 20 20 20 7c    |.|          |
ad60: 20 61 72 65 20 75 70 63 61 73 65 64 20 61 75 74   are upcased aut
ad70: 6f 6d 61 74 69 63 61 6c 6c 79 20 62 65 66 6f 72  omatically befor
ad80: 65 20 62 65 69 6e 67 20 73 65 6e 74 20 74 6f 20  e being sent to 
ad90: 4f 53 2f 38 20 20 20 20 20 20 7c 0a 7c 20 60 37  OS/8      |.| `7
ada0: 62 60 20 20 20 20 20 7c 20 53 49 4d 48 20 37 62  b`     | SIMH 7b
adb0: 69 74 20 6d 6f 64 65 2e 20 20 41 6c 6c 20 63 68  it mode.  All ch
adc0: 61 72 61 63 74 65 72 73 20 61 72 65 20 70 61 73  aracters are pas
add0: 73 65 64 20 74 6f 20 4f 53 2f 38 20 20 20 20 20  sed to OS/8     
ade0: 20 20 7c 0a 7c 20 20 20 20 20 20 20 20 20 20 7c    |.|          |
adf0: 20 77 69 74 68 6f 75 74 20 63 61 73 65 20 63 6f   without case co
ae00: 6e 76 65 72 73 69 6f 6e 2e 20 20 20 20 20 20 20  nversion.       
ae10: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
ae20: 20 20 20 20 20 20 20 20 20 20 7c 0a 7c 20 2d 2d            |.| --
ae30: 2d 2d 2d 2d 2d 2d 20 7c 20 2d 2d 2d 2d 2d 2d 2d  ------ | -------
ae40: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ae50: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ae60: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
ae70: 2d 2d 2d 2d 2d 2d 2d 2d 20 7c 0a 7c 20 2a 2a 72  -------- |.| **r
ae80: 78 2a 2a 20 20 20 7c 20 2a 2a 46 6c 6f 70 70 79  x**   | **Floppy
ae90: 20 44 69 73 6b 20 64 65 76 69 63 65 20 73 65 74   Disk device set
aea0: 74 69 6e 67 73 2a 2a 20 20 20 20 20 20 20 20 20  tings**         
aeb0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
aec0: 20 7c 0a 7c 20 60 52 58 38 45 60 20 20 20 7c 20   |.| `RX8E`   | 
aed0: 53 65 74 20 74 68 65 20 53 49 4d 48 20 60 72 78  Set the SIMH `rx
aee0: 60 20 74 6f 20 60 52 58 38 45 60 20 6d 6f 64 65  ` to `RX8E` mode
aef0: 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68   compatible with
af00: 20 52 58 30 31 20 20 20 20 7c 0a 7c 20 20 20 20   RX01    |.|    
af10: 20 20 20 20 20 20 7c 20 46 6c 6f 70 70 79 20 44        | Floppy D
af20: 69 73 6b 20 44 72 69 76 65 73 2e 20 20 20 20 20  isk Drives.     
af30: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
af40: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
af50: 20 7c 0a 7c 20 60 52 58 32 38 60 20 20 20 7c 20   |.| `RX28`   | 
af60: 53 65 74 20 74 68 65 20 53 49 4d 48 20 60 72 78  Set the SIMH `rx
af70: 60 20 74 6f 20 60 52 58 32 38 60 20 6d 6f 64 65  ` to `RX28` mode
af80: 20 63 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68   compatible with
af90: 20 52 58 30 32 20 20 20 20 7c 0a 7c 20 20 20 20   RX02    |.|    
afa0: 20 20 20 20 20 20 7c 20 46 6c 6f 70 70 79 20 44        | Floppy D
afb0: 69 73 6b 20 44 72 69 76 65 73 2e 20 20 20 20 20  isk Drives.     
afc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
afd0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
afe0: 20 7c 0a 7c 20 60 72 78 30 31 60 20 20 20 7c 20   |.| `rx01`   | 
aff0: 53 79 6e 6f 6e 79 6d 20 66 6f 72 20 74 68 65 20  Synonym for the 
b000: 60 52 58 38 45 60 20 6f 70 74 69 6f 6e 2e 20 43  `RX8E` option. C
b010: 6f 6d 70 61 74 69 62 6c 65 20 77 69 74 68 20 52  ompatible with R
b020: 58 30 31 2e 20 20 20 20 20 7c 0a 7c 20 60 72 78  X01.     |.| `rx
b030: 30 32 60 20 20 20 7c 20 53 79 6e 6f 6e 79 6d 20  02`   | Synonym 
b040: 66 6f 72 20 74 68 65 20 60 52 58 32 38 60 20 6f  for the `RX28` o
b050: 70 74 69 6f 6e 2e 20 43 6f 6d 70 61 74 69 62 6c  ption. Compatibl
b060: 65 20 77 69 74 68 20 52 58 30 32 2e 20 20 20 20  e with RX02.    
b070: 20 7c 0a 7c 20 2d 2d 2d 2d 2d 2d 2d 2d 20 7c 20   |.| -------- | 
b080: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
b090: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
b0a0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d  ----------------
b0b0: 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 20  --------------- 
b0c0: 7c 0a 0a 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20  |..This command 
b0d0: 61 6c 6c 6f 77 73 20 72 65 63 6f 6e 66 69 67 75  allows reconfigu
b0e0: 72 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 53 49  ration of the SI
b0f0: 4d 48 20 64 65 76 69 63 65 73 20 64 75 72 69 6e  MH devices durin
b100: 67 20 74 68 65 0a 65 78 65 63 75 74 69 6f 6e 20  g the.execution 
b110: 6f 66 20 61 20 60 6f 73 38 2d 72 75 6e 60 20 73  of a `os8-run` s
b120: 63 72 69 70 74 2e 20 20 54 68 69 73 20 63 6f 6d  cript.  This com
b130: 6d 61 6e 64 20 6d 61 6b 65 73 20 69 74 20 70 6f  mand makes it po
b140: 73 73 69 62 6c 65 20 74 6f 0a 63 72 65 61 74 65  ssible to.create
b150: 20 73 79 73 74 65 6d 20 69 6d 61 67 65 73 20 66   system images f
b160: 6f 72 20 68 61 72 64 77 61 72 65 20 63 6f 6e 66  or hardware conf
b170: 69 67 75 72 61 74 69 6f 6e 73 20 74 68 61 74 20  igurations that 
b180: 61 72 65 20 6e 6f 74 20 77 68 61 74 20 61 72 65  are not what are
b190: 0a 63 6f 6d 6d 6f 6e 79 20 75 73 65 64 20 66 6f  .commony used fo
b1a0: 72 20 4f 53 2f 38 20 6f 70 65 72 61 74 69 6f 6e  r OS/8 operation
b1b0: 20 75 6e 64 65 72 20 53 49 4d 48 2e 0a 0a 54 68   under SIMH...Th
b1c0: 65 20 62 65 73 74 20 65 78 61 6d 70 6c 65 20 69  e best example i
b1d0: 73 20 74 68 65 20 64 69 63 68 6f 74 6f 6d 79 20  s the dichotomy 
b1e0: 62 65 74 77 65 65 6e 20 54 44 38 65 20 61 6e 64  between TD8e and
b1f0: 20 54 43 30 38 20 44 45 43 54 61 70 65 2e 0a 0a   TC08 DECTape...
b200: 54 43 30 38 20 69 73 20 61 20 44 4d 41 20 64 65  TC08 is a DMA de
b210: 76 69 63 65 2e 20 49 74 20 69 73 20 74 72 69 76  vice. It is triv
b220: 69 61 6c 20 74 6f 20 65 6d 75 6c 61 74 65 2e 20  ial to emulate. 
b230: 54 68 65 20 53 49 4d 48 20 64 65 76 69 63 65 20  The SIMH device 
b240: 64 72 69 76 65 72 0a 73 69 6d 70 6c 79 20 63 6f  driver.simply co
b250: 70 69 65 73 20 62 6c 6f 63 6b 73 20 61 72 6f 75  pies blocks arou
b260: 6e 64 20 69 6e 20 74 68 65 20 2e 74 75 35 36 20  nd in the .tu56 
b270: 44 45 43 74 61 70 65 20 69 6d 61 67 65 2e 0a 0a  DECtape image...
b280: 54 44 38 65 20 69 73 20 61 6e 20 69 6e 65 78 70  TD8e is an inexp
b290: 65 6e 73 69 76 65 2c 20 44 45 43 74 61 70 65 20  ensive, DECtape 
b2a0: 69 6e 74 65 72 66 61 63 65 20 6f 6e 20 61 20 73  interface on a s
b2b0: 69 6e 67 6c 65 20 68 65 78 20 77 69 64 74 68 20  ingle hex width 
b2c0: 63 61 72 64 0a 66 6f 72 20 50 44 50 38 20 68 61  card.for PDP8 ha
b2d0: 72 64 77 61 72 65 20 73 75 70 70 6f 72 74 69 6e  rdware supportin
b2e0: 67 20 74 68 65 20 4f 6d 6e 69 62 75 73 26 74 6d  g the Omnibus&tm
b2f0: 2e 20 20 54 68 65 20 43 50 55 20 64 6f 65 73 20  .  The CPU does 
b300: 6d 6f 73 74 20 6f 66 20 74 68 65 0a 77 6f 72 6b  most of the.work
b310: 2e 20 41 6c 74 68 6f 75 67 68 20 61 20 53 49 4d  . Although a SIM
b320: 48 20 65 6d 75 6c 61 74 69 6f 6e 20 69 73 20 61  H emulation is a
b330: 76 61 69 6c 61 62 6c 65 20 66 6f 72 20 54 44 38  vailable for TD8
b340: 65 2c 20 69 74 20 72 75 6e 73 0a 70 65 72 63 65  e, it runs.perce
b350: 70 74 61 62 6c 79 20 61 6e 64 20 6f 66 74 65 6e  ptably and often
b360: 20 75 6e 61 63 63 65 70 74 61 62 6c 79 20 6d 6f   unacceptably mo
b370: 72 65 20 73 6c 6f 77 6c 79 20 74 68 61 6e 20 74  re slowly than t
b380: 68 65 20 73 69 6d 70 6c 65 20 54 43 30 38 0a 65  he simple TC08.e
b390: 6d 75 6c 61 74 69 6f 6e 2e 0a 0a 48 6f 77 65 76  mulation...Howev
b3a0: 65 72 2c 20 68 61 72 64 77 61 72 65 20 69 6e 20  er, hardware in 
b3b0: 74 68 65 20 66 69 65 6c 64 20 6d 6f 73 74 20 6f  the field most o
b3c0: 66 74 65 6e 20 68 61 73 20 74 68 65 20 54 44 38  ften has the TD8
b3d0: 65 20 44 45 43 74 61 70 65 20 62 65 63 61 75 73  e DECtape becaus
b3e0: 65 0a 69 74 20 77 61 73 20 69 6e 65 78 70 65 6e  e.it was inexpen
b3f0: 73 69 76 65 2e 0a 0a 42 79 20 61 6c 6c 6f 77 69  sive...By allowi
b400: 6e 67 20 72 65 63 6f 6e 66 69 67 75 72 61 74 69  ng reconfigurati
b410: 6f 6e 20 69 6e 73 69 64 65 20 61 20 73 63 72 69  on inside a scri
b420: 70 74 2c 20 77 65 20 63 61 6e 20 75 73 65 20 54  pt, we can use T
b430: 43 30 38 20 62 79 0a 64 65 66 61 75 6c 74 2c 20  C08 by.default, 
b440: 73 77 69 74 63 68 20 74 6f 20 54 44 38 65 20 74  switch to TD8e t
b450: 6f 20 72 75 6e 20 60 42 55 49 4c 44 60 20 61 6e  o run `BUILD` an
b460: 64 20 63 72 65 61 74 65 20 2e 74 75 35 35 20 74  d create .tu55 t
b470: 61 70 65 20 69 6d 61 67 65 73 0a 73 75 69 74 61  ape images.suita
b480: 62 6c 65 20 66 6f 72 20 64 65 70 6c 6f 79 6d 65  ble for deployme
b490: 6e 74 20 6f 6e 20 63 6f 6d 6d 6f 6e 6c 79 20 66  nt on commonly f
b4a0: 6f 75 6e 64 20 68 61 72 64 77 61 72 65 20 6f 75  ound hardware ou
b4b0: 74 20 69 6e 20 74 68 65 20 72 65 61 6c 0a 77 6f  t in the real.wo
b4c0: 72 6c 64 2e 20 0a 0a 0a 23 23 20 54 4f 44 4f 73  rld. ...## TODOs
b4d0: 0a 0a 2a 20 41 64 64 20 73 61 6e 69 74 79 20 63  ..* Add sanity c
b4e0: 68 65 63 6b 20 70 61 72 73 65 20 6f 66 20 73 75  heck parse of su
b4f0: 62 2d 63 6f 6d 6d 61 6e 64 73 20 74 6f 20 63 6f  b-commands to co
b500: 6e 66 69 72 6d 20 63 6f 6d 6d 61 6e 64 2e 20 2a  nfirm command. *
b510: 2a 4f 52 2a 2a 20 43 68 61 6e 67 65 20 74 68 65  *OR** Change the
b520: 20 0a 62 65 67 69 6e 20 63 6f 6d 6d 61 6e 64 20   .begin command 
b530: 74 6f 20 74 72 65 61 74 20 5f 61 72 67 75 6d 65  to treat _argume
b540: 6e 74 5f 20 6e 6f 74 20 61 73 20 61 20 66 75 6c  nt_ not as a ful
b550: 6c 20 63 6f 6d 6d 61 6e 64 2c 20 62 75 74 20 6d  l command, but m
b560: 65 72 65 6c 79 0a 61 20 64 65 76 69 63 65 20 66  erely.a device f
b570: 72 6f 6d 20 77 68 69 63 68 20 74 6f 20 66 65 74  rom which to fet
b580: 63 68 20 74 68 65 20 63 6f 6d 6d 61 6e 64 2e 20  ch the command. 
b590: 20 4d 61 79 62 65 20 6d 61 6b 65 20 5f 61 72 67   Maybe make _arg
b5a0: 75 6d 65 6e 74 5f 20 6f 70 74 69 6f 6e 61 6c 2e  ument_ optional.
b5b0: 0a 0a 0a 23 23 20 4e 6f 74 65 73 0a 0a 2a 20 4e  ...## Notes..* N
b5c0: 6f 20 6e 6f 74 65 73 20 61 73 20 6f 66 20 79 65  o notes as of ye
b5d0: 74 2e 0a 0a 23 23 23 20 3c 61 20 69 64 3d 22 6c  t...### <a id="l
b5e0: 69 63 65 6e 73 65 22 3e 3c 2f 61 3e 4c 69 63 65  icense"></a>Lice
b5f0: 6e 73 65 0a 0a 43 6f 70 79 72 69 67 68 74 20 c2  nse..Copyright Â
b600: a9 20 32 30 31 38 20 62 79 20 42 69 6c 6c 20 43  © 2018 by Bill C
b610: 61 74 74 65 79 20 61 6e 64 20 57 61 72 72 65 6e  attey and Warren
b620: 20 59 6f 75 6e 67 2e 20 4c 69 63 65 6e 73 65 64   Young. Licensed
b630: 20 75 6e 64 65 72 20 74 68 65 0a 74 65 72 6d 73   under the.terms
b640: 20 6f 66 20 5b 74 68 65 20 53 49 4d 48 20 6c 69   of [the SIMH li
b650: 63 65 6e 73 65 5d 5b 73 6c 5d 2e 0a 0a 5b 73 6c  cense][sl]...[sl
b660: 5d 3a 20 68 74 74 70 73 3a 2f 2f 74 61 6e 67 65  ]: https://tange
b670: 6e 74 73 6f 66 74 2e 63 6f 6d 2f 70 69 64 70 38  ntsoft.com/pidp8
b680: 69 2f 64 6f 63 2f 74 72 75 6e 6b 2f 53 49 4d 48  i/doc/trunk/SIMH
b690: 2d 4c 49 43 45 4e 53 45 2e 6d 64 0a              -LICENSE.md.