PiDP-8/I Software

Hex Artifact Content
Log In

Artifact 56549eace213270d921b548b9f59ab7b7628ddeb:

Wiki page [Getting Text In] by tangent 2018-01-12 10:59:19.
0000: 44 20 32 30 31 38 2d 30 31 2d 31 32 54 31 30 3a  D 2018-01-12T10:
0010: 35 39 3a 31 39 2e 36 32 32 0a 4c 20 47 65 74 74  59:19.622.L Gett
0020: 69 6e 67 5c 73 54 65 78 74 5c 73 49 6e 0a 4e 20  ing\sText\sIn.N 
0030: 74 65 78 74 2f 78 2d 6d 61 72 6b 64 6f 77 6e 0a  text/x-markdown.
0040: 50 20 34 36 62 37 38 36 65 61 33 39 30 39 31 35  P 46b786ea390915
0050: 65 34 38 32 66 33 37 37 35 37 63 65 37 66 64 62  e482f37757ce7fdb
0060: 63 61 37 61 30 30 37 62 34 37 0a 55 20 74 61 6e  ca7a007b47.U tan
0070: 67 65 6e 74 0a 57 20 36 36 30 33 0a 23 20 49 6e  gent.W 6603.# In
0080: 74 72 6f 64 75 63 74 69 6f 6e 0d 0a 0d 0a 54 68  troduction....Th
0090: 65 72 65 20 61 72 65 20 6d 61 6e 79 20 63 61 73  ere are many cas
00a0: 65 73 20 77 68 65 6e 20 77 6f 72 6b 69 6e 67 20  es when working 
00b0: 77 69 74 68 20 74 68 65 20 50 69 44 50 2d 38 2f  with the PiDP-8/
00c0: 49 20 77 68 65 72 65 20 74 68 65 20 66 69 72 73  I where the firs
00d0: 74 20 70 72 6f 62 6c 65 6d 20 79 6f 75 20 68 61  t problem you ha
00e0: 76 65 20 74 6f 20 73 6f 6c 76 65 20 69 73 20 67  ve to solve is g
00f0: 65 74 74 69 6e 67 20 73 6f 6d 65 20 73 75 62 73  etting some subs
0100: 74 61 6e 74 69 61 6c 20 62 6f 64 79 20 6f 66 20  tantial body of 
0110: 74 65 78 74 20 69 6e 74 6f 20 74 68 65 20 73 69  text into the si
0120: 6d 75 6c 61 74 69 6f 6e 2e 20 54 68 69 73 20 61  mulation. This a
0130: 72 74 69 63 6c 65 20 63 6f 6c 6c 65 63 74 73 20  rticle collects 
0140: 6d 61 6e 79 20 6f 66 20 74 68 65 73 65 20 6d 65  many of these me
0150: 74 68 6f 64 73 2c 20 62 65 63 61 75 73 65 20 6d  thods, because m
0160: 61 6e 79 20 6f 66 20 74 68 65 6d 20 77 6f 72 6b  any of them work
0170: 20 61 63 72 6f 73 73 20 6d 75 6c 74 69 70 6c 65   across multiple
0180: 20 73 6f 66 74 77 61 72 65 20 73 79 73 74 65 6d   software system
0190: 73 2c 20 73 6f 20 61 20 63 65 6e 74 72 61 6c 20  s, so a central 
01a0: 72 65 73 6f 75 72 63 65 20 69 73 20 77 61 6e 74  resource is want
01b0: 65 64 2e 0d 0a 0d 0a 0d 0a 23 20 3c 61 20 69 64  ed.......# <a id
01c0: 3d 22 73 73 68 22 3e 3c 2f 61 3e 53 53 48 0d 0a  ="ssh"></a>SSH..
01d0: 0d 0a 4f 6e 65 20 6d 65 74 68 6f 64 20 69 73 20  ..One method is 
01e0: 74 6f 20 6d 61 6b 65 20 75 73 65 20 6f 66 20 74  to make use of t
01f0: 68 65 20 66 61 63 74 20 74 68 61 74 20 6d 61 6e  he fact that man
0200: 79 20 50 69 44 50 2d 38 2f 49 20 62 75 69 6c 64  y PiDP-8/I build
0210: 73 20 77 69 6c 6c 20 62 65 20 62 61 73 65 64 20  s will be based 
0220: 6f 6e 20 61 20 6e 65 74 77 6f 72 6b 65 64 20 50  on a networked P
0230: 69 2c 20 77 68 69 63 68 20 70 72 65 74 74 79 20  i, which pretty 
0240: 6d 75 63 68 20 65 78 63 6c 75 64 65 73 20 6f 6e  much excludes on
0250: 6c 79 20 74 68 65 20 50 69 20 41 2b 20 61 6e 64  ly the Pi A+ and
0260: 20 74 68 65 20 6f 72 69 67 69 6e 61 6c 20 76 65   the original ve
0270: 72 73 69 6f 6e 20 6f 66 20 74 68 65 20 50 69 20  rsion of the Pi 
0280: 5a 65 72 6f 2c 20 61 6e 64 20 74 68 65 6e 20 6f  Zero, and then o
0290: 6e 6c 79 20 69 66 20 79 6f 75 20 68 61 76 65 6e  nly if you haven
02a0: 27 74 20 66 69 78 65 64 20 74 68 65 20 6c 61 63  't fixed the lac
02b0: 6b 20 62 79 20 61 64 64 69 6e 67 20 61 20 55 53  k by adding a US
02c0: 42 20 6e 65 74 77 6f 72 6b 20 61 64 61 70 74 65  B network adapte
02d0: 72 2e 20 0d 0a 0d 0a 54 68 65 20 5b 62 69 6e 61  r. ....The [bina
02e0: 72 79 20 4f 53 20 69 6d 61 67 65 73 5d 28 2f 29  ry OS images](/)
02f0: 20 73 68 69 70 70 65 64 20 62 79 20 74 68 69 73   shipped by this
0300: 20 70 72 6f 6a 65 63 74 20 68 61 76 65 20 53 53   project have SS
0310: 48 20 65 6e 61 62 6c 65 64 20 61 6e 64 20 6c 69  H enabled and li
0320: 73 74 65 6e 69 6e 67 20 62 79 20 64 65 66 61 75  stening by defau
0330: 6c 74 2c 20 61 6e 64 20 69 74 27 73 20 65 61 73  lt, and it's eas
0340: 79 20 74 6f 20 65 6e 61 62 6c 65 20 69 74 20 6f  y to enable it o
0350: 6e 20 79 6f 75 72 20 6f 77 6e 20 50 69 20 69 66  n your own Pi if
0360: 20 79 6f 75 20 62 75 69 6c 74 20 69 74 20 75 70   you built it up
0370: 20 66 72 6f 6d 20 73 6f 6d 65 20 6f 74 68 65 72   from some other
0380: 20 4f 53 2e 20 46 6f 72 20 52 61 73 70 62 69 61   OS. For Raspbia
0390: 6e 20 53 74 72 65 74 63 68 20 61 6e 64 20 6e 65  n Stretch and ne
03a0: 77 65 72 2c 20 74 68 65 20 63 6f 6d 6d 61 6e 64  wer, the command
03b0: 73 20 61 72 65 3a 0d 0a 0d 0a 20 20 20 20 20 24  s are:....     $
03c0: 20 73 75 64 6f 20 73 79 73 74 65 6d 63 74 6c 20   sudo systemctl 
03d0: 65 6e 61 62 6c 65 20 73 73 68 0d 0a 20 20 20 20  enable ssh..    
03e0: 20 24 20 73 75 64 6f 20 73 79 73 74 65 6d 63 74   $ sudo systemct
03f0: 6c 20 73 74 61 72 74 20 73 73 68 0d 0a 0d 0a 4f  l start ssh....O
0400: 74 68 65 72 20 76 65 72 73 69 6f 6e 73 20 6f 66  ther versions of
0410: 20 4c 69 6e 75 78 20 63 61 6c 6c 20 74 68 69 73   Linux call this
0420: 20 73 65 72 76 69 63 65 20 60 73 73 68 64 60 20   service `sshd` 
0430: 6f 72 20 60 6f 70 65 6e 73 73 68 64 60 20 69 6e  or `opensshd` in
0440: 73 74 65 61 64 2e 0d 0a 0d 0a 4f 6e 63 65 20 79  stead.....Once y
0450: 6f 75 20 68 61 76 65 20 61 20 5b 73 65 63 75 72  ou have a [secur
0460: 65 20 73 68 65 6c 6c 5d 28 68 74 74 70 73 3a 2f  e shell](https:/
0470: 2f 65 6e 2e 77 69 6b 69 70 65 64 69 61 2e 6f 72  /en.wikipedia.or
0480: 67 2f 77 69 6b 69 2f 53 65 63 75 72 65 5f 53 68  g/wiki/Secure_Sh
0490: 65 6c 6c 29 20 63 6f 6e 6e 65 63 74 69 6f 6e 20  ell) connection 
04a0: 74 6f 20 79 6f 75 72 20 50 69 2c 20 79 6f 75 20  to your Pi, you 
04b0: 63 61 6e 20 6f 66 74 65 6e 20 6a 75 73 74 20 63  can often just c
04c0: 6f 70 79 2d 61 6e 64 2d 70 61 73 74 65 20 74 68  opy-and-paste th
04d0: 65 20 74 65 78 74 20 69 6e 74 6f 20 77 68 61 74  e text into what
04e0: 65 76 65 72 20 70 72 6f 67 72 61 6d 20 77 61 6e  ever program wan
04f0: 74 73 20 69 74 2e 20 49 66 20 79 6f 75 20 68 61  ts it. If you ha
0500: 76 65 20 61 20 74 65 78 74 20 66 69 6c 65 20 6f  ve a text file o
0510: 70 65 6e 20 69 6e 20 61 20 47 55 49 20 74 65 78  pen in a GUI tex
0520: 74 20 65 64 69 74 6f 72 20 6f 6e 20 74 68 65 20  t editor on the 
0530: 64 65 73 6b 74 6f 70 20 63 6f 6d 70 75 74 65 72  desktop computer
0540: 20 74 68 61 74 20 61 6c 73 6f 20 68 61 73 20 74   that also has t
0550: 68 65 20 53 53 48 20 63 6f 6e 6e 65 63 74 69 6f  he SSH connectio
0560: 6e 20 6f 70 65 6e 20 74 6f 20 74 68 65 20 50 69  n open to the Pi
0570: 44 50 2d 38 2f 49 2c 20 79 6f 75 20 63 6f 75 6c  DP-8/I, you coul
0580: 64 20 73 61 79 20 53 65 6c 65 63 74 20 41 6c 6c  d say Select All
0590: 20 61 6e 64 20 43 6f 70 79 20 69 6e 20 74 68 65   and Copy in the
05a0: 20 74 65 78 74 20 65 64 69 74 6f 72 2c 20 74 68   text editor, th
05b0: 65 6e 20 41 6c 74 2d 54 61 62 20 6f 76 65 72 20  en Alt-Tab over 
05c0: 74 6f 20 74 68 65 20 53 53 48 20 77 69 6e 64 6f  to the SSH windo
05d0: 77 20 61 6e 64 20 50 61 73 74 65 20 64 69 72 65  w and Paste dire
05e0: 63 74 6c 79 20 69 6e 74 6f 20 74 68 65 20 70 72  ctly into the pr
05f0: 6f 67 72 61 6d 20 77 61 6e 74 69 6e 67 20 74 68  ogram wanting th
0600: 65 20 74 65 78 74 2e 0d 0a 0d 0a 42 65 77 61 72  e text.....Bewar
0610: 65 3a 20 54 68 69 73 20 6d 65 74 68 6f 64 20 6f  e: This method o
0620: 6e 6c 79 20 77 6f 72 6b 73 20 77 69 74 68 20 70  nly works with p
0630: 72 6f 67 72 61 6d 73 20 74 68 61 74 20 68 61 6e  rograms that han
0640: 64 6c 65 20 74 65 72 6d 69 6e 61 6c 20 49 2f 4f  dle terminal I/O
0650: 20 69 6e 20 73 75 63 68 20 61 20 77 61 79 20 74   in such a way t
0660: 68 61 74 20 74 68 65 79 20 63 61 6e 20 68 6f 6c  hat they can hol
0670: 64 20 6f 66 66 20 6f 6e 20 61 63 63 65 70 74 69  d off on accepti
0680: 6e 67 20 65 61 63 68 20 69 6e 70 75 74 20 63 68  ng each input ch
0690: 61 72 61 63 74 65 72 20 75 6e 74 69 6c 20 74 68  aracter until th
06a0: 65 20 73 69 6d 75 6c 61 74 6f 72 20 e2 80 94 20  e simulator — 
06b0: 77 68 69 63 68 20 69 73 20 66 61 72 20 73 6c 6f  which is far slo
06c0: 77 65 72 20 61 74 20 68 61 6e 64 6c 69 6e 67 20  wer at handling 
06d0: 49 2f 4f 20 74 68 61 6e 20 79 6f 75 72 20 68 6f  I/O than your ho
06e0: 73 74 20 73 79 73 74 65 6d 20 e2 80 94 20 69 73  st system — is
06f0: 20 72 65 61 64 79 20 66 6f 72 20 69 74 2e 20 53   ready for it. S
0700: 6f 6d 65 20 50 44 50 2d 38 20 70 72 6f 67 72 61  ome PDP-8 progra
0710: 6d 73 20 61 72 65 20 73 69 6d 70 6c 79 20 6e 6f  ms are simply no
0720: 74 20 62 75 69 6c 74 20 74 6f 20 63 6f 70 65 20  t built to cope 
0730: 77 69 74 68 20 74 68 69 73 2c 20 73 75 63 68 20  with this, such 
0740: 61 73 20 55 2f 57 20 46 4f 43 41 4c 2e 20 49 66  as U/W FOCAL. If
0750: 20 79 6f 75 20 74 72 79 20 74 68 69 73 20 6d 65   you try this me
0760: 74 68 6f 64 20 61 6e 64 20 74 68 65 20 70 61 73  thod and the pas
0770: 74 65 64 20 74 65 78 74 20 65 6e 64 73 20 75 70  ted text ends up
0780: 20 74 72 61 73 68 65 64 20 69 6e 73 69 64 65 20   trashed inside 
0790: 74 68 65 20 73 69 6d 75 6c 61 74 6f 72 2c 20 79  the simulator, y
07a0: 6f 75 20 77 69 6c 6c 20 68 61 76 65 20 74 6f 20  ou will have to 
07b0: 73 77 69 74 63 68 20 74 6f 20 6f 6e 65 20 6f 66  switch to one of
07c0: 20 74 68 65 20 61 6c 74 65 72 6e 61 74 69 76 65   the alternative
07d0: 73 20 62 65 6c 6f 77 2c 20 73 75 63 68 20 61 73  s below, such as
07e0: 20 5b 74 68 65 20 60 50 49 50 60 20 73 6f 6c 75   [the `PIP` solu
07f0: 74 69 6f 6e 5d 28 23 70 69 70 29 2e 0d 0a 0d 0a  tion](#pip).....
0800: 0d 0a 23 20 4f 53 2f 38 0d 0a 0d 0a 54 68 65 72  ..# OS/8....Ther
0810: 65 20 61 72 65 20 61 20 6e 75 6d 62 65 72 20 6f  e are a number o
0820: 66 20 6d 65 74 68 6f 64 73 20 66 6f 72 20 67 65  f methods for ge
0830: 74 74 69 6e 67 20 74 65 78 74 20 69 6e 74 6f 20  tting text into 
0840: 74 68 65 20 73 69 6d 75 6c 61 74 6f 72 20 74 68  the simulator th
0850: 61 74 20 64 65 70 65 6e 64 20 6f 6e 20 66 65 61  at depend on fea
0860: 74 75 72 65 73 20 6f 66 20 4f 53 2f 38 2e 20 54  tures of OS/8. T
0870: 68 65 73 65 20 73 6f 6c 75 74 69 6f 6e 73 20 61  hese solutions a
0880: 72 65 20 67 72 6f 75 70 65 64 20 68 65 72 65 20  re grouped here 
0890: 69 6e 20 63 61 73 65 20 79 6f 75 27 72 65 20 6e  in case you're n
08a0: 6f 74 20 72 75 6e 6e 69 6e 67 20 4f 53 2f 38 2c  ot running OS/8,
08b0: 20 69 6e 20 77 68 69 63 68 20 63 61 73 65 20 74   in which case t
08c0: 68 65 73 65 20 6f 70 74 69 6f 6e 73 20 77 69 6c  hese options wil
08d0: 6c 20 70 72 6f 62 61 62 6c 79 20 62 65 20 6f 66  l probably be of
08e0: 20 6e 6f 20 75 73 65 20 74 6f 20 79 6f 75 2e 0d   no use to you..
08f0: 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64 3d 22 70  .....## <a id="p
0900: 69 70 22 3e 3c 2f 61 3e 50 49 50 0d 0a 0d 0a 53  ip"></a>PIP....S
0910: 6f 6d 65 74 69 6d 65 73 20 74 68 65 20 70 72 6f  ometimes the pro
0920: 67 72 61 6d 20 79 6f 75 27 72 65 20 72 75 6e 6e  gram you're runn
0930: 69 6e 67 20 68 61 73 20 6e 6f 20 77 61 79 20 6f  ing has no way o
0940: 66 20 72 65 63 65 69 76 69 6e 67 20 74 65 78 74  f receiving text
0950: 20 64 69 72 65 63 74 6c 79 20 66 72 6f 6d 20 74   directly from t
0960: 68 65 20 74 65 72 6d 69 6e 61 6c 2c 20 62 75 74  he terminal, but
0970: 20 6e 65 65 64 73 20 69 74 20 66 72 6f 6d 20 61   needs it from a
0980: 20 64 69 73 6b 20 66 69 6c 65 20 69 6e 73 74 65   disk file inste
0990: 61 64 2e 20 4f 74 68 65 72 20 74 69 6d 65 73 2c  ad. Other times,
09a0: 20 74 68 65 20 50 44 50 2d 38 20 70 72 6f 67 72   the PDP-8 progr
09b0: 61 6d 20 79 6f 75 27 72 65 20 77 6f 72 6b 69 6e  am you're workin
09c0: 67 20 77 69 74 68 20 64 6f 65 73 20 61 63 63 65  g with does acce
09d0: 70 74 20 74 65 72 6d 69 6e 61 6c 20 69 6e 70 75  pt terminal inpu
09e0: 74 2c 20 62 75 74 20 6f 6e 6c 79 20 61 74 20 22  t, but only at "
09f0: 68 69 67 68 20 73 70 65 65 64 22 20 70 61 70 65  high speed" pape
0a00: 72 20 74 61 70 65 20 72 65 61 64 65 72 20 73 70  r tape reader sp
0a10: 65 65 64 73 20 61 74 20 62 65 73 74 2e 20 28 33  eeds at best. (3
0a20: 30 30 20 62 69 74 73 20 70 65 72 20 73 65 63 6f  00 bits per seco
0a30: 6e 64 2e 29 20 53 6f 6c 76 69 6e 67 20 74 68 69  nd.) Solving thi
0a40: 73 20 73 6f 72 74 20 6f 66 20 63 6f 70 79 20 69  s sort of copy i
0a50: 6e 2d 74 6f 2d 6f 75 74 20 70 72 6f 62 6c 65 6d  n-to-out problem
0a60: 20 69 73 20 74 68 65 20 70 75 72 70 6f 73 65 20   is the purpose 
0a70: 6f 66 20 74 68 65 20 4f 53 2f 38 20 60 50 49 50  of the OS/8 `PIP
0a80: 60 20 70 72 6f 67 72 61 6d 2e 0d 0a 0d 0a 0d 0a  ` program.......
0a90: 23 23 23 20 3c 61 20 69 64 3d 22 70 69 70 2d 70  ### <a id="pip-p
0aa0: 61 73 74 65 22 3e 3c 2f 61 3e 54 65 72 6d 69 6e  aste"></a>Termin
0ab0: 61 6c 20 50 61 73 74 65 0d 0a 0d 0a 53 74 61 72  al Paste....Star
0ac0: 74 69 6e 67 20 77 69 74 68 20 74 68 65 20 5b 53  ting with the [S
0ad0: 53 48 20 6f 70 74 69 6f 6e 5d 28 23 73 73 68 29  SH option](#ssh)
0ae0: 20 61 62 6f 76 65 2c 20 79 6f 75 20 63 61 6e 20   above, you can 
0af0: 73 65 6e 64 20 70 61 73 74 65 64 20 74 65 78 74  send pasted text
0b00: 20 74 6f 20 61 6e 20 4f 53 2f 38 20 64 69 73 6b   to an OS/8 disk
0b10: 20 66 69 6c 65 20 77 69 74 68 3a 0d 0a 0d 0a 20   file with:.... 
0b20: 20 20 20 2e 52 20 50 49 50 0d 0a 20 20 20 20 2a     .R PIP..    *
0b30: 4d 59 46 49 4c 45 2e 54 58 3c 54 54 59 3a 0d 0a  MYFILE.TX<TTY:..
0b40: 20 20 20 20 62 6c 61 68 20 62 6c 61 68 20 62 6c      blah blah bl
0b50: 61 68 20 2e 2e 2e 20 20 20 20 20 20 20 20 20 e2  ah ...         â
0b60: 87 a0 20 70 61 73 74 65 20 74 65 78 74 20 69 6e  ‡  paste text in
0b70: 20 68 65 72 65 0d 0a 20 20 20 20 5e 5a 20 20 20   here..    ^Z   
0b80: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0b90: 20 20 20 20 20 20 e2 87 a0 20 70 72 65 73 73 20        ⇠ press 
0ba0: 43 74 72 6c 2d 5a 20 74 6f 20 73 69 67 6e 61 6c  Ctrl-Z to signal
0bb0: 20 45 4f 46 0d 0a 20 20 20 20 2a 20 20 20 20 20   EOF..    *     
0bc0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
0bd0: 20 20 20 20 20 e2 87 a0 20 70 72 65 73 73 20 45       ⇠ press E
0be0: 73 63 61 70 65 20 74 6f 20 65 78 69 74 20 50 49  scape to exit PI
0bf0: 50 0d 0a 0d 0a 54 68 61 74 20 77 69 6c 6c 20 64  P....That will d
0c00: 72 6f 70 20 79 6f 75 20 62 61 63 6b 20 69 6e 74  rop you back int
0c10: 6f 20 4f 53 2f 38 20 77 69 74 68 20 61 20 66 69  o OS/8 with a fi
0c20: 6c 65 20 63 61 6c 6c 65 64 20 60 44 53 4b 3a 4d  le called `DSK:M
0c30: 59 46 49 4c 45 2e 54 58 60 20 63 6f 6e 74 61 69  YFILE.TX` contai
0c40: 6e 69 6e 67 20 74 68 65 20 70 61 73 74 65 64 20  ning the pasted 
0c50: 74 65 78 74 2e 0d 0a 0d 0a 0d 0a 23 23 23 20 3c  text.......### <
0c60: 61 20 69 64 3d 22 70 69 70 2d 70 74 22 3e 3c 2f  a id="pip-pt"></
0c70: 61 3e 53 69 6d 75 6c 61 74 65 64 20 50 61 70 65  a>Simulated Pape
0c80: 72 20 54 61 70 65 0d 0a 0d 0a 53 6f 6d 65 74 69  r Tape....Someti
0c90: 6d 65 73 20 79 6f 75 20 77 6f 75 6c 64 20 72 61  mes you would ra
0ca0: 74 68 65 72 20 6e 6f 74 20 75 73 65 20 74 68 65  ther not use the
0cb0: 20 63 6c 69 70 62 6f 61 72 64 2c 20 62 75 74 20   clipboard, but 
0cc0: 72 61 74 68 65 72 20 73 65 6e 64 20 61 20 66 69  rather send a fi
0cd0: 6c 65 20 6f 6e 20 74 68 65 20 68 6f 73 74 20 73  le on the host s
0ce0: 69 64 65 20 64 69 72 65 63 74 6c 79 20 69 6e 74  ide directly int
0cf0: 6f 20 74 68 65 20 73 69 6d 75 6c 61 74 6f 72 2e  o the simulator.
0d00: 20 57 69 74 68 20 74 68 65 20 68 65 6c 70 20 6f   With the help o
0d10: 66 20 42 69 6c 6c 20 43 61 74 74 65 79 27 73 20  f Bill Cattey's 
0d20: 60 74 78 74 32 70 74 70 60 20 70 72 6f 67 72 61  `txt2ptp` progra
0d30: 6d 2c 20 77 68 69 63 68 20 77 65 27 76 65 20 62  m, which we've b
0d40: 65 65 6e 20 73 68 69 70 70 69 6e 67 20 73 69 6e  een shipping sin
0d50: 63 65 20 74 68 65 20 32 30 31 37 2e 31 32 2e 32  ce the 2017.12.2
0d60: 32 20 72 65 6c 65 61 73 65 2c 20 79 6f 75 20 63  2 release, you c
0d70: 61 6e 20 6e 6f 77 20 65 61 73 69 6c 79 20 64 6f  an now easily do
0d80: 20 74 68 61 74 2e 0d 0a 0d 0a 46 69 72 73 74 2c   that.....First,
0d90: 20 79 6f 75 20 6d 75 73 74 20 63 6f 6e 76 65 72   you must conver
0da0: 74 20 74 68 65 20 68 6f 73 74 2d 73 69 64 65 20  t the host-side 
0db0: 74 65 78 74 20 66 69 6c 65 20 74 6f 20 74 68 65  text file to the
0dc0: 20 66 6f 72 6d 61 74 20 75 73 65 64 20 62 79 20   format used by 
0dd0: 53 49 4d 48 20 66 6f 72 20 69 74 73 20 70 61 70  SIMH for its pap
0de0: 65 72 20 74 61 70 65 20 69 6d 61 67 65 73 3a 0d  er tape images:.
0df0: 0a 0d 0a 20 20 20 20 24 20 74 78 74 32 70 74 70  ...    $ txt2ptp
0e00: 20 3c 20 6d 79 66 69 6c 65 2e 74 78 74 20 3e 20   < myfile.txt > 
0e10: 6d 79 66 69 6c 65 2e 70 74 0d 0a 0d 0a 54 68 65  myfile.pt....The
0e20: 20 60 74 78 74 32 70 74 70 60 20 70 72 6f 67 72   `txt2ptp` progr
0e30: 61 6d 20 28 61 6e 64 20 69 74 73 20 69 6e 76 65  am (and its inve
0e40: 72 73 65 2c 20 60 70 74 70 32 74 78 74 60 29 20  rse, `ptp2txt`) 
0e50: 69 73 20 61 20 5b 66 69 6c 74 65 72 5d 5b 77 70  is a [filter][wp
0e60: 66 5d 20 77 68 69 63 68 20 74 61 6b 65 73 20 61  f] which takes a
0e70: 6e 79 20 41 53 43 49 49 20 74 65 78 74 20 69 6e  ny ASCII text in
0e80: 20 61 6e 64 20 77 72 69 74 65 73 20 69 74 20 74   and writes it t
0e90: 6f 20 53 49 4d 48 20 70 61 70 65 72 20 74 61 70  o SIMH paper tap
0ea0: 65 20 66 6f 72 6d 61 74 20 61 73 20 6f 75 74 70  e format as outp
0eb0: 75 74 2e 20 49 74 20 63 6f 6e 76 65 72 74 73 20  ut. It converts 
0ec0: 4c 46 20 6c 69 6e 65 20 65 6e 64 69 6e 67 73 20  LF line endings 
0ed0: 6f 6e 20 69 74 73 20 69 6e 70 75 74 20 74 6f 20  on its input to 
0ee0: 74 68 65 20 43 52 2b 4c 46 20 66 6f 72 6d 61 74  the CR+LF format
0ef0: 20 65 78 70 65 63 74 65 64 20 62 79 20 70 72 65   expected by pre
0f00: 74 74 79 20 6d 75 63 68 20 61 6c 6c 20 4f 53 2f  tty much all OS/
0f10: 38 20 70 72 6f 67 72 61 6d 73 2e 20 54 68 65 20  8 programs. The 
0f20: 66 69 6c 74 65 72 20 61 6c 73 6f 20 74 61 6b 65  filter also take
0f30: 73 20 63 61 72 65 20 6f 66 20 64 65 74 61 69 6c  s care of detail
0f40: 73 20 73 75 63 68 20 61 73 20 70 72 65 70 65 6e  s such as prepen
0f50: 64 69 6e 67 20 61 20 74 61 70 65 20 6c 65 61 64  ding a tape lead
0f60: 65 72 2c 20 63 6f 70 69 6e 67 20 77 69 74 68 20  er, coping with 
0f70: 45 4f 46 20 63 68 61 72 61 63 74 65 72 73 2c 20  EOF characters, 
0f80: 65 74 63 2e 0d 0a 0d 0a 4e 65 78 74 2c 20 79 6f  etc.....Next, yo
0f90: 75 20 61 74 74 61 63 68 20 74 68 65 20 70 61 70  u attach the pap
0fa0: 65 72 20 74 61 70 65 20 74 6f 20 74 68 65 20 73  er tape to the s
0fb0: 69 6d 75 6c 61 74 6f 72 2e 20 46 72 6f 6d 20 77  imulator. From w
0fc0: 69 74 68 69 6e 20 74 68 65 20 73 69 6d 75 6c 61  ithin the simula
0fd0: 74 6f 72 2c 20 68 69 74 20 3c 6b 62 64 3e 43 74  tor, hit <kbd>Ct
0fe0: 72 6c 2d 45 3c 2f 6b 62 64 3e 20 74 6f 20 65 73  rl-E</kbd> to es
0ff0: 63 61 70 65 20 74 6f 20 74 68 65 20 53 49 4d 48  cape to the SIMH
1000: 20 63 6f 6d 6d 61 6e 64 20 70 72 6f 6d 70 74 2c   command prompt,
1010: 20 74 68 65 6e 20 73 61 79 3a 0d 0a 0d 0a 20 20   then say:....  
1020: 20 20 73 69 6d 3e 20 61 74 74 61 63 68 20 70 74    sim> attach pt
1030: 72 20 6d 79 66 69 6c 65 2e 70 74 0d 0a 20 20 20  r myfile.pt..   
1040: 20 73 69 6d 3e 20 63 6f 6e 74 0d 0a 0d 0a 54 68   sim> cont....Th
1050: 61 74 20 61 74 74 61 63 68 65 73 20 74 68 65 20  at attaches the 
1060: 70 61 70 65 72 20 74 61 70 65 20 69 6d 61 67 65  paper tape image
1070: 20 66 69 6c 65 20 79 6f 75 20 63 72 65 61 74 65   file you create
1080: 64 20 61 62 6f 76 65 20 74 6f 20 74 68 65 20 73  d above to the s
1090: 69 6d 75 6c 61 74 65 64 20 50 44 50 2d 38 27 73  imulated PDP-8's
10a0: 20 3c 62 3e 70 3c 2f 62 3e 61 70 65 72 20 3c 62   <b>p</b>aper <b
10b0: 3e 74 3c 2f 62 3e 61 70 65 20 3c 62 3e 72 3c 2f  >t</b>ape <b>r</
10c0: 62 3e 65 61 64 65 72 2c 20 74 68 65 6e 20 3c 62  b>eader, then <b
10d0: 3e 63 6f 6e 74 3c 2f 62 3e 69 6e 75 65 73 20 74  >cont</b>inues t
10e0: 68 65 20 73 69 6d 75 6c 61 74 69 6f 6e 2e 20 59  he simulation. Y
10f0: 6f 75 20 63 61 6e 20 61 62 62 72 65 76 69 61 74  ou can abbreviat
1100: 65 20 74 68 65 73 65 20 63 6f 6d 6d 61 6e 64 73  e these commands
1110: 20 74 6f 20 60 61 74 60 20 61 6e 64 20 60 63 60   to `at` and `c`
1120: 2c 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e 0d  , respectively..
1130: 0a 0d 0a 4e 6f 77 20 77 65 20 63 61 6e 20 75 73  ...Now we can us
1140: 65 20 5b 60 50 49 50 60 5d 28 23 70 69 70 29 20  e [`PIP`](#pip) 
1150: 69 6e 20 61 20 73 6c 69 67 68 74 6c 79 20 64 69  in a slightly di
1160: 66 66 65 72 65 6e 74 20 77 61 79 20 74 68 61 6e  fferent way than
1170: 20 61 62 6f 76 65 20 74 6f 20 70 75 6c 6c 20 74   above to pull t
1180: 68 65 20 74 65 78 74 20 69 6e 74 6f 20 74 68 65  he text into the
1190: 20 73 69 6d 75 6c 61 74 6f 72 3a 0d 0a 0d 0a 20   simulator:.... 
11a0: 20 20 20 2e 52 20 50 49 50 0d 0a 20 20 20 20 2a     .R PIP..    *
11b0: 4d 59 46 49 4c 45 2e 54 58 3c 50 54 52 3a 0d 0a  MYFILE.TX<PTR:..
11c0: 20 20 20 20 5e 2a 24 20 20 20 20 20 20 20 20 20      ^*$         
11d0: 20 20 20 20 20 20 20 20 20 20 e2 87 a0 20 70 72            ⇠ pr
11e0: 65 73 73 20 45 73 63 61 70 65 20 74 77 69 63 65  ess Escape twice
11f0: 20 77 68 65 6e 20 5e 20 61 70 70 65 61 72 73 20   when ^ appears 
1200: 74 6f 20 65 78 69 74 20 50 49 50 0d 0a 0d 0a 54  to exit PIP....T
1210: 68 65 20 60 5e 60 20 6f 75 74 70 75 74 20 61 62  he `^` output ab
1220: 6f 76 65 20 73 69 67 6e 61 6c 73 20 74 68 61 74  ove signals that
1230: 20 50 49 50 20 68 61 73 20 66 6f 75 6e 64 20 65   PIP has found e
1240: 6e 64 2d 6f 66 2d 66 69 6c 65 20 6f 6e 20 74 68  nd-of-file on th
1250: 65 20 70 61 70 65 72 20 74 61 70 65 20 69 6e 70  e paper tape inp
1260: 75 74 2e 20 54 68 65 20 60 2a 60 20 69 73 20 74  ut. The `*` is t
1270: 68 65 20 50 49 50 20 70 72 6f 6d 70 74 20 61 66  he PIP prompt af
1280: 74 65 72 20 79 6f 75 20 68 69 74 20 3c 6b 62 64  ter you hit <kbd
1290: 3e 45 73 63 61 70 65 3c 2f 6b 62 64 3e 20 74 68  >Escape</kbd> th
12a0: 65 20 66 69 72 73 74 20 74 69 6d 65 2c 20 61 6e  e first time, an
12b0: 64 20 74 68 65 20 60 24 60 20 69 73 20 74 68 65  d the `$` is the
12c0: 20 72 65 73 75 6c 74 20 6f 66 20 68 69 74 74 69   result of hitti
12d0: 6e 67 20 69 74 20 74 68 65 20 73 65 63 6f 6e 64  ng it the second
12e0: 20 74 69 6d 65 2e 20 54 68 61 74 20 77 69 6c 6c   time. That will
12f0: 20 64 72 6f 70 20 79 6f 75 20 62 61 63 6b 20 74   drop you back t
1300: 6f 20 74 68 65 20 4f 53 2f 38 20 60 2e 60 20 70  o the OS/8 `.` p
1310: 72 6f 6d 70 74 20 77 69 74 68 20 61 20 6e 65 77  rompt with a new
1320: 6c 79 2d 77 72 69 74 74 65 6e 20 66 69 6c 65 20  ly-written file 
1330: 63 61 6c 6c 65 64 20 60 44 53 4b 3a 4d 59 46 49  called `DSK:MYFI
1340: 4c 45 2e 54 58 60 2e 0d 0a 0d 0a 42 65 77 61 72  LE.TX`.....Bewar
1350: 65 20 74 68 61 74 20 53 49 4d 48 20 74 72 65 61  e that SIMH trea
1360: 74 73 20 69 74 73 20 73 69 6d 75 6c 61 74 65 64  ts its simulated
1370: 20 70 61 70 65 72 20 74 61 70 65 73 20 74 68 65   paper tapes the
1380: 20 73 61 6d 65 20 77 61 79 20 61 20 72 65 61 6c   same way a real
1390: 20 50 44 50 2d 38 20 77 6f 75 6c 64 3a 20 79 6f   PDP-8 would: yo
13a0: 75 20 67 65 74 20 61 20 73 69 6e 67 6c 65 20 6c  u get a single l
13b0: 69 6e 65 61 72 20 72 65 61 64 2c 20 74 68 65 6e  inear read, then
13c0: 20 74 68 65 20 70 61 70 65 72 20 74 61 70 65 20   the paper tape 
13d0: 22 66 61 6c 6c 73 20 6f 75 74 22 20 6f 66 20 74  "falls out" of t
13e0: 68 65 20 73 69 6d 75 6c 61 74 6f 72 27 73 20 70  he simulator's p
13f0: 61 70 65 72 20 74 61 70 65 20 72 65 61 64 65 72  aper tape reader
1400: 2e 20 59 6f 75 20 6d 75 73 74 20 72 75 6e 20 74  . You must run t
1410: 68 65 20 60 61 74 74 61 63 68 60 20 63 6f 6d 6d  he `attach` comm
1420: 61 6e 64 20 61 67 61 69 6e 20 74 6f 20 72 65 61  and again to rea
1430: 64 20 74 68 61 74 20 70 61 70 65 72 20 74 61 70  d that paper tap
1440: 65 20 61 67 61 69 6e 2e 0d 0a 0d 0a 5b 77 70 66  e again.....[wpf
1450: 5d 3a 20 68 74 74 70 73 3a 2f 2f 65 6e 2e 77 69  ]: https://en.wi
1460: 6b 69 70 65 64 69 61 2e 6f 72 67 2f 77 69 6b 69  kipedia.org/wiki
1470: 2f 46 69 6c 74 65 72 5f 28 73 6f 66 74 77 61 72  /Filter_(softwar
1480: 65 29 0d 0a 0d 0a 0d 0a 23 23 20 3c 61 20 69 64  e)......## <a id
1490: 3d 22 74 78 74 32 6f 73 38 22 3e 3c 2f 61 3e 43  ="txt2os8"></a>C
14a0: 72 65 61 74 65 20 4f 53 2f 38 20 4d 65 64 69 61  reate OS/8 Media
14b0: 0d 0a 0d 0a 42 69 6c 6c 20 43 61 74 74 65 79 20  ....Bill Cattey 
14c0: 61 6c 73 6f 20 77 72 6f 74 65 20 61 20 73 63 72  also wrote a scr
14d0: 69 70 74 20 77 68 69 63 68 20 61 75 74 6f 6d 61  ipt which automa
14e0: 74 65 73 20 73 6f 6d 65 20 6f 66 20 74 68 65 20  tes some of the 
14f0: 61 62 6f 76 65 2c 20 77 68 69 63 68 20 69 73 20  above, which is 
1500: 75 73 65 66 75 6c 20 77 68 65 6e 20 79 6f 75 27  useful when you'
1510: 76 65 20 67 6f 74 20 73 6f 6d 65 20 6e 75 6d 62  ve got some numb
1520: 65 72 20 6f 66 20 74 65 78 74 20 66 69 6c 65 73  er of text files
1530: 20 6f 6e 20 74 68 65 20 68 6f 73 74 20 73 69 64   on the host sid
1540: 65 20 61 6e 64 20 73 69 6d 70 6c 79 20 77 61 6e  e and simply wan
1550: 74 20 74 68 65 6d 20 63 6f 70 69 65 64 20 74 6f  t them copied to
1560: 20 61 20 73 69 6d 75 6c 61 74 65 64 20 4f 53 2f   a simulated OS/
1570: 38 20 6d 65 64 69 75 6d 20 69 6d 61 67 65 3a 0d  8 medium image:.
1580: 0a 0d 0a 20 20 20 20 24 20 74 78 74 32 6f 73 38  ...    $ txt2os8
1590: 20 2d 2d 72 6b 30 35 61 20 6d 79 64 69 73 6b 2e   --rk05a mydisk.
15a0: 72 6b 30 35 0d 0a 0d 0a 54 68 69 73 20 63 72 65  rk05....This cre
15b0: 61 74 65 73 20 28 6f 72 20 75 70 64 61 74 65 73  ates (or updates
15c0: 29 20 74 68 65 20 66 69 72 73 74 20 73 75 62 2d  ) the first sub-
15d0: 64 65 76 69 63 65 20 6f 6e 20 74 68 65 20 52 4b  device on the RK
15e0: 30 35 20 64 69 73 6b 20 69 6d 61 67 65 20 66 69  05 disk image fi
15f0: 6c 65 20 60 6d 79 64 69 73 6b 2e 72 6b 30 35 60  le `mydisk.rk05`
1600: 2c 20 63 6f 70 79 69 6e 67 20 69 6e 20 66 69 6c  , copying in fil
1610: 65 73 20 6c 69 73 74 65 64 20 69 6e 20 60 6d 79  es listed in `my
1620: 64 69 73 6b 2e 72 6b 30 35 2e 6c 69 73 74 60 2e  disk.rk05.list`.
1630: 0d 0a 0d 0a 54 68 69 73 20 73 63 72 69 70 74 20  ....This script 
1640: 63 61 6e 20 75 70 64 61 74 65 20 74 68 65 20 73  can update the s
1650: 65 63 6f 6e 64 20 73 75 62 2d 64 65 76 69 63 65  econd sub-device
1660: 20 28 60 2d 2d 72 6b 30 35 62 60 29 20 6f 72 20   (`--rk05b`) or 
1670: 61 20 54 55 35 36 20 74 61 70 65 20 69 6d 61 67  a TU56 tape imag
1680: 65 20 28 60 2d 2d 74 75 35 36 60 29 20 69 6e 73  e (`--tu56`) ins
1690: 74 65 61 64 2e 0d 0a 0d 0a 4f 6e 63 65 20 79 6f  tead.....Once yo
16a0: 75 20 68 61 76 65 20 74 68 69 73 20 6d 65 64 69  u have this medi
16b0: 61 20 69 6d 61 67 65 2c 20 79 6f 75 20 63 61 6e  a image, you can
16c0: 20 60 61 74 74 61 63 68 60 20 69 74 20 74 6f 20   `attach` it to 
16d0: 74 68 65 20 73 69 6d 75 6c 61 74 6f 72 20 61 6e  the simulator an
16e0: 64 20 77 6f 72 6b 20 77 69 74 68 20 74 68 65 20  d work with the 
16f0: 66 69 6c 65 73 20 6f 6e 20 69 74 20 64 69 72 65  files on it dire
1700: 63 74 6c 79 3a 0d 0a 0d 0a 20 20 20 20 43 74 72  ctly:....    Ctr
1710: 6c 2d 45 0d 0a 20 20 20 20 73 69 6d 3e 20 61 74  l-E..    sim> at
1720: 74 20 64 74 30 20 6d 79 74 61 70 65 2e 74 75 35  t dt0 mytape.tu5
1730: 36 0d 0a 20 20 20 20 73 69 6d 3e 20 63 6f 6e 74  6..    sim> cont
1740: 0d 0a 20 20 20 20 2e 44 49 52 20 44 54 41 30 3a  ..    .DIR DTA0:
1750: 0d 0a 20 20 20 20 2e 2e 2e 20 20 20 20 20 20 20  ..    ...       
1760: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20                  
1770: 20 20 20 20 20 20 20 20 20 e2 87 a0 20 6c 69 73           ⇠ lis
1780: 74 20 6f 66 20 66 69 6c 65 73 20 6f 6e 20 6d 79  t of files on my
1790: 74 61 70 65 2e 74 75 35 36 0d 0a 0d 0a 0d 0a 23  tape.tu56......#
17a0: 23 20 3c 61 20 69 64 3d 22 6c 61 6e 67 22 3e 3c  # <a id="lang"><
17b0: 2f 61 3e 50 72 6f 67 72 61 6d 6d 69 6e 67 20 45  /a>Programming E
17c0: 6e 76 69 72 6f 6e 6d 65 6e 74 73 0d 0a 0d 0a 53  nvironments....S
17d0: 6f 6d 65 20 6f 66 20 74 68 65 20 70 72 6f 67 72  ome of the progr
17e0: 61 6d 6d 69 6e 67 20 6c 61 6e 67 75 61 67 65 20  amming language 
17f0: 65 6e 76 69 72 6f 6e 6d 65 6e 74 73 20 61 76 61  environments ava
1800: 69 6c 61 62 6c 65 20 77 69 74 68 69 6e 20 6f 75  ilable within ou
1810: 72 20 4f 53 2f 38 20 64 69 73 74 72 69 62 75 74  r OS/8 distribut
1820: 69 6f 6e 20 68 61 76 65 20 74 68 65 69 72 20 6f  ion have their o
1830: 77 6e 20 77 61 79 73 20 6f 66 20 70 75 6c 6c 69  wn ways of pulli
1840: 6e 67 20 74 65 78 74 20 69 6e 20 66 72 6f 6d 20  ng text in from 
1850: 65 78 74 65 72 6e 61 6c 20 6d 65 64 69 61 2e 20  external media. 
1860: 53 65 65 20 66 6f 72 20 65 78 61 6d 70 6c 65 20  See for example 
1870: 74 68 65 20 5b 6d 61 6e 79 20 6d 65 74 68 6f 64  the [many method
1880: 73 5d 5b 75 77 66 6c 5d 20 77 65 27 76 65 20 63  s][uwfl] we've c
1890: 61 74 61 6c 6f 67 65 64 20 66 6f 72 20 64 6f 69  ataloged for doi
18a0: 6e 67 20 74 68 69 73 20 69 6e 20 55 2f 57 20 46  ng this in U/W F
18b0: 4f 43 41 4c 2e 20 45 76 65 6e 20 69 66 20 79 6f  OCAL. Even if yo
18c0: 75 20 61 72 65 6e 27 74 20 75 73 69 6e 67 20 46  u aren't using F
18d0: 4f 43 41 4c 2c 20 73 6f 6d 65 20 6f 66 20 74 68  OCAL, some of th
18e0: 65 20 69 64 65 61 73 20 74 68 65 72 65 20 6d 61  e ideas there ma
18f0: 79 20 73 70 61 72 6b 20 69 64 65 61 73 20 79 6f  y spark ideas yo
1900: 75 20 63 61 6e 20 75 73 65 20 69 6e 20 79 6f 75  u can use in you
1910: 72 20 70 72 6f 67 72 61 6d 6d 69 6e 67 20 65 6e  r programming en
1920: 76 69 72 6f 6e 6d 65 6e 74 20 6f 66 20 63 68 6f  vironment of cho
1930: 69 63 65 2e 0d 0a 0d 0a 5b 75 77 66 6c 5d 3a 20  ice.....[uwfl]: 
1940: 68 74 74 70 73 3a 2f 2f 74 61 6e 67 65 6e 74 73  https://tangents
1950: 6f 66 74 2e 63 6f 6d 2f 70 69 64 70 38 69 2f 64  oft.com/pidp8i/d
1960: 6f 63 2f 74 72 75 6e 6b 2f 64 6f 63 2f 75 77 66  oc/trunk/doc/uwf
1970: 6f 63 61 6c 2d 6d 61 6e 75 61 6c 2d 73 75 70 70  ocal-manual-supp
1980: 2e 6d 64 23 6c 6f 61 64 69 6e 67 0d 0a 0d 0a 0d  .md#loading.....
1990: 0a 23 20 4c 69 63 65 6e 73 65 0d 0a 0d 0a 43 6f  .# License....Co
19a0: 70 79 72 69 67 68 74 20 c2 a9 20 32 30 31 38 20  pyright © 2018 
19b0: 62 79 20 57 61 72 72 65 6e 20 59 6f 75 6e 67 2e  by Warren Young.
19c0: 20 54 68 69 73 20 64 6f 63 75 6d 65 6e 74 20 69   This document i
19d0: 73 20 6c 69 63 65 6e 73 65 64 20 75 6e 64 65 72  s licensed under
19e0: 20 74 68 65 20 74 65 72 6d 73 20 6f 66 20 5b 74   the terms of [t
19f0: 68 65 20 53 49 4d 48 20 6c 69 63 65 6e 73 65 5d  he SIMH license]
1a00: 5b 73 6c 5d 2e 0d 0a 0d 0a 5b 73 6c 5d 3a 20 68  [sl].....[sl]: h
1a10: 74 74 70 73 3a 2f 2f 74 61 6e 67 65 6e 74 73 6f  ttps://tangentso
1a20: 66 74 2e 63 6f 6d 2f 70 69 64 70 38 69 2f 64 6f  ft.com/pidp8i/do
1a30: 63 2f 74 72 75 6e 6b 2f 53 49 4d 48 2d 4c 49 43  c/trunk/SIMH-LIC
1a40: 45 4e 53 45 2e 6d 64 0a 5a 20 66 66 31 63 64 37  ENSE.md.Z ff1cd7
1a50: 35 66 61 36 64 30 38 63 33 32 35 35 64 39 38 33  5fa6d08c3255d983
1a60: 66 61 39 64 33 63 64 61 37 31 0a                 fa9d3cda71.