perm filename UUO.ME[S,DOC] blob
sn#864542 filedate 1978-10-19 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00377 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00036 00002 SECTION 1--INTRODUCTION
C00055 00003 1.1 UUOs (Un-Used Operation codes)
C00060 00004 1.2 Extended UUOs
C00063 00005 1.3 CALLs and CALLIs
C00067 00006 1.4 UUO Trapping and User-Defined UUOs
C00071 00007 1.5 DEC vs. Stanford UUOs
C00072 00008 1.6 Understanding this Manual
C00076 00009 SECTION 2--GENERAL INPUT/OUTPUT
C00080 00010 2.1 User I/O Channels
C00083 00011 2.2 Data Modes
C00090 00012 2.3 Dump Mode Command Lists
C00095 00013 2.4 Buffer Rings
C00099 00014 2.5 Buffers
C00102 00015 DIAGRAM OF A 2-BUFFER RING
C00107 00016 2.6 Device I/O Status Word
C00116 00017 2.7 Files
C00119 00018 UFDs (User File Directories) and the MFD
C00122 00019 Disk File Protection System
C00130 00020 Disk Project-Programmer Names
C00132 00021 DSKPPN [OP=047, ADR=400071] CALLI 400071
C00135 00022 2.8 Initializing a Device
C00140 00023 INIT [OP=041]
C00144 00024 OPEN [OP=050]
C00146 00025 2.9 Setting Up Buffer Rings
C00149 00026 INBUF [OP=064]
C00151 00027 OUTBUF [OP=065]
C00152 00028 UINBF [OP=704]
C00154 00029 UOUTBF [OP=705]
C00155 00030 BUFLEN [OP=047, ADR=400042] CALLI 400042
C00157 00031 2.10 Opening Files
C00159 00032 LOOKUP [OP=076]
C00167 00033 ENTER [OP=077]
C00176 00034 RENAME [OP=055]
C00182 00035 Read-Alter Mode
C00186 00036 Disk Error Codes for LOOKUP, ENTER and RENAME
C00190 00037 2.11 Transferring Data
C00191 00038 IN [OP=056]
C00194 00039 INPUT [OP=066]
C00195 00040 OUT [OP=057]
C00199 00041 OUTPUT [OP=067]
C00200 00042 WAIT [OP=047, ADR=10] CALLI 10
C00201 00043 2.12 Terminating I/O
C00202 00044 CLOSE [OP=070]
C00206 00045 RELEAS [OP=071]
C00208 00046 REASSI [OP=047, ADR=21] CALLI 21
C00211 00047 2.13 Saving and Restoring I/O Channels
C00213 00048 IOPUSH [OP=724]
C00215 00049 IOPOP [OP=725]
C00217 00050 IOPDL [OP=726]
C00220 00051 2.14 Random Access to Files
C00223 00052 USETI [OP=074]
C00225 00053 USETO [OP=075]
C00227 00054 UGETF [OP=073]
C00229 00055 2.15 I/O Status Testing and Setting
C00230 00056 GETSTS [OP=062]
C00231 00057 SETSTS [OP=060]
C00232 00058 STATZ [OP=063]
C00233 00059 STATO [OP=061]
C00234 00060 CHNSTS [OP=716]
C00238 00061 DEVCHR [OP=047, ADR=4] CALLI 4
C00243 00062 DEVUSE [OP=047, ADR=400051] CALLI 400051
C00248 00063 PNAME [OP=047, ADR=400007] CALLI 400007
C00250 00064 DEVNUM [OP=047, ADR=400104] CALLI 400104
C00252 00065 TTYIOS [OP=047, ADR=400014] CALLI 400014
C00254 00066 SECTION 3--TERMINAL INPUT/OUTPUT
C00255 00067 3.1 TTY Echoing and LF Insertion
C00262 00068 3.2 Codes Returned for Characters Typed
C00266 00069 3.3 TTYUUO
C00267 00070 TTYUUO [OP=051]
C00268 00071 INCHRW [OP=051, AC=0] TTYUUO 0,
C00269 00072 OUTCHR [OP=051, AC=1] TTYUUO 1,
C00270 00073 INCHRS [OP=051, AC=2] TTYUUO 2,
C00271 00074 OUTSTR [OP=051, AC=3] TTYUUO 3,
C00272 00075 INCHWL [OP=051, AC=4] TTYUUO 4,
C00274 00076 INCHSL [OP=051, AC=5] TTYUUO 5,
C00275 00077 GETLIN [OP=051, AC=6] TTYUUO 6,
C00293 00078 SETLIN [OP=051, AC=7] TTYUUO 7,
C00295 00079 RESCAN [OP=051, AC=10] TTYUUO 10,
C00297 00080 CLRBFI [OP=051, AC=11] TTYUUO 11,
C00298 00081 CLRBFO [OP=051, AC=12] TTYUUO 12,
C00299 00082 INSKIP [OP=051, AC=13] TTYUUO 13,
C00300 00083 INWAIT [OP=051, AC=14] TTYUUO 14,
C00302 00084 SETACT [OP=051, AC=15] TTYUUO 15,
C00315 00085 TTREAD [OP=051, AC=16] TTYUUO 16,
C00320 00086 OUTFIV [OP=051, AC=17] TTYUUO 17,
C00322 00087 3.4 Miscellaneous UUOs for Terminals
C00323 00088 BEEP [OP=047, ADR=400111] CALLI 400111
C00325 00089 TTYSET [OP=047, ADR=400121] CALLI 400121
C00348 00090 RDLINE [OP=047, ADR=400123] CALLI 400123
C00351 00091 TTYMES [OP=047, ADR=400047] CALLI 400047
C00356 00092 NULMES [OP=047, ADR=400114] CALLI 400114
C00359 00093 SNEAKW [OP=047, ADR=400063] CALLI 400063
C00361 00094 ACTCHR [OP=047, ADR=400105] CALLI 400105
C00362 00095 TTYSKP [OP=047, ADR=400116] CALLI 400116
C00364 00096 TTYJOB [OP=047, ADR=400113] CALLI 400113
C00366 00097 CTLV [OP=047, ADR=400001] CALLI 400001
C00368 00098 GETLN [OP=047, ADR=34] CALLI 34
C00369 00099 3.5 Pseudo-Teletypes
C00374 00100 PTYUUO
C00375 00101 PTYUUO [OP=711]
C00377 00102 Doing PTYUUOs to Terminals
C00379 00103 PTYGET [OP=711, AC=0] PTYUUO 0,
C00381 00104 PTYREL [OP=711, AC=1] PTYUUO 1,
C00382 00105 PTIFRE [OP=711, AC=2] PTYUUO 2,
C00383 00106 PTOCNT [OP=711, AC=3] PTYUUO 3,
C00384 00107 PTRD1S [OP=711, AC=4] PTYUUO 4,
C00385 00108 PTRD1W [OP=711, AC=5] PTYUUO 5,
C00387 00109 PTWR1S [OP=711, AC=6] PTYUUO 6,
C00389 00110 PTWR1W [OP=711, AC=7] PTYUUO 7,
C00390 00111 PTRDS [OP=711, AC=10] PTYUUO 10,
C00392 00112 PTWRS7 [OP=711, AC=11] PTYUUO 11,
C00394 00113 PTWRS9 [OP=711, AC=12] PTYUUO 12,
C00396 00114 PTGETL [OP=711, AC=13] PTYUUO 13,
C00398 00115 PTSETL [OP=711, AC=14] PTYUUO 14,
C00400 00116 PTLOAD [OP=711, AC=15] PTYUUO 15,
C00404 00117 PTL7W9 [OP=711, AC=17] PTYUUO 17,
C00406 00118 PTJOBX [OP=711, AC=16] PTYUUO 16,
C00412 00119 SECTION 4--DISPLAY OUTPUT
C00415 00120 4.1 III Displays
C00419 00121 4.2 Data Disc Displays
C00425 00122 4.3 Datamedia Displays
C00429 00123 4.4 Page Printer Manipulation
C00431 00124 PPIOT [OP=702]
C00432 00125 PPSEL [OP=702, AC=0] PPIOT 0,
C00435 00126 PPACT [OP=702, AC=1] PPIOT 1,
C00437 00127 DPYPOS [OP=702, AC=2] PPIOT 2,
C00440 00128 DPYSIZ [OP=702, AC=3] PPIOT 3,
C00442 00129 PPREL [OP=702, AC=4] PPIOT 4,
C00444 00130 PPINFO [OP=702, AC=5] PPIOT 5,
C00449 00131 LEYPOS [OP=702, AC=6] PPIOT 6,
C00451 00132 PPHLD [OP=702, AC=7] PPIOT 7,
C00453 00133 CURSOR [OP=702, AC=10] PPIOT 10,
C00455 00134 PPSPY [OP=047, ADR=400107] CALLI 400107
C00457 00135 4.5 Running Display Programs
C00458 00136 UPGIOT [OP=703]
C00473 00137 FREEZE [OP=047, ADR=400012] CALLI 400012
C00476 00138 PGIOT [OP=715]
C00477 00139 PGSEL [OP=715, AC=0] PGIOT 0,
C00478 00140 PGACT [OP=715, AC=1] PGIOT 1,
C00479 00141 PGCLR [OP=715, AC=2] PGIOT 2,
C00480 00142 DDUPG [OP=715, AC=3] PGIOT 3,
C00482 00143 PGINFO [OP=715, AC=4] PGIOT 4,
C00484 00144 UPGMVM [OP=714]
C00486 00145 UPGMVE [OP=713]
C00487 00146 DPYCLR [OP=701]
C00490 00147 4.6 File-Status Display on the Wholine
C00491 00148 SHOWIT [OP=047, ADR=400011] CALLI 400011
C00495 00149 4.7 Extra Data Disc Channels
C00496 00150 DDCHAN [OP=047, ADR=400067] CALLI 400067
C00501 00151 4.8 The Video Switch
C00504 00152 VDSMAP [OP=047, ADR=400070] CALLI 400070
C00523 00153 4.9 The Audio Switch
C00528 00154 ADSMAP [OP=047, ADR=400110] CALLI 400110
C00539 00155 SECTION 5--UPPER SEGMENTS
C00542 00156 Upper Segment Protection
C00545 00157 5.1 Making and Killing Segments
C00550 00158 LINKUP [OP=047, ADR=400023] CALLI 400023
C00552 00159 REMAP [OP=047, ADR=37] CALLI 37
C00555 00160 CORE2 [OP=047, ADR=400015] CALLI 400015
C00558 00161 ATTSEG [OP=047, ADR=400016] CALLI 400016
C00561 00162 DETSEG [OP=047, ADR=400017] CALLI 400017
C00563 00163 GETHI [OP=047, ADR=400072] CALLI 400072
C00564 00164 SETPR2 [OP=047, ADR=400052] CALLI 400052
C00570 00165 GETPR2 [OP=047, ADR=400053] CALLI 400053
C00572 00166 5.2 Getting/Setting Segment Status
C00573 00167 SETUWP [OP=047, ADR=36] CALLI 36
C00575 00168 UNPURE [OP=047, ADR=400102] CALLI 400102
C00578 00169 SETPRO [OP=047, ADR=400020] CALLI 400020
C00580 00170 SETNM2 [OP=047, ADR=400036] CALLI 400036
C00582 00171 POINTS [OP=712]
C00583 00172 SEGNAM [OP=047, ADR=400037] CALLI 400037
C00584 00173 SEGNUM [OP=047, ADR=400021] CALLI 400021
C00585 00174 SECTION 6--GETTING/SETTING INFORMATION
C00586 00175 6.1 AC Contents upon System Startup
C00587 00176 6.2 Dates and Times
C00588 00177 DATE [OP=047, ADR=14] CALLI 14
C00589 00178 DAYCNT [OP=047, ADR=400100] CALLI 400100
C00590 00179 TIMER [OP=047, ADR=22] CALLI 22
C00591 00180 MSTIME [OP=047, ADR=23] CALLI 23
C00592 00181 ACCTIM [OP=047, ADR=400101] CALLI 400101
C00593 00182 RUNTIM [OP=047, ADR=27] CALLI 27
C00594 00183 6.3 Job Information
C00595 00184 CORE [OP=047, ADR=11] CALLI 11
C00597 00185 PJOB [OP=047, ADR=30] CALLI 30
C00598 00186 GETPPN [OP=047, ADR=24] CALLI 24
C00599 00187 GETNAM [OP=047, ADR=400062] CALLI 400062
C00600 00188 SETNAM [OP=047, ADR=43] CALLI 43
C00601 00189 SETCRD [OP=047, ADR=400073] CALLI 400073
C00603 00190 GETPRV [OP=047, ADR=400115] CALLI 400115
C00613 00191 SETPRV [OP=047, ADR=400066] CALLI 400066
C00616 00192 WHO [OP=047, ADR=400112] CALLI 400112
C00618 00193 SLEVEL [OP=047, ADR=400044] CALLI 400044
C00621 00194 RLEVEL [OP=047, ADR=400054] CALLI 400054
C00622 00195 6.4 Looking at the Monitor
C00623 00196 NAMEIN [OP=047, ADR=400043] CALLI 400043
C00625 00197 JBTSTS [OP=047, ADR=400013] CALLI 400013
C00632 00198 SWITCH [OP=047, ADR=20] CALLI 20
C00633 00199 CALLIT [OP=047, ADR=400074] CALLI 400074
C00636 00200 PEEK [OP=047, ADR=33] CALLI 33
C00638 00201 .SYML [OP=047, ADR=400010] CALLI 400010
C00640 00202 MTRUUO [OP=047, ADR=400122] CALLI 400122
C00641 00203 SECTION 7--INTER-JOB MAIL SYSTEM
C00643 00204 MAIL [OP=710]
C00644 00205 7.1 Sending Mail
C00645 00206 SEND [OP=710, AC=0] MAIL 0,
C00647 00207 SKPSEN [OP=710, AC=5] MAIL 5,
C00649 00208 7.2 Receiving Mail
C00650 00209 WRCV [OP=710, AC=1] MAIL 1,
C00651 00210 SRCV [OP=710, AC=2] MAIL 2,
C00652 00211 7.3 Peeking at Mailboxes
C00653 00212 SKPME [OP=710, AC=3] MAIL 3,
C00654 00213 SKPHIM [OP=710, AC=4] MAIL 4,
C00656 00214 SECTION 8--SPACEWAR MODE
C00666 00215 8.1 Spacewar UUOs
C00667 00216 SPCWAR [OP=043]
C00669 00217 SPCWGO [OP=047, ADR=400003] CALLI 400003
C00672 00218 DISMIS [OP=047, ADR=400024] CALLI 400024
C00673 00219 SECTION 9--USER INTERRUPTS
C00695 00220 9.1 New-style Interrupts
C00705 00221 INTENB [OP=047, ADR=400025] CALLI 400025
C00706 00222 INTORM [OP=047, ADR=400026] CALLI 400026
C00707 00223 INTACM [OP=047, ADR=400027] CALLI 400027
C00708 00224 INTENS [OP=047, ADR=400030] CALLI 400030
C00709 00225 CLKINT [OP=717]
C00713 00226 DISMIS [OP=047, ADR=400024] CALLI 400024
C00716 00227 UWAIT [OP=047, ADR=400034] CALLI 400034
C00720 00228 DEBREAK [OP=047, ADR=400035] CALLI 400035
C00722 00229 IWAIT [OP=047, ADR=400040] CALLI 400040
C00723 00230 IENBW [OP=047, ADR=400045] CALLI 400045
C00724 00231 INTGEN [OP=047, ADR=400033] CALLI 400033
C00725 00232 INTIRQ [OP=047, ADR=400032] CALLI 400032
C00726 00233 INTMSK [OP=720]
C00728 00234 IMSKST [OP=721]
C00729 00235 IMSKCL [OP=722]
C00730 00236 INTUUO [OP=723]
C00731 00237 INTDEJ [OP=723, AC=0] INTUUO 0,
C00733 00238 IMSTW [OP=723, AC=1] INTUUO 1,
C00734 00239 IWKMSK [OP=723, AC=2] INTUUO 2,
C00736 00240 INTDMP [OP=723, AC=3] INTUUO 3,
C00739 00241 INTIPI [OP=723, AC=4] INTUUO 4,
C00741 00242 IMSKCR [OP=723, AC=5] INTUUO 5,
C00742 00243 9.2 Old-style Interrupts
C00745 00244 APRENB [OP=047, ADR=16] CALLI 16
C00747 00245 SETPOV [OP=047, ADR=32] CALLI 32
C00749 00246 SECTION 10--MISCELLANEOUS UUOS
C00750 00247 EXIT [OP=047, ADR=12] CALLI 12
C00752 00248 SLEEP [OP=047, ADR=31] CALLI 31
C00753 00249 RESET [OP=047, ADR=0] CALLI 0
C00758 00250 SWAP [OP=047, ADR=400004] CALLI 400004
C00768 00251 RUN [OP=047, ADR=35] CALLI 35
C00770 00252 TMPCOR [OP=047, ADR=44] CALLI 44
C00780 00253 TMPCRD [OP=047, ADR=400103] CALLI 400103
C00783 00254 UUOSIM [OP=047, ADR=400106] CALLI 400106
C00788 00255 WAKEME [OP=047, ADR=400061] CALLI 400061
C00792 00256 JOBRD [OP=047, ADR=400050] CALLI 400050
C00795 00257 LOCK [OP=047, ADR=400076] CALLI 400076
C00797 00258 UNLOCK [OP=047, ADR=400077] CALLI 400077
C00798 00259 SETDDT [OP=047, ADR=2] CALLI 2
C00799 00260 SPWBUT [OP=047, ADR=400000] CALLI 400000
C00801 00261 EIOTM [OP=047, ADR=400005] CALLI 400005
C00802 00262 LOGIN [OP=047, ADR=15] CALLI 15
C00804 00263 LOGOUT [OP=047, ADR=17] CALLI 17
C00805 00264 SECTION 11--OBSOLETE OR OTHERWISE USELESS UUOS
C00806 00265 11.1 Old UUOs
C00807 00266 INTIIP [OP=047, ADR=400031] CALLI 400031
C00808 00267 USKIP [OP=047, ADR=400041] CALLI 400041
C00810 00268 LIOTM [OP=047, ADR=400006] CALLI 400006
C00811 00269 DDTIN [OP=047, ADR=1] CALLI 1
C00813 00270 DDTOUT [OP=047, ADR=3] CALLI 3
C00814 00271 GETCHR [OP=047, ADR=6] CALLI 6
C00815 00272 SETNAM [OP=047, ADR=400002] CALLI 400002
C00816 00273 SEGSIZ [OP=047, ADR=400022] CALLI 400022
C00817 00274 11.2 Useless UUOs
C00819 00275 SECTION 12--INDIVIDUAL DEVICE DESCRIPTIONS
C00820 00276 12.1 The Disk (DSK and new-mode UDPn)
C00826 00277 Long Block LOOKUPs, ENTERs and RENAMEs
C00829 00278 Record Offset
C00834 00279 Disk I/O Status Word Summary
C00838 00280 MTAPE UUOs for the Disk
C00839 00281 MTAPE [OP=072]
C00867 00282 12.2 Terminals
C00876 00283 12.3 The Line Printer
C00881 00284 LPT I/O Status Word Summary
C00883 00285 12.4 The XGP
C00885 00286 Video Mode
C00893 00287 Character Mode
C00910 00288 XGP I/O Status Word Summary
C00911 00289 XGP MTAPE UUO
C00912 00290 MTAPE [OP=072]
C00926 00291 XGPUUO UUO
C00927 00292 XGPUUO [OP=047, ADR=400075] CALLI 400075
C00931 00293 12.5 Dectapes
C00933 00294 Dectape I/O Status Word Summary
C00935 00295 Old Dectape Format
C00939 00296 UTPCLR [OP=047, ADR=13] CALLI 13
C00940 00297 12.6 Magnetic Tapes
C00941 00298 Magnetic Tape I/O Status Word Summary
C00944 00299 MTAPE UUO for Magnetic Tapes
C00945 00300 MTAPE [OP=072]
C00948 00301 12.7 Plotter (PLT)
C00949 00302 12.8 Paper Tape Punch
C00953 00303 12.9 Paper Tape Reader
C00956 00304 Paper Tape Reader I/O Status Word Summary
C00957 00305 12.10 User Disk Pack
C00961 00306 Old-Mode UDP Usage
C00966 00307 ENTER [OP=077]
C00968 00308 RENAME [OP=055]
C00970 00309 UDPn I/O Status Word Summary
C00971 00310 12.11 Device SIX
C00974 00311 OUTPUT [OP=067]
C00976 00312 INPUT [OP=066]
C00978 00313 MTAPE [OP=072]
C00980 00314 Disk Transfers to and from P3 Memory
C00981 00315 MTAPE [OP=072]
C00990 00316 MTAPE [OP=072]
C00992 00317 P1/P3 Message Formats
C01012 00318 12.12 Interlock Devices for P3
C01014 00319 12.13 TV Cameras
C01027 00320 TV I/O Status Word Summary
C01028 00321 12.14 The IMP
C01030 00322 Glossary of Network Terms
C01038 00323 Special Note on 8-Bit Byte Size
C01041 00324 IMP I/O
C01053 00325 IMP MTAPEs
C01054 00326 MTAPE [OP=072]
C01080 00327 System IMP Tables
C01086 00328 12.15 The PDP-11 Interface: ELF
C01087 00329 ELF I/O Status Word Summary
C01090 00330 UUOs with Special Meanings for ELF
C01091 00331 USETI [OP=074]
C01092 00332 USETO [OP=075]
C01097 00333 UGETF [OP=073]
C01098 00334 RELEAS [OP=071]
C01099 00335 MTAPE [OP=072]
C01103 00336 12.16 The Cart Control Transmitter (CAR)
C01104 00337 The Cart Control Interface
C01110 00338 The Transmitter
C01113 00339 SECTION 13--SPECIAL I/O GADGETS
C01114 00340 13.1 The Dialer
C01115 00341 DIAL [OP=047, ADR=400117] CALLI 400117
C01122 00342 13.2 III Display Processor
C01123 00343 TSS Instruction
C01127 00344 LVW Instruction
C01131 00345 SVW Instruction
C01133 00346 CHR Instruction
C01135 00347 JMP Instruction
C01136 00348 HLT Instruction
C01137 00349 JMS Instruction
C01141 00350 JSR Instruction
C01143 00351 SAVE Instruction
C01144 00352 REST Instruction
C01146 00353 SEL Instruction
C01148 00354 13.3 Data Disc Display System
C01152 00355 Text Word
C01155 00356 Graphics Word
C01157 00357 Halt Instruction
C01158 00358 Jump Instruction
C01159 00359 No Operation
C01161 00360 Command Word
C01176 00361 13.4 Datamedia Display Output
C01188 00362 SECTION 14--EXAMPLES
C01189 00363 14.1 Example of General I/O
C01197 00364 14.2 Example of Display Programming
C01206 00365 14.3 Example of Using Interrupts
C01210 00366 APPENDIX 1--GENERAL INFORMATION ABOUT THE PDP-10
C01214 00367 PC Flags
C01219 00368 IOT-USER Mode
C01222 00369 Text Representations
C01224 00370 Assembler Features Relevant to this Manual
C01226 00371 APPENDIX 2--JOB DATA AREA
C01246 00372 APPENDIX 3--LOW CORE ADDRESSES OF USEFUL POINTERS IN THE MONITOR
C01288 00373 APPENDIX 4--DEVICE DATA BLOCKS (DDBS)
C01297 00374 APPENDIX 5--QUEUE NAMES AND NUMBERS
C01300 00375 APPENDIX 6--STANFORD CHARACTER SET
C01304 00376 APPENDIX 7--UUOS BY NUMBER
C01315 00377 INDEX
C01362 ENDMK
C⊗;
SECTION 1--INTRODUCTION
This document describes the UUOs (monitor calls) available to users of the
Stanford Artificial Intelligence Laboratory timesharing system. Additional
information relevant to the use of the UUOs is contained in the introductory
section and in the appendices. This manual supersedes SAILON 55.4.
The reader is assumed to know the PDP-10 instruction set and format, data types
and assembly languages. However, the aspects of these subjects that are
relevant to this manual are explained in Appendix 1. The user who is new to
the PDP-10 should read that appendix before going any further. The experienced
user may skip to Section 1.6, UNDERSTANDING THIS MANUAL.
1.1 UUOs (Un-Used Operation codes)
UUOs are monitor calls which make use of instruction codes that would otherwise
be unused or illegal. The opcodes from 000 to 077 are not used by any machine
instruction, and opcodes from 700 to 777 are input/output machine instructions,
which are normally illegal in user programs. All these opcodes trap to the
monitor, which can then take whatever action it deems appropriate. Taking
advantage of this situation, the system designates some of these opcodes to be
monitor calls for certain common functions such as I/O. Thus whenever a UUO is
encountered in the instruction stream, the monitor is called to execute the
function corresponding to the particular UUO. When the function has been
executed, control returns to the user program. Some UUOs may take skip returns;
that is, control does not always return at the instruction immediately following
the UUO, but sometimes at one of the next instructions after that one. The
individual writeups explain when a UUO skips; unless otherwise described, a
UUO's return is always at the instruction immediately following the UUO.
Some UUOs take arguments or return values in words in your core image. In such
cases the words can be accumulators (ACs), but a block of such words must not
extend beyond the last accumulator (octal 17) because words 20 through 37 in a
user's core image are used by the system for special temporary storage of sets
of ACs. (Words 40 through 137 are used by the system to store information about
the job. This part of a core image is referred to as the Job Data Area; the
data stored here is described in Appendix 2.)
Note also that some UUOs have unused argument fields. Such a field should be
made zero so that if at some later time it becomes used for a new feature, an
old program using that UUO will still work.
Some of the opcodes not defined by the system are available to the user for
defining his own special purpose UUOs. The method for defining these UUOs is
explained in Section 1.4. The categories of opcodes that are used for UUOs
are:
000 always illegal,
001:037 user-definable UUOs,
040:077 system-defined regular UUOs,
700:777 system-defined IOT UUOs.
The IOT UUOS are available only when the program is NOT in IOT-USER mode; in
IOT-USER mode these opcodes are machine I/O instructions instead. A user
program will not be in IOT-USER mode unless it has done something special to get
into that mode. For a complete explanation of IOT-USER mode, see Appendix 1.
Finally, a special feature allows the user to have normal system-defined UUOs
trap to a given location in the user program instead of being executed by the
system. For details of this feature, see the UUOSIM UUO on page 254.
1.2 Extended UUOs
In order to define more UUOs than there are opcodes available, two primary
methods are employed that allow a single opcode to represent many different UUO
functions. The first of these methods is to use the value of the accumulator
(AC) field in the instruction to specify one of 20 (octal) possible UUOs for a
given opcode. Thus, for example, the OUTSTR UUO (which types out an asciz
string on the terminal) is invoked by specifying the opcode 051 and the AC field
3. There are currently six opcodes that use the value of the AC field in this
manner. Each of these opcodes has a generic mnemonic which, together with a
specific value for the AC field, can be used to indicate a specific UUO. In
addition, each combination of generic mnemonic and specific AC field has a
specific mnemonic which also can be used to indicate the UUO. Opcode 051 has
the generic mnemonic TTYUUO, and TTYUUO with an AC field of 3 has the specific
mnemonic OUTSTR. Thus the following three lines of code are equivalent. (ADR
is an argument of this UUO; it specifies the address of the asciz string to be
typed out.)
OUTSTR ADR
TTYUUO 3,ADR
051140,,ADR
Note, however, that not all of the mnemonics are known by all of the assemblers
or all of the debuggers. FAIL, however, gets its UUO mnemonic definitions
directly from the system and thus is always up to date, even just after a new
UUO has been added.
1.3 CALLs and CALLIs
The second method of defining many UUOs with the same opcode has two versions.
In one of these, the address field of the UUO points to a word which contains
the sixbit name of the UUO function desired. In the other version, the address
field of the UUO is itself the number of the function desired. The opcode in
the first case is 040 and its mnemonic is CALL; the opcode in the second case is
047 and its mnemonic is CALLI (for CALL Immediate).
CALL [OP=040]
--------------------------------------------------
CALL AC,[SIXBIT /<name>/]
CALLI [OP=047]
--------------------------------------------------
CALLI AC,<number>
Exactly the same UUO functions are available through these two methods. Thus,
the following two lines of code are functionally equivalent; each will cause
execution of the EXIT UUO.
CALLI 12
CALL [SIXBIT /EXIT/]
Since there are these two versions of calling the same UUOs, the following fact
should be noted. When you use a CALL instead of a CALLI, not only do you need
an extra word in which to store the name of the CALL function, but also (and
more importantly) you force the system to look up the function name in a table
in order to find out the function number. This means that using CALLs instead
of CALLIs creates a substantial amount of extra work that could be completely
avoided. In addition, it is easier to use CALLIs instead of CALLs because, in
FAIL and MACRO, if you use the name of a CALL as an opcode, the appropriate
CALLI will be generated. (In MACRO, only the DEC CALLIs are predefined.) For
example, the following two lines will produce the same machine code.
CALLI 12
EXIT
Thus the CALL UUO is essentially obsolete; it is mentioned here mainly for
completeness sake. Please use CALLIs!
1.4 UUO Trapping and User-Defined UUOs
The method employed by the PDP-10 to trap to the monitor when an unused opcode
is encountered is the following:
1. The effective address calculation for the instruction is carried out as
usual with the address field, index field and indirect bit in the
instruction and in any words referenced indirectly by the instruction.
2. Bits 0 to 12 (opcode and AC field) of the instruction are deposited in
bits 0 to 12 of a special user or monitor location (depending on
whether the opcode represents a user or a monitor UUO). The calculated
effective address from 1 above is deposited into bits 18 to 35 (address
field) of the same special location. Bits 13 to 17 (index field and
indirect bit) of this location are cleared. For user UUOs, the special
location where the UUO is deposited is user 40. For monitor UUOs, this
special location depends on the particular type of processor involved
(KL, KA, etc.).
3. The instruction at a second special location (user or monitor as above)
is then executed (as if from an XCT instruction). This location
usually contains a JSR instruction to jump to a subroutine to interpret
the UUO. The JSR saves the program counter (which points to the
instruction immediately following the UUO) for returning to the program
containing the UUO. For user UUOs, the location whose instruction is
executed is user 41. For monitor UUOs, this locations depends on the
type of processor.
Thus, for a user to define his own UUOs (selected from opcodes 001 to 037), he
need only deposit a JSR or similar instruction in user location 41 to jump to
the subroutine that will interpret his user UUOs. The instruction in location
41 should be one that saves the program counter for returning. For instance it
could be a PUSHJ if you have a stack.
Note: Because the effective address calculation has already been completed by
the time a UUO's function is executed, what the monitor (or a user's UUO
handler) sees in the address field of a UUO is this effective address. In the
UUO writeups in this manual, the two expressions THE EFFECTIVE ADDRESS OF THE
UUO and THE ADDRESS FIELD OF THE UUO mean the same thing, namely, this final
value of the effective address calculation.
1.5 DEC vs. Stanford UUOs
UUOs with opcodes 040 through 077 and CALLIs with numbers 0 through 44 are
essentially standard DEC UUOs modified for use at Stanford. (Some have been
modified completely out of existence.) The exceptions are the TTYUUOs (opcode
051) with AC fields 14 through 17 and the SPCWAR UUO (opcode 043), which are
special Stanford UUOs. All of the IOT UUOs (opcodes over 700) and all CALLIs
with numbers from 400000 up are also special Stanford UUOs.
1.6 Understanding this Manual
Unless otherwise modified, the word DISPLAY in this manual will mean any
terminal which the system knows is a III, Data Disc, or Datamedia terminal.
In this timesharing system, there are currently three major computers. In this
manual they will be referred to as: P1 (the primary processor running the
timesharing system, currently a KL-10), P2 (the secondary processor, currently a
KA-10), and P3 (the tertiary processor, currently a PDP-6).
In each of the sections that follow, a collection of related UUOs is explained
along with the system concepts involved. Preceding the writeup for each UUO are
1) a line containing the UUO's mnemonics and numeric codes and 2) a sample usage
(calling procedure) to which the writeup will often refer. For numeric codes,
the abbreviation OP stands for the operation code field, AC for the accumulator
field and ADR for the effective address of the UUO. For CALL/CALLI UUOs, the
numerics will be those of the CALLI.
The phrases AC LEFT and AC RIGHT mean, respectively, THE LEFT HALF OF AC and THE
RIGHT HALF OF AC.
Wherever there is a data block of length N used or set up by a UUO, the words of
the block will be referred to as WORD 0 through WORD N-1 or sometimes (usually
with short blocks) as THE FIRST WORD through THE NTH WORD. Please note the
difference between these two terminologies.
A range of bits or words will often be referenced by an expression of the form
"X:Y", where X and Y are numbers. This represents all values from X through Y.
For example, "bits 18:26" means bits 18 through 26.
All numbers will be in OCTAL except for the following, which will be in DECIMAL:
bit numbers (e.g., "bit 35"), byte sizes (e.g., "12-bit bytes"), times (e.g.,
"30 seconds"), and numbers preceded by an equals sign (e.g., "=15").
References to particular bits or groups of bits will usually be made both by the
bit numbers and by the octal value resulting from 1's in the specified bit
positions. For example:
...if bit 0 (400000,,0 bit) is on...
...and bits 18:26 (0,,777000 bits)...
The octal value will be in half-word format, as shown above.
SECTION 2--GENERAL INPUT/OUTPUT
The purpose of input/output (I/O) is to transfer data between the computer's
memory and an external device such as a tape, a disk, a printer, etc. The UUOs
are set up to allow I/O with a fair amount of flexibility and device
independence. I/O here is done on a very low level and involves three basic
phases: initialization of the device, transfer of the data, and releasing of the
device. Another phase, file selection, is necessary for the disk and other
directory devices.
There are other simpler forms of I/O for certain devices (including terminals);
I/O for those devices is explained in later sections.
The basic phases of I/O can be seen in the corresponding UUOs, so I will give an
example sequence of the UUOs used in I/O. Since much of the I/O done by
programs uses the disk, I will include the file selection phase in the example
below. Note that this example is not a complete program; it contains only some
excerpts involving the use of UUOs. This is intended to introduce you to
various I/O concepts which will be explained in great detail in the remainder of
this section.
INIT 1,10 ;This initializes the disk (DSK) on channel 1 in
SIXBIT /DSK/ ; mode 10 and specifies an output buffer header at
OBUF,,0 ; location OBUF. Upon an error in the execution
HALT . ; of this UUO, the program will HALT.
ENTER 1,FILE ;This opens the file specified at location FILE for
HALT . ; output on channel 1; this will HALT on any error.
OUTPUT 1, ;This is used to write out data on channel 1.
CLOSE 1, ;This closes the file open on channel 1.
RELEAS 1, ;This releases the device on channel 1.
In general I/O, the methods for doing output are very similar to those for doing
input. Consequently, the following discussion will describe the basics of
input; minor differences for doing output will usually be mentioned in
parenthetical remarks. Any significant differences will be called to your
attention.
2.1 User I/O Channels
A program is allowed to use up to 20 I/O devices at the same time. In order to
keep straight which device an I/O UUO is meant for, each device in use is
assigned a CHANNEL NUMBER. The channel number, which can be any number between
0 and 17 inclusive, is specified by the user when he initializes the device.
Subsequent operations involving that device refer only to the channel number and
not to the name of the device. The channel number is chosen by the user and has
significance only to the program in which it is assigned. Furthermore, when a
device is released, the channel number is disassociated from it; so if the
device is to be used again, it must be initialized again with a new (possibly
the same) channel number.
To overcome the limitations imposed by the fact that the number of I/O channels
is fixed at 20, some UUOs have been provided to allow you to save and later
restore the state of one or more channels in order to be able to use those
channels for other I/O. For a description of this feature, see Section 2.13.
A RESET (see page 249) releases (without closing) any channels which are
currently saved as well as any normal channels open.
2.2 Data Modes
When you are doing I/O, you must select the data mode to be used. The mode
indicates how the data is to be transferred: primarily, whether the data
transfers are to be buffered and, if so, whether the data is made up of
characters or of full words.
In buffered mode, the system transfers data between the device and some buffers
in your core area. Buffers are used so that the system can be transferring data
into or out of one area (buffer) of your core image while you are transferring
data out of or into another area (buffer). Transfers from or to a device are
initiated for input by the INPUT UUO and for output by the OUTPUT UUO. To get
data from a buffer on input or to put data into a buffer for output, you simply
do ILDBs (input) or IDPBs (output) with a byte pointer that is set up by the
system. The data is thus handled a byte at a time, with the bytes being either
characters (7 bits each) or full words (36 bits each); the mode determines the
byte size. When a buffer is used up, you give an INPUT UUO to get another
buffer of data (or an OUTPUT UUO to write out a buffer of data). The buffers
you use are set up by the system in the form of buffer rings. Buffer rings will
be described in detail in Section 2.4, but now back to data modes.
The alternative to buffered mode is dump mode. To read (write) in dump mode,
you tell the system where in your core image you want the data to go (come from)
and how many words are to be transferred. This is done with dump mode command
lists, which will be explained in Section 2.3. In dump mode, the actual
transfer of data between your core image and the device happens when the INPUT
or OUTPUT UUO is given, and the UUO does not return until the transfer is
complete (unless you request, usually by setting some special bit, that the UUO
return immediately--this is possible only for certain devices).
The basic data modes are listed in the following table and described below.
(There are many special modes for specific devices; these modes are described in
Section 12, which deals with device-dependent features.)
MODE NAME TYPE OF TRANSFERS
0 ASCII Buffered characters (7-bit byte pointer)
1 ASCII LINE Buffered characters (7-bit byte pointer)
10 IMAGE Buffered words (36-bit byte pointer)
13 IMAGE BINARY Buffered words (36-bit byte pointer)
14 BINARY Buffered words (36-bit byte pointer)
16 DUMP RECORD Unbuffered
17 DUMP Unbuffered
ASCII mode (mode 0) is used for inputting (outputting) text. You get (put) one
ascii character at a time from (into) your buffer by using the byte pointer.
(Note: An INPUT UUO for a terminal will not return until an activation character
is typed or the terminal's input buffer is full (holding =95 characters) or the
end-of-file character is typed (CONTROL-META-linefeed on displays, control-Z on
non-displays). However, terminal I/O is usually done with the special UUOs
described in Section 3.)
ASCII LINE mode (1) is the same as ASCII mode (0) for most devices.
IMAGE mode (10) is similar to ASCII mode except that the bytes are 36 bits
instead of 7. When you do an ILDB (IDPB) you get (put) a whole word from (into)
the buffer. You can read text files in this mode, in which case you will get 5
characters at a time.
IMAGE BINARY (13) and BINARY (14) modes are the same as IMAGE mode except for
the paper tape reader and punch and the XGP. See Section 12.4 for the use of
mode 13 with the XGP, and see Section 12.8 and Section 12.9 for the meanings
of these modes with paper tape I/O.
DUMP mode (17) is used to do I/O without buffering. With each INPUT or OUTPUT
UUO, you must give the address of a dump mode command list, which specifies how
many words are to be transferred and where in your core image they are to come
from or go. The INPUT or OUTPUT UUO does not return until the transfer is
complete. Dump mode command lists are explained below.
DUMP RECORD mode (16) is the same as DUMP mode (17).
2.3 Dump Mode Command Lists
The effective address of an INPUT or OUTPUT UUO in dump mode (16 or 17) must be
the address of a dump mode command list. This list consists of up to 100 dump
mode commands, each of which takes one word. The end of the list is indicated
by a zero word after the last command.
In the left half of a dump mode command word is the negative of the number of
words to be transferred, and in the right half is the address of the word BEFORE
the first word in your core image to which (from which) the data is to go
(come).
(This is the standard dump mode command format. Some devices like the TV
cameras take non-standard dump mode commands. See the individual device
descriptions in Section 12.)
In the assembly languages, there is a pseudo-op called IOWD that generates dump
mode commands. The line
IOWD N,LOC
generates a word with -N in the left half and LOC-1 in the right half. As a
dump mode command, this will cause N words to be transferred to (from) the block
consisting of locations LOC through LOC+N-1.
Each dump mode command in a list causes a separate I/O transfer to take place.
In particular, with record devices (like the disk, dectapes and magnetic tapes)
each command is executed from the beginning of a record. For example the
command list
IOWD 100,A
IOWD 100,B
0
will read 100 words from one record and then 100 words from the next record,
IGNORING ALL BUT THE FIRST 100 WORDS OF EACH RECORD.
Consecutive commands in a list are usually fetched from consecutive words.
However, if the LEFT half of a dump mode command word is zero, then that word is
taken NOT as a command, but as a POINTER to the next command word, which is then
fetched from the location specified by the RIGHT half of that word. (Of course,
if the right half is zero also, then that word marks the end of the command
list.) For example, the two command lists given below (beginning at LIST1 and
LIST2, respectively) are equivalent.
LIST1: IOWD 200,LOC1 | LIST2: IOWD 200,LOC1
IOWD 200,LOC2 | LIST2B
0 | ...
|
| LIST2B: IOWD 200,LOC2
| 0
The only difference is that in the second example, the commands are in two
different places instead of being directly in line. Either of these lists would
cause 200 words to be transferred to (from) LOC1 and then 200 words to (from)
LOC2.
2.4 Buffer Rings
When you are doing input (output) in one of the buffered modes, a ring of
buffers is set up by the system for storage of data in your core image. This
allows you to empty (fill) one buffer while the device is filling (emptying)
another buffer independently.
A buffer ring consists of some number of buffers with each one containing a
pointer to the next. The last buffer contains a pointer to the first; hence it
is a ring. The user can specify the number of buffers in a ring with the INBUF
and OUTBUF UUOs (see Section 2.9), or he can accept the system default number
of buffers, which is two. The current buffer in a ring is referenced through a
three word block called the BUFFER HEADER. When you initialize a device in
buffered mode, you give the address of a three word block where the buffer
header is. The system will initialize the header when it sets up the buffer
ring.
The buffer header contains 1) a bit indicating whether the buffer ring has ever
been used, 2) a pointer to the buffer the user is currently emptying (filling),
3) the byte pointer that is used for loading (storing) data from (into) the
current buffer, and 4) a count of the number of bytes left in the current
buffer. Normally only the byte pointer and the byte count are needed by the
user. The byte pointer is in the second word of the header and the byte count
in the third. The first word contains the use indicator in the sign bit
(400000,,0 bit) (which is set to 1 when the buffers are created and cleared to
zero when the first INPUT or OUTPUT UUO is given) and the buffer pointer in the
right half. For input, the byte count is the number of bytes of data left in
the buffer; for output it is the number of bytes not yet filled with data by the
user. The byte pointer is set up so that you can get (put) the next byte by
doing an ILDB (IDPB). When you initialize a device in buffered mode, the system
clears the buffer header and then sets up the size field of the byte pointer.
If you so desire, you may then change the byte size to any size you want, and
the system will do the right things. (The system actually uses the byte size in
the byte pointer to calculate the byte count.) Finally, whenever you do an
INPUT or OUTPUT UUO, the system updates the entire buffer header before
returning control to you.
2.5 Buffers
The first three words of each buffer are used by the system and contain no data.
The first word contains the device I/O status word (explained in Section 2.6)
for the device at the time the buffer was transferred. The left half of the
second word has the size of the buffer not counting the first two words, that
is, the number of data words in the buffer plus one. The right half of the
second word holds the address of the next buffer in the ring (which may be the
same buffer). All pointers to buffers, both in the buffer header and from one
buffer to the next, point not to the first word of the buffer but to the second
word, where the pointer to the next buffer is. The sign bit (400000,,0 bit) of
the second word in a buffer is set to 1 by the system when the buffer is full of
data and cleared to 0 when it is empty.
The right half of the third word holds a count of the number of words of data
actually contained in the buffer. The left half of this word is reserved for
bookkeeping use by the system. On output the word count is computed from the
byte pointer in the buffer header unless the IOWC bit in the device status word
(see Section 2.6) is on, in which case the value in the third word of the
buffer is taken as the count. That means you must specifically place the word
count there yourself. Many devices (including the disk) will not take a word
count larger than their standard buffer size. There are at least two devices
that will accept buffers of any size: terminals and magnetic tapes. For other
devices, consult the individual device writeups in Section 12.
The illustration on the next page shows the structure of a buffer ring with two
buffers.
DIAGRAM OF A 2-BUFFER RING
BUFFER HEADER
-------------------------------------- \
|s| | buffer pointer |→→→→→→→→→→↓
-------------------------------------- / ↓
| byte pointer | ↓
-------------------------------------- ↓
| byte count | ↓
-------------------------------------- ↓
↓
↓
↓←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←
↓ FIRST BUFFER ↑
↓ ↑
↓ -------------------------------------- ↑
↓ | I/O status bits | ↑
↓ \ -------------------------------------- \ ↑
→→→→→→→→|s| data size + 1 | buffer pointer |→→→→→→→→→→↓ ↑
/ -------------------------------------- / ↓ ↑
| bookkeeping | data word count | ↓ ↑
-------------------------------------- ↓ ↑
| | ↓ ↑
| | ↓ ↑
| data | ↓ ↑
| | ↓ ↑
| | ↓ ↑
-------------------------------------- ↓ ↑
↓ ↑
↓ ↑
↓←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←←← ↑
↓ SECOND BUFFER ↑
↓ ↑
↓ -------------------------------------- ↑
↓ | I/O status bits | ↑
↓ \ -------------------------------------- \ ↑
→→→→→→→→|s| data size + 1 | buffer pointer |→→→→→→→→→→→→→→→→→→↑
/ -------------------------------------- /
| bookkeeping | data word count |
--------------------------------------
| |
| |
| data |
| |
| |
--------------------------------------
2.6 Device I/O Status Word
For each device on the system there is a word called the device I/O status word.
The left half of this word is used internally by the system and the right half
is used to communicate with the user. The right half word is set up when the
user initializes the device. Thereafter, certain bits may be set by the system
to tell the user of conditions that have arisen (such as end of file). These
bits can be tested or changed by the user with the STATZ, STATO, GETSTS and
SETSTS UUOs (see Section 2.15); for a job's attached terminal, these bits can
be examined or changed with the TTYSET UUO (see page 89). The following table
gives the meanings of the bits in the right half of the I/O status word and the
meanings of some bits in the left half (used by the system) that are common to
all devices.
BITS OCTAL NAME MEANINGS OF 1'S IN DEVICE I/O STATUS WORD
8 1000,,0 DEVSBB The device's internal system buffer is busy.
12 40,,0 IOEND The last data has been transmitted by the
device.
13 20,,0 IO A 1 means output is going on.
15 4,,0 IOFST The next data transmitted will be the first
data in a buffer.
16 2,,0 IOBEG The device has not yet been used.
17 1,,0 IOW Some job is waiting for data from the device.
18 0,,400000 IOIMPM Improper mode. This can mean many things.
If you attempt to write on a write-locked
dectape or UDP, you get this error bit. If
you initialize a device in a mode that is not
legal for that device, you will get either
this error bit or a system error message.
19 0,,200000 IODERR Device detected error.
20 0,,100000 IODTER Device detected error. This bit and the
IODERR bit generally mean that the device has
detected an undesirable, if not catastrophic,
condition.
21 0,,40000 IOBKTL Dectape block number out of bounds. This bit
comes on if you reference a non-existent
block on a dectape. It can also come on for
the paper tape reader in mode 1 (Ascii Line
mode) if no activator (LF or FF) is seen
before filling the buffer or in mode 14
(Checksum mode) if the data word count (right
half of the first word of a block) exceeds
the buffer size.
22 0,,20000 IODEND End of file. This bit comes on only with
input; it means there is no more data to be
read in because you have reached the end of
the file. On non-displays, end of file is
indicated by typing control-Z (↑Z); on
displays, end of file is indicated by typing
CONTROL-META-linefeed.
23 0,,10000 IOACT Device is active.
24:29 0,,7700 Reserved for device-dependent features.
30 0,,40 IOCON Synchronize buffered I/O. An attempt is made
to make buffered I/O synchronous when this
bit is on. That is, exactly one buffer is
transmitted for every INPUT UUO and at most
one buffer for each OUTPUT UUO. The best way
to insure synchronous I/O, however, is to
have exactly one buffer in your ring, or
better yet, to use dump mode.
31 0,,20 IOWC Inhibit system computation of output word
count. The system is inhibited from
computing the word count that goes in the
third word of each buffer. Normally, when
you do an OUTPUT UUO in buffered mode, the
system uses the byte pointer in the buffer
header to compute the number of words of data
in the buffer. This computed word count is
then deposited in the third word of the
buffer. If the IOWC bit is on, the word
count computation is inhibited and whatever
is in the third word of the buffer is taken
as gospel for the word count.
32:35 0,,17 Data mode (see Section 2.2).
2.7 Files
Data on certain devices is stored in the form of files. To access data on one
of these devices, you must specify the filename in addition to the device name.
Devices that are file structured are called directory devices; the disk and
dectapes are such devices.
Every file has a name of one to six characters and an optional extension of one
to three characters. On the disk each file is associated with some
project-programmer name (PPN). A project-programmer name consists of a project
code and a programmer code, each of which is one to three characters. All of
the files for a particular project-programmer name are referred to collectively
as that PPN's disk area.
File names, file name extensions and project-programmer names are stored in
SIXBIT representation. File names are left-justified in one whole word; file
name extensions are left-justified in the left half of a word. If a filename
has no extension, the extension half word is zero. A zero file name is not
permitted. Project-programmer names are stored in one word with the project
code in the left half and the programmer code in the right half, each half being
right-justified. For an example of all this, the file RAD.Y[A,BC] would be
represented by the following octal values and corresponding assembly language
lines of code (the date word is included to make this four-word block into a
sample block for the LOOKUP UUO):
OCTAL ASSEMBLY LANGUAGE
file name: 624144000000 SIXBIT /RAD/
extension: 710000000000 SIXBIT /Y/
date word: 000000000000 0
PPN: 000041004243 SIXBIT / A BC/
where 62 is the octal value for "R" in sixbit, 41 is the octal value for "A" in
sixbit, etc.
UFDs (User File Directories) and the MFD
For each project-programmer name (PPN) on a disk device (DSK or UDPn), there is
a special file on that device called the UFD (User File Directory) which
contains the names of all the files on that disk area (i.e., all the files with
that PPN). Every UFD is a file on the disk area [1,1]. The filename for a
given PPN's UFD consists of the PPN itself as the primary name (project code in
the left half, programmer name in the right half, each half being right
justified), the extension .UFD and a PPN of [1,1]. For example, the UFD for the
disk area [FOO,BAZ] is the file FOOBAZ.UFD[1,1].
The UFD for disk area [1,1] is " 1 1.UFD[1,1]" and is called the MFD (Master
File Directory). The MFD does not contain an entry for itself, even though it
is on [1,1]; however it does contain the names of all the other files on [1,1],
which files are in fact the UFDs for all the other disk areas. There is one MFD
on each disk device (DSK or UDPn).
Any UFD (including the MFD) can be read just like any other file. Each UFD
consists of a number of contiguous 20-word entries, each of which either points
to a file or is unused. The first three words of a file's entry are exactly the
same as the first three words you get back from a successful LOOKUP (see page
32) of that file. The fourth word of a file's entry contains a disk pointer to
the file. The remaining 14 words are currently zero but will soon hold other
information about the file, such as its length. The first word of an entry not
in use is zero.
Disk File Protection System
Each file on the disk has a nine-bit protection key that indicates who may do
what to that file. To access any file, you must be permitted the type of access
you seek according to both the individual file's protection and the protection
of the UFD for that file's disk area. A UFD's protection key thus automatically
applies to all files on that disk area.
A one in the first bit (400 bit) position of a file's protection key means that
the file dumping program DART (that provides file backup on magnetic tape)
should never dump this file. For UFD's, this 400 bit means that the password
for this PPN should be required by LOGIN only for remote users. A one in the
second bit (200 bit) means that COPY should not delete this file without getting
special confirmation; this prevents accidental deletion of a file with the
monitor DELETE command. For UFD's, the 200 bit in the protection key is
currently unused. The remaining seven bits (177 bits) are broken into three
groups: the third bit (100 bit) tells what the owner of the file may do to the
file ("owner" means any user logged in with the same PPN as that of the file),
the middle three bits (070 bits) tell what other logged-in users may do with the
file, and the last three bits (007 bits) tell what not-logged-in users may do.
The LUP privilege (see page 190) determines whether the second or third group is
checked when a reference is made to a file on a disk area other than your own.
Corresponding bits in the logged-in-user and the not-logged-in-user protection
groups mean the same thing but for the two different classes of users. The sole
bit in the owner group (100 bit) means the same as the third bit in each of the
other groups (10 & 1 bits) but applies to the owner of the file.
In each group, a one in the first bit position (40 & 4 bits) means that the
users corresponding to that group are not permitted to change the file's
protection key. This is called PROTECTION PROTECTION. A user is always
permitted to change the protection keys of his own files. A one in the second
bit position (20 & 2 bits) means that the corresponding users may not read the
file. This is called READ PROTECTION, and, again, a user may always read his
own files. A one in the third bit position (100 & 10 & 1 bits) means that the
corresponding users may not write, alter or delete the file. This is called
WRITE PROTECTION. Read protection for a file implies protection protection
since it is necessary to open (LOOKUP) the file for reading before its
protection can be changed (with RENAME).
Here is a summary of the nine protection bits.
BITS OCTAL MEANING
0 400 Dump never (DART only). Remote-only LOGIN password for UFDs.
1 200 Delete protect (COPY only). Unused with UFDs.
2 100 Write protection for users with same PPN as file.
3 040 Protection protection for other logged-in users.
4 020 Read protection for other logged-in users.
5 010 Write protection for other logged-in users.
6 004 Protection protection for not-logged-in users.
7 002 Read protection for not-logged-in users.
8 001 Write protection for not-logged-in users.
The protection of a file is set when the file is created (with the ENTER UUO,
see page 33) but can be subsequently changed (with the RENAME UUO, see page
34). When a file is created, if a protection of 000 is specified, then the
file will be given the default protection for that UFD, unless the file already
existed (superseding old file of same name), in which case the protection of the
old version will be given to the new version. See the next paragraph for
setting your UFD's default protection (which should not be confused with the
UFD's own protection).
UFD's themselves are protected (as files) in the following ways. The
read-protect bits (022 bits) of a UFD's protection key determine whether a user
can read the UFD (as well as whether a user can read any file on that disk
area). Only privileged programs (like LOGIN) can write or change the name of a
UFD, but a user can change the protection key of his UFD with the RENAME UUO.
However, the RENAME monitor command cannot be used to change your UFD's
protection unless you know the password for [1,1]. The simplest way to change
your UFD's protection is to log in using a percent sign (%) as the delimiter
between project code and programmer code. LOGIN will then allow you to change
the password, the UFD's protection, and/or the default protection for that UFD.
Disk Project-Programmer Names
When you reference a file on the disk, you must specify the project-programmer
name of the file's owner. If the file is your own, this can be done by
indicating a PPN word of zero. Sometimes, however, you would like a program to
act as if it were logged in under a different PPN. This can be accomplished
with respect to file references through the use of Disk PPNs and the DSKPPN UUO.
Each job has associated with it a Disk Project-Programmer Name (the Disk PPN,
also called the ALIAS) that is used whenever the PPN word for a disk file
specification contains zero. Your Disk PPN is set to your real PPN when you log
in and can be changed with the monitor ALIAS command; it can also be changed or
retrieved with the DSKPPN UUO. Thus if you specify a file with a zero PPN, the
project-programmer name of your Disk PPN (your alias) will be assumed for the
file. This method does not, however, allow you violate any protection keys for
the files you reference. These protection keys are applied to your real (logged
in) PPN to see if you are permitted the kind of access you are requesting for
the file.
DSKPPN [OP=047, ADR=400071] CALLI 400071
--------------------------------------------------
MOVE AC,[<code>]
DSKPPN AC,
Code Meaning
0 Return own Disk PPN in AC.
-1 Reset own Disk PPN to logged in PPN.
0,,n Return the Disk PPN of job n.
<proj>,,0 Set own Disk PPN to: <proj>,,<logged in prog. name>.
<proj>,,<prog> Set own Disk PPN to that in AC.
The DSKPPN UUO is used to change or retrieve your Disk Project-Programmer Name
or to retrieve the Disk PPN of someone else. The action taken by this UUO is
determined by the code in AC. If AC contains zero, your current Disk PPN is
returned in AC. If AC contains -1, your Disk PPN is reset to your logged in
PPN. If AC contains a job number, the Disk PPN for that job is returned; if the
job is not logged in, zero is returned. If the right half of AC contains zero
and the left half is non-zero, then the PROJECT part of your Disk PPN is set to
the project specified by AC left and the PROGRAMMER part is set to the
programmer code under which you are logged in. If both halves of AC are
non-zero and AC doesn't contain -1, then your Disk PPN is set to the PPN
specified by the whole AC. No error checking is done to make sure AC holds a
legal or existing PPN.
2.8 Initializing a Device
There are two UUOs available to initialize a device: the INIT UUO and the OPEN
UUO. Either of these UUOs can be used; the only difference between them is the
format for passing parameters to the system.
Each of these UUOs tells the system what device you want to use, what mode you
want to use it in, where your buffer headers are, if any, and what channel
number you want to associate with the device. The mode is specified in a half
word value which is used as the right half of the initial I/O status word for
the device. If the device is a non-sharable device (such as the line printer, a
terminal, a dectape or a magnetic tape) which is not available now, the system
will normally type out a message asking if you will wait for it. However, the
following bits in the data mode half word which you specify when you attempt to
initialize the device can be used to indicate special action to be taken.
BITS OCTAL MEANINGS OF 1'S IN THE INITIAL DATA MODE
26 0,,1000 Wait automatically until the device is available.
27 0,,400 Take error return automatically if the device is busy.
This bit takes precedence over bit 26.
If you want to have your program wait automatically without your being asked,
you should have bit 26 (the 1000 bit) on in the data mode half word. If you
would like to get the error return automatically when a device is busy, you
should have bit 27 (the 400 bit) on in the data mode. The automatic error
return bit takes precedence over the automatic wait bit. Note that these two
bits (26 and 27) are among those reserved for device-dependent features. Thus,
if you have either of these bits on when you initialize a device, you should use
the SETSTS UUO (explained in Section 2.15) to turn them off after you get the
device unless you want the particular features they represent for that device.
See the device writeups in Section 12 for the meanings of these bits for the
individual devices.
A device can be referred to by either its PHYSICAL name or its LOGICAL name.
The physical name of a device is the permanent name given that device by the
system. A logical device name is a temporary name that can be specified with
the monitor ASSIGN command. Device names (physical or logical) are stored
left-justified in sixbit representation. For example, the device DTA1 is
represented by the octal number 446441210000, which can be set up by the SIXBIT
pseudo-op in the assembly languages, i.e., SIXBIT /DTA1/. If a given device
name is both a physical name (of one device) and a logical name (of another
device), the logical name takes precedence.
INIT [OP=041]
--------------------------------------------------
INIT <channel number>,<data mode>
<physical or logical device name in sixbit>
OBUF,,IBUF
<error return>
The INIT UUO initializes the named device on the channel indicated by the AC
field and in the data mode specified by the address field of the instruction.
OBUF should be the address for your output buffer header or zero if none. IBUF
should be the the address for your input buffer header or zero if none. If you
are not going to do any buffered output on this channel, OBUF can be zero. If
you are not going to do any buffered input on this channel, IBUF can be zero.
See the explanation above of bits 26:27 in the data mode half-word for selecting
action to be taken automatically if the device you are trying to INIT is busy.
The INIT initializes the 3-word buffer headers by zeroing the first and third
words (indicating that there is no buffer ring and no data) and by setting up
the left half of the byte pointer (second word) to contain only the byte size
(which is detemined by the mode). If you want to use a byte size other than the
standard one for the mode you are using, you can change the byte size field
after the INIT is done. The system will then still correctly calculate the byte
count which it places in the third word of the buffer header after an INPUT or
OUTPUT UUO.
The data mode half word is used to set the right half of the I/O status word for
this device. The IOACT bit, however, is masked out when this is done. (The I/O
status word is explained in Section 2.6.)
When you initialize a device, any device open on the channel specified is
released before the new device is initialized. (See the RELEAS UUO in Section
2.12.)
If there is no device with the name you give, the error return (double skip) is
taken. If this UUO is successful, the triple skip return is taken.
OPEN [OP=050]
--------------------------------------------------
OPEN <channel number>,ADR
<error return>
ADR: <data mode>
<device name in sixbit>
OBUF,,IBUF
The OPEN UUO does exactly the same thing as the INIT UUO above. The difference
is that the information passed to the system by OPEN does not have to appear in
line with the instruction stream. The location of this information is specified
by the effective address of the UUO. Hence OPEN can be used by reentrant
programs that change the data referenced by the UUO.
The left half of the data mode word is ignored.
2.9 Setting Up Buffer Rings
For buffered I/O, a buffer ring must be set up in your core area. Unless you
issue an explicit buffer-creating UUO (described below), or make the buffer ring
yourself (very carefully!), the system will set up a buffer ring for you when
you first give an INPUT or OUTPUT UUO. That is, if a device open in buffered
mode has no associated input (output) buffer ring when the first INPUT (OUTPUT)
UUO is given, the system will set up a two-buffer ring before carrying out the
normal function of the UUO. To do buffered input (output), you must have given
the address of the input (output) buffer header when you initialized the device.
Whenever the system sets up a buffer ring for you, it places the ring at the
address contained in JOBFF in your job data area (see Appendix 2). You may
cause your buffers to be set up anywhere in your core image by temporarily
changing JOBFF to point to the place where you want the buffers to be. If there
is not enough room between JOBFF and JOBREL for the number of buffers you
request, your core image is automatically expanded to make room. After the ring
is set up, JOBFF is left pointing to the first word beyond the ring and your
buffer header is made to point to the first buffer in the ring.
The following UUOs cause a buffer ring to be set up, and they permit
specification of a non-standard number of buffers and non-standard sizes.
INBUF [OP=064]
--------------------------------------------------
INBUF <channel number>,<number of buffers>
The INBUF UUO causes an input buffer ring to be set up in your core area and to
be associated with the specified channel. The effective address of this UUO is
interpreted as the number of buffers the ring is to have. If the effective
address is zero, two buffers are set up (the same number of buffers you would
get if you did not give this UUO at all).
For buffered mode disk I/O, the recommended number of buffers is currently =19,
which permits an entire disk track to be read at one time. If the format of
files on the disk changes, this recommended number of disk buffers will change
too.
OUTBUF [OP=065]
--------------------------------------------------
OUTBUF <channel number>,<number of buffers>
The OUTBUF UUO causes a ring of output buffers to be set up exactly as INBUF
does for input buffers.
UINBF [OP=704]
--------------------------------------------------
UINBF <channel number>,ADR
ADR: <number of buffers>
<number of words of data in each buffer> + 1
The UINBF UUO causes an input buffer ring to be set up in your core area and to
be associated with the specified channel. The effective address points to a two
word block. The first word of this block contains the number of buffers to be
in the ring (zero means two), and the second word contains a number which is one
greater than the number of words of data in each buffer.
Some devices (including the disk) do not accept nonstandard buffer sizes.
Devices that will accept nonstandard sizes include terminals and magnetic tapes.
For other devices see the individual device descriptions in Section 12.
UOUTBF [OP=705]
--------------------------------------------------
UOUTBF <channel number>,ADR
ADR: <number of buffers>
<number of words of data in each buffer> + 1
The UOUTBF UUO causes a ring of output buffers to be set up exactly as UINBF
does for input buffers.
BUFLEN [OP=047, ADR=400042] CALLI 400042
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
BUFLEN AC,
The BUFLEN UUO tells you the standard buffer size for the device specified by
the contents of AC. AC should contain either the name (logical or physical) of
the device or the number of the channel on which it is open. The buffer size,
which is returned in AC, is one greater than the length of the data portion of a
buffer that would be set up if you did an INIT and then an INBUF or OUTBUF for
the particular device. This is the number you would need to use to set up a
standard size buffer with a UINBF or a UOUTBF UUO. The total number of words
each buffer would take up is two greater than this number (see Section 2.5). If
there is no such device, zero is returned in AC.
2.10 Opening Files
After initialization of a directory device (e.g., the disk), a particular file
on the device must be opened (i.e., selected) before any I/O can take place.
Opening of a file for input is done with the LOOKUP UUO; opening of a file for
output is done with the ENTER UUO. An ENTER done after a LOOKUP of the same
file on the same channel opens the file in Read-Alter mode, which is explained
on page 35. The RENAME UUO is available for changing a file's name or
specifications (date written, protection, etc.) after the file has been opened.
RENAME is also used to delete files.
If you initialize a directory device and attempt to transfer data with an INPUT
(OUTPUT) UUO without having done a LOOKUP (ENTER), the system will type out a
message and require you to type in a filename so that a LOOKUP (ENTER) can be
done before the data is transferred.
For non-directory devices, the UUOs LOOKUP, ENTER and RENAME are no-ops; they
always take the success (skip) return.
LOOKUP [OP=076]
--------------------------------------------------
LOOKUP <channel number>,ADR
<error return>
ADR: <file name in sixbit>
<file name extension in sixbit>,,<this halfword ignored>
<this word is ignored>
<project-programmer name in sixbit>
The LOOKUP UUO opens for input the file specified by the four-word block pointed
to by the effective address of the UUO. The first word of the block should
contain the sixbit name of the file to be read; the second word should contain
the sixbit file name extension in the left half. If the device is the disk, the
fourth word of the block should contain the project-programmer name for the file
or zero; zero will cause your current Disk PPN to be assumed for the file (see
page 20). The right half of the file extension word is ignored as is the whole
word following the extension word. For dectapes the project-programmer name is
also ignored. If the device is SYS, then the project-programmer name is taken
to be [1,3] and the fourth word of the LOOKUP block is ignored.
A LOOKUP always does a CLOSE of the input side of the channel (see Section
2.12) before attempting to open the specified file for input. If the LOOKUP is
successful, the skip return is taken and some information about the file is
returned. If the file does not exist or if some other error condition arises,
then the error return (no skip) is taken and, if the device is the disk, an
error code is returned in the right half of ADR+1 (the rest of the block is
unchanged). If you try to LOOKUP a disk file that is read protected against
you, then you will get the protection-failure error. The disk error codes for
LOOKUP, ENTER and RENAME are explained in a table on page 36. Every LOOKUP,
ENTER or RENAME error leaves you with no file open on the offending channel
except that after a BAD RETRIEVAL error of code 11 you are permitted to RENAME
the garbaged file. No error codes are returned for dectapes.
After a successful LOOKUP of a disk file, the following information is returned
in the LOOKUP block. The word at ADR+2 contains: the file's protection in bits
0:8 (777000,,0 bits) the data mode in which the file was written in bits 9:12
(740,,0 bits), the file's time written in bits 13:23 (37,,770000 bits), and the
low-order 12 bits of the file's date written in bits 24:35 (0,,7777 bits). The
3 high-order bits of the file's date written are returned in bits 18:20
(0,,700000 bits) of the word at ADR+1. These values are stored in the directory
when the file is created and may be changed with the RENAME UUO (see page 34).
(The date written is in system date format which is explained under the DATE UUO
on page 177. The time written is in minutes past midnight on the date given.
The protection bits are explained on page 19 and the data mode is explained in
Section 2.2.) The word at ADR+3 contains the negative swapped word count, that
is, the negative of the number of words in the file, with the left and right
halves exchanged. Finally, bits 21:35 of the word at ADR+1 contain, in system
date format, the "creation date" of the file, which is a slightly less than well
defined quantity. The date written, whose high-order part is in bits 18:20
(0,,700000) of the word at ADR+1 and whose low-order part is in bits 24:35
(0,,7777 bits) of the word at ADR+2, is the usual date of interest.
Here is a summary of the information in the block after a successful LOOKUP on
the disk.
ADR: <file name>
ADR+1: <Bits 0:17 (777777,,0 bits): file name extension;
bits 18:20 (0,,700000 bits): high-order bits of date written;
bits 21:35 (0,,77777 bits): "creation date">
ADR+2: <Bits 0:8 (777000,,0 bits): protection;
bits 9:12 (740,,0 bits): data mode;
bits 13:23 (37,,770000 bits): time written;
bits 24:35 (0,,7777 bits): low-order bits of date written>
ADR+3: <negative swapped word count>
WARNING! You may not do two consecutive successful LOOKUPs for the disk with
the same four-word block without restoring the project-programmer name in the
fourth word of the block after the first LOOKUP! The negative swapped word
count probably will not represent the PPN you want!
After a successful LOOKUP on a dectape, the following information will be found
in the LOOKUP block:
ADR: <file name>
ADR+1: <Bits 0:17 (777777,,0 bits): file name extension;
bits 18:20 (0,,700000 bits): high-order bits of date written;
bits 21:35 (0,,77777 bits): number of first block of file>
ADR+2: <Bits 0:23 (777777,,770000 bits): zero;
bits 24:35 (0,,7777 bits): low-order bits of date written>
ADR+3: <value from 4th word of ENTER block when file was created>
ENTER [OP=077]
--------------------------------------------------
ENTER <channel number>,ADR
<error return>
ADR: <file name in sixbit>
<file name extension in sixbit>,,<creation date>
<protection key in bits 0:8 (777000,,0 bits)>
<project-programmer name>
The ENTER UUO opens for output the file with the specifications given in the
four-word block pointed to by the effective address of the UUO as indicated
above. There are three cases of ENTER: 1) Creating new file: no old file of
same name already exists; 2) Superseding old file: an old file of the same name
exists and will be replaced with the new version when the new version is closed;
and 3) Altering old disk file: the file specified already exists on the disk and
a successful LOOKUP of that file has been done on this channel (and no CLOSE has
been done since then)¬the ENTER opens the old file in Read-Alter mode (which is
explained below on page 35). In all of these cases, ENTER does a CLOSE of the
output side of the channel (see Section 2.12) before attempting to open the
specified file for output.
For the disk, if the PPN is zero, your current Disk PPN is assumed. After a
successful ENTER on the disk (for any of the three cases mentioned) the file's
time and date written are set to the current time and date when the ENTER is
done. Also, after any successful ENTER, the PPN and name of the job doing the
ENTER are stored in the file's retrieval; see disk MTAPE function 14 (for
reading a file's retrieval) on page 281.
If the device is SYS, then the PPN is taken to be [1,3] and the fourth word of
the ENTER block is ignored.
If the device is a dectape, the file's name and extension are written into the
first two words of the file's directory entry on the dectape. The right half of
the extension word in the directory gets the number of the first dectape block
allocated to the file. The third word of the file's directory entry gets the
current date in system date format, and the fourth word of the directory entry
is copied from the fourth word of the ENTER block. Normal procedure for writing
dump mode files is to put the dump mode command (which will write out the entire
file) into the fourth word of the ENTER block before the ENTER is done so that a
subsequent LOOKUP will return this word which contains the length of the file.
In buffered mode, this word should be zero so that the file will not appear to
have been written in dump mode.
When the ENTER is creating a new file (case 1 above) on the disk, the file's
protection is set from bits 0:8 (777000,,0 bits) of ADR+2 unless that field is
000, in which case the default file protection of this file's UFD is used. When
the ENTER is superseding an old file (case 2 above) on the disk, the file's
protection is again set from bits 0:8 (777000,,0 bits) of ADR+2 unless that
field is 000, in which case the protection of the file being superseded will be
passed to the new version. When the ENTER opens a disk file in Read-Alter mode
(case 3 above), the protection of the file is not changed.
If the ENTER is successful, the skip return is taken and, for the disk, exactly
the same information is returned in the block as after a successful LOOKUP (see
the LOOKUP UUO above and note that for a new file the word count is zero). If
you are superseding an old disk file with the same name, then the old file's
creation date is returned. With a successful ENTER of a dectape file, the
number of the first block allocated to the file is returned in bits 21:35
(0,,77777 bits) of ADR+1; the remainder of the ENTER block is left unchanged.
If an ENTER fails for any reason, then the no-skip error return is taken and, if
the device is the disk, a code is returned in the right half of ADR+1 (the rest
of the block is unchanged). If you try to ENTER a file that is write protected
against you, then you will get the protection-failure error. The disk error
codes for LOOKUP, ENTER and RENAME are explained in a table on page 36. Every
LOOKUP, ENTER or RENAME error leaves you with no file open on the offending
channel except that after a BAD RETRIEVAL error of code 11 you are permitted to
RENAME the garbaged file. No error codes are returned for dectapes.
An ENTER can fail for a number of reasons. It will fail if the file name is
zero, if the PPN (or Disk PPN) is illegal, if the file already exists and is
write protected against you, if the file is already open for output (by anyone),
if the device is a dectape which is already full, or if you have already done a
LOOKUP on this channel and the filename for the ENTER does not agree with that
given in the LOOKUP (see Read-Alter mode for the disk on page 35).
With a successful ENTER of a disk file to supersede an old file of the same
name, the old file will be replaced with the new file WHEN THE NEW FILE IS
CLOSED. Until that time, any attempt to read the specified file will access the
old file. After the new file is closed, any attempt to read the specified file
will get the new version; the old version will stay around only long enough for
anyone still reading it to finish.
RENAME [OP=055]
--------------------------------------------------
RENAME <channel number>,ADR
<error return>
ADR: <new file name or zero for deletion>
<new file extension>,,<high-order date bits (0,,700000)>
<new protection, mode, time and low-order date bits>
<project-programmer name>
The RENAME UUO is used to change the name, extension, project-programmer name,
protection key, mode, or time and date written, or a combination of these, for a
file, or to delete a file. This UUO MUST be given AFTER a successful LOOKUP or
ENTER has been done on this channel and MAY be given after a CLOSE UUO (see
Section 2.12) for this channel. However, if you do a CLOSE and then someone
else either RENAMEs (successfully or not) your CLOSEd file or opens it in
Read-Alter mode, then you will no longer be permitted to RENAME the file. As
with LOOKUP and ENTER, if the project-programmer name is zero, your current Disk
PPN is assumed; and if the device is SYS, then the PPN is taken to be [1,3] and
the fourth word of the RENAME block is ignored. RENAME does not do a CLOSE.
The renamed file will still be open (unless deleted) after the RENAME UUO.
If the file name specified is zero, and if the effective PPN matches the PPN of
the file open on this channel, then that file is marked for deletion. This
means that as soon as no one is reading the file, it will go away. After a file
has been marked for deletion, anyone already reading it will be able to continue
reading it but will not be able to RENAME it, and anyone attempting to start
reading it will not find it.
If the file name is not zero, then the name, extension, project-programmer name
and protection key for the file open on this channel are all changed to those
specified in the four-word block. The protection key is in bits 0:8 (777000,,0
bits) at ADR+2. Also, if the mode, time and date fields (in bits 18:20
(0,,700000 bits) at ADR+1 and bits 9:35 (777,,777777 bits) at ADR+2) are not all
zero, then the mode and time/date written of the file are set to those specified
by these bits: bits 9:12 (740,,0 bits) of ADR+2 are the mode field; bits 13:23
(37,,770000) of ADR+2 are the time; and bits 18:20 (0,,700000 bits) of ADR+1 are
the high-order date bits and bits 24:35 (0,,7777 bits) of ADR+2 are the
low-order date bits. If the mode, time and date fields ARE all zero, then the
values of those parameters in the file are not changed. Note that for dectapes,
the mode and the time written are not saved; however, if either of the mode and
time fields is non-zero, then the file's date written will be set from the
two-part date field, even if it is zero. The protection-key field is ignored
for dectapes.
If the RENAME is successful, the skip return is taken. Otherwise, the no-skip
error return is taken and (for the disk) an error code is returned in the right
half of ADR+1, with the rest of the block left unchanged. If you try to change
the name of a file that is write protected against you, or if you try to change
the protection of a file that is protection protected against you, then you will
get the protection-failure return. You cannot delete, or change the name or
protection of, a UFD except that you can change the protection of your own UFD.
The disk error codes for LOOKUP, ENTER and RENAME are explained in a table on
page 36. Every LOOKUP, ENTER or RENAME error leaves you with no file open on
the offending channel except that after a BAD RETRIEVAL error of code 11 you are
permitted to RENAME the garbaged file. No error codes are returned for
dectapes.
Read-Alter Mode
There are two basic methods of updating data in a file. In the first, the file
is copied, with appropriate changes, into a new file with the same name. This
is accomplished by doing a LOOKUP of the old file on one channel and an
independent ENTER of the same filename on a different channel. When the new
version of the file is closed, the old version will be deleted (after all read
references to it are finished). This method requires the whole file, however,
to be read in and written out again even if only a little of the data in the
file is to be changed. The second method allows you to open an already existing
disk file and to change data in it IN PLACE, without rewriting the whole file.
This method of file manipulation is known as READ-ALTER (RA) mode. When you
have a file open in this mode, you may do (on the same channel) both input and
output with the file. To open a file in this mode, you do a LOOKUP of the file
and then an ENTER of the same file on the same channel. If both the LOOKUP and
the ENTER are successful, then the file will be open in RA mode and its
time/date written will have been updated to the current time and date. If you
give a different filename for the ENTER than you used with the LOOKUP, the ENTER
will fail with an error code of 6 (see table below). In RA mode, at the moment
any data is written out, that data overwrites whatever was there before. So if
the file does not get closed thereafter, the new data will still have replaced
the old data in the file. Data can be written into selected parts of a file by
use of the random access UUOs USETI, USETO and UGETF (see Section 2.14). While
a file is open in RA mode, anyone attempting to do either a LOOKUP or an ENTER
of that file will get the FILE BUSY error return (code 3, see below). Also, an
attempt to open a file in RA mode (by doing an ENTER after a successful LOOKUP)
will also fail with the FILE BUSY error return if anyone else is reading or
writing the file.
Disk Error Codes for LOOKUP, ENTER and RENAME
CODE MEANING
0 NO SUCH FILE.
LOOKUP: File specified does not exist.
ENTER: Zero file name given.
RENAME: File LOOKUPed or ENTERed has been deleted.
1 ILLEGAL PPN. PPN specified has no UFD.
2 PROTECTION VIOLATION. File is protected from what you
tried to do.
3 FILE BUSY.
LOOKUP: File is currently open in Read-Alter mode.
ENTER: File is currently being written.
ENTER after LOOKUP: File is currently being read or written.
RENAME: File is currently being read.
4 FILE ALREADY EXISTS. (RENAME only)
RENAME: There is already a file with the new name given.
5 ILLEGAL LOOKUP/ENTER/RENAME SEQUENCE.
LOOKUP: Channel was already open for output (ENTERed).
RENAME: No successful LOOKUP or ENTER has been done yet,
or someone else has a) RENAMEd your CLOSEd file
or b) opened your CLOSEd file in Read-Alter mode.
6 DIFFERENT FILENAME SPECIFIED. (ENTER after LOOKUP only)
ENTER after LOOKUP: The filename does not match that of a
successful LOOKUP already done on this channel
(attempt to open a file in Read-Alter mode).
7 (This error code cannot occur.)
10 BAD RETRIEVAL. Some disk pointers for this file are
inconsistent. This should not happen.
11 BAD RETRIEVAL. Slightly different version of error 10 above.
12 DISK IS FULL. (ENTER only)
ENTER: There is no more room on the disk.
Note: Errors 10, 11 and 12 will cause a system error message to be typed out
unless GARBIT (bit 28--the 0,,200 bit) is on in the device's I/O status word
(see Section 2.6). If GARBIT is on, the error return will be taken and the
appropriate error code will be returned. If GARBIT is off, an error message
will be typed out and the program will be stopped. For the DISK IS FULL case,
if you then type CONTINUE, the ENTER will take the error return with the error
code of 12. You cannot CONTINUE after getting bad retrieval with GARBIT off.
(You will get the error message "DISK TRANSMISSION ERROR" instead of "BAD
RETRIEVAL" if the bad retrieval resulted from an error by the disk itself.)
2.11 Transferring Data
The following UUOs are used to transfer data between your core image and a
device, which must already have been initialized on some channel (see Section
2.8). If you give one of these UUOs for a device open in buffered mode with no
buffer ring set up, a two-ring buffer will be set up for you before the normal
action of the UUO is taken (see Section 2.9).
IN [OP=056]
--------------------------------------------------
IN <channel number>,ADR
<success return>
<error return>
The IN UUO causes some data to be read in to your core image from the device
open on the given channel. In buffered mode, at least one buffer will be filled
with input data and the buffer header will be updated so that the byte pointer
and byte count are correct for the newly filled buffer. In dump mode, ADR is
taken to be the address of a dump mode command list (see Section 2.3), and the
UUO will not return until all the data indicated by the command list has been
transferred. In buffered mode, ADR is ignored.
If any error (including end of file) occurs, then the UUO skips. Specifically,
when the UUO is to return, if any of the error bits IOBKTL, IODTER, IODERR,
IOIMPM or IODEND (see Section 2.6) are on, the skip return is taken. Otherwise,
the direct return (no skip) is taken.
In dump mode, if end of file occurs before the command list has been satisfied,
then IODEND will come on and the UUO will skip, but there will be no way of
telling how much data, if any, was read in before end of file occurred. In
buffered mode, there is always a byte count that tells how much data has been
read in.
On non-displays, end of file is indicated by typing control-Z (↑Z); on displays,
end of file is indicated by typing CONTROL-META-linefeed.
INPUT [OP=066]
--------------------------------------------------
INPUT <channel number>,ADR
The INPUT UUO does exactly the same thing as the IN UUO except that no error
checking is done and the UUO never skips.
OUT [OP=057]
--------------------------------------------------
OUT <channel number>,ADR
<success return>
<error return>
The OUT UUO causes some data to be written out from your core image to the
device open on the given channel. In buffered mode, the buffer pointer, byte
pointer and byte count in the buffer header are set up for the next buffer that
you may fill and the device is started up to empty the buffer you just filled.
The first OUT UUO you give in buffered mode, however, does not cause any data to
be written out, only the buffer header to be set up with the buffer pointer,
byte pointer and byte count for the first buffer for you to fill.
In dump mode ADR is taken as the address of a dump mode command list (see
Section 2.3) that indicates what data are to be written out; the UUO does not
return until the transfer is complete.
In buffered mode, if ADR is non-zero, this UUO does NOT write out your current
buffer but instead switches you to the new buffer ring pointed to by ADR. (ADR
should be the address of the second word of a buffer in the ring.) Your buffer
header and some internal system data are adjusted so that you will next be
filling the first buffer in the new ring. The buffer ring you are switching to
must be completely set up with the buffer-to-buffer pointers and the buffer
sizes in the second word of each buffer. The purpose of this feature is to let
you switch among several output buffer rings if you so desire. Note, however,
that when you switch rings there is no provision for forcing data still in
buffers in the old ring to be written out even though the buffers would be
forced out by a CLOSE or RELEAS UUO!
As with the IN UUO, if any of the error bits IOBKTL, IODTER, IODERR, IOIMPM or
IODEND (see Section 2.6) are on at completion of the UUO, the UUO skips.
Otherwise, the direct return (no skip) is taken.
OUTPUT [OP=067]
--------------------------------------------------
OUTPUT <channel number>,ADR
The OUTPUT UUO does exactly the same thing as the OUT UUO except that no error
checking is done and the UUO never skips.
WAIT [OP=047, ADR=10] CALLI 10
--------------------------------------------------
WAIT <channel number>,
The WAIT UUO simply waits for all I/O on the channel indicated by the AC field
to finish. Normally, when a device is open in buffered mode, the system does
I/O with your buffers while your program is running. This means that only the
buffer pointed to by your buffer header can be expected to be remain untouched
by the system. After giving this UUO, you can expect all of your buffers to be
stable and untouched by the system.
2.12 Terminating I/O
The following two UUOs are used to finish up I/O on a given channel. The CLOSE
UUO essentially undoes the effect of a LOOKUP or ENTER, and the RELEAS UUO
undoes the effect of an INIT or OPEN.
CLOSE [OP=070]
--------------------------------------------------
CLOSE <channel number>,<close-inhibit flags>
(<close-inhibit flags>:
1 (bit 35) inhibits closing output,
2 (bit 34) inhibits closing input.)
The CLOSE UUO is used to terminate I/O on the channel specified by the AC field
of the UUO. The effective address of the instruction determines whether input
or output or both or neither is closed. If the low order bit (bit 35--the 0,,1
bit) of the effective address is on, then the closing of output is inhibited.
If bit 34 (0,,2 bit) of the effective address is on, the closing of input is
inhibited. The remaining bits in the effective address are ignored.
The sides (input or output) of the channel that are not to be closed (i.e., the
sides whose close-inhibit bits are on) are left untouched by this UUO and can be
closed later by another CLOSE UUO, by a RELEAS UUO (see below) or by the EXIT
UUO (see page 247). To discard either side of this channel without closing it
(for example, to discard a new file currently ENTERed on this channel), use the
RELEAS UUO with the corresponding close-inhibit bits on.
On non-directory devices like terminals and paper tape, this UUO forces out any
data still in any output buffers. For magnetic tape, closing output causes two
end-of-file marks to be written on the tape and causes the drive to backspace
over one of them; this means that there will be one end-of-file mark between
each pair of files and two end-of-file marks after the last file on the tape.
The two consecutive end-of-file marks denote what is called the logical (as
opposed to physical) end of tape.
On the disk and dectape, closing output forces out any data still in any output
buffers and then closes the file; closing input simply closes the file. After a
disk or dectape file is closed, no more data may be transferred to or from it.
However, a file may be RENAMEd even after it is CLOSEd, unless the file has been
deleted or RENAMEd or opened in Read-Alter mode by someone else after the CLOSE.
RELEAS [OP=071]
--------------------------------------------------
RELEAS <channel number>,<close-inhibit flags>
(<close-inhibit flags>:
1 (bit 35) inhibits closing output,
2 (bit 34) inhibits closing input.)
The RELEAS UUO does a CLOSE of the given channel with the given <close-inhibit
flags> specified by the effective address (see the CLOSE UUO above) and then
frees the channel number. After giving this UUO, you must do another INIT or
OPEN to do any more I/O on this channel.
To discard either side of this channel without closing it (for example, to
discard a new file currently ENTERed on this channel), do a RELEAS with the
corresponding close-inhibit bits on.
The RESET UUO (see page 249) simulates a RELEAS <channel>,3 for every channel
you have open. The normal EXIT UUO (that is, "EXIT 0,") simulates a
RELEAS <channel>,0 for every channel you have open (see page 247).
REASSI [OP=047, ADR=21] CALLI 21
--------------------------------------------------
MOVE AC,[<job number>]
MOVE AC+1,[<device name in sixbit, or channel number>]
REASSI AC,
The REASSI UUO will assign (by console) to another or the same job, a device
that is either assigned (by console) or inited (assigned by program).
Accumulator AC should contain the number of the job to whom you wish to give the
device, and accumulator AC+1 should contain the logical or physical name of the
device or the channel on which it is open. This UUO gives the same results as
the following sequence: 1) you release the device with BOTH input and output
inhibiting, 2) you deassign the device with the monitor command DEASSIGN
command, and 3) the job indicated assigns the device with the monitor command
ASSIGN.
Since REASSI can reassign to the job that issues the UUO, a job can assign to
itself (by console) any device that it can INIT.
If the job number you give is not that of a logged in job, then this UUO will
return with accumulator AC set to zero. If the device is not assigned to your
job, or if the device may not be reassigned at this time, then the UUO will
return with accumulator AC+1 set to zero (which might be confusing if you
specified channel zero in AC+1).
2.13 Saving and Restoring I/O Channels
Because it is sometimes useful to be able to reference more files than a job can
have open on its =16 I/O channels, the following UUOs have been created to allow
a job to save and then later to restore the state of I/O on one or more
channels. A channel is saved by pushing it onto a special stack for your job
called your I/O stack, which currently can hold at most 23 channels. After an
I/O channel's state has been saved, that channel is completely free to be used
for other I/O without affecting the device open on the saved channel. The
channel state that was saved cannot be referenced by the normal I/O UUOS (such
as LOOKUP, IN, CLOSE, etc.); only the following UUOs plus EXIT and RESET (which
affect all channels, saved or not) can affect a saved channel's state. Note
that the UUOs below are IOT UUOs which means they cannot be given when the
program is in IOT-USER mode (which is explained in Appendix 1).
IOPUSH [OP=724]
--------------------------------------------------
IOPUSH <channel number>,<ID>
<pdl-overflow return>
The IOPUSH UUO saves the state of the I/O channel specified by the AC field by
pushing it on your I/O stack with the identification given by the address field
of this UUO. Thereafter, that channel number may be used without affecting the
device open on the channel pushed. The identification <ID> is saved with the
channel for use with the IOPOP and IOPDL UUOs below. If there is no more room
on your I/O stack, the channel is not pushed and the direct (error) return is
taken. If the channel is successfully pushed, the skip return is taken.
IOPOP [OP=725]
--------------------------------------------------
IOPOP <channel number>,<ID>
<no-such-saved-channel return>
The IOPOP UUO restores the saved state of an I/O channel that was pushed onto
your I/O stack. The channel restored is the closest one to the top of the stack
that was pushed with the identification <ID>. If the <ID> is zero, then the top
channel in the stack is restored. If no saved channel matching <ID> is found,
or if <ID> is zero and the stack is empty, then the direct (error) return is
taken. If the channel to be restored is found, any device currently open on the
channel number specified is released (as with RELEAS <channel>,0), the saved
channel is restored, its entry is compressed out of the stack, and the skip
return is taken.
IOPDL [OP=726]
--------------------------------------------------
IOPDL <function number>,<ID>
The IOPDL UUO is an extended UUO that uses the AC field to determine the
function to be performed with your I/O stack. The functions currently available
and their associated numbers are listed below. Some of these functions may take
skip returns; see the individual writeups below.
IOPDL 0, This function restores each channel saved on your I/O
stack to the channel from which it was pushed. The
channels on the stack are restored in order from the top
down. Any device open on a channel to which a saved
channel is being restored is released as with
RELEAS <channel>,0.
IOPDL 1, This function releases (as with RELEAS <channel>,0) all
of the channels currently saved on your I/O stack. Any
channels that are not currently pushed on the stack are
unaffected.
IOPDL 2,<ID> (Skips on success.) This releases (as with
RELEAS <channel>,0) the channel closest to the top of
your I/O stack that has the identification <ID>. No
other channels, on the stack or not, are affected. If
<ID> is zero, the top channel in the stack is released.
The released channel's entry is compressed out of the
stack. If no saved channel matching <ID> is found, or if
<ID> is zero and the stack is empty, then the direct
(error) return is taken. Otherwise the channel found is
released and the skip return is taken.
2.14 Random Access to Files
A disk or dectape file consists of a series of 200 word records. Often, these
records are read (or written) sequentially from the beginning of the file to the
end. But sometimes one wishes to read or alter only selected parts of a file.
Three random access UUOs are provided to allow the user to do exactly that. To
do random access input or output, you must specify which record you want to
reference next. On the disk, the records of a file are numbered consecutively
from 1 to n, where the file is n records long. (HIDDEN records can precede
logical record 1 of a disk file. The hidden records have non-positive logical
record numbers. See the disk file record offset feature on page 278.) On
dectapes the records of a file are physical blocks and are numbered differently;
for a precise explanation of dectape files, read Section 12.5.
For each disk file open, the system maintains a pointer to the record that will
be referenced by the next INPUT or OUTPUT UUO. For each dectape file open, the
system maintains two pointers, one for input and one for output. The following
three UUOs set these pointers to specific values. If you try to set the record
pointer for a disk file to a value less than that of the first physical record
in the file, you get the first physical record instead. If you try to set it to
a record beyond the end of a disk file, you get the first record after the last
record in the file (and IODEND in the device I/O status word is turned on; see
Section 2.6). If you try to set it to a value greater than the number of the
last physical block on a dectape, IOBKTL will be turned on in the device I/O
status word; thus the error return will be taken with the next IN or OUT UUO.
USETI [OP=074]
--------------------------------------------------
USETI <channel number>,<record number>
The USETI UUO prepares you to read from a file at a specific record. You must
have a file open for input on the channel indicated by the AC field. The record
pointer for the file (input block pointer for dectape files) is set to the value
in the address field of the instruction and the status of any input buffers is
set to unused. The IODEND bit in the device I/O status word is cleared unless
you have selected a record beyond the end of a disk file.
Note that the record number in a USETI for the disk is taken as a signed 18-bit
number in twos-complement notation; see the record offset feature on page 278.
USETO [OP=075]
--------------------------------------------------
USETO <channel number>,<record number>
The USETO UUO prepares you for writing into a file at a specific record. You
must have a file open for output on the channel indicated by the AC field. This
UUO forces out the data in any output buffers that have not yet been written and
then sets the record pointer for the file (output block pointer for dectape
files) to the value in the address field of the instruction. The status of any
output buffers is set to unused.
Note that the record number in a USETO for the disk is taken as a signed 18-bit
number in twos-complement notation; see the record offset feature on page 278.
UGETF [OP=073]
--------------------------------------------------
UGETF <channel number>,ADR
The UGETF UUO prepares you to extend the file open on the given channel. It
forces out the data in any output buffers that have not yet been written. Then,
for the disk, the record pointer is set to the number of the record after the
last record of the file and IODEND is turned on. For dectapes, the output block
pointer is set to the number of the next free block you may write on. In either
case, the number of the record (or block) so selected is returned in the word
pointed to by the effective address of the UUO. The status of any input or
output buffers is set to unused.
2.15 I/O Status Testing and Setting
There are various pieces of information one can find out about an I/O device or
about a logical I/O channel, namely: the I/O device status bits (explained in
detail in Section 2.6), the channel use bits (explained below), the device
characteristics (explained below), the physical name of a device, and the number
of people waiting to use a given device. This section describes the UUOs used
to get and/or set these. For the terminal attached to your job, the TTYSET UUO
(described on page 89) can also get and set the I/O device status bits.
GETSTS [OP=062]
--------------------------------------------------
GETSTS <channel number>,ADR
The GETSTS UUO puts the I/O status word for the device open on the indicated
channel into the word located at ADR. See Section 2.6.
SETSTS [OP=060]
--------------------------------------------------
SETSTS <channel number>,<status bits>
The SETSTS UUO waits for the device open on this channel to become inactive and
then sets the right half of the I/O status word for this device from the address
field of the UUO. See Section 2.6. If you are changing I/O modes, this UUO may
affect the contents of your buffers.
STATZ [OP=063]
--------------------------------------------------
STATZ <channel number>,<status bits to be tested>
<return if any of the indicated bits are on>
<return if all indicated bits are off>
The STATZ UUO tests certain bits in the right half of the status word for the
device open on the indicated channel. The address field of the UUO should
contain 1's in the bit positions to be tested. If all of the tested bits are
off (zero), then this UUO skips. If any of them are on, the direct return is
taken.
STATO [OP=061]
--------------------------------------------------
STATO <channel number>,<status bits to be tested>
<return if all indicated bits are off>
<return if any of the indicated bits are on>
The STATO UUO tests bits in the right half of the status word just like STATZ
does but skips if any of the tested bits are on and does not skip if all of them
are off.
CHNSTS [OP=716]
--------------------------------------------------
CHNSTS <channel number>,ADR
The CHNSTS UUO puts the use bits for the I/O channel indicated into the word
located at ADR. Here is a list of the meanings of these bits.
BITS OCTAL NAME MEANINGS OF 1'S IN CHANNEL USAGE WORD
18 0,,400000 INITB The channel has been initialized with an INIT
or an OPEN and a RELEAS has not been given
yet.
19 0,,200000 IBUFB The INIT or OPEN which initialized this
channel specified an input buffer header
address.
20 0,,100000 OBUFB The INIT or OPEN which initialized this
channel specified an output buffer header
address.
21 0,,40000 LOOKB A LOOKUP (successful or not) has been done on
this channel.
22 0,,20000 ENTRB An ENTER (successful or not) has been done on
this channel.
23 0,,10000 INPB An INPUT or IN UUO has been done on this
channel.
24 0,,4000 OUTPB An OUTPUT or OUT UUO has been done on this
channel.
25 0,,2000 ICLOSB The input side of this I/O channel has been
closed.
26 0,,1000 OCLOSB The output side of this I/O channel has been
closed.
27 0,,400 INBFB An input buffer ring has been set up for this
channel.
28 0,,200 OUTBFB An output buffer ring has been set up for
this channel.
29 0,,100 SYSDEV The device open on this channel is SYS, which
can only reference files on the disk with
PPNs of [1,3].
DEVCHR [OP=047, ADR=4] CALLI 4
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
DEVCHR AC,
The DEVCHR UUO returns the device characteristics word for the device specified
by the contents of AC. AC should contain either the name (logical or physical)
of the device or the number of the channel on which it is open. The
characteristics are returned in the AC. If the device does not exist, a zero is
returned. Here are the meanings of the bits in the returned word.
BITS OCTAL MEANINGS OF 1'S IN DEVICE CHARACTERISTICS WORD
0 400000,,0 Dectape with directory in core.
1 200000,,0 Disk (DSK, SYS, or or new-mode UDPn).
2 100000,,0 Old- or new-mode user disk pack (UDPn).
3 40000,,0 Line printer (LPT) or XGP. The LPT and the XGP can be
distinguished from each other by checking bit 8 (long
dispatch table), which will be on for the XGP and off
for the LPT.
4 20000,,0 Terminal which is attached to a job.
5 10000,,0 Terminal which is in use.
6 4000,,0 TV camera.
7 2000,,0 The IMP.
8 1000,,0 Long dispatch table. This means that the device will
accept UUOs other than INPUT and OUTPUT, such as MTAPE,
USETO and LOOKUP.
9 400,,0 Paper tape punch or plotter.
10 200,,0 Paper tape reader.
11 100,,0 Dectape.
12 40,,0 The device is available to the job that gave the DEVCHR
UUO.
13 20,,0 Magnetic tape.
14 10,,0 Terminal.
15 4,,0 Directory device. At Stanford, this means the device
is a dectape, the disk or a UDP.
16 2,,0 Input device.
17 1,,0 Output device.
18 0,,400000 Some job has the device ASSIGNed. If the argument to
the DEVCHR was 'DSK', 'IMP' or 'SIX', then this bit
will be off.
19 0,,200000 Some job has the device INITed or OPENed. If the
argument to the DEVCHR was 'DSK', 'IMP' or 'SIX', then
this bit will be off.
20:35 0,,177777 A one in bit N means mode =35-N is legal for this
device.
DEVUSE [OP=047, ADR=400051] CALLI 400051
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
DEVUSE AC,
The DEVUSE UUO can be used to find out what job, if any, is using a device and
how many jobs are waiting for that device. The AC should contain the name
(logical or physical) of the device or the channel number on which it is open.
If there is no such device, a zero is returned in AC. Otherwise, the following
information is returned in AC:
BITS OCTAL VALUE
0 400000,,0 One if some job has the device ASSIGNed (zero for
'DSK', 'IMP' or 'SIX').
1 200000,,0 One if some job has the device INITed or OPENed (zero
for 'DSK', 'IMP' or 'SIX').
2 100000,,0 One if the device is a terminal attached to a job.
3 40000,,0 One if the device is a UDP currently ASSIGNed by your
job.
4 20000,,0 One if the device is a UDP currently INITed or OPENed
by your job.
5 10000,,0 One if the device is a UDP currently ASSIGNed by some
other job.
6 4000,,0 One if the device is a UDP currently INITed or OPENed
by some other job.
7 2000,,0 One if the device is a UDP currently ASSIGNed as
PRIVATE or OLD by any job.
12:17 77,,0 Number of the job the device is being used by, or zero
if it is not in use. If the device has been detached
from the system, then this field will contain zero but
bit 0 (ASSIGNed device) will be on unless the device is
a UDP. If the device is a UDP detached from the
system, then this field will be zero, bits 0:6 will be
off, and bit 7 (PRIVATE or OLD) will be on. If the
device is a UDP being used as the swapping device, then
this field will be zero and bits 0 (ASSIGNed), 1
(INITed), 5 (ASSIGNed by someone else), 6 (INITed by
someone else) and 7 (PRIVATE or OLD) will all be on.
If the device is a UDP assigned as PUBLIC, then this
field will be zero, bit 0 will be on, and bit 7
(PRIVATE or OLD) will be off.
18:35 0,,777777 The number of jobs (not including you) in the queue
waiting for the device.
PNAME [OP=047, ADR=400007] CALLI 400007
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
PNAME AC,
<error return for no such device>
The PNAME UUO returns the physical name of the device specified by the contents
of the AC. AC should contain either the device name (logical or physical) or
the number of the channel on which the device is currently open. If the device
exists, the skip return is taken and the device's physical name is returned in
AC. If there is no such device, the direct (error) return is taken and the AC
is unchanged.
DEVNUM [OP=047, ADR=400104] CALLI 400104
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
DEVNUM AC,
<error return for no such device>
The DEVNUM UUO is used to find out the unit number of a particular device. AC
should contain either the logical or physical name of the device or the number
of the channel on which the device is open. If there is a device with the name
given or open on the channel given, then its unit number is returned in AC and
the skip return is taken. If there is no such device, the direct (error) return
is taken.
The unit number of a device specifies which of several logically identical
devices a specific device is. For instance, the unit number of TTY41 is 41, the
unit number of MTA1 is 1, etc.
TTYIOS [OP=047, ADR=400014] CALLI 400014
--------------------------------------------------
MOVE AC,[<job number or sixbit device name>]
TTYIOS AC,
The TTYIOS UUO returns the I/O status word of the device indicated by the
contents of the AC. If AC contains a logical or physical device name, that
device's I/O status word is returned. If AC contains a job number, then the I/O
status word of the terminal belonging to that job is returned; if that job has
more than one terminal, then there is no telling which one's I/O status word
will be returned. The I/O status word is returned in the AC; if there is no
such device, -1 is returned. The meanings of some bits in the device I/O status
word are explained in Section 2.6. Other bits for specific devices are
explained in the device writeups in Section 12.
SECTION 3--TERMINAL INPUT/OUTPUT
The terminal is one of the most important I/O devices for the user. He controls
his programs by typing in various commands, and the programs type back certain
things to keep him informed. This section explains several UUOs that are
provided to make terminal I/O control flexible but simple. The word TTY is used
in this manual to mean a user terminal of any type, whether display, teletype or
pseudo-teletype.
For explanations of bits in the terminal I/O status word, see also Section
12.2.
3.1 TTY Echoing and LF Insertion
The system provides two services to terminals doing input. The first is that
characters typed in are normally sent back to the terminal in order for the user
to see what he has typed. This is called echoing of input. The second action
taken on input is that normally, when the system receives a carriage return from
a terminal, it inserts a linefeed after the carriage return. Thus the user does
not have to type a linefeed (hereafter abbreviated LF) after each carriage
return (hereafter abbreviated CR). The LF is put into the terminal's input
buffer just as if the user had typed it; it is also usually echoed to the
terminal.
These actions can be modified by the user to suit his particular purposes.
Echoing can be turned off in two different manners. The first of these is for
terminals that always print each character typed. If the system were to echo
characters to this kind of terminal, each character would appear twice. This
method of turning echoing off causes all echoing to be suppressed except for
echoing of LFs inserted after CRs. The FULTWX bit (bit 15--4,,0 bit) in the
line characteristics word (see the GETLIN UUO on page 77) indicates the state
of this type of echo suppression. This bit can be set and cleared by the
monitor commands TTY NO ECHO and TTY ECHO, respectively.
The second type of echo suppression is designed to be used by programs that, for
whatever reasons, do not want typed-in characters to appear on the terminal.
This method turns off all echoing except when terminal input is going to the
monitor rather than to the program. (The terminal is said to be in MONITOR MODE
when input is going to the monitor; monitor mode is indicated by the TPMON bit
(bit 9--the 400,,0 bit) being on in the terminal's I/O status word.) The state
of this type of echo suppression is indicated by the NOECHO bit (bit 28--the
0,,200 bit) in the terminal's I/O status word (see Section 2.6 and Section
2.15); when the NOECHO bit is on, echoing is suppressed. This bit can be turned
on or off only by UUO, currently only by the CTLV UUO (see page 97), the PTJOBX
UUO (with the DOFF and DON functions--see page 118), the TTYSET UUO (see page
89), and the INIT, OPEN and SETSTS UUOs. PTJOBX (DOFF and DON functions) is
the recommended UUO for this purpose. A RESET (see page 249) clears this bit,
thus turning echoing back on. (A program can also disable just the echoing of
the CONTROL and META bits; see the NOECHB bit in Section 12.2.)
Insertion of linefeeds after carriage returns is affected by three factors:
1) whether terminal input is going to the monitor or to a user program,
2) whether the terminal is a pseudo-teletype (see Section 3.5), a display or a
teletype, and 3) the value of the XON bit (bit 16--2,,0 bit) in the terminal's
line characteristics word (see the GETLIN UUO on page 77). LFs are always
inserted after CRs on III and Data Disc displays and on Datamedia displays that
are not PTYs. For other terminals in the normal case, LFs ARE inserted after
CRs. They are NOT inserted if both 1) the XON bit in the line characteristics
word is on and 2) either the terminal is a pseudo-teletype or input is going to
a user program. Note that pseudo-teletypes (PTYs) are initialized with the XON
bit on; thus LFs are normally NOT inserted after CRs on PTYs. The XON bit in
the characteristics word can be changed only by UUO, currently only by the
SETLIN UUO (see page 78), the PTSETL UUO (see page 115) and the TTYSET UUO (see
page 89).
Note: On Datamedias (DMs) that are network (or PTYJOB) pseudo-teletypes, the
TELNET servor (or PTYJOB) inserts a LF after each CR and discards any LF that
comes in from the net (or PTYJOB's terminal) following a CR. The XON bit is set
for such pseudo-teletypes in order to keep the system from inserting another LF
after each CR.
3.2 Codes Returned for Characters Typed
NOTE: In this manual, the word "CONTROL" (all capitals) is used to represent
the display keyboard CONTROL key, as used in typing the end-of-file character on
a display, namely CONTROL-META-linefeed. Old style control characters (which
are typed on ascii keyboards by holding down the CTRL key) are described by
using the word "control" (lower case); for example, the end-of-file character on
a non-display terminal is control-Z. The word "control-C" is used to mean both
"control-C on a teletype" and "CALL on a display keyboard∩." Actually, CALL
sends two control-C's, whereas CONTROL-CALL, META-CALL, and CONTROL-META-CALL
send one.
When a character is read from a terminal, the 7-bit Stanford ascii code for that
character is returned in bits 29:35 (0,,177 bits) (see the Stanford ascii
character set in Appendix 6); in addition, characters read from displays are
returned with the CONTROL and META keys represented as bits 28 (0,,200--CONTROL)
and 27 (0,,400--META). Characters typed on terminals with the old-style control
key held down are normally returned with a code of 100 less than the character
typed; for example, control-M returns a code of 015 ("M" is 115 in ascii).
However, when control-Z is typed on a non-display terminal and read by any of
the UUOs described below, the value returned is 612, which is the code for
CONTROL-META-linefeed from displays. Thus the end-of-file character always
appears as the same code regardless of the type of terminal on which it was
typed. Note that when characters are being read from a terminal by means of the
INPUT or IN UUOs described in Section 2, only 7 bits are returned for each
character (the CONTROL and META keys on displays are lost), and the EOF
character (control-Z or CONTROL-META-linefeed) does not appear as a character at
all--it merely sets the EOF bit (IODEND) in the terminal's I/O status word.
3.3 TTYUUO
The most important UUO is probably TTYUUO (known some places as TTCALL). This
is an extended UUO with many different functions. With a couple of exceptions,
which are noted, these functions all operate on the terminal attached to the job
giving this UUO.
TTYUUO [OP=051]
--------------------------------------------------
TTYUUO <function number>,ADR
TTYUUO uses the accumulator field of the instruction to determine the particular
function to be executed. Each of these functions is described separately below.
INCHRW [OP=051, AC=0] TTYUUO 0,
--------------------------------------------------
INCHRW ADR
The INCHRW UUO waits for a character to be typed and then returns the character
right-justified in the word at ADR.
OUTCHR [OP=051, AC=1] TTYUUO 1,
--------------------------------------------------
OUTCHR ADR
ADR: <ascii character>
The OUTCHR UUO types out the single ascii character represented by the
right-most seven bits of the word at ADR.
INCHRS [OP=051, AC=2] TTYUUO 2,
--------------------------------------------------
INCHRS ADR
<return if no character has been typed>
<success return>
The INCHRS UUO looks to see if a character has been typed. Then, if so, the
character is returned in the word at ADR and the skip return is taken. If no
character has been typed, the direct return is taken and the word at ADR is not
changed.
OUTSTR [OP=051, AC=3] TTYUUO 3,
--------------------------------------------------
OUTSTR ADR
ADR: <asciz string>
The OUTSTR UUO types out the asciz string that starts at location ADR. (An
asciz string is an ascii string terminated by the first null (zero) byte.)
INCHWL [OP=051, AC=4] TTYUUO 4,
--------------------------------------------------
INCHWL ADR
The INCHWL UUO waits until an activation character has been typed and then
returns a single character right-justified in ADR. The normal activation
characters are carriage return, linefeed, altmode and any character typed with
CONTROL and/or META on a display; in special activation mode (that is, with the
SPCACT bit on in your line characteristics--see the GETLIN UUO below),
additional activation characters can be specified by turning their bits on in
the activation table given with the SETACT UUO (see page 84). Any character
that fills up the terminal's input buffer also is effectively an activation
character.
Input using INCHWLs is called LINE MODE input and should be used instead of
CHARACTER MODE (as in INCHRW) whenever possible. In character mode you cannot
always backspace over mistyped characters because your program may already have
eaten them up; in line mode you can backup as far as the last activation
character.
INCHSL [OP=051, AC=5] TTYUUO 5,
--------------------------------------------------
INCHSL ADR
<return if no activation character has been typed yet>
<success return>
The INCHSL UUO looks to see if an activation character has been typed in, and if
so, returns one character right-justified in ADR and takes the skip return. If
no activation character has been typed, the direct return is taken and ADR is
not changed.
GETLIN [OP=051, AC=6] TTYUUO 6,
--------------------------------------------------
GETLIN ADR
The GETLIN UUO can be used to find out what terminal a job is attached to, if
any, and what the characteristics are for any terminal. If the original
contents of ADR are less than zero, then the characteristics for your own
terminal are returned in ADR. If ADR originally contains the number of a
terminal line (a number between zero and the maximum legal terminal line
number), the characteristics of that terminal are returned in ADR. If ADR
originally contains a number greater than the maximum legal terminal line
number, then zero is returned in ADR.
If a job requests the line characteristics for its own terminal, and if that job
is detached, that is, not attached to any terminal, then a -1 (all bits on) will
be returned as the line characteristics. You should check for this condition
before testing any of the particular bits or you will be deceived by a detached
job.
If the characteristics word is not -1, then the right half contains the line
number of the terminal and the left half contains the characteristics of the
terminal, as explained in the table below.
NOTE: If the terminal is a pseudo-teletype (see Section 3.5) controlled
directly or indirectly (through a chain of pseudo-teletypes) by a display
terminal, then the bit representing the type of the first display terminal found
up the chain will be on in the characteristics word returned for the
pseudo-teletype.
Certain bits in the line characteristics for a terminal can be changed with the
UUOs SETLIN (see page 78), PTSETL (see page 115) and TTYSET (see page 89).
Certain monitor commands are also available to set or clear specific bits, as
explained below.
BITS OCTAL NAME MEANINGS OF 1'S IN TTY LINE CHARACTERISTICS
WORD
0 400000,,0 DISLIN The terminal is a III display.
1 200000,,0 CTYLIN The terminal is the P1 console teletype
(CTY).
2 100000,,0 TTYFIL Carriage returns are made into multiple
carriage returns in order to allow the
terminal's carriage to reach the left margin
before the next character reaches the
terminal. This bit can be set and cleared
with the monitor commands TTY FILL and
TTY NO FILL, respectively, and with the UUOs
SETLIN (see page 78), PTSETL (see page 115)
and TTYSET (see page 89). Displays are not
affected by this bit.
3 40000,,0 DMLIN The terminal is a Datamedia display. This
bit can be set with the monitor commands
TTY DM and TTY DM128 and with the UUOs
SETLIN, PTSETL and TTYSET. This bit cannot
be cleared except by logging out the job on
this terminal (and waiting a few seconds).
If the terminal is a pseudo-teletype, then
this bit can be cleared only by releasing the
pseudo-teletype. This bit cannot be set on
Data Disc and III displays.
4 20000,,0 DDDLIN The terminal is a Data Disc display.
5 10000,,0 ECHARR Characters with codes 001 to 006, 010, and
016 to 037 will be echoed and output as an
up-arrow (↑) followed by the character
represented by the code with the 100 bit
turned on. E.g., character code 001 will be
output as "↑A" ("A" is code 101). This bit
can be set and cleared with the monitor
commands TTY ARROW and TTY NO ARROW,
respectively, and with the UUOs SETLIN,
PTSETL and TTYSET. This bit is initially on
for terminals 0 through 11. Displays are not
affected by this bit.
6 4000,,0 PTYLIN The terminal is a pseudo-teletype (see
Section 3.5).
7 2000,,0 (unused)
8 1000,,0 IMPBIT The terminal is a pseudo-teletype being used
as the terminal for an ARPA network TELNET
connection. This bit can be set with the
UUOs SETLIN, PTSETL and TTYSET, but once set,
it cannot be cleared except by releasing the
pseudo-teletype.
9 400,,0 PTYWAK Pseudo-teletype input wait will be terminated
by terminal input also if this bit is set in
the terminal's line characteristics word (see
the PTRD1W UUO on page 108). This bit can be
set and cleared with the UUOs SETLIN, PTSETL
and TTYSET.
10 200,,0 PTYUSE The terminal is a pseudo-teletype (PTY) in
use by some job. This bit prevents the PTY's
DDB from being killed when there is no job
logged in on this terminal.
11 100,,0 SPCBRK The terminal is in special activation mode.
This means that line mode input will be
activated by the normal activation characters
AND by the characters whose bits are 1's in
the special activation table. This bit can
be set and cleared with the UUOs SETLIN,
PTSETL and TTYSET. A RESET (see page 249)
clears this bit, as well as resetting your
special activation table to the standard
special activation table. See the SETACT UUO
on page 84.
12 40,,0 ROBTPD The last character typed was a rubout, and a
backslash will be typed out when a character
that is not a rubout is typed.
13 20,,0 FCS The terminal is in full-character-set mode.
When this bit is off, lower case letters are
automatically changed to upper case. This
bit can be set and cleared with the monitor
commands TTY FULL and TTY NO FULL,
respectively, and with the UUOs SETLIN,
PTSETL and TTYSET. On displays this bit can
be set by ESCAPE F and cleared by BREAK F.
14 10,,0 TBXPND The terminal is assumed not to have a
hardware tabbing mechanism. When this bit is
on, tabs get converted into the appropriate
number of spaces. This bit can be cleared
and set by the monitor commands TTY TAB and
TTY NO TAB, respectively, and with the UUOs
SETLIN, PTSETL and TTYSET. III and Data Disc
displays and non-network PTYs are not
affected by this bit.
15 4,,0 FULTWX The terminal is assumed to be a self-echoing
full duplex terminal. Echoing of input
characters is inhibited except for linefeeds
inserted by the system after carriage
returns. This type of echoing inhibition is
provided to avoid double echoing on terminals
that always print each character typed. See
Section 3.1. This bit can be set and cleared
by the monitor commands TTY ECHO and
TTY NO ECHO, respectively, and with the UUOs
SETLIN, PTSETL and TTYSET. Displays are not
affected by this bit.
16 2,,0 XON Linefeeds will not be inserted after carriage
returns, except in monitor mode. This bit
always determines whether linefeeds are to be
inserted after carriage returns on a
pseudo-teletype (PTY), regardless of whether
the PTY is in monitor mode. See Section 3.1.
On Data Disc, III, and non-PTY Datamedia
displays, this bit does not inhibit insertion
of LFs; it merely inhibits echoing of
inserted LFs. This bit can be set and
cleared with the UUOs SETLIN, PTSETL and
TTYSET. A RESET (see page 249) clears this
bit except on PTYs.
17 1,,0 TLKRNG This line is in a talk ring. The number of
the next terminal in the ring will be found
in bits 11:17 (177,,0 bits) of this line's
TTYTAB entry (see the explanation of TTYTAB
entries on page 372).
SETLIN [OP=051, AC=7] TTYUUO 7,
--------------------------------------------------
SETLIN ADR
ADR: <line characteristics bits which you want on>
The SETLIN UUO sets the line characteristics for the terminal attached to your
job from the word at ADR. In the line characteristics word, only bits 2, 3, 5,
8, 9, 11, 13, 14, 15 and 16 (151536,,0 bits) can be changed by the user. Other
bits in the word at ADR are ignored. The DMLIN bit (bit 3--40000,,0 bit) and
the IMPBIT (bit 8--1000,,0 bit) can be set but cannot be cleared. See the
GETLIN UUO above for the meanings of the various bits in the line
characteristics word.
The TTYSET UUO (see page 89) can be used instead of SETLIN to set and/or clear
selected bits without affecting others.
RESCAN [OP=051, AC=10] TTYUUO 10,
--------------------------------------------------
RESCAN ADR ; ADR is ignored if it is zero
ADR: <character count returned here>
The RESCAN UUO attempts to back up your terminal's input buffer pointer to the
beginning of the last monitor command typed in. By using this UUO, a program
started up by a monitor command can re-read the command line that started it.
In fact, this UUO can be given over and over to read the command line several
times. If this UUO is given with a non-zero effective address, then the number
of characters over which the pointer is backed up is returned in the word
pointed to by the effective address.
WARNING: If more than a buffer full of characters have been typed since the
beginning of the last monitor command, then the characters you get after giving
this UUO will NOT be from the command. The pointer into the buffer will simply
have been set to the value it had at the beginning of the command; the command
itself may have been overwritten by other text typed in more recently, in which
case you will be reading garbage after giving this UUO.
CLRBFI [OP=051, AC=11] TTYUUO 11,
--------------------------------------------------
CLRBFI
The CLRBFI UUO clears your terminal's input buffer and your line editor buffer
(if a display). This is used mainly to throw away any characters the user has
typed ahead when a fatal error occurs.
CLRBFO [OP=051, AC=12] TTYUUO 12,
--------------------------------------------------
CLRBFO
The CLRBFO UUO clears your terminal's output buffer.
INSKIP [OP=051, AC=13] TTYUUO 13,
--------------------------------------------------
INSKIP <flag>
<return if no characters have been typed>
<success return>
The INSKIP UUO tells you if the user has typed anything which you have not yet
read. If the low order bit of the address field <flag> is on, then this UUO
checks for a whole line having been typed; otherwise it checks for anything
having been typed. If something has been typed, then this UUO skips; if not,
the direct return is taken.
INWAIT [OP=051, AC=14] TTYUUO 14,
--------------------------------------------------
INWAIT ADR
The INWAIT UUO just waits until a full line has been typed in. Then if the
address ADR is non-zero, the number of characters in the last line re-edited
(display terminals only) with a CONTROL-CR or with a PTLOAD or PTL7W9 UUO (see
page 116) is returned in the word at ADR. In other words, if you give a PTLOAD
UUO and then do an INWAIT ADR, you will get in location ADR the number of
characters in the re-edited line. If you are not at a display terminal, or if
you did not re-edit a line somehow, the number placed in ADR will be
meaningless.
SETACT [OP=051, AC=15] TTYUUO 15,
--------------------------------------------------
SETACT [OLD,,NEW]
OLD: <4 word block to receive the current activation table>
NEW: <4 word block to provide a new activation table>
The SETACT UUO is used to retrieve and/or change the activation table used in
special activation mode and some special bits which apply whether or not the
terminal is in special activation mode. An activation table consists of 4
words, with one bit for each of the =128 possible 7-bit characters. The first
three words plus the =20 high-order bits of the fourth word (total of =128 bits)
specify which characters are activation characters when the terminal is in
special activation mode (bit 0 of first word represents ascii 0, bit 1
represents ascii 1, etc.). The activation characters are defined to be those
characters whose bits are 1 in the activation table. Some of the remaining
low-order bits of the fourth word have special meanings which are given below.
Note that these bits are in effect regardless of the terminal's
special-activation-mode status.
BITS OCTAL NAME MEANING OF 1'S AT END OF FOURTH WORD
35 0,,1 SUPBTS Suppress activation on characters with
CONTROL and/or META bits except for those
characters that would activate without either
of these bits. See also bit 33 below.
34 0,,2 SUPCCR Disable CONTROL-carriage-return from giving
back the last line typed. This bit is
ignored when the terminal is in monitor mode.
33 0,,4 SUPSCM Always activate on characters that have both
CONTROL and META on, regardless of setting of
bit 35 above.
32 0,,10 EMODE A META-null (400) character is inserted in
the terminal's input buffer after each line
editor activation, following all characters
activated. Thus when an activation character
is typed in the middle of a line, the program
can find out where the line ends. The 400 is
an activation character, in the sense that
all of the text up to and including it will
be available to INCHWL. (Normally when the
line editor is activated by a character other
than return in the middle of the line, the
program can only read (with INCHWL) up to the
activation character, not up to the end of
the line, until another activation character
is typed.)
31 0,,20 BSACT Backspace with any combination of CONTROL and
META bits (including none) will activate and
be made available to the user program if the
current input line is empty. This works on
both displays and non-displays.
30 0,,40 ALLACT Backspace and any character with either or
both of CONTROL and META on will activate the
line editor except in re-edited lines.
29 0,,100 SUPERS Suppress erasure of the Data Disc or
Datamedia line editor upon activation while
positioned to a specific screen location with
the LEYPOS UUO.
28 0,,200 SUPACT Suppress CONTROL and META bits on all
characters except line editor commands. In
this mode, anything typed with CONTROL or
META is inserted into the line, never
overtyping something already there, but the
CONTROL and META bits are then discarded.
When you are typing to the monitor, you are
effectively always in this mode.
27 0,,400 SUPEOL Suppress activation by the following commands
at the end of the line editor: CONTROL-TAB,
CONTROL-R, CONTROL-S, CONTROL-K, and
META-<plain non-activating char>. Among
these, the CONTROL commands are carried out
as line editor commands, including the taking
of a following character argument by
CONTROL-S and CONTROL-K; however, these
commands are all no-ops at the end of the
line (except for storing the repeat
search/kill argument). META-<plain
non-activating char> at the end of the line
is treated as though the META had not been
typed. However, ALLACT mode (see above)
takes precedence over this mode--anything
required to activate by ALLACT, including
META at the end of a not-reedited line, will
activate dispite this bit being set. Note
that CONTROL-D and CONTROL-I still activate
at the end of the line in SUPEOL mode.
21 0,,40000 SUPCT Disable the line editor commands CONTROL-T,
CONTROL-L, and CONTROL-B. With the SUPCT bit
set, these three characters will be processed
as normal typein to the user program.
The SETACT UUO takes the current activation table (including extra bits listed
above) and places it in the four words at OLD, then sets up the new activation
table (including extra bits listed above) from the four words at NEW. If either
address OLD or NEW is zero, the corresponding function of this UUO is omitted.
Thus if OLD is zero, the old activation table is not returned, and if NEW is
zero, the (old) activation table is not changed.
Your special activation table is initialized by the system so that all
characters except letters and digits cause activation (when you are in special
activation mode). The precise value of the initial special activation table
(including extra bits at the end) is shown below.
777777,,777777 ;Activate on octal 0:43
777700,,037600 ;Activate on octal 44:57 or 72:100
000000,,374000 ;Activate on octal 133:140
000007,,600000 ;Activate on octal 173:177
Your special activation table (including extra bits at the end) is also restored
to the above values by a RESET UUO (see page 249).
TTREAD [OP=051, AC=16] TTYUUO 16,
--------------------------------------------------
TTREAD ADR
ADR: <line number--data returned here>
The TTREAD UUO allows you to read the microswitch keyboard bits of any Data Disc
or III keyboard. The effective address in this instruction specifies a location
which should contain the terminal line number of the keyboard you wish to read.
If the line number specified is illegal, then your line number is used. Then if
the line is not on the keyboard scanner (that is, if the line is not a III or
Data Disc display line), this UUO is a no-op.
The keyboard bits are returned in the right half of ADR. The line number minus
20 is returned in the left half of ADR. The tables below give the
correspondence between the keys depressed and the returned data.
BITS OCTAL DESCRIPTION
0:11 777700,,0 These bits are unused and returned as zero.
12:17 77,,0 The terminal line number minus 20 appears here.
18:21 0,,740000 These bits are unused and returned as zero.
22,26:29 0,,21700 These bits are on when there are no keys
depressed. They are explained individually below.
22 0,,20000 This is the SPW bit and should always be on in returned
value.
23 0,,10000 This is the STR bit and is on whenever exactly one
character key is depressed. All the keys are character
keys except META, CONTROL, TOP, SHIFT, and SHIFT LOCK.
24:25 0,,6000 These bits are unused but may be on.
26 0,,1000 This bit is turned off by depressing META.
27 0,,400 This bit is turned off by depressing CONTROL.
28 0,,200 This bit is turned off by depressing TOP.
29 0,,100 This bit is turned off by depressing SHIFT or SHIFT
LOCK.
30:35 0,,77 These bits hold the value that results from ORing
together the codes for all of the character key(s)
being depressed. See the table below for
correspondences between keys and their 6-bit codes.
The notation "---" means no key generates the indicated
code.
MICROSWITCH KEYBOARD CHARACTER CODES
0 1 2 3 4 5 6 7
00 --- a b c d e f g
10 h i j k l m n o
20 p q r s t u v w
30 x y z CR \ LF --- ---
40 SPC BRK ESC CAL CLR TAB FF VT
50 ( ) * + , - . /
60 0 1 2 3 4 5 6 7
70 8 9 : ; BS ALT --- ---
OUTFIV [OP=051, AC=17] TTYUUO 17,
--------------------------------------------------
OUTFIV ADR
ADR: <five-character ascii string>
The OUTFIV UUO allows you to output up to five characters (plus an optional
initial 177 character) to your terminal with a guarantee that no other output
will be intermixed. The effective address should point to a word containing a
five-character ascii string. If the low order bit (bit 35--the 0,,1 bit) of the
ascii word is on, a 177 character will be output first. Characters from the
string are sent to the terminal until either a null byte is encountered or the
fifth character (not counting the 177, if any) in the string has been sent.
The guarantee of non-intermixing with other output does not apply to displays.
3.4 Miscellaneous UUOs for Terminals
BEEP [OP=047, ADR=400111] CALLI 400111
--------------------------------------------------
MOVE AC,[<terminal line number, or -1 for self>]
BEEP AC,
The BEEP UUO is used to send a beep to any terminal line in order to catch
someone's attention. The AC should contain the number of the line to be beeped
or -1 to beep your own line. For III and Data Disc lines, a beep interruption
is generated, and the beep itself may happen at once, be delayed, or be ignored
altogether, depending on the recipient's audio switch connection status (see the
ADSMAP UUO on page 154). For other terminals, a control-G (bell) is sent to the
terminal.
For any destination line, the beep is actually sent to the terminal responsible
for that line; that is, the beep is sent to the physical terminal that was the
last to type a character (while mapped) to the logical destination line.
This UUO returns at once in any case, giving no indication of what happened.
TTYSET [OP=047, ADR=400121] CALLI 400121
--------------------------------------------------
MOVE AC,[-N,,ADR]
TTYSET AC,
ADR: <N words--each defining an operation to be performed>
The TTYSET UUO allows a job to SET the values of various parameters and flags
associated with the job's attached terminal, and to GET the values of certain
parameters and flags for any terminal. Upon call, AC right should contain the
address of a table of one-word operations to be performed, and AC left should
contain the negative of the number of words (operations) in the table. The
operations are executed in order, with the operation at ADR executed first.
Each word in the table is a function word representing the operation specified
by the high-order nine bits (bits 0:8--the 777000,,0 bits). (The currently
defined opcodes and their corresponding operations are listed below.) The
remaining bits of the function word are used as arguments to the operation, with
the meanings of particular bits being dependent on the opcode. Unused bits in a
function word should be zero.
There are two kinds of operations: SETTING operations and GETTING operations.
The GETTING operations are marked in the table below by an asterisk (*) after
the opcode.
SETTING operations change something for the job's attached terminal (if any) and
usually use the right half of the function word as an immediate argument.
SETTING operations are no-ops if the job is detached.
GETTING operations return the value of some parameter for a terminal. The value
is returned in the word pointed to by the right half of the function word. The
terminal affected is the job's attached terminal unless bit 9 (400,,0 bit) is ON
in the function word, in which case it is the terminal whose line number is in
bits 11:17 (177,,0 bits). GETTING operations will return -1 if either bit 9 is
OFF and the job is detached or bit 9 is ON and the terminal specified in bits
11:17 is not in use or does not exist.
OPCODE OPERATION AND INTERPRETATION OF FUNCTION WORD
000 No operation.
001 Turn on indicated line characteristics bits. Ones in any of bits
18:35, representing line characteristics bits 0:17, indicate line
characteristics bits you want turned on. No indication is given of
attempts to turn on illegal bits; they simply are not turned on.
See the GETLIN UUO (on page 77) for meanings of the individual
bits.
002 Turn off indicated line characteristics bits. Ones in any of bits
18:35, representing line characteristics bits 0:17, indicate line
characteristics bits you want turned off. No indication is given
of attempts to turn off illegal bits; they simply are not turned
off. See the GETLIN UUO (on page 77) for meanings of the
individual bits.
003 * Get line characteristics and line number. The indicated terminal's
line characteristics are returned in the left half of the specified
word, and the terminal's line number is returned in the right half.
See the GETLIN UUO (on page 77) for meanings of the individual
bits. Unlike the GETLIN UUO, however, this function does NOT
return the display bit of the first display up the PTY chain when
this function is getting the line characteristics of a PTY--only
the actual line characteristics of the particular TTY are returned.
(See function 022 below for finding out the number and line
characteristics of the first display, if any, up a given PTY
chain.)
004 Execute ESCAPE or BREAK command. This function performs an
operation normally effected with an ESCAPE or BREAK keyboard
command (or with one of the monitor commands TTY ESCAPE and
TTY BREAK). This function does NOT interfere with actual typein
(e.g., of ESCAPE/BREAK commands) from the keyboard. If the
terminal is not a display and the ESCAPE/BREAK command given
applies only to displays, then this function will be a no-op. The
only ESCAPE/BREAK commands currently meaningful on non-displays
are: F,H,I,X,Z. The low-order 7 bits of the function word (bits
29:35--0,,177 bits) are taken as the ascii command character. The
command will be ESCAPE if bit 27 (0,,400) is off and BREAK if this
bit is on. Bits 18:26 (0,,777000 bits) of the function word hold
the (unsigned) numeric argument to the command; if these bits are
all zero, then a null argument will be used unless bit 28 (0,,200
bit) is on, in which case an explicit zero argument will be used.
For example, <004000,,"W"> will do ESCAPE W, and <004000,,600+"W">
will do BREAK 0 W. Escape commands that affect the physical
terminal rather than the one to which you are mapped cannot be
executed with this UUO; these include all video switch, audio
switch and mapping commands (ESCAPE/BREAK + * A D S T U B M and
BREAK L).
005 Set terminal width. This function sets the maximum terminal line
width for output of text to the terminal (the monitor command
TTY WIDTH also sets this width). The width is set to the value in
the right half of the function word, which should be between =16
and =256. Displays ignore this width, as do non-ARPA
pseudo-teletypes.
006 * Get terminal width. The maximum line width for the indicated
terminal is returned. This width is meaningful unless the terminal
is a non-ARPA PTY.
007 * Get terminal horizontal position. The horizontal position of
output and echoing on the indicated terminal is returned. If bit 9
(400,,0) is off in the function word (meaning you are referencing
your attached terminal) and you are on a display, then this
function first waits for display page printer output to stop.
010 Inhibit CONTROL-CR once only now. The CONTROL-CR feature of
reloading the last line activated from the line editor is inhibited
for right now only (displays only), the actual line editor buffer
is cleared (displays only), and (for both displays and
non-displays) already-read characters in the terminal's (system)
input buffer are cleared in order to hide what was there. This is
a useful function to execute immediately after reading a password
or other secret information that should not be displayed. After
this function is executed, the last line activated from the line
editor cannot be retrieved with CONTROL-CR, and spies looking at
the line editor or input buffer cannot see the already-read
password. If there is text in the line editor at the time this
function is given, then the clearing of the line editor buffer is
not done.
011 Turn on selected bits in terminal I/O status word. Bits on in the
right half of the function word are turned on in the right half of
your terminal's I/O status word. You cannot set the IOACT bit (bit
23--0,,10000 bit).
012 Turn off selected bits in terminal I/O status word. Bits on in the
right half of the function word are turned off in the right half of
your terminal's I/O status word.
013 * Get terminal's I/O status word. The I/O status word of the
indicated terminal is returned.
014 Turn on or off special Datamedia bits. This function has no effect
if your job is not running on a Datamedia display (DM). If bit 35
(0,,1 bit) is on in the function word, your DM is flagged as
CAPABLE of displaying the control characters (1:37 octal) when they
are sent following an ascii escape (octal 33); the monitor command
TTY DM128 also does this (although it also tells the system the
terminal is a DM). If bit 34 (0,,2 bit) is on in the function
word, your DM is flagged as NOT CAPABLE of displaying the control
characters; this cannot be done by monitor command. If bit 33
(0,,4 bit) is on in the function word, your DM is flagged as NOT
WANTING the line editor displayed in blinking/bold (e.g., your DM
doesn't have blinking and bold interchanged); the monitor commands
TTY NO BLINK and TTY NO BOLD do the same thing. If bit 32 (0,,10
bit) is on in the function word, your DM is flagged as WANTING the
line editor displayed in blinking/bold; TTY BLINK and TTY BOLD do
this also. The remaining bits in the function word are reserved
for future uses.
015 * Get display's screen height. The number of screen lines on the
indicated display is returned. The value returned will be -1 if
the specified terminal is not a display.
016 Set Datamedia display's screen height. This function has no effect
if your job is not running on a Datamedia display (DM). The number
of lines the system considers your DM to have is set from the right
half of the function word. Currently, this number must be at least
8 and no more than =50; otherwise the default number of screen
lines, namely =24, is used for your DM. Note that after you give
this function, a screen reset (e.g., ESCAPE N or DPYCLR or RESET
UUO) is necessary to actually cause the number of lines used by
your page printer to take into account your new screen height.
017 * Get responsible terminal. This function returns the number of the
physical terminal responsible for the indicated logical TTY line.
The responsible terminal is the last (physical) terminal to type a
character (while mapped) to the logical TTY line.
020 * Get privacy bit. This function returns the current setting of the
privacy bit for the indicated terminal. The privacy bit will be on
if the user of that terminal has requested that his terminal remain
hidden from spies. (Note that the privacy bit does not guarantee
complete privacy because it can be overridden.) The privacy bit is
set by ESCAPE H and cleared by BREAK H.
021 * Get Datamedia state flags. This function returns the current
settings of the Datamedia (DM) state flags (the right half of the
DMFLAG word in the DPY header) for the indicated terminal. If the
given terminal is not a DM, then -1 is returned. Here are the
meanings of the DM state flags.
BITS OCTAL NAME MEANINGS OF 1'S IN DM STATE FLAGS
21 0,,40000 TBSSET Tabs have been set.
22 0,,20000 RAPPED The current transfer has just
wrapped around at column =80.
23 0,,10000 BELOW The current transfer is now being
suppressed because it is off-screen
or would overwrite the line editor.
24 0,,4000 DM128 Control characters (1:37) can be
displayed (set by the monitor
command TTY DM128 or function 014
above).
25 0,,2000 NOBOLD The line editor is not displayed as
bold/blinking (set by the monitor
command TTY NO BOLD or function 014
above).
26 0,,1000 NOINTR There is a FREEZE 1, UUO in effect.
27 0,,400 NO177 The 177 character cannot be
displayed (set by the monitor
command TTY NO BS).
32 0,,10 BLNKON The DM is in blink mode (bold mode
on modified DMs).
33 0,,4 PROTON The DM is in protected-field mode
(blink mode on modified DMs).
34 0,,2 IDON The DM is in insert/delete mode.
35 0,,1 ROLLON The DM is in roll mode.
022 * Get line number and line characteristics of controlling display, if
any. This function returns the line characteristics and line
number of the display on which a UPGIOT display program would be
run if a UPGIOT UUO (see page 136) were executed by the job running
on the given terminal. That display is the given terminal itself
if it is a display, else it is the first display up the PTY chain
if the given terminal is a PTY. If there is no such display, then
this function returns -1. See the GETLIN UUO on page 77 for
meanings of the line characteristics bits.
RDLINE [OP=047, ADR=400123] CALLI 400123
--------------------------------------------------
MOVE AC,[BBCCCC,,ADR]
RDLINE AC,
ADR: <block for returned 9-bit string>
The RDLINE UUO reads a whole line from a terminal (waiting, if necessary, for
one to be typed) and returns a 9-bit string ended with a null. In the calling
sequence shown above, BB (two octal digits) is the initial byte position (to be
IDPBed) for returning characters, and CCCC (four octal digits) is the maximum
number of characters (including the ending null) to be returned by this UUO. If
CCCC=0, then the default maximum is used, namely =160 characters (including the
ending null) (=40 words). The byte pointer to the ending null byte is returned
in the AC. This UUO reads characters until either the maximum count is used up
or a whole "line" has been read. A "line" is defined as follows: If the
terminal is a display with the EMODE bit turned on (see the SETACT UUO on page
84), then a line is any number of characters terminated by a 400 (the marking
character in EMODE); otherwise, a line is any number of characters terminated by
an activation character (which is defined in the usual manner, e.g., as in
INCHWL).
Note that if the AC of this UUO contains just 0,,ADR upon call, then the
characters will be returned starting in the high-order byte of address ADR+1,
since the byte position (00 in this case) is incremented with the first deposit.
TTYMES [OP=047, ADR=400047] CALLI 400047
--------------------------------------------------
MOVEI AC,ADR
TTYMES AC,
<error return>
ADR: <number or physical name of destination terminal>
<byte pointer for message but with byte count in bits 6:17>
MESS: ASCII /...message.../
The TTYMES UUO can be used to type out an ascii string on any terminal. Unlike
the OUTSTR UUO, TTYMES allows the message to start in any byte of a word. The
end of the message is indicated by a null (zero) byte or by exhaustion of an
explicit character count.
Upon call, AC should contain the address of a two-word block. The first word of
this block should contain either the name (physical or logical) of the
destination terminal (e.g., SIXBIT /TTY21/) or the number of the destination
terminal (e.g., 21). The second word of the block should contain a byte pointer
for the ascii message except that bits 6:17 (7777,,0) should contain either zero
or a byte count. The first character of the message is found by doing an ILDB
on the byte pointer, so the position field (bits 0:5--770000,,0 bits) of the
byte pointer should indicate the byte before the first character in the message.
If the position field of the byte pointer contains zero, then 44 is assumed for
this field so that the first byte of the message will be the high-order byte of
the word addressed by the right half of the byte pointer word.
Characters are sent to the destination until either the character count runs out
or a null (zero) byte is encountered in the message. If the count field
contains zero, then characters are sent until a null byte in encountered. Thus,
if you don't wish to calculate the length of your message, you can use a zero
count and a null byte at the end of the message (i.e., use an asciz string).
If the terminal you are sending the message to is a display not specified by
'TTY' (your own terminal), then the message is sent to piece of paper 0 and to
the current piece of paper, if non-zero.
If you are outputting a message to your own terminal, this UUO will wait until
it has sent the message successfully and then will take the skip (success)
return. If the word at ADR does not specify a legal terminal, or if not all of
the message can be sent right now (for instance, if the terminal's output is
being held), then the direct (error) return will be taken. If all of the
message is successfully sent (to at least one piece of paper on a display), then
the skip (success) return is taken. Note that if this UUO fails, there is no
indication of how much, if any, of the message was actually sent. See the
NULMES UUO below for the ability to recover from such failures.
(The TTYMES UUO and the NULMES UUO work by putting characters from the string
into the output buffer of the destination terminal. If the output buffer fills
up, the UUO waits a little and tries to continue. If the output buffer is still
full after a certain time, the UUO gives up and takes the error return.)
NULMES [OP=047, ADR=400114] CALLI 400114
--------------------------------------------------
MOVEI AC,ADR
NULMES AC,
<error return>
ADR: <number or physical name of destination terminal>
<byte pointer for message but with byte count in bits 6:17>
MESS: ASCII /...message.../
The NULMES UUO, like the TTYMES UUO above, allows a job to type out an ascii
string on any terminal. However, unlike the TTYMES UUO, the NULMES UUO does not
interpret a null (zero) byte in the message as terminating the message, and upon
failure the NULMES UUO gives an indication of what happened or how much of the
message got sent.
Upon call, AC should contain the address of a two-word block, which is
interpreted just as in the TTYMES UUO above except that the count field (bits
6:17--7777,,0 bits) in the word at ADR+1 must be non-zero and always specifies
the number of bytes in the ascii message. Null bytes do not terminate the
message--they are ignored although included in the byte count.
If the word at ADR does not specify a legal terminal, or if no DDB can be gotten
for the terminal indicated, the direct (error) return will be taken and AC will
contain zero. If the terminal is legal but not all of the message could be
sent, then the direct (error) return will be taken and AC will contain the
number of characters in the message that were not sent. Thus the user can
recover from a temporary jam in the destination terminal's output buffer. If
the message is successfully sent in its entirety, then the skip (success) return
is taken.
SNEAKW [OP=047, ADR=400063] CALLI 400063
--------------------------------------------------
SNEAKW AC,
SNEAKS [OP=047, ADR=400064] CALLI 400064
--------------------------------------------------
SNEAKS AC,
<return if no char is waiting for you>
<success return>
The SNEAKW and SNEAKS UUOs look to see if any characters have been typed that
have not yet been read. If there is such a character, it is returned in the AC.
SNEAKW always returns a character, after waiting until there is one if
necessary. SNEAKS never waits; if there is a character present, it is returned
and the skip return is taken. Otherwise, SNEAKS does not change the AC and
takes the direct return.
Note that SNEAKW does not wait for a whole line to be typed, only one character.
Also, neither of these UUOs actually reads in a character.
ACTCHR [OP=047, ADR=400105] CALLI 400105
--------------------------------------------------
ACTCHR AC,
The ACTCHR UUO (display terminals only) waits for a line to be typed and then
returns in AC the character (including CONTROL and/or META bits typed) that
activated the last line re-edited with a CONTROL-CR or with a PTLOAD or PTL7W9
UUO (see page 116).
If you are not on a display terminal, this UUO returns 0 without waiting for a
line to be typed.
TTYSKP [OP=047, ADR=400116] CALLI 400116
--------------------------------------------------
TTYSKP <channel>,
<no-terminal-input-ready return>
The TTYSKP UUO can be used to find out if there is terminal input ready to be
read from a particular I/O channel. The AC field of this UUO specifies the
channel whose input you wish to test. If the device open on that channel is a
terminal, and if an INPUT UUO given now would return immediately, then this UUO
takes the skip return. If the device open on this channel is not a terminal, or
if it is a terminal but an INPUT would not return immediately, then the direct
return is taken. If there is no device open on the specified channel, then the
program will be stopped with the system error message "IO TO UNASSIGNED
CHANNEL."
TTYJOB [OP=047, ADR=400113] CALLI 400113
--------------------------------------------------
MOVE AC,[<terminal line number> or -<PTY line number>]
TTYJOB AC,
The TTYJOB UUO is used to find out the number of the job owning or controlling a
particular terminal. If AC contains a legal terminal number, the job number of
that terminal's owner is returned in AC, with the sign bit on if the terminal is
not the owner job's attached terminal (that is, the sign bit is on if the
terminal belongs to that job only because the job has the terminal assigned or
INITed). If AC contains the negative of a legal PTY number, then the number of
that PTY's controlling job will be returned in AC. If AC contains an illegal
argument, then zero is returned in AC.
CTLV [OP=047, ADR=400001] CALLI 400001
--------------------------------------------------
CTLV
The CTLV UUO inverts the state of program-controllable echoing of terminal input
by the system. Normally every character you type is sent back to your terminal
by the system so that you can see what you have typed. If you give this UUO
when echoing is turned on (normal state), echoing will cease; and if you give
this UUO when echoing is turned off, echoing will resume. The state of this
type of echoing is determined by the value the NOECHO bit (bit 28--the 0,,200
bit) in the terminal's I/O status word; this bit is inverted by the CTLV UUO.
When the terminal is in monitor mode, the NOECHO bit is ignored. See Section
3.1.
A better way to control this type of echoing is to use the DOFF and DON
functions of the PTJOBX UUO (see page 118). Those functions set the state of
this type of echoing explicitly rather than just inverting it as CTLV does.
GETLN [OP=047, ADR=34] CALLI 34
--------------------------------------------------
GETLN AC,
The GETLN UUO is used to find out the physical name of the terminal attached to
your job. The name (in sixbit) is returned in AC. If the job is detached, zero
is returned.
3.5 Pseudo-Teletypes
The pseudo-teletype (PTY) is a special system concept designed to allow users to
have control of more than one job at a time. A PTY is like a physical terminal
in almost all respects. However, a PTY is controlled by the job which created
it, and no other job can access it. To TYPE CHARACTERS ON A PTY, the
controlling job does character output to the PTY; and to SEE THE CHARACTERS
TYPED OUT ON A PTY, a job does character input from the PTY. If you send a new
PTY the character "L" followed by a carriage return and linefeed, a job will
begin logging in on the PTY. You can run programs and communicate with the
monitor through a PTY just as you can through a physical terminal, but PTYs are
controlled by program rather than by keyboard. Thus, a single job (attached to
a terminal or even detached) can control one or more PTYs and hence one or more
other jobs, which themselves can control other PTYs.
Just as each physical terminal has a unique line number, so does each PTY.
Currently the line numbers assigned to PTYs begin with 121 and go upward. The
PTYs have physical device names, just like other terminals; for example, the
physical name of the PTY on line 121 is SIXBIT /TTY121/. There is a maximum
number of PTYs that the system can support at any one time and this maximum is
currently 24.
PTYs have line characteristics just as other terminals do (see the GETLIN UUO on
page 77). When a PTY is initialized (with the PTYGET UUO), it is set up with
the following bits (4222,,0 bits) on in the characteristics word: 6--PTYLIN,
10--PTYUSE, 13--FCS (full-character-set mode), and 16--XON (linefeeds are not
inserted after carriage returns). You can of course change certain bits in the
characteristics word to suit your purposes. This can be done for a PTY with the
PTSETL UUO (see page 115) just as SETLIN (see page 78) does it for other
terminals.
When you output characters to a PTY, those characters will be echoed by the
monitor as usual and will thus appear in subsequent inputs that you do from the
PTY. You can turn off the automatic echoing by the usual means for doing so
with terminals; namely, you can turn on the FULTWX bit (bit 15--4,,0 bit) in the
PTY's line characteristics (this inhibits echoing so that only linefeeds
inserted after carriage returns get echoed), or you can turn on the NOECHO bit
(bit 28--0,,200 bit) in the PTY's I/O status word, which eliminates all echoing
except while the PTY is in monitor mode. You can turn on FULTWX with the PTSETL
UUO (see page 115), and you can turn on NOECHO by using the the PTJOBX UUO (see
page 118) with the control function DOFF. The control function DON for PTJOBX
can be used to turn off NOECHO.
PTYUUO
The UUO that is used to communicate with PTYs is PTYUUO, which has many
different functions that it can perform, including reading from and writing on a
PTY.
PTYUUO [OP=711]
--------------------------------------------------
PTYUUO <function number>,ADR
ADR: <PTY's line number>
<other data depending on the function>
PTYUUO is an extended UUO that uses the AC field to determine which of many
possible pseudo-teletype functions is to be executed. Each of these functions
(which are described in detail below) expects a two word block to be pointed to
by the address field of the instruction. The right half of the first word of
this block should contain the line number of the pseudo-teletype for which the
UUO is intended (except with PTYGET which returns this line number). The second
word is a data word that is used or returned by the UUO.
Doing PTYUUOs to Terminals
It is sometimes useful for a program to be able to type things into its own
terminal input buffer just as if the user had typed them. This can be done with
PTYUUO by specifying a PTY line number of zero in the word at ADR. When this
word is zero, the PTY function is executed with your attached terminal. Thus,
if you do output to a PTY with a line number of zero, the characters will go to
your terminal's input buffer (into your line editor if you are on a display
terminal) just as if you had typed them.
If bit 18 (the 0,,400000 bit) of the word at ADR is on for a PTYUUO, the number
in the remaining bits of the right half is interpreted as the line number of a
terminal and the PTY function is carried out for that terminal. However, if you
do not own the terminal, you must have the MES privilege to do anything with it.
Any attempt to do input (PTRD1S, PTRD1W or PTRDS UUOs) from a physical
terminal's output buffer with either of the above two methods will not work; you
will get the system error message ILLEGAL UUO and your program will be stopped.
Now here are the individual PTYUUO functions.
PTYGET [OP=711, AC=0] PTYUUO 0,
--------------------------------------------------
PTYGET ADR
<return if no PTYs available>
<success return>
ADR: <PTY's line number and characteristics are returned here>
The PTYGET UUO gets you a pseudo-teletype and places its line characteristics
word (see the GETLIN UUO on page 77) in the location pointed to by the effective
address of the instruction (i.e., ADR). This means that the PTY's line number
will appear in the right half of ADR and its characteristics will appear in the
left half.
If a PTY is available, this UUO skips and the PTY is assigned to you. If there
are none available, the direct return is taken and you get no PTY.
PTYREL [OP=711, AC=1] PTYUUO 1,
--------------------------------------------------
PTYREL ADR
ADR: <line number of PTY to be released>
The PTYREL UUO releases the pseudo-teletype whose line number is in the right
half of ADR. The job running on that PTY is killed, and any PTYs it may have
acquired are released.
The RESET UUO (see page 249) releases all pseudo-teletypes you own.
PTIFRE [OP=711, AC=2] PTYUUO 2,
--------------------------------------------------
PTIFRE ADR
ADR: <PTY's line number>
<count of free bytes is returned here>
The PTIFRE UUO returns to you in ADR+1 the number of free bytes left in the
input buffer of the PTY whose line number is in ADR. This is the number of
characters you may send to that PTY before its input buffer is full. If you use
a PTY output UUO that waits, and if you send more that this many characters, you
will have to wait until the program running on the PTY reads some characters and
makes room for your output.
PTOCNT [OP=711, AC=3] PTYUUO 3,
--------------------------------------------------
PTOCNT ADR
ADR: <PTY's line number>
<count of characters in PTY's output buffer is returned here>
The PTOCNT UUO returns in ADR+1 the number of characters in the output buffer of
the PTY whose line number is in ADR.
PTRD1S [OP=711, AC=4] PTYUUO 4,
--------------------------------------------------
PTRD1S ADR
<return if no character is present>
<success return>
ADR: <PTY's line number>
<one 7-bit character is returned here>
The PTRD1S UUO looks to see if there are any characters in the output buffer of
the PTY whose line number is in ADR. If there are, one 7-bit character is read
from there and returned in ADR+1 and the skip return is taken. If there are no
characters in the PTY's output buffer, then a zero is returned in ADR+1 and the
direct return is taken.
PTRD1W [OP=711, AC=5] PTYUUO 5,
--------------------------------------------------
PTRD1W ADR
ADR: <PTY's line number>
<one 7-bit character is returned here>
The PTRD1W UUO reads one 7-bit character from the output buffer of the PTY whose
line number is in ADR and returns the character in ADR+1. If there are no
characters in the PTY's output buffer, this UUO waits for the PTY to do some
output and then returns the first character.
If the PTYWAK bit (bit 9--the 400,,0 bit) is on in the line characteristics word
for your terminal (see the GETLIN UUO on page 77), then this instruction will
return when a character is typed either on the PTY or on your terminal. If the
first character typed is from the terminal, a zero will be returned in ADR+1 and
no characters will have been read from either the terminal or the PTY. In this
manner, you may wait for either PTY or terminal input.
PTWR1S [OP=711, AC=6] PTYUUO 6,
--------------------------------------------------
PTWR1S ADR
<return if character not sent>
<success return>
ADR: <PTY's line number>
<9-bit character to be sent>
The PTWR1S UUO sends the 9-bit character right-justified in ADR+1 to the PTY
whose line number is in ADR. If the character can be sent, the skip return is
taken. If the PTY's input buffer is already full, the character is not sent and
the direct return is taken. The CONTROL and META keys which display lines have
are represented by bit 28 (0,,200--CONTROL) and bit 27 (0,,400--META) in ADR+1.
PTWR1W [OP=711, AC=7] PTYUUO 7,
--------------------------------------------------
PTWR1W ADR
ADR: <PTY's line number>
<9-bit character to be sent>
The PTWR1W UUO sends the 9-bit character right-justified in ADR+1 to the PTY
whose line number is in ADR. If the PTY's input buffer is already full, this
UUO waits until there is room and then sends the character. The CONTROL and
META keys which display lines have are represented by bit 28 (0,,200--CONTROL)
and bit 27 (0,,400--META) in ADR+1.
PTRDS [OP=711, AC=10] PTYUUO 10,
--------------------------------------------------
PTRDS ADR
ADR: <PTY's line number>
<address or byte ptr to 30-word block for returned string>
The PTRDS UUO reads all the characters that are in the output buffer of the PTY
whose line number is in ADR and returns these characters as an asciz string at
the location indicated by ADR+1, where 30 words should be allocated. If bits
6:17 (7777,,0 bits) in ADR+1 are not all zero, the word at ADR+1 is taken as a
byte pointer to be used to return the asciz string, with the byte pointer
incremented before the first character is deposited. (Before the byte pointer
is used, the size field is set up for 7-bit bytes and the index and indirect
fields are cleared.) If bits 6:17 of ADR+1 are zero, the asciz string is
returned such that the first byte is in the high-order 7 bits of the location
pointed to by the right half of ADR+1.
If the PTY is not a display and is holding output, then the PTRDS UUO returns
immediately with only a null in the returned string. Otherwise, the PTRDS UUO
waits for at least one character from the PTY before returning.
PTWRS7 [OP=711, AC=11] PTYUUO 11,
--------------------------------------------------
PTWRS7 ADR
ADR: <PTY's line number>
<address or byte pointer for string to be sent>
The PTWRS7 UUO takes the asciz string specified by ADR+1 and sends it to the PTY
whose line number is in ADR. This UUO waits as necessary until the whole string
has been sent. If bits 6:17 (7777,,0 bits) of ADR+1 are not all zero, then
ADR+1 is taken as a byte pointer to be used to access the string, with the byte
pointer incremented before the first character is loaded. (Before the byte
pointer is used, the size field is set up for 7-bit bytes and the index and
indirect fields are cleared.) If bits 6:17 are zero, the string is assumed to
start in the high-order 7 bits of the word pointed to by ADR+1.
PTWRS9 [OP=711, AC=12] PTYUUO 12,
--------------------------------------------------
PTWRS9 ADR
ADR: <PTY's line number>
<address or byte pointer for string to be sent>
The PTWRS9 UUO does the same as PTWRS7 except that the string sent is not a
standard 7-bit asciz string, but a string of 9-bit characters terminated by a
zero (null) character. The two high order bits in each 9-bit character
represent META (400 bit) and CONTROL (200 bit), which display terminal keyboards
can send. As with PTWRS7, ADR+1 can contain either a simple half-word pointer
to the string or a byte pointer to be incremented to get the first character.
This UUO is important because octal code 003 (β or control-C) does not mean
control-C if you are sending it to a display terminal. The code representing
control-C in that case is 600, which takes 9 bits to represent. The code 600
works as control-C for all terminals, so it can always be sent instead of 003 to
stop a job. Note that you must send TWO 600s (two control-C's) to stop a job
immediately. Another method for stopping a PTY is to use the PTJOBX UUO with
the HALT control function; see page 118.
PTGETL [OP=711, AC=13] PTYUUO 13,
--------------------------------------------------
PTGETL ADR
ADR: <PTY's line number>
<PTY's line characteristics word is returned here>
The PTGETL UUO returns in ADR+1 the line characteristics for the PTY whose line
number is in ADR. The meaning of the line characteristics word is explained
under the GETLIN UUO on page 77.
NOTE: If a pseudo-teletype is controlled directly or indirectly (through a chain
of pseudo-teletypes) by a display terminal, then the bit representing the type
of the first display terminal found up the chain will be on in the
characteristics word returned for the pseudo-teletype.
PTSETL [OP=711, AC=14] PTYUUO 14,
--------------------------------------------------
PTSETL ADR
ADR: <PTY's line number>
<new line characteristics desired>
The PTSETL UUO sets the line characteristics for the PTY whose line number is in
ADR from the word at ADR+1. In the line characteristics word, only bits 2, 3,
5, 8, 9, 11, 13, 14, 15 and 16 (151536,,0 bits) can be changed by the user.
Other bits in the word at ADR+1 are ignored. The DMLIN bit (bit 3--40000,,0
bit) and the IMPBIT (bit 8--1000,,0 bit) can be set but cannot be cleared. See
the GETLIN UUO on page 77 for the meanings of the various bits in the line
characteristics word.
PTLOAD [OP=711, AC=15] PTYUUO 15,
--------------------------------------------------
PTLOAD ADR
ADR: <PTY's line number--must be a display (usually 0)>
<address or byte pointer for string>
The PTLOAD UUO loads a display's line editor with the ascii string specified by
the word at ADR+1. After the line editor is loaded, the cursor is left at the
beginning of the line. If the left half of ADR+1 is non-zero, then ADR+1 is
assumed to be a byte pointer to the string; characters are picked up from the
string with ILDBs, so the byte pointer should point to the byte just before the
string. If the left half of ADR+1 is zero, the string is assumed to start with
the high-order byte of the word pointed to by the right half of ADR+1.
The string being loaded ends with the first null or activation character in the
string. The activation character, if any, is left on the end of the string in
the line editor; typing carriage return will simply activate the line up to and
including any activation character. Note that if the string was terminated with
a null, then typing carriage return will activate the string but will not add a
carriage return to it. If you activate the re-edited line with anything besides
carriage return, the activation character you type will be inserted in the line
wherever you typed it.
This UUO only works if the line number at ADR specifies a display terminal;
otherwise this is a no-op. The normal use of this UUO is with a zero at ADR,
which selects your own line editor to be loaded with the given string (provided
you are at a display). After giving this UUO, you may read input from the
terminal to get the line back with any changes that may have been made.
PTLOAD saves any unread characters that are typed by the user before or during
the UUO and simulates retyping those characters when the UUO is done. To ensure
that no timing error is possible in handling typeahead, the PTLIP bit (bit
6--the 4000,,0 bit) in the terminal's I/O status word is set during the UUO.
See also the INWAIT UUO on page 83 and the ACTCHR UUO on page 94 for other
special features regarding re-edited lines.
PTL7W9 [OP=711, AC=17] PTYUUO 17,
--------------------------------------------------
PTL7W9 ADR
ADR: <PTY's line number--must be a display (usually 0)>
<address or byte pointer for 7-bit string for line editor>
<address or byte pointer for 9-bit string of simulated typeahead>
The PTL7W9 UUO loads a display's line editor with a specified 7-bit string and
then, with the cursor at the beginning of the line, simulates the typing of
characters from a given 9-bit string. The line editor loading from the 7-bit
string specified at ADR+1 occurs just as in the PTLOAD UUO (see above,
especially for what terminates the string). The 9-bit string of characters to
be "typed" thereafter is specified by an address or a byte pointer (to be
ILDBed) at ADR+2; this string is terminated with a null byte (000).
PTL7W9 saves any unread characters that are typed by the user before or during
the UUO and simulates retyping those characters when the UUO is done. To ensure
that no timing error is possible in handling typeahead, the PTLIP bit (bit
6--the 4000,,0 bit) in the terminal's I/O status word is set during the UUO.
PTJOBX [OP=711, AC=16] PTYUUO 16,
--------------------------------------------------
PTJOBX ADR
<error return for HALT and CONT--no job logged in>
<error return for CONT--job cannot be continued>
<success return for CONT>
ADR: <pseudo-teletype line number>
<index, or sixbit name, of control function>
Control functions:
Index Name Function Success Return
----- ---- -------- --------------
1 HALT Stop the pty's job. skips
2 CONT Continue the pty's job. double skips
3 DOFF Turn off echoing of input to pty. no skip
4 DON Turn on echoing of input to pty. no skip
5 LOGIN Log in a job on pty. skips
6 IWAITS Skip if pty waiting for input. skips
7 CLRBFI Clear pty's input buffer. no skip
PTJOBX is the extended PTY job control UUO. Any one of several control
functions can be exercised over a PTY without sending it any character strings.
The control is exercised over the job running on the PTY whose line number is in
ADR; a zero line number means the control is exercised over your own job. This
is a good method for turning on and off the echoing of input to your job.
The word at ADR+1 should contain either the index or the sixbit name of the
control function desired. The currently available control functions are listed
above with their names and indices.
The HALT function takes the skip return on success and the direct (error) return
if there is no job logged in on the PTY. If you HALT a job this way, its
terminal is left in user mode and commands cannot be typed either to the monitor
or to the job on that terminal; two control-C's (octal code 600) will put the
terminal in monitor mode.
The CONT function takes the double skip return on success, the direct return if
there is no job logged in on the PTY, and the single skip return if the job
cannot be continued.
The DOFF and DON functions always take the direct return; DOFF sets the NOECHO
bit (bit 28--0,,200 bit) in the terminal I/O status word (thus turning OFF
echoing) and DON clears this bit (turning echoing back ON). See Section 3.1 for
the meaning of this bit.
The LOGIN function logs the PTY in under the PPN of the controlling job and
copies the controlling job's Disk PPN and privileges; the job number of the new
job is returned at ADR+1 and the skip return is taken if the job gets
successfully logged in. If there is already a job logged in on the PTY, that
job's number is returned in ADR+1 and the direct return is taken. (This is a
good way to find out the number of the job logged in on a PTY.) If there is no
job logged in on the PTY but there are no job slots available, zero is returned
in ADR+1 and the direct return is taken.
The IWAITS function lets you find out if the PTY is waiting for input. That is,
if the PTY has returned to monitor level and needs a monitor command typed to
it, or if the job running on the PTY is waiting for terminal input, then this
function skips. Otherwise, the direct return is taken.
The CLRBFI function clears the PTY's input buffer.
SECTION 4--DISPLAY OUTPUT
The availability of displays for output provides great flexibility and
convenience in many programs. This section explains several UUOs that allow the
user to determine what will appear on a display. These UUOs include: the PPIOTs
to select and position various PIECES OF PAPER on your screen; the PGIOTs and
UPGIOT to run display programs and to select from various PIECES OF GLASS on
IIIs; DDCHAN to acquire and manipulate extra Data Disc channels; VDSMAP to
select the sources for the picture on a Data Disc display; ADSMAP to select the
sound source to be connected to the speaker associated with a given Data Disc or
III display; and a few other related UUOs.
A job running on a PTY is allowed to use most of the UUOs in this section to
control the display of the job owning the PTY (perhaps through a chain of PTYs).
Thus, with the exception of the UUOs PPSPY, DDCHAN, ADSMAP, and BEEP, all UUOs
in this section are executed as if the job running on the PTY was really running
on its owner's display.
This section does NOT discuss how to write display programs for III, Data Disc,
and Datamedia displays. Programs for these displays are explained in Section
13.2 (III), Section 13.3 (Data Disc), and Section 13.4 (Datamedia). However,
since programs for these displays operate somewhat differently, I shall attempt
to explain how each type of display program works and how it interacts with the
system so that you can understand what the various UUOs are intended to do.
Some references are made to specific III, DD and DM instructions and commands;
these are all explained in the above-mentioned sections.
4.1 III Displays
The display on the III (Information International Inc.) terminals is generated
by a display processor which is running continuously, executing display
instructions from main memory. The code it executes is located in system free
storage. Any change to a single word of this code will cause the resultant
display to change. A user-written III display program can be run by using the
UPGIOT UUO. (The III instructions are explained in Section 13.2.) UPGIOT
takes as arguments the location and length of the display program to be run.
The system copies the display program out of the user's core image into free
storage, making transformations such as address relocation.
The system uses the first word in your program to interface with other display
programs; you MUST include an extra word at the beginning of each III display
program you write. To exit from the middle of your display program, insert a
HLT instruction. Otherwise, you should simply plan to fall through to the end
of your program. You need not have a HLT at the end.
Every job running on a III is permitted to have up to 20 independent display
programs. A III display program is called a PIECE OF GLASS, and each piece of
glass (hereafter abbreviated POG) has a number between 0 and 17 inclusive. RAID
uses POG 17; please note the obvious conflict if your program uses this POG too.
You may choose which of your pieces of glass are to be visible and which are to
be invisible. The display code for an invisible POG continues to reside in
system free storage but is simply not executed; you may reactivate it at any
time.
The only III instruction that is illegal in a user display program is the JMS
instruction. To get the effect of a JMS, use the JSR and/or SAVE instructions
(see Section 13.2).
The SEL instruction will not be allowed to select someone else's III unless you
have mapped your display output to that III using the DPYCLR UUO (see page 146)
or you have the UPG privilege. You may display on a III that is not in use.
4.2 Data Disc Displays
The display on Data Disc terminals is also generated by a display processor.
The Data Disc (DD) display processor works by storing complete TV pictures bit
by bit on a disk. The disk we have has =64 tracks; two tracks are needed to
hold a complete picture. Thus =32 complete TV images can be stored on the Data
Disc. Each combination of two tracks that makes up a whole picture is called a
DATA DISC CHANNEL. The Data Disc hardware reads the disk and puts out a TV
signal for each channel. Each TV signal can then be routed by the video switch
(controlled by software) to any combination of TV monitors (Data Disc displays).
Unlike the III processor, the DD processor executes each display program only
once. When the DD processor executes a program, the resultant picture changes
are recorded on the disk, and the displayed picture changes. The only way to
make a DD picture disappear is to explicitly erase it from the disk by means of
a DD program (from either the system or a user).
There is no such thing as a piece of glass on a DD display. Also, you should
NOT include an extra word at the beginning of a DD display program as you do for
III display programs; every word of a DD display program is executed as a
display instruction. (The DD instructions are explained in Section 13.3).
More words of warning:
The DD processor executes your display program directly from your core image.
After starting a DD display program, you shouldn't change anything in the
display program's core area until the display program has finished execution.
Your Data Disc display program should end with a HALT instruction (a zero word);
if it does not, the system will zero the last word of the program to make sure
it halts. If you use the last word for something else (for example, to contain
the CR and LF for the last line displayed), then you may not see what you
expected (in this case, the last line won't appear at all--a common problem with
new programs).
Finally, you may do a channel select only to your own main channel or to an
extra DD channel that you own or are permitted to write on. If you have no
channel select in the first 10 words of your DD program, the system will select
your main DD channel for you unless you are not on a Data Disc display, in which
case the system will not run the DD program but will type out ILLEGAL DD CHANNEL
without stopping your job. (On the DD display processor, only the first channel
select in a program will work; so any channel select beyond the first 10 words
will be ignored.) A select of channel 0 will get your main DD channel (if you
are on a DD display). Thus to select the real channel 0, you select channel 40.
You see, 40 is non-zero so you don't get your main channel, but only the low
order 5 bits of the channel number are used in the select (since there are only
=32 channels). You can always select channel 40+C and be assured of getting
channel C. However, if you select a channel that you are not allowed to write
on, the select is changed to your own main channel unless you are not on a Data
Disc display, in which case the system will not run the DD program but will type
out ILLEGAL DD CHANNEL without stopping your job. If you have the UPG
privilege, you can write on any DD channel. In all of these cases where the
system selects your own main DD channel for you, it does so by starting the DD
processor at a special two word block that contains a channel select in the
first word and a jump to your program in the second word.
4.3 Datamedia Displays
The display on a Datamedia (DM) terminal is generated by the system sending a
sequence of 7-bit characters to the DM. For each DM, the system maintains five
priority queues of pending text transfers for that DM. Here are the five DM
queues in order of priority.
(1) Line editor queue (top priority)
(2) Special queue ("holding" message, etc.)
(3) Page printer queue
(4) User display program queue
(5) Wholine queue
A higher priority transfer will interrupt any lower priority transfer (which
will resume when the higher priority transfer has finished). Whenever the
terminal is ready to accept a text character, a character is sent from the
highest priority non-empty queue. If the cursor is not already where the
particular transfer expects it, the system first sends a cursor positioning
command to get it there. The priority system ensures that, for example, text
typed into the line editor will be displayed immediately despite page printer,
user program, or wholine transfers already going.
User display programs are normally interpreted by the system and not necessarily
sent to the DM exactly as encountered. This interpretation allows the system to
provide certain automatic features such as erasing old text on lines where new
text is being output and conversion of certain Stanford special characters
(1:37) to their standard DM representation. It also enables the system to keep
track of the cursor position so that it can be restored after higher-priority
transfers have interrupted the user display program.
The user can alter the interpretation of his display program by use of the flags
in header word for the UPGIOT UUO (see page 136). By also using the FREEZE UUO
(see page 137), the user can completely disable interpretation of the display
program.
No extra word is necessary at either the beginning or end of a DM display
program.
For a complete description of the interpretation of a DM user display program,
see Section 13.4.
4.4 Page Printer Manipulation
The page printer is what handles the printing of output and echoed text on
display screens. Normally your entire screen is used as one text area by the
page printer. However, you may direct text output to 20 different logical parts
of the screen. These logical parts of the screen are called PIECES OF PAPER and
are numbered from 0 to 17 inclusive. Each may be placed anywhere on the screen
as a continguous group of whole lines. You select the piece of paper (hereafter
abbreviated PP) which is to be used currently; all terminal printing will go to
that PP until you select some other PP. Additionally, you can choose which PPs
will be visible on the screen and which will be invisible. Visible PPs are said
to be activated, invisible ones deactivated.
Initially, and after a RESET UUO (see page 249) or DPYCLR UUO (see page 146), PP
0 is selected and no other PPs exist. Other PPs are created automatically when
they are selected with the PPSEL UUO (see below).
PPIOT [OP=702]
--------------------------------------------------
PPIOT <function>,<argument>
PPIOT is an extended UUO that uses the AC field to determine which of several
page printer functions is to be executed. The individual functions are
described separately below.
PPSEL [OP=702, AC=0] PPIOT 0,
--------------------------------------------------
PPSEL <flag>+<piece of paper number>
The PPSEL UUO selects the piece of paper (PP) to which subsequent terminal
printing is to go. All text output and echoing will go to that PP until another
PP is selected. The PP's number, which should be between 0 and 17 inclusive,
should appear as the UUO's effective address except that the 400000 bit of the
effective address is used as a flag for the UUO. Unless the 400000 bit is on in
the effective address, this UUO will activate the PP being selected and
deactivate all others. If the 400000 bit is on in the effective address, (e.g.,
PPSEL 400002), then no change will be made in the activation condition of any
PP.
If a piece of paper is selected that does not exist, then that PP will be
created and given the default size (whole screen) and position (top of screen)
for the type of display you are on; see the DPYSIZ and DPYPOS UUOs below to
change the PP's size and position. A given PP (other than PP 0, which always
exists) will not exist if it has not been selected since the last time you
executed a RESET, a DPYCLR UUO, or a PPREL of that PP (see PPREL below).
PPACT [OP=702, AC=1] PPIOT 1,
--------------------------------------------------
PPACT <piece of paper activation map>
The PPACT UUO is used to display particular pieces of paper. The effective
address of the instruction is interpreted as a bit map indicating which pieces
of paper are to be displayed. A one in bit 18+N will cause PP number N to be
displayed. Thus bit 18 (400000 bit) of the effective address is for PP 0, bit
19 (200000 bit) for PP 1, etc. Any PPs deactivated will disappear (explicitly
erased on Data Discs and Datamedias); any PPs re-activated on a III will appear
but PPs re-activated on a Data Disc or Datamedia must be forced to be redrawn
(for instance, with the TTYSET UUO doing an ESCAPE P).
DPYPOS [OP=702, AC=2] PPIOT 2,
--------------------------------------------------
DPYPOS <Y-position>
The DPYPOS UUO causes the currently selected piece of paper to be positioned on
the screen so that its first line is located at the Y-position specified by the
effective address of this instruction, where +1000 is the top of the screen and
-1000 is the bottom (except on simulated DMs--see next paragraph).
The DPYPOS and LEYPOS UUOs, which take arguments specifying the screen position
of the page printer and line editor, respectively, normally take arguments from
-1000 (bottom of screen) to 1000 (top of screen), with other values being off
screen. On DMs, however, -1000 is at the =24th line but negative values with
magnitude greater than 1000, for instance -1200, may not represent off-screen
positions if the DM is a simulated DM with more than =24 lines. On the other
hand, positive values greater than 1000, for instance 1400, will always be
off-screen.
Also, note that currently only the low-order 9 bits of the position argument are
examined, with this 9-bit value being taken as a two's-complement number. Thus
the 2000 bit is the sign bit, and the possible range of values for the position
is from -2000 to 1777.
DPYSIZ [OP=702, AC=3] PPIOT 3,
--------------------------------------------------
DPYSIZ <G*1000 + L>
The DPYSIZ UUO sets two values for the currently selected piece of paper: the
number of glitches (G) and the number of lines per glitch (L). Both of these
numbers are set from the effective address of the instruction, G from bits 18:26
(0,,777000 bits) and L from bits 27:35 (0,,777 bits). The current default
values are: on IIIs, =12 glitches of 2 lines each; on Data Discs, 4 glitches of
=9 lines each; on Datamedias, 7 glitches of 3 lines each.
Now a word about glitches. When a piece of paper fills up, the text in it jumps
up to provide room for more text (thus moving some text off the top of the PP).
This jumping up is called a glitch. The number of lines it jumps is the number
of lines per glitch (L) as set by the last DPYSIZ for this PP or by the default
if no DPYSIZ has been given. The total number of lines in a PP is L*G.
PPREL [OP=702, AC=4] PPIOT 4,
--------------------------------------------------
PPREL <piece of paper number>
The PPREL UUO releases the piece of paper whose number is the effective address
of the UUO. Piece of paper zero cannot be released; PPREL 0 is a no-op. The
system storage associated with a PP being released is freed; you cannot possibly
get back the text that was on it. If you release the currently selected PP, a
PPSEL (see above) to piece of paper zero is done. On IIIs, released PPs will
disappear. To erase a piece of paper on a Data Disc or Datamedia, deactivate it
(with the PPACT UUO) while it still exists.
PPINFO [OP=702, AC=5] PPIOT 5,
--------------------------------------------------
PPINFO ADR
ADR: <block 24 words long for returned information>
The PPINFO UUO gives you a 24-word table of information about your page printer.
The effective address in the instruction should point to a 24-word block into
which the table is to be placed.
The information returned in the table is indicated below, where PP means piece
of paper and POG means piece of glass. To get the same information for some
other job, use the PPSPY UUO (see page 134).
WORDS VALUE
0 <POG activation bits>,,<PP activation bits>
These are in PGACT and PPACT formats. See these two UUOs.
1 <number of the currently selected PP>
2 Bit 0 (400000,,0 bit) is 1 if your terminal is a III display.
Bit 1 (200000,,0 bit) is 1 if your screen has been erased by an
escape command since you last gave this UUO.
Bit 2 (100000,,0 bit) is 1 if your Data Disc page color is green
on black.
Bit 3 (40000,,0 bit) is 1 if your terminal is a Datamedia
display.
Bit 4 (20000,,0 bit) is 1 if your terminal is a Data Disc
display.
Bit 17 (1,,0 bit) is 1 if your terminal is a Datamedia with a
FREEZE 1, UUO in effect (see page 137).
Bits 18:35 (the 0,,777777 bits) hold your line editor Y-position
in LEYPOS format. See the LEYPOS UUO below.
3:22 <Y-position>,,<G * 1000 + L>
There is one word here for each PP; in word 3 is the status for
PP 0, word 4 for PP 1, etc. The <Y-position> is in DPYPOS
format, G means number of glitches, and L means lines per glitch.
See the DPYPOS and DPYSIZ UUOs above.
23 Bit 0 (400000,,0 bit) is 1 if the size of the currently selected
PP was last set by keyboard command rather than by UUO.
Bit 1 (200000,,0 bit) is the same for the Y-position of the
current PP.
Bit 2 (100000,,0 bit) is the same for the line hold count.
Bit 3 (40000,,0 bit) is the same for the glitch hold count.
Bits 9:17 (777,,0 bits) have the actual line hold count.
Bits 18:26 (0,,777000 bits) have the actual glitch hold count.
Zero in either of these hold counts means that that hold count is
not being used.
Bits 27:35 (0,,777 bits) hold the character (including CONTROL
and/or META bits) that activated the last line re-edited with a
CONTROL-CR or with a PTLOAD or PTL7W9 UUO (see page 116).
LEYPOS [OP=702, AC=6] PPIOT 6,
--------------------------------------------------
LEYPOS <Y-position for line editor>
The LEYPOS UUO sets the Y-position of your line editor to that specified by the
effective address of the instruction, which is interpreted in DPYPOS format
(+1000 is top of screen, -1000 is bottom--except on simulated DMs--see the
DPYPOS UUO on page 127). A Y-position of zero does NOT mean to position the
line editor at the middle of the screen, but instead means to return the line
editor to its normal location at the bottom of the currently selected piece of
paper. This UUO always sets your line editor's X-position to the left margin of
the display screen unless you are normalizing the line editor's Y-position by
specifying a Y-position of zero.
PPHLD [OP=702, AC=7] PPIOT 7,
--------------------------------------------------
PPHLD <LHC*1000 + GHC>
The PPHLD UUO sets the line hold count (LHC) and the glitch hold count (GHC) for
your page printer. These two numbers indicate how many lines or glitches the
system should allow to be printed before automatically holding the typeout for
your display. Both the LHC and the GHC are set from the effective address of
the UUO, LHC from bits 18:26 (the 0,,777000 bits) and GHC from bits 27:35 (the
0,,777 bits). If the high order bit of either of these fields is on, the
corresponding hold count is NOT CHANGED. A zero in either field disables that
particular type of automatic holding.
CURSOR [OP=702, AC=10] PPIOT 10,
--------------------------------------------------
CURSOR [<X-position>,,<Y-position>]
The CURSOR UUO specifies the place to leave the DM cursor when output isn't
going on and the line editor cursor is at the beginning of the line. A position
word of 0,,0 represents the upper-left corner. A negative X-position causes the
cursor to be returned to its normal line editor position. If the X-position or
Y-position is off-screen (greater than or equal to the screen's X or Y size),
then no cursor will be displayed when the line editor cursor is at the beginning
of the line.
The effect of the CURSOR UUO is undone by RESET, DPYCLR, ESCAPE N and BREAK N.
PPSPY [OP=047, ADR=400107] CALLI 400107
--------------------------------------------------
MOVE AC,[<job number or -terminal number>,,ADR]
PPSPY AC,
<error return>
ADR: <24-word block for returned information>
The PPSPY UUO returns a 24-word block of information about the page printer of a
specific job or display. The information returned is exactly the same as that
returned by the PPINFO UUO (see page 130). The right half of AC should contain
the address of the 24-word block where you want the information returned. The
left half of AC should contain either the number of the job or the negative of
the number of the display for which you want the page printer information. If
this UUO is successful, the skip return is taken. If there is no job with the
job number given or no display with the negative terminal number given, then the
direct (error) return is taken.
4.5 Running Display Programs
This section describes the UUOs that allow the user to run display programs on
III, Data Disc, and Datamedia displays.
UPGIOT [OP=703]
--------------------------------------------------
UPGIOT <piece of glass number>,ADR
ADR: <flags>,,<address of display program>
<length of display program in words>
<transfer-in-progress flag, if bit 0 in ADR is on>
<address of low order line command, if bit 1 in ADR is on>
The UPGIOT UUO (also known as DPYOUT) causes a display program to be run. If
you are on a display, the program is assumed to be in the form for your
particular type of display (III, DD, or DM). If you are on a pseudo-teletype
(PTY) which is owned either directly or indirectly (that is, through a chain of
PTYs) by a job running on a display, then the program is run on the first
display up the chain from the PTY and is assumed to be in the appropriate form.
Note that each type of display requires a different format of display program.
If the display program is to be run on a III, the AC field of the instruction
indicates which piece of glass the program is to be run as. This piece of glass
will be automatically selected as if a PGSEL (see page 139) had been executed
for it.
If the display program is run for a Data Disc or Datamedia, the AC field is
ignored.
The address field of this UUO points to a data block, of which the first word
contains the address of the display program that is to be run and the second
word contains the program's length in words. A length of zero will flush any
III display program running on this piece of glass but will wait for any
previous Data Disc or Datamedia display program still running to finish (unless
the CHASTE bit is on for a DM--see the CHASTE bit below).
For Data Disc and Datamedia programs, there are some optional flags and
parameters you may specify. The flags are in the left half of the word at ADR
and are explained below. Certain flags specify that another data word or two
are used at ADR+2 and ADR+3.
For descriptions of the mechanisms of display programs on the different types of
displays, see Section 4.1 (III), Section 4.2 (DD), and Section 4.3 (DM). For
explanations of the particular effects of display programs, see Section 13.2
(III), Section 13.3 (DD), and Section 13.4 (DM).
RESET and EXIT UUOs will flush any pending display program on a DM.
Flag bits in the left half of the word at ADR are interpreted as follows:
BITS OCTAL NAME MEANINGS OF FLAGS IN UPGIOT HEADER WORD
0 400000,,0 (DD,DM) Overlapped mode. The UUO will return
immediately without waiting for the display
program to finish. However, it will wait for
any previous display programs to finish
before returning (unless the CHASTE bit is on
for a DM--see below). While the program is
running, the transfer-in-progress flag (at
ADR+2) will be non-zero. When the program
finishes, this flag will be cleared. On a
DD, you should not change any part of the
display program until it has finished, since
it is executed out of your core image. On a
DM, if the user program does a RESET or EXIT
before the display program has finished, the
remainder of the display program will be
suppressed and the transfer-in-progress flag
may not be cleared.
1 200000,,0 (DD) Double field mode. This is useful for
writing text on a Data Disc channel.
Normally you have to send text to the DD
processor twice, once for each of the two
tracks that make up the DD channel. In these
two passes, you would indicate two line
addresses that are the same except in the low
order bit position. In double field mode,
the system sends the program to the DD
processor twice, once with the low order bit
of the line address select set to zero and
once with it set to one. The original value
of this bit when you give the UUO is
irrelevant and its final value is
unspecified. The low order line address
select must occur as the third command in the
word pointed to by ADR+3. This feature will
not work properly if you have more than one
line address select in your DD program.
2 100000,,0 DMQUOT (DM) Quote all characters in the display
program, except 0's and 177's. That is,
control characters will never be converted to
blinking/bold characters to represent
characters 1:37 in the Stanford character
set. No conversion of Stanford to ascii will
be done for the three characters that are
different in the two character sets. No
automatic erasing of new lines will be done.
Tabs will never be converted to spaces on
output, nor spaces to tabs. Nulls (000s) are
still ignored and 177s still cause the next
character to be interpreted specially.
3 40000,,0 TRUNCA (DM) Truncate each output line to 80
characters. When the 80th column of a line
is passed on the DM display, following bytes
will be ignored until a CR, LF, or quoted (by
177 or DMQUOT) FF appears.
4 20000,,0 NOEEOL (DM) Suppress the erasing of each line that
normally occurs just before anything
(including a CR or LF) is output on the line.
5 10000,,0 NOEEOB (DM) Suppress the erasing of any line on
which nothing is output but CR or LF.
6 4000,,0 BETWEE (DM) Ignore spaces between tabs. When a tab
is encountered in the program, all following
spaces and nulls are ignored until or a
character other than a space or null is seen.
If the terminating character is a tab, then
it also is ignored.
7 2000,,0 USERGO (DM) Don't let any other DM output occur
while this program is running. Normally,
higher-priority DM outputs (e.g., line editor
and page printer output) can interrupt a user
program. Also, if the output from the
program falls off the bottom of the screen,
it will wrap around to the top if and only if
this bit is set; otherwise text occurring
after falling off the bottom will be ignored
until a command to position the cursor back
on the screen is seen.
8 1000,,0 CHASTE (DM) Don't wait for any previous DM display
program to finish. Instead, suppress the
remainder of such a previous display program.
9 400,,0 PROTLE (DM) Don't allow the display program to
overwrite the display of the line editor
while the line editor has been positioned by
an LEYPOS UUO.
FREEZE [OP=047, ADR=400012] CALLI 400012
--------------------------------------------------
FREEZE <code>,
Code values:
0 unfreeze all frozen output
1 freeze all output except user display programs
The FREEZE UUO allows user programs to determine exactly what characters are
transmitted to a Datamedia (DM). This UUO uses the AC field as an immediate
argument code. If the AC field is 1 (FREEZE 1,), then non-UPGIOT output is
frozen and will not take place. If the AC field is 0 (FREEZE 0,), then
non-UPGIOT output is unfrozen and can continue. Other values in the AC field
are reserved for future use. Any time the state of frozenness is changed, all
queued output is flushed instantly. While the DM is in the frozen state,
transfers queued by UPGIOT will still be allowed to go through, but if the
DMQUOT bit is on for such a UPGIOT transfer, the display program text will be
sent EXACTLY as given to the system, with no padding characters ever inserted
and no interpretation of such things as control characters, long line
wraparound, etc. If the DMQUOT bit is off for a frozen UPGIOT transfer, normal
text interpretation occurs. RESET, DPYCLR, and ESCAPE C all restore the DM to
the unfrozen state. FREEZE is a no-op if the terminal is not a DM.
PGIOT [OP=715]
--------------------------------------------------
PGIOT <function>,<argument>
The PGIOT UUO is an extended UUO that uses the AC field to determine which of
several display functions is to be executed. The individual functions are
described separately below. Of these, the PGSEL, PGACT, and PGCLR UUOs are
meaningful only for IIIs and are no-ops when given on Data Discs or Datamedias.
PGSEL [OP=715, AC=0] PGIOT 0,
--------------------------------------------------
PGSEL <piece of glass number>
The PGSEL UUO (IIIs only) causes the piece of glass whose number is the
effective address of the UUO to be selected. This means that the UPGMVM and
UPGMVE UUOs (see page 144) will refer to this piece of glass until the next
PGSEL or UPGIOT UUO is given.
PGACT [OP=715, AC=1] PGIOT 1,
--------------------------------------------------
PGACT <piece of glass activation map>
The PGACT UUO (IIIs only) is used to select which pieces of glass are to be
displayed. The effective address of this UUO is interpreted as a bit map; a one
in bit 18+P will cause piece of glass number P to be displayed, and a zero will
cause that piece of glass to be invisible.
PGCLR [OP=715, AC=2] PGIOT 2,
--------------------------------------------------
PGCLR
The PGCLR UUO (IIIs only) causes all of your pieces of glass to be cleared.
This means that the system free storage that was allocated for these POGs is
freed and whatever was displayed by them disappears never to be seen again.
This UUO does not affect your page printer at all.
DDUPG [OP=715, AC=3] PGIOT 3,
--------------------------------------------------
DDUPG ADR
ADR: <flags>,,<address of display program>
<length of display program in words>
<transfer-in-progress flag, if bit 0 in ADR is on>
<address of low order line command, if bit 1 in ADR is on>
The DDUPG UUO causes a user's Data Disc display program to be run. This UUO
works just like UPGIOT except that the program is always run on the Data Disc
display processor. See the UPGIOT UUO on page 136 for an explanation of the
various options.
This UUO is especially useful if you are not on a Data Disc and want to run a
Data Disc display program (for example, on a Data Disc channel you have acquired
using the DDCHAN UUO--see page 150).
PGINFO [OP=715, AC=4] PGIOT 4,
--------------------------------------------------
PGINFO ADR
ADR: <block 21 words long for returned information>
The PGINFO UUO returns a 21-word table of information about your pieces of
glass. The effective address of the instruction should specify the location of
a 21-word block where the table is to be stored. The information returned in
the table is indicated below. If you are on a Data Disc or Datamedia, only the
first word of the table is relevant; the remainder are returned as zero.
WORDS VALUE
0 <POG activation bits>,,<PP activation bits>
These are in PGACT and PPACT formats respectively; see these two
UUOs.
1:20 <word count>,,<starting address given in UPGIOT UUO>
There is one word here for each piece of glass.
UPGMVM [OP=714]
--------------------------------------------------
UPGMVM AC,ADR
The UPGMVM UUO is used to update a III display program. The III display program
affected by this UUO is the one running on currently selected piece of glass,
which is the piece of glass indicated in the last UPGIOT or PGSEL UUO exectuted.
UPGMVM is used to update the display program of that piece of glass by replacing
the word that would have been at ADR in that program with the word in the
specified AC. In other words, you could update your display program by doing a
MOVEM AC,ADR and then another UPGIOT, or you can give this UUO with the same AC
and ADR specified. This causes a change to one word of your display program,
which is already running (unless deactivated by a PGACT UUO). The address ADR
must be within the bounds of the core area that contained the display program
when you created this piece of glass with the UPGIOT UUO.
UPGMVE [OP=713]
--------------------------------------------------
UPGMVE AC,ADR
The UPGMVE UUO is the MOVE analog of the UPGMVM UUO described above. This UUO
picks up a word from the currently selected display program and returns it in
the specified AC.
DPYCLR [OP=701]
--------------------------------------------------
DPYCLR <flag>,ADR
ADR: <job name or number, if <flag> is non-zero>
The DPYCLR UUO resets your display to its initial state if the AC field of the
UUO (<flag> above) is zero. This means that your page printer is normalized by
releasing and deactivating all pieces of paper except number zero, which is
selected and activated with its position and size normalized. The position of
your line editor is reset to normal, and any III display programs running are
killed. Any Datamedia display program still running is flushed.
On a III, all pieces of glass and all pieces of paper but PP 0 will disappear.
On a Data Disc or Datamedia, however, nothing is erased except that which is
overwritten by any newly redrawn page printer. To erase pieces of paper on a
Data Disc or Datamedia, deactivate them while they still exist (this UUO
releases all but PP 0). The RESET UUO (see page 249) also normalizes your
display like DPYCLR.
If you do a "DPYCLR 0," after having done a DPYCLR with a non-zero AC field (see
next paragraph), then your display's state is reset and the mapping effect for
display output is undone.
If the AC field (<flag> above) of this UUO is non-zero, then the address field
of the UUO should point to a word containing either the name or number of a job
running on a display. In this case, all subsequent display output done by your
job will be displayed on the specified job's terminal just as if he himself had
done the display output UUOs. To undo this effect, execute a DPYCLR 0, or a
RESET UUO, both of which will also reset your display's state as described
above.
4.6 File-Status Display on the Wholine
SHOWIT [OP=047, ADR=400011] CALLI 400011
--------------------------------------------------
MOVEI AC,<flags + I/O channel number>
SHOWIT AC,
The SHOWIT UUO causes your job's wholine to include a display of the status of a
disk (DSK or UDP) file on the right half of the 3rd line of the screen (the left
half of the 3rd line is never touched by the wholine). SHOWIT can also be used
to turn off the file-status display. The form of the file-status display is
FILENM EXT PRJPRG LENGTH USETP MODES
where the first three of these give the file's name, extension and PPN; LENGTH
is the file's length in (octal) records; USETP is the current (octal) value of
the USET pointer for the file; and in the MODES, U means the file is on a UDP, R
means the file is being Read, RA means the file is open in Read-Alter mode, W
means the file is being Written, and E means the End of file has been reached.
Upon call, AC should contain the I/O channel number whose disk file status is to
be displayed (unless you are turning off the display) plus any of the flags in
the following table.
BITS OCTAL MEANING OF FLAG IN SHOWIT UUO
18 0,,400000 Suppress the erasure of the file-status display that
normally happens when the I/O channel being displayed
is released or when the file-status display is turned
off. This is useful if your program normally displays
something else on that line which you don't want the
system to erase. This bit is irrelevant if the display
is a III.
19 0,,200000 Don't display any file status on the wholine. This
turns off any previous file-status display (whether
turned on by UUO or by keyboard command).
4.7 Extra Data Disc Channels
The DDCHAN UUO is provided to allow users to acquire extra Data Disc channels
for use in displaying text and graphics.
DDCHAN [OP=047, ADR=400067] CALLI 400067
--------------------------------------------------
MOVE AC,[<channel request>]
DDCHAN AC,
<error return - for get channel and set status only>
The DDCHAN UUO is used to get and release DD channels and to get and set the
status of DD channels. This UUO should be given with a channel request in the
specified AC; this request is interpreted as follows.
BITS OCTAL MEANINGS OF BITS IN A DATA DISC CHANNEL REQUEST
28:29 0,,300 Operation.
0 = release channel 2 = get status
1 = get channel 3 = set status
A GET CHANNEL will fail if the requested channel is
unavailable. A SET STATUS will fail if the channel
doesn't belong to you. These two commands skip on
success; otherwise, the direct return is taken.
30:35 0,,77 Channel number. Values 0 through 37 specify a
particular DD channel. In a GET CHANNEL request, the
value 77 specifies ANY CHANNEL. In a GET STATUS or SET
STATUS, 77 means your main channel. In a RELEASE
CHANNEL, 77 releases all channels assigned to the job.
Other values for the channel number are undefined.
0 400000,,0 Privacy flag. A one in this bit means no one else can
look at this channel.
1 200000,,0 Write permission. A one in this bit means that other
jobs may write on this channel.
After execution of this UUO (except for a RELEASE ALL CHANNELS or a GET ANY
CHANNEL failure), the AC contains the channel number in the right half, the
privacy and write permission status in bits 0 and 1, plus the CHANNEL USE in
bits 10:17 (377,,0 bits). A value of zero in this use field means the channel
is free; 1 through 77 mean that it is an extra channel belonging to that job
number; 100 through 177 mean that it is the main channel for the terminal line
whose number is 52 less than this number; 200 means the channel is being used by
the system to advertise available consoles (or to display other system
messages); 201 means the channel is detached from the system (probably because
it is a lousy channel, e.g., streaks a lot); 202 through 377 are reserved for
future use.
The RESET UUO (see page 249) releases all of your extra DD channels.
EXAMPLE: To request a private channel that only your job can write on.
MOVE AC,[400000,,177]
DDCHAN AC,
JRST LOSE
WIN: ...
If you get to WIN, the channel number will be in the right half of AC and the
left half will have the sign bit on with your job number in bits 10:17.
4.8 The Video Switch
The Video Switch determines which pictures appear on which TV monitors (Data
Disc displays). Available to these displays are =32 Data Disc (DD) channels
(numbered 0 to 37 octal), a null channel (numbered 40), and 7 television
channels, (numbered 41 to 47).
Each TV monitor is controlled by a 36-bit map that specifies which channels are
connected to that monitor. This map is explained below.
BITS OCTAL MEANINGS OF BITS IN A DATA DISC DISPLAY CHANNEL MAP
0:31 777777,,777760DD channels. A one in bit N means that DD channel N is
connected to this monitor.
33:35 0,,7 Low order 3 bits of TV channel number, as indicated
below. The following (0 to 7) represent the TV
channels 40:47.
0 Null channel. 4 Cart receiver.
1 (variable) 5 Lounge TV.
2 Sierra camera. 6 Conference room TV.
3 HPM TV. 7 Video synthesizer.
32 0,,10 Asynchronous flag. A zero in this bit causes DD sync
to be inserted; a one blocks DD sync and all DD
channels. Whenever bits 33:35 specify an asynchronous
source, the system automatically sets this bit to one.
TV channels 41 through 46 are all asynchronous and
cannot be viewed along with DD channels.
EXAMPLE: A map containing "200000,,7" selects DD channel 1 and TV channel 47.
The following UUO permits user programs to set the maps for particular TV
monitors.
VDSMAP [OP=047, ADR=400070] CALLI 400070
--------------------------------------------------
MOVE AC,[<video switch request>,,ADR]
VDSMAP AC,
<error return for operations 1:4,6>
ADR: <Data Disc display channel map>
The VDSMAP UUO is used to change and/or retrieve one of the channel maps for a
Data Disc display line. AC left specifies, in the form of a video switch
request, the type of operation to be carried out by this UUO; the fields of a
video switch request are explained in the table below. All the operations
except GET MAP and GET LINE TIED TO take the skip return on complete success and
the direct return otherwise; GET MAP (operation 0) and GET LINE TIED TO
(operation 5) always takes the direct return. For operations 1, 2 and 3 (SET
MAP, ADD CHANNELS and DELETE CHANNELS), AC right should point to the channel map
to be used in the operation; channel maps are described above. For operations
0, 1, 2, 3, 4, and 6, a channel map is returned in AC; the particular map
returned depends on the video switch request given, as explained below. If you
specify a terminal line that is not a Data Disc display line, -1 is returned in
AC.
For each Data Disc display line, the system keeps two channel maps, which are
called the PERMANENT MAP and the TEMPORARY MAP; and for each actual TV monitor
the system keeps an additional map called the UNTIED MAP. Normally, each TV
monitor is tied to some display line and sees that line's temporary map (unless
the line is not in use, in which case the TV monitor sees the line's permanent
map); when a TV monitor is tied to a display line, it is affected by any channel
mapping done by the program running on that line. However, the TV monitor can
be untied from the display line (for example, by the keyboard command
ESCAPE n S), in which case its untied map is displayed. Any number of TV
monitors can be tied to a given Data Disc display line and any changes to that
display line's permanent or temporary map will be seen on all TV monitors tied
there. However, the untied map for a given TV monitor is displayed only on that
actual TV monitor, and then only if the TV monitor is not tied to any display
line.
BITS OCTAL MEANINGS OF BITS IN A VIDEO SWITCH REQUEST
11:17 177,,0 Number of the Data Disc display line whose map is to be
changed or retrieved, where zero means your own line.
Other lines associated with TV monitors (26 through
117) may have their maps changed (operations 1:4) only
if they have no job logged in (or if you are
privileged).
9 400,,0 Shadow line map. If this bit is on, then the UUO will
refer to one of the six unused TV lines rather than to
a normal Data Disc line. The number in bits 11:17
should be in the range 0:5 and specifies which one of
these six lines is to be mapped or examined.
0 400000,,0 Temporary/permanent flag. For a SET MAP operation, an
ADD CHANNELS operation, or a DELETE CHANNELS operation
(operation 1, 2 or 3), the operation will affect only
the temporary map if this bit is 0 and both the
permanent and temporary maps if this bit is 1. For
operations 0, 1, 2, 3 and 4 (with bit 1 off--see
below), the map returned in the AC will be the
temporary map if this bit is 0 and the permanent map if
this bit is 1. For a RESET MAP operation (operation
4), this bit determines which kind of reset is done;
see the reset map operation below. Operation 5 (GET
LINE TIED TO) ignores this bit. An attempt to change
just the temporary map (this bit off) of a shadow line
or of a line not in use will be a no-op, taking the
skip (success) return; such lines have no temporary
map.
1 200000,,0 Affect untied map. This bit being on causes operations
0, 1, 2 and 3 to affect a TV monitor's untied map
instead of a line's temporary and permanent maps.
Operations 4 and 5 (RESET MAP and GET LINE TIED TO)
ignore this bit. This bit is also ignored if you are
mapping a shadow line (bit 9 on--see above). When this
bit is on for operation 0, 1, 2 or 3, the map returned
in AC will be that which is actually being displayed on
the TV monitor specifed: untied map if untied,
permanent map if not in use, else temporary map. The
channel mapping operations (1, 2 and 3) with this bit
on are privileged (requiring the UPG privilege); these
operations will untie the TV monitor if it is tied to
some line (copying the temporary map into the untied
map before carrying out the operation), and if bit 0 if
off (temporary mode) a flag will be set so that the
next RESET MAP (operation 4) will tie the TV monitor
back to the display line to which it is
keyboard-mapped.
6:8 7000,,0 Operation.
0 = GET MAP. The temporary, permanent, or untied
channel map (as determined by bits 0 and 1--see
above) of the indicated line is returned in the
AC, and the direct return (no skip) is always
taken.
1 = SET MAP. The indicated maps (temporary, temporary
and permanent, or untied, according to bits 0 and
1 above) are set from the word at ADR. This
operation skips if it is entirely successful.
2 = ADD CHANNELS. Bits 0:31 of the map at ADR are
ORed into the indicated maps. If bits 33:35 of
the map at ADR are not all zero, they replace the
corresponding bits in the indicated maps. The
resultant map is set into the temporary, permanent
or untied maps according to bits 0 and 1 above.
This operation skips on complete success.
3 = DELETE CHANNELS. The complements of bits 0:31 of
the map at ADR are ANDed with the current map. If
bits 33:35 of the map at ADR are not all zero,
this field is cleared to zero (which selects the
null TV channel) in the resultant map. The
resultant map is set into the temporary, permanent
or untied maps according to bits 0 and 1 above.
This operation can fail only on a busy line
number. It skips on success.
4 = RESET MAP. If bit 0 (temporary/permanent flag) is
off, the temporary map is reset to the permanent
one. If bit 0 is on, the permanent and temporary
maps are both reset to the line's main channel
alone. This operation can fail only on a busy
line number. It skips on success. The RESET UUO
also resets the temporary map to the permanent
map.
5 = GET LINE TIED TO. This function simply returns in
AC a word indicating the tied/untied status of the
TV monitor indicated in bits 9, 11:17. The
returned word will be: 0 if the TV monitor is
untied; 400000,,0 if the TV monitor is untied but
a RESET MAP will tie it back to the display line
to which it is keyboard-mapped; or the line number
the TV monitor is tied to if not untied. This
operation ignores bits 0 and 1 and will return a 0
if bit 9 (shadow line) is on.
6 = SET LINE TIED TO. Bits 0, 1, and 9 of the AC
argument are ignored. Bits 11:17 must specify a
physical Data Disc terminal number (not a shadow
line). The right half of the AC, instead of a
pointer to a channel map, should contain as an
immediate operand the number of a Data Disc line
to which the specified physical screen should be
tied. If AC right is zero, the screen is tied to
the line to which its keyboard is mapped. This
operation requires the UPG privilege and skips on
success. It returns in AC the map word which the
given physical screen sees after the UUO, i.e.,
the map for the line specified in AC right if
successful.
7 = Undefined.
An attempt to map someone else's private channel to another's display will fail,
even if you are privileged. However, each channel being mapped is considered
separately, and a mapping operation may successfully map some channels while
failing on others. If the mapping operation fails on at least one channel, then
the UUO will take the error return. Also, unless you are privileged, you cannot
change the map of someone else's display; nevertheless, a job running on a PTY
can change the map of the display of the job owning the PTY (possibly through a
chain of PTYs).
EXAMPLE: To temporarily display Data Disc channel 21 and TV channel 47 on your
line.
MOVE AC,[1000,,[1,,7]]
VDSMAP AC,
JRST LOSE
WIN: ...
EXAMPLE: To get the temporary map of terminal line 26.
MOVSI AC,26
VDSMAP AC,
...
The map would be returned in AC.
4.9 The Audio Switch
Associated with each Data Disc and III display is an audio speaker which can be
connected to any one of several sound sources. The ADSMAP UUO (see below) is
used to choose the sound source to be heard over the speaker at a program's
attached terminal.
Each sound source that can be connected to a display's speaker is assigned an
audio channel number. The current assignments of channels to sources is as
follows:
CHANNEL SOUND SOURCE
0 Laboratory personnel paging system.
1 (unconnected)
2 PMF tuner.
3 DAC channel A.
4 FRM dac.
5 A continuous beeping--used by the BEEP UUO.
6 AM tuner. (KJAZ)
7 (unconnected)
10 ME tuner.
11 PMF tuner.
12 SGK tuner.
13 TV audio. (TV43)
14 TV audio. (TV44)
15 TV audio. (TV45)
16 TV audio. (TV46)
17 TED tuner. (KSAN)
To connect a speaker to a sound source, the user specifies the source's channel
number. A speaker cannot be connected to more than one source.
Each display has both a PERMANENT audio switch connection and a TEMPORARY
connection. When a temporary connection is made, its duration (possibly
infinite) must be specified; when the duration runs out, the permanent
connection is reselected automatically. A RESET (see page 249) will also
reselect the permanent connection.
The system allows a user to send a beep to a display terminal in order to
attract the attention of that display's user. Since a beep may interrupt
something a user is listening to, the user is permitted to inhibit beeping on
his display's speaker. Furthermore, the personnel paging system of the
laboratory uses the audio switch to make paging announcements over users'
speakers, and these pages may also interrupt a user's selected sound source.
The following system lets each user decide what can interrupt his audio switch
connections.
Four possible dispositions are allowed for handling audio interruptions; for
each connection, one of these is selected for paging interruptions and one for
beep interruptions:
INTERRUPT
DON'T INTERRUPT
INTERRUPT WITH EXTENDED DURATION
DELAY BEEP
INTERRUPT means that if an interruption comes along, the connection will be
momentarily changed until the beep or page ends.
DON'T INTERRUPT means ignore all interruptions; no change will be made even
momentarily to the audio switch connection.
INTERRUPT WITH EXTENDED DURATION means allow interruptions to take place but
extend the duration of the connection. This is meaningful only for temporary
connections.
DELAY BEEP means postpone any beep interruption until the expiration of the
connection. This again applies only to temporary connections, and further is
not a defined disposition for paging interruptions.
ADSMAP [OP=047, ADR=400110] CALLI 400110
--------------------------------------------------
MOVE AC,[<audio switch connection>]
ADSMAP AC,
The ADSMAP UUO is used to connect a specific sound source to the speaker of a
Data Disc or III display or to find out the status of such a speaker's audio
switch connection.
This UUO actually examines or sets the audio switch setting for the (physical)
terminal responsible for the job's attached (logical) TTY line; the responsible
terminal is the physical terminal that was the last to type a character (while
mapped) to the logical TTY line. If the responsible terminal is not a Data Disc
or III display, then this UUO is a no-op.
If AC contains -1, the audio switch connection is reset to the current permanent
connection. Otherwise, the value in AC specifies either the temporary or
permanent connection and indicates whether that connection is to be changed or
its status is merely to be returned. If a temporary connection is to be made,
the duration of the new temporary connection must be given in the right half of
the AC; this duration is in units of 1/4 second. The various fields of AC are
interpreted as indicated in the table below.
BITS OCTAL MEANINGS OF AUDIO SWITCH CONNECTION FIELDS
0 400000,,0 Temporary/permanent flag. A 0 in this bit specifies
the permanent audio switch connection; a 1 means the
temporary connection.
1 200000,,0 Set/get flag. If this bit is 0, the connection
indicated by bit 0 will not be changed; the connection
status will simply be returned in AC (with bit 0
unchanged, bits 1:4 zero, bits 5:17 containing the data
indicated below, and bits 18:35 containing the time
remaining in any temporary connection's duration, or 0
for infinite, even if getting permanent connection
status). A 1 in this bit means the connection is to be
changed.
2:3 140000,,0 Action taken if there is a current temporary connection
(applies only if setting new connection):
0 Wait for any existing finite temporary connection to
expire. An infinite temporary connection in
progress will be flushed.
1 If making a temporary connection and there is
already a finite temporary connection, don't change
the connection; if there is an infinite temporary
connection, it is flushed and the new connection is
made. If making a permanent connection, same as 2
below.
2 Make this connection now regardless of former
status. Any current temporary connection is flushed
immediately.
3 Same as 2.
4 20000,,0 Return-immediately flag. If this bit is 0 and a finite
temporary connection is to be made, the UUO will not
return until the new connection expires. A 1 in this
bit makes the UUO return immediately, possibly after
waiting for an old temporary connection to expire--see
bits 2:3 above.
5:6 14000,,0 Paging disposition (bit 5 is ignored for a permanent
connection):
0 Interrupt.
1 Don't interrupt.
2 Interrupt and extend duration (only for temporary
connection).
3 Same as 1.
7:8 3000,,0 Beep disposition (bit 7 is ignored for a permanent
connection):
0 Interrupt.
1 Don't interrupt.
2 Interrupt and extend duration (only for temporary
connection).
3 Delay beep (only for temporary connection).
14:17 17,,0 Audio switch channel.
18:35 0,,777777 Duration in 1/4 second units, or 0 for infinite
(temporary connections only).
9:13 760,,0 The original contents of this field are ignored, but if
bit 1 is 0 (getting status), these bits are used to
return the following status information:
9 400,,0 Temporary connection active. This bit will be a 1 if
you have a current temporary connection. This bit is
returned whether you are getting the status of a
temporary connection or of a permanent connection. If
you are getting the temporary connection status and
this bit is returned as 0 (no temporary connection),
then only bits 9:12 (740,,0 bits) will return
significant data.
10 200,,0 Page in progress. This bit will be 1 whenever a paging
announcement is being made, whether or not your display
is allowing page interruptions.
11 100,,0 Paging interruption in progress. This bit will be 1
whenever a paging announcement is in progress and you
are enabled for page interruptions.
12 40,,0 Beep interruption in progress. This bit will be 1
whenever a beep is happening on your display.
13 20,,0 Delayed beep pending. This bit will be 1 if you have
selected the delayed beep disposition and there is a
beep interruption waiting for the expiration of your
temporary connection.
SECTION 5--UPPER SEGMENTS
Programs may be split into two discontiguous parts. The first part goes from
user address zero to an address whose low order 10 bits are always 1777 and
which is contained in the word at JOBREL in the job data area (see Appendix 2).
The second part, if it exists, starts at user address 400000 and goes up to
another address ending in 1777, which address is kept in the right half of
JOBHRL in the job data area. This second part of a program, when it exists, is
called the UPPER SEGMENT, SECOND SEGMENT or HIGH SEGMENT of that job. The first
part is usually called the LOWER SEGMENT and is the controlling job. An upper
segment cannot execute code except when attached to a lower segment.
An upper segment can be shared by several jobs; this saves core by eliminating
all but one copy of the same piece of code. However, it uses up an extra job
slot because each upper segment is given a separate job number.
Another use of upper segments involves having several of them which are attached
by a lower segment one at a time and detached when the next one is needed. For
a job to be run, it must be entirely in core, including its attached upper
segment, if any.
Upper Segment Protection
Since upper segments are sometimes shared, they can be write protected to
prevent any job from changing the code and/or data in a segment, which, after
all, may be part of another job. Write protection is just an option, however,
and shared segments are not required to be protected. The SETUWP UUO is used to
change an upper segment's write protection status. The sign bit of JOBHRL will
be on when your upper segment is write protected.
In addition to the write protection capability, upper segments have a protection
scheme similar to that used on the disk. Each upper segment has a nine bit
protection key which indicates who may use that segment and how they may use it.
The nine bits (777 bits) are in three groups of three bits each. The first
group (700 bits) tells what the creator PPN may do with the segment, the second
group (070 bits) tells what other logged-in users may do, and the third group
(007 bits) tells what not-logged-in users may do. The LUP privilege (see page
190) determines whether the second of third group is checked when a reference is
made to a segment created by some other PPN. Within each group, the first bit
(444 bits) is unused, the second bit (222 bits) is read protection and the third
bit (111 bits) is status change protection. Read protection prevents you from
attaching to the segment; status change protection prevents you from changing
the name, write protection status, core size, or protection of the segment.
5.1 Making and Killing Segments
There are three ways you can become attached to an upper segment. You can run
an SSAVEd program (i.e., one that was saved with its upper segment), in which
case you will get the segment that was attached to the program when it was saved
(or, if someone is already using a segment with the credentials of the saved
segment (see next paragraph), you will be attached to a matching segment); or
you can attach to an already existing upper segment; or you can create a new
upper segment.
Every job, including upper segments, has a list of credentials. These include
the job name, the project-programmer name of the source dump file of the current
program, the physical and logical names of the device the dump file was on, the
creation date of the dump file and the protection. The protection for a lower
segment will always be 000 unless it has been changed by the SETCRD UUO (see
page 189), which can also be used to set the protection and creation date for an
upper segment. When you cause a new upper segment to be created, its
credentials are copied from your job. For a given job, all of the credentials
except the protection are set from their values for the dump file which holds
the current program. If the dump file was SSAVEd, then the upper segment will
be initialized to the same protection it had when it was saved. The lower
segment is set up with protection 000.
Let me explain this a bit further with some examples. If you run a system
program, your job name will be the file name of the dump file on [1,3], your job
PPN (not to be confused with your logged-in PPN) will be 1,3, your job physical
device name will be DSK, your logical device name will probably be null, and
your job creation date will be the creation date of the dump file. If you run a
user program from, say, the disk area [ABC,DEF], then all this stuff will be the
same except that your job PPN will be ABC,DEF.
The LINKUP UUO is used to search the system for an upper segment with
credentials that match those of your job. The SETPRO UUO (see page 169) can be
used to set an upper segment's protection. The SETCRD UUO (see page 189) can be
used to set the creation date and protection either for a lower segment or for
an upper segment.
When you are finished with an upper segment, you should kill it. This means
that it will go away (giving up its job number) unless someone else is still
using it.
The following UUOs are used to create, kill, attach and detach upper segments
and to change the size of an upper segment.
LINKUP [OP=047, ADR=400023] CALLI 400023
--------------------------------------------------
LINKUP
<error return>
The LINKUP UUO attempts to find an already existing upper segment with the same
job name, date of creation, and other credentials as your job has. (The list of
credentials required for an upper segment to match your job is given above.) If
such an upper segment is found which is not protected from you, it is attached
to your job and the skip return is taken. If there is no such upper segment,
you get the direct (error) return. Any segment you were attached to when you
gave this UUO is killed before all this happens.
REMAP [OP=047, ADR=37] CALLI 37
--------------------------------------------------
MOVE AC,[<write-protect flag>,,<highest address in lower>]
REMAP AC,
<error return>
The REMAP UUO causes your core image to be broken into two segments. The
address contained in AC right is taken as the address of the last word to be in
the lower segment. The next word becomes the first word in the upper segment
and its address becomes 400000. If the sign bit of the AC is on when this UUO
is given, the upper segment will be write protected.
Before your core image is broken, an automatic LINKUP is attempted in order to
find an already existing upper segment with your credentials; see the LINKUP UUO
above. If one is found, the part of your core image that would otherwise have
become your upper segment is discarded and your core size reduced appropriately
before attaching to the already existing upper segment.
If this UUO is successful, the skip return is taken and the job number of your
upper segment is returned in AC. If the automatic LINKUP fails and there are no
more job numbers left to create a high segment under, or if there is something
illegal in your specifications, the direct (error) return is taken.
Any upper segment you are attached to when you give the REMAP UUO is killed
before anything else is done.
CORE2 [OP=047, ADR=400015] CALLI 400015
--------------------------------------------------
MOVEI AC,<highest upper segment address desired>
CORE2 AC,
<error return>
The CORE2 UUO is used to change the size of your upper segment. The address in
the AC is interpreted as the highest address you want in your upper segment;
this address, if non-zero, is ORed with 1777 and the 400000 bit is ignored. If
the AC contains zero, any upper segment you have will be detached and if there
are no other users of the upper segment, it will be killed. The skip return is
always taken if the AC contains zero.
If the AC contains a non-zero number and you do not have an upper segment, an
upper segment of the specified size will be created for you. If you already
have an upper segment, its size is adjusted to that specified by the number in
the AC. If this UUO is successful, the skip return is taken. If there is not
enough core to grant your request, then no new segment is created and the direct
(error) return is taken. If the segment is protected from you, or if you are
asking to have a new upper segment created for you and there are no job slots
available, then the direct (error) return is taken. Unless you are killing your
upper segment (with a zero in AC) or a new segment couldn't be created because
there were no job slots available, this UUO returns with the AC containing the
total number of 1K blocks available to a single user program, counting both
upper and lower segments.
ATTSEG [OP=047, ADR=400016] CALLI 400016
--------------------------------------------------
MOVE AC,[<job number or name>]
ATTSEG AC,
<error return - code in AC>
The ATTSEG UUO is used to attach to an upper segment that already exists. You
must not already have an attached upper segment. The AC should contain either
the sixbit job name or the job number of the upper segment to which you wish to
attach. If this UUO is successful, the skip return is taken. Otherwise the
direct (error) return is taken and a code is returned in the AC indicating the
cause of failure. The error codes and their meanings are explained below.
ERROR CODE MEANING
0 A protection violation has occurred; you are not allowed
to attach to this upper segment.
1 There are two or more upper segments with the job name you
gave. The job number of the first one is returned in the
left half of AC.
2 The job number you gave is not the job number of an upper
segment.
3 There is no job with the name you gave.
4 You already have an upper segment.
5 Lower segment is too big (bigger than =128K).
DETSEG [OP=047, ADR=400017] CALLI 400017
--------------------------------------------------
DETSEG <flag>,
The DETSEG UUO detaches your upper segment from your job. Normally your upper
segment is placed into a list of the segments you have detached, so that when
you do a RESET (see page 249), all your detached segments will go away.
However, if the low order bit of the AC field is a one, then the segment will
not go into the list, but will stick around like any other detached job. This
is not recommended because it can result in the proliferation of unused upper
segments. Only the low order bit of the AC field is looked at by this UUO.
If you have a simulated upper segment (see the SETPR2 UUO on page 164), it is
killed by this UUO.
GETHI [OP=047, ADR=400072] CALLI 400072
--------------------------------------------------
MOVE AC,[<data>]
GETHI AC,
<error return>
The GETHI UUO is a temporary UUO used to enable your job to look at various
parts of the system by including those areas in your job's page map. This UUO
changes definition often and is therefore not explained here. See a system
programmer for today's definition of the GETHI UUO.
SETPR2 [OP=047, ADR=400052] CALLI 400052
--------------------------------------------------
MOVE AC,[<relative end address>,,<base address>]
SETPR2 AC,
<error return>
(Low order bit of <relative end address> on
means write protect simulated upper segment;
low order bit of <base address> on means
<base address> is relative to your core image.)
The SETPR2 UUO selects part of main memory to be addressed as your (simulated)
upper segment. There are two purposes for doing this: the first is to allow
you to look at any part of core (particularly the monitor) efficiently; the
second purpose is to enable your job to address part of your core image as if it
were in an upper segment (addresses over 400000) even though it isn't. The
table in Appendix 3 tells where in the monitor you can find various interesting
pieces of system information which you can access by using this UUO.
NOTE: Any attached upper segment (real or simulated) that you have will be
killed when you give this UUO. Also, both the RESET UUO (see page 249) and the
DETSEG UUO (see page 162) undo the effect of SETPR2.
At the time this UUO is called, AC right should contain the base address where
your simulated upper segment is to start and AC left should contain the relative
end address of your simulated upper segment. These addresses will be adjusted
to 1K boundaries before they take effect; the low-order 10 bits (1777 bits) of
the base address will be turned off and the low-order 10 bits of the relative
end address will be turned on. The original low-order bit of each half of the
AC, however, is used as a flag for this UUO. If the low order bit of AC left
(bit 17--the 1,,0 bit) is on, your simulated upper segment will be write
protected. If the low order bit of AC right (bit 35--the 0,,1 bit) is on, the
base address specified will be assumed relative to your core image and both the
base address and the relative end address must yield addresses in your core
image. Upon success, this UUO takes the skip return; if your request
specifications are impossible to satisfy, then the direct (error) return is
taken.
If you give an absolute base address and you do not have the ACW privilege, your
simulated upper segment will automatically be write protected.
Now, if you still don't understand (and even if you do), let me explain further.
Suppose you wish to look at certain locations in the monitor (for whatever
reason). You can use this UUO once and then do simple MOVEs (or their
equivalent) to get the information you want. For instance, if you would like to
put into AC whatever is in the system at EXEC location 220, you can execute the
following sequence of instructions.
MOVSI AC,377777 ;base addr = 0, rel end addr = 377777
SETPR2 AC, ;make the first 128K of core
; into your simulated upper segment
HALT ;halt on error return
...
MOVE AC,400220 ;get whatever is in EXEC 220
...
The relative mode use of this UUO allows you to write code as if it were going
to run as a upper segment, and then to execute it without making it into a upper
segment, provided you have used this UUO with the relative mode bit set. You
could even do overlays by reading another piece of code, also written to run as
a upper segment, into the same place. The base address of the upper segment
code, however, should be on a 1K boundary or you might get confused about what
is happening.
GETPR2 [OP=047, ADR=400053] CALLI 400053
--------------------------------------------------
GETPR2 AC,
The GETPR2 UUO is used to find out the base address and relative end address of
your simulated upper segment, if any. The base address is returned in AC right
but with bit 35 (0,,1 bit) on if the base address is relative to your core
image. The relative end address is returned in AC left but with bit 17 (1,,0
bit) on if access to the segment is write protected. See the SETPR2 UUO above
for an explanation of simulated upper segments.
If you do not have a simulated upper segment at the time you call this UUO (for
example, if you have a real upper segment), then zero is returned in AC.
5.2 Getting/Setting Segment Status
The following UUOs are used to find out and/or change the protection, name and
other information associated with an upper segment.
SETUWP [OP=047, ADR=36] CALLI 36
--------------------------------------------------
MOVEI AC,<zero for unprotect, non-zero for protect>
SETUWP AC,
<error return>
The SETUWP UUO is used to write protect or unprotect your attached upper
segment. If AC contains zero, the segment becomes unprotected; otherwise it
becomes protected. If this UUO is successful, the skip return is taken. If the
segment is protected from you, then you get the direct (error) return. If you
have no upper segment and no simulated upper segment (see the SETPR2 UUO on page
164), you get the direct (error) return.
If you have done a SETPR2, then this UUO will do another SETPR2 with the
previous parameters but with the write-protect bit in the state requested by
this SETUWP UUO; the skip (success) return will then be taken (although if your
SETPR2 specified an absolute base address and you are asking for your segment to
be unprotected, it will always be write protected unless you have the ACW
privilege).
The sign bit of JOBHRL in the job data area is a one if your upper segment is
write protected.
UNPURE [OP=047, ADR=400102] CALLI 400102
--------------------------------------------------
UNPURE
<error return>
The UNPURE UUO is used to unprotect your upper segment. If you are sharing a
write-protected upper segment with other users, this UUO will create an
unprotected copy of that upper segment (assigning it a new job number), detach
you from the old segment, attach you to this new segment, and set the name of
the new segment to that of the old segment, but shifted right one character (6
bits). If you are the sole user of a write-protected upper segment, this UUO
will simply unprotect that segment and shift its name right 6 bits. The skip
return will be taken upon success. If your upper segment is not write
protected, then this UUO will not do anything but will take the skip (success)
return. If there are no job numbers available for a copy of your upper segment,
or if you cannot be granted enough core, or if you have no upper segment, then
the direct (error) return will be taken.
If you do an UNPURE after having done a SETPR2 UUO (see page 164), you get one
of the following results. If the SETPR2 specified an absolute base address,
then nothing is done and the direct (error) return is taken. If the SETPR2
specified a relative base address, then the write protection is cleared for your
simulated upper segment and the skip (success) return is taken.
SETPRO [OP=047, ADR=400020] CALLI 400020
--------------------------------------------------
MOVE AC,[<Bits 0:8 = new prot key; bits 30:35 = job no.>]
SETPRO AC,
<error return>
The SETPRO UUO can be used to change the protection key of any upper segment not
protected from you. Bits 30:35 (0,,77 bits) in the AC should contain the job
number of the upper segment whose protection you wish to change, where zero
means your own attached upper segment; bits 0:8 of the AC should contain the new
protection key you wish the segment to have. If this UUO is successful, the
skip return is taken. If a protection violation occurs or if the job indicated
is not an upper segment, the direct (error) return is taken.
SETNM2 [OP=047, ADR=400036] CALLI 400036
--------------------------------------------------
MOVE AC,[<sixbit name for your upper segment>]
SETNM2 AC,
<error return>
The SETNM2 UUO is used to change the job name of your upper segment. The name
you wish your segment to have should be in the AC when you give this UUO. If
your segment is successfully renamed, the monitor then scans the names of other
upper segments in the system, and if there is one with the same name as yours,
its job number is returned in the AC; if there is no other upper segment with
the same name, zero is returned in the AC. The skip return is taken on success.
If you are not permitted to change your upper segment's name, the direct (error)
return is taken. If you have no segment attached, the skip (success) return is
always taken.
POINTS [OP=712]
--------------------------------------------------
POINTS ADR
ADR: <block =63 words long for returned job numbers>
The POINTS UUO returns a list of the job numbers of all jobs, including your
own, which are attached to your upper segment. This list is returned in the
block pointed to by the effective address of the UUO, with one job number per
word. The end of the list is indicated by a zero. This list can be up to =63
words long.
SEGNAM [OP=047, ADR=400037] CALLI 400037
--------------------------------------------------
SEGNAM AC,
The SEGNAM UUO returns in AC the sixbit job name of your upper segment. If you
have no upper segment attached, zero is returned.
SEGNUM [OP=047, ADR=400021] CALLI 400021
--------------------------------------------------
MOVEI AC,<job number>
SEGNUM AC,
The SEGNUM UUO gets the job number of the upper segment attached to the job
whose number is in AC. The segment number is returned in AC. A zero in AC gets
your own segment number. A zero returned means the specified job has no upper
segment attached.
SECTION 6--GETTING/SETTING INFORMATION
This section describes numerous UUOs that allow you to get certain types of
information from the system and to change some of this information regarding
your job.
6.1 AC Contents upon System Startup
When a program is setup (and possibly run) directly by a monitor command (such
as GET, RUN, or R), the contents of certain ACs will be as listed in the
following table.
AC CONTENTS
0 Sixbit file name of dump file
1 Sixbit extension of dump file,,normal stuff returned by LOOKUP
2 Normal third word returned by LOOKUP
3 PPN of dump file
4 PPN of dump file
6.2 Dates and Times
Here are some UUOs to get various flavors of date and time.
DATE [OP=047, ADR=14] CALLI 14
--------------------------------------------------
DATE AC,
The DATE UUO returns in AC the current date in system date format. The number
returned has the following value: ((year-1964)*12+month-1)*31+day-1, where all
these numbers are in decimal. You can calculate the day, month and year by
dividing. If you divide by =31, the remainder is then day-1. Then if you
divide the quotient by =12, the new remainder is month-1. Finally, if you take
the quotient again and add =1964, you get the year.
DAYCNT [OP=047, ADR=400100] CALLI 400100
--------------------------------------------------
MOVE AC,[<date in system date format>]
DAYCNT AC,
The DAYCNT UUO converts a date from system date format (see the DATE UUO above)
to the number of days from 1 January 1964 (a Wednesday) to the date indicated.
AC should contain the date of interest, where zero or a negative number is taken
to mean today's date. The corresponding day count is returned in AC.
TIMER [OP=047, ADR=22] CALLI 22
--------------------------------------------------
TIMER AC,
The TIMER UUO returns in AC the time of day in 60ths of a second after midnight.
MSTIME [OP=047, ADR=23] CALLI 23
--------------------------------------------------
MSTIME AC,
The MSTIME UUO returns in AC the time of day in milliseconds after midnight.
This time is accurate only to the nearest 60th of a second.
ACCTIM [OP=047, ADR=400101] CALLI 400101
--------------------------------------------------
ACCTIM AC,
The ACCTIM UUO returns the current date and time. The date is returned in the
left half of AC and is in system date format (see the DATE UUO above). The time
is returned in the right half of AC and is in seconds after midnight.
RUNTIM [OP=047, ADR=27] CALLI 27
--------------------------------------------------
MOVE AC,[<job number>]
RUNTIM AC,
The RUNTIM UUO returns in AC the total compute time since login used by the job
whose number is in the AC. A zero job number in the AC will get the compute
time for your own job. The time returned is in milliseconds. An illegal job
number specified will cause zero to be returned.
6.3 Job Information
Here are some UUOs to find out things about specific jobs and even to set
certain values for your own job.
CORE [OP=047, ADR=11] CALLI 11
--------------------------------------------------
MOVEI AC,<highest address you want in your lower segment>
CORE AC,
<error return>
The CORE UUO is used to change your core size (the size of your lower segment if
you have a two segment program). AC should contain the highest address (in your
lower segment) that you want to be able to reference. This address, if
non-zero, is ORed with 1777 (to make it a 1K boundary), and then your core size
is adjusted, if necessary, to the size indicated. If you can be given the
amount of core you request, the skip return is taken; if not, the direct (error)
return is taken. In any case, the maximum number of 1K blocks a single program
is allowed to use, counting both upper and lower segments, is returned in the
AC. If the AC originally contains zero, then no change is made in your core
size, but the number of 1K blocks available to a single program is returned in
the AC and the direct (error) return is taken.
PJOB [OP=047, ADR=30] CALLI 30
--------------------------------------------------
PJOB AC,
The PJOB UUO returns your job number in the AC.
GETPPN [OP=047, ADR=24] CALLI 24
--------------------------------------------------
GETPPN AC,
The GETPPN UUO returns in AC the logged-in project-programmer name (PPN) of your
job.
NOTE: If JACCT in your job status word is set (i.e., you are the LOGIN or LOGOUT
program), then this UUO behaves differently. It sets the login PPN and Disk PPN
of this job to [1,2]. Then, if there is another job with the login PPN that
this job used to have, the skip return is taken; otherwise, the direct return is
taken. The old login PPN is returned in the AC.
GETNAM [OP=047, ADR=400062] CALLI 400062
--------------------------------------------------
MOVEI AC,<job number>
GETNAM AC,
The GETNAM UUO is used to get the name of any job on the system. AC should
contain the number of the job whose name you wish to know. If AC contains zero,
a negative number, or an illegal job number, then your job is assumed. The
sixbit name of the job specified is returned in AC.
SETNAM [OP=047, ADR=43] CALLI 43
--------------------------------------------------
MOVE AC,[<sixbit job name>]
SETNAM AC,
The SETNAM UUO is used to change your job name to that given in the AC. Any job
name is legal.
SETCRD [OP=047, ADR=400073] CALLI 400073
--------------------------------------------------
MOVE AC,[<new protection and creation date>]
SETCRD AC,
The SETCRD UUO is used to set the protection and creation date of either your
lower segment or your upper segment. The new protection and creation date are
taken from the AC specified in the UUO. If bit 0 (400000,,0 bit) is on, the
protection and creation date of your upper segment are set; otherwise the
protection and creation date of your lower are set. Bits 0:8 specify the
protection, bits 13:23 the time of creation (in minutes after midnight) and bits
24:35 the date of creation (in system date format). Bit 0 (400000,,0 bit) is
turned off before the protection is stored. If bits 13:35 are all zero, the
current time and date will be used. The protection and creation date are used
mainly in conjunction with linking to or creating an upper segment; see Section
5 on upper segments.
GETPRV [OP=047, ADR=400115] CALLI 400115
--------------------------------------------------
MOVE AC,[<code>,,<job number>]
GETPRV AC,
<code> = 0 gets the job's Active privileges.
<code> = 1 gets the job's Passive privileges.
<code> = 2 gets the job's Temporary privileges.
The GETPRV UUO is used to get a particular job's active, passive or temporary
privilege bits. AC right should contain the number of the job whose privileges
you want returned; a zero or illegal job number will get you the privileges of
your own job. AC left should contain a code indicating which type of privilege
bits you want returned for the specified job. The types of privileges and their
corresponding codes are listed above.
A job's ACTIVE PRIVILEGES are those privileges currently enabled for that job;
these are the privileges that are checked when you attempt to execute a
privileged function. The PASSIVE PRIVILEGES are those privileges which the job
is always permitted to enable; these are the privileges granted to the job's PPN
and are normally all enabled (turned on in the active privileges) when the job
logs in. A job's TEMPORARY PRIVILEGES are those which have been temporarily
enabled (turned on in the active privileges) by the system for the benefit of
the particular program currently running on that job; these privileges are
enabled by monitor commands that run various programs and are automatically
disabled by any MONITOR COMMANDS that attempt to change the job's core image,
disk PPN (alias), or I/O state. The temporary privileges as well as the passive
privileges can be enabled by the job; thus a job can disable its temporary
privileges and re-enable them later itself (provided they are still turned on in
the job's temporary privileges).
The SETPRV UUO below can be used to enable or disable privileges (i.e., to turn
them on or off in the active privileges). The various privilege bits and their
meanings are explained in the table below. To request privileges, see any
system programmer.
BITS OCTAL NAME PRIVILEGED OPERATIONS PERMITTED
0 400000,,0 PRIPRV Can enable any privileges.
1 200000,,0 DAWPRV Can use disk absolute write MTAPE and certain
other disk MTAPEs.
2 100000,,0 PROPRV Can change the protection of any disk file.
3 40000,,0 REAPRV Can read any disk file.
4 20000,,0 WRTPRV Can write any disk file.
5 10000,,0 UDPPRV Old-mode UDPs: Can read/write password block
and can do RENAME or ENTER without giving
password.
6 4000,,0 UPGPRV Can select any DD channels or IIIs in a
display program; can do VDSMAP to any DD.
7 2000,,0 MESPRV Can use 0,,400000 bit in PTY number to do
PTYUUOs to terminals not owned by you.
8 1000,,0 KILPRV Can use monitor KILL command on any job.
9 400,,0 DEVPRV Can DETACH and ATTACH devices; can FLUSH busy
terminals.
10 200,,0 SEGPRV Can attach to or change the write-protection
or protection key of any upper segment.
11 100,,0 SSLPRV Can set system service level reservation
table.
12 40,,0 ACWPRV Can do write-enabling absolute SETPR2 UUO.
13 20,,0 INFPRV Can do disk absolute read MTAPE and disk file
info read MTAPE.
14 10,,0 TLKPRV Can TALK to any terminal, even if it is busy.
15 4,,0 (unused)
16 2,,0 XGPPRV Can use XGPUUO--job is font compiler.
17 1,,0 LUPPRV Can reference files and upper segments as a
logged-in user. That is, when a job
references a disk file not on its own disk
area or an upper segment created by some
other PPN, the system checks the second group
of protection bits (070 bits) in the file's
or segment's protection key if the job has
this privilege; if the job does not have this
privilege, the system checks the third group
(007 bits) in the protection key--see the
disk file protection system on page 19 and
the segment protection system on page 156.
Everyone completely logged in gets this
privilege. Jobs without the LUP privilege
also cannot do any of the following: start
spacewar processes; use the EIOTM UUO; start
an interrupt process in IOT-USER mode. For
jobs without this privilege, spacewar and
EIOTM UUOs get the ILLEGAL UUO message, and
interrupt processes are run but not in
IOT-USER mode. Also, certain devices cannot
be ASSIGNed or INITed by jobs that do not
have this privilege.
18 0,,400000 ATTPRV Can use ATTACH command to attach a phantom
and turn on JLOG.
19 0,,200000 LIVPRV Will not be auto-logged out. This privilege
can be enabled and disabled by anyone with
the monitor commands ENABLE LIV and
DISABLE LIV.
SETPRV [OP=047, ADR=400066] CALLI 400066
--------------------------------------------------
MOVE AC,<active privilege bits you want>
SETPRV AC,
The SETPRV UUO is used to find out and/or change your active privileges. (See
the GETPRV UUO above for the meanings of the different kinds of privileges.) AC
should contain either -1 or the active privilege bits you want. If AC contains
-1, then your privileges will not be changed, just returned in AC. Otherwise,
an attempt will be made to set your active privilege bits to those indicated in
AC. Each new active privilege bit requested will be granted only if either
1) the new privilege bit wanted is on in your passive or temporary privileges,
or 2) you currently have the privilege privilege (bit 0--the 400000,,0
bit--represents the privilege privilege), or 3) JBTSTS indicates that you are an
accounting program with JACCT set. However, the system will be glad to disable
any privileges you no longer want. Under any circumstances, the resultant
settings of your active privilege bits (i.e., your currently-enabled privileges)
will be returned in AC. The various privilege bits and their meanings are
explained in the table above. To request privileges, see any system programmer.
WHO [OP=047, ADR=400112] CALLI 400112
--------------------------------------------------
MOVE AC,[<job number or 0 or -1>,,ADR]
WHO AC,
ADR: <22-word block>
The WHO UUO is used to get the wholine of any job or of the system. AC right
should contain the address of a 22-word block in which the wholine will be
returned as an asciz string (ending with a carriage return, linefeed, and one to
five nulls to fill out the last word). AC left should contain either the number
of the job whose wholine is desired, or zero to get the wholine of your own job,
or a negative number to get the system wholine. If AC left contains an illegal
positive job number, then the wholine for your own job is returned. If AC left
contains a legal job number but there is no job with that number, then the null
string is returned.
SLEVEL [OP=047, ADR=400044] CALLI 400044
--------------------------------------------------
MOVE AC,[ADR,,<job number>]
SLEVEL AC,
<service-level-monitor-only error return>
ADR: <service level cost (0, 1, or 2)>,,NBR
<block of NBR words of service level table>
The SLEVEL UUO is used to find out a job's current service level. AC should
contain the number of the job whose service level you want to know; a zero job
number means your own job. The service level (in percent) of the job indicated
will be returned in the left half of AC; the right half will contain the job
number. If you specify an illegal job number other than -1, zero will be
returned in AC. ADR is ignored unless the job number is -1.
If the job number is -1 and you have the SSL privilege (i.e., you are the
service level monitor), then this UUO will set the system's service level
reservation table and skip if it is successful. In this case, AC left should
point to a block whose first word should contain the core cost of service level
(which should be 0, 1, or 2) in its left half and the number of words of service
level table following in its right half. Each word of the following service
level table should have the format:
<service level fraction>,,<programmer name>
where a <service level fraction> of 1,,0 would be 100%.
RLEVEL [OP=047, ADR=400054] CALLI 400054
--------------------------------------------------
MOVEI AC,<programmer name>
RLEVEL AC,
The RLEVEL UUO is used to find out how much service level is reserved for the
current hour by a particular user. The user's programmer name should be
specified in AC right; the service level (in percent) is returned in AC left.
AC right is unchanged by this UUO unless the reserved service level is zero, in
which case zero is returned in the whole AC. The original value of AC left is
ignored by this UUO.
6.4 Looking at the Monitor
Here are some UUOs used to examine various parts of the monitor.
NAMEIN [OP=047, ADR=400043] CALLI 400043
--------------------------------------------------
MOVE AC,[<sixbit job name>]
NAMEIN AC,
<error return - code in AC>
The NAMEIN UUO is used to determine if there are any jobs in the system with a
particular job name. AC should contain the job name you are interested in. If
there is exactly one job with the given name, the skip (success) return is taken
and the job number of the job with that name is returned in the AC. Otherwise,
the direct (error) return is taken and a code is returned in AC; a code of 1
means that there is no job with the given name, and a code of 3 means that there
are two or more jobs with that name.
JBTSTS [OP=047, ADR=400013] CALLI 400013
--------------------------------------------------
MOVEI AC,<job number>
JBTSTS AC,
The JBTSTS UUO is used to get from the system the job status word for a
particular job. AC should contain the number of the job of interest, where zero
means your own job. The table below gives the meanings of some of the bits in
this word.
BITS OCTAL NAME MEANINGS OF 1'S IN THE JOB STATUS WORD
0 400000,,0 RUN The job is runnable, though it may be in a
wait state of some kind. This bit gets
turned off by typing control-C, giving the
EXIT UUO, or hitting some kind of error.
1 200000,,0 CMWB The job is waiting to be swapped in to
service a monitor command.
2 100000,,0 JACCT LOGIN or LOGOUT is running; any control-C's
typed at this time will be turned into
altmodes.
3 40000,,0 JNA A job number has been assigned to this job.
4 20000,,0 JERR The job has hit an error and cannot be
continued.
5 10000,,0 JLOG The job is successfully logged in. System
phantom jobs (see the WAKEME UUO on page 255)
run with this bit off as do temporary jobs
(project-programmer name of 100,100) started
up by monitor commands (like WHO) that need a
job but which do not require you to be logged
in. A job with the JLOG bit off will be
killed if a monitor command line is typed to
it, if it exits, or if it hits an error such
as an illegal memory reference or parity
error (when it is not enabled for ILM or
INTPAR interrupts) or an illegal UUO.
6 4000,,0 LOKSWP The job will be swapped into locked core the
next time it comes in.
7 2000,,0 SWP The job is swapped out.
8 1000,,0 JSEG The job is really an upper segment.
9 400,,0 CLKR The job has a clock request in.
10:14 370,,0 WTMASK This field will be non-zero if the job is
using a dectape or magnetic tape and is
waiting for the device's controller or the
data controller, which is used by both the
dectapes and the mag tapes.
15 4,,0 (unused)
16 2,,0 JHLDIN The job should not be swapped out.
17 1,,0 JWP This upper segment is write protected. This
bit is meaningful only if bit 8 is on, that
is, only if this job is an upper segment.
18 0,,400000 SAVJDA The job data area is saved in JBTPDL.
19 0,,200000 (unused)
20 0,,100000 JLOCK The job is locked in core by the LOCK UUO;
see page 257.
21 0,,40000 SDEADIN The core deadlock detector has a clock
request in.
22 0,,20000 SDEAD1 Deadlock condition still exists if SDEADIN
still set.
23:29 0,,1700 (unused)
30:35 0,,77 Job number of this job's upper segment, if
any; this field is zero if the job has no
upper.
SWITCH [OP=047, ADR=20] CALLI 20
--------------------------------------------------
SWITCH AC,
The SWITCH UUO returns in AC the current setting of the P1 console data
switches.
CALLIT [OP=047, ADR=400074] CALLI 400074
--------------------------------------------------
MOVE AC,[<UUO opcode, CALLI number or UUO mnemonic>]
CALLIT AC,
The CALLIT UUO is used to find out the opcode corresponding to a given UUO
mnemonic or to find out the mnemonic for a UUO opcode or CALLI number. AC
should contain the opcode, CALLI number or sixbit mnemonic of the UUO you are
interested in. The result is returned in AC: for UUO mnemonics, the opcode is
returned (i.e., a full 36-bit instruction including relevant AC or address
fields); for UUO opcodes the most specific sixbit mnemonic is returned (e.g.,
opcode 051000,,0 returns 'INCHRW' and 051040,,0 returns 'OUTCHR'), unless bit 17
(1,,0 bit) was on originally in the AC, in which case the generic mnemonic is
returned (e.g., opcode 051001,,0 returns 'TTYUUO'); for CALLI numbers, the
sixbit CALL name is returned (e.g., 0,,400003 returns 'SPCWGO'). If the given
mnemonic, opcode or CALLI number is undefined, zero is returned.
This UUO works by first checking bits 13:16 (36,,0 bits) in the AC. If these
bits are all zero, the argument is assumed to be an opcode unless it is 'IN',
which is handled as a special case to return the correct result; if any of bits
13:16 is non-zero, the argument is assumed to be a sixbit mnemonic. All
irrelevant fields in the argument must be zero to avoid confusion.
PEEK [OP=047, ADR=33] CALLI 33
--------------------------------------------------
MOVEI AC,<absolute address you want to look at>
PEEK AC,
The PEEK UUO is used to get the contents of any absolute location in memory. AC
should contain the absolute address you wish to examine. The contents of that
address will be returned in AC. Appendix 3 tells where you can find some
interesting system information in the monitor.
This UUO has been largely replaced by the SETPR2 UUO (see page 164), which makes
examining memory outside your core image much more efficient. However, if you
have an upper segment, you must detach it to use the SETPR2 UUO but not to use
the PEEK UUO.
.SYML [OP=047, ADR=400010] CALLI 400010
--------------------------------------------------
MOVEI AC,ADR
.SYML AC,
<error return - error code in AC>
ADR: RADIX50 0,<symbol of interest>
RADIX50 0,<blockname or zero>
Error codes:
0 system symbols not in core or not sorted
1 symbol not in any block
2 symbol not in specified block, but is in some other block
3 symbol multiply defined (blockname was 0)
The .SYML UUO searches the system's symbol table for the given symbol. If it is
found in the specified block, the symbol's value is returned in the AC,
regardless of the existence of the symbol in any other blocks. If the blockname
is 0, then there must be exactly one occurrence of the symbol in the table. On
a failure return, AC will contain one of the error codes shown above.
MTRUUO [OP=047, ADR=400122] CALLI 400122
--------------------------------------------------
MOVE AC,[<data>]
MTRUUO AC,
<first error return>
<second error return>
The MTRUUO UUO is used to change the way the KL-10 uses its internal meters.
This UUO changes definition often and is therefore not explained here. See a
system programmer for today's definition of MTRUUO.
SECTION 7--INTER-JOB MAIL SYSTEM
The inter-job mail system provided by the monitor allows =32 word letters to be
passed between jobs. Each job in the system has a mailbox which can hold
exactly one =32 word letter. For a letter to be sent, the sending job
identifies the destination job by either the job number or the sixbit job name.
This causes the letter to be placed in the mailbox of the destination job, who
can then take the letter out of his own mailbox (i.e., receive the letter)
whenever he wants. While a job's mailbox is full (holding a letter he hasn't
read yet), no one can send that job a letter.
NOTE: The RESET UUO (see page 249) will cause any letter in your mailbox to be
thrown away.
MAIL [OP=710]
--------------------------------------------------
MAIL <function>,ADR
The MAIL UUO is an extended UUO that uses the AC field to determine which of
several mail-handling functions is to be executed. Each of these functions is
described separately below. Notice that MAIL is an IOT UUO and hence cannot be
given when the program is in IOT-USER mode (which is explained in Appendix 1).
7.1 Sending Mail
The following two UUOs allow you to send a letter to any job.
SEND [OP=710, AC=0] MAIL 0,
--------------------------------------------------
SEND ADR
<error return>
ADR: <destination job name or number>
<address of =32 word letter to be sent>
The SEND UUO is used to send a letter to any job in the system. The effective
address of the UUO should point to a two-word block. The first word of this
block should be the job number or the sixbit job name of the job to which the
letter is to be sent. The second word of the block should contain the address
of the =32 word letter.
If the letter is successfully sent, the skip return is taken. If the
destination job already has a letter in his mailbox (meaning the letter cannot
be sent at this time), the direct (error) return is taken. If there is no job
with the name or number you give, you get the system error message NON-EX JOB
NAME OR NUMBER. If there are two or more jobs with the job name you give, you
get the system error message AMBIGUOUS JOB NAME. With either of these last two
errors, your program will be stopped and you will be permitted to type CONTINUE,
which will cause this UUO to be tried again.
SKPSEN [OP=710, AC=5] MAIL 5,
--------------------------------------------------
SKPSEN ADR
<return for destination mailbox full>
<return for letter successfully sent>
<return for non ex job name or number, or ambiguous name>
ADR: <job name or number>
<address of =32 word letter to be sent>
The SKPSEN UUO is used to send a letter to another job just as the SEND UUO (see
above) does except that there is an extra return, which is taken when there is
no job with the given name or number or when there are two or more jobs with the
given name. Thus, there are three possible returns that this UUO can take. The
direct return (no skip) is taken if the letter cannot be sent because the
addressee already has a letter in his mailbox. The skip return is taken if the
letter is successfully sent. The double skip return is taken if there is no job
with the given name or number or if there are two or more jobs with the given
name.
7.2 Receiving Mail
The following two UUOs allow you to receive mail sent to you, that is, to have a
letter removed from your mailbox and deposited in your core image.
WRCV [OP=710, AC=1] MAIL 1,
--------------------------------------------------
WRCV ADR
ADR: <block =32 words long to receive a letter>
The WRCV UUO takes the letter, if any, that is in your mailbox and places it in
the =32 word block specified by the effective address of the UUO. If there is
no letter in your mailbox, this UUO waits until someone sends you one and then
gives it to you.
SRCV [OP=710, AC=2] MAIL 2,
--------------------------------------------------
SRCV ADR
<return if no letter is in your mailbox>
<success return>
ADR: <block =32 words long to receive a letter>
The SRCV UUO checks to see if there is a letter in your mailbox. If there is
one, it is returned to you in the =32 word block pointed to by the effective
address (ADR) of this UUO and the skip return is taken. If there is no letter
in your mailbox, the direct return is taken and the block at ADR is untouched.
7.3 Peeking at Mailboxes
The following two UUOs allow you to find out whether a job has a letter in its
mailbox.
SKPME [OP=710, AC=3] MAIL 3,
--------------------------------------------------
SKPME
<return for your mailbox empty>
The SKPME UUO tells you whether or not there is a letter in your mailbox. If
there is a letter there, the skip return is taken; if not, the direct return is
taken.
SKPHIM [OP=710, AC=4] MAIL 4,
--------------------------------------------------
SKPHIM ADR
<return for his mailbox empty>
ADR: <name or number of job you are interested in>
The SKPHIM UUO is used to find out if a given job has a letter in his mailbox.
The job number or sixbit job name of the job of interest should be in the word
pointed to by the effective address of this UUO. If that job has a letter in
his mailbox, the skip return is taken; if his mailbox is empty, the direct
return is taken. If there is no job with the name or number given, you will get
the system error message NON-EX JOB NAME OR NUMBER. If there are two or more
jobs with the job name given, then you will get the system error message
AMBIGUOUS JOB NAME. If either of these two errors occurs, your program will be
stopped and you will be permitted to type CONTINUE, which will cause this UUO to
be tried again.
SECTION 8--SPACEWAR MODE
In a timesharing system the available CPU time must be split up among all the
programs that are trying to run. Any one program will be run only for a short
period of time, then stopped for a while to let other programs run, then run a
little more, etc. The intervals between, and durations of, the times when a
program is allowed to run are generally irregular and depend on the system load.
Certain programs require fairly regular service (in the form of CPU time
allocated) in order to operate meaningfully. The system provides spacewar mode
to assure regular service to such programs.
To use spacewar mode, a job tells the system the starting address of the
spacewar module (process) and how often and on which processor(s) (P1, P2) it
should be run. A spacewar module is a separate process from your job's main
process (the one that initiates the spacewar module) but runs in the same core
image. The spacewar module will be restarted at a fixed interval after it last
stopped; you specify this interval when you initiate the module. A spacewar
process cannot quite be guaranteed of running every so often because, for
example, another spacewar process on the same processor could have conflicting
time demands. After you have initiated a spacewar module, your job's main
process can continue doing whatever it wants. You are allowed to have one
spacewar module active on each processor; i.e., you can have one on P1 and
another one on P2.
While you have a spacewar module active, your job usually will not be swapped
out. Before your job is swapped out, your spacewar module will be warned that
it is not going to be run for a while; so it can take whatever precautions are
necessary to see that nothing bad happens while it is away.
Each time a spacewar process is started up, it is allowed to run until either it
signals by the DISMIS UUO (see page 218) that it is done or it times out.
Normally a spacewar process will time out if it runs for more that half a second
during a single activation. If you set the timeout-suppression bit (see the
SPCWGO UUO below) for a spacewar process, then that process will never time out.
However, running for very long (like more than a few milliseconds) will cause
system performance to deteriorate noticeably, especially if the process is
running on P1! In fact, a spacewar module running on either processor for more
than about half a second will cause the other processor to think that the first
processor is dead.
If a spacewar process makes an illegal or non-existent memory reference, or if
it gets a push-down overflow, then the message SPACEWAR LOSSAGE will be typed on
the job's terminal and both the spacewar process and the main process will be
stopped. If you try to initiate a spacewar process when one is already active,
or if you indicate that a spacewar process should be run on P2 and P2 is not
running, or if one of your spacewar processes times out, then you will get an
error message and your spacewar processes will be killed.
Spacewar modules are started in IOT-USER mode; this means that operation codes
700:777 are machine I/O instructions rather then UUOs. Thus a spacewar process
can do its own I/O directly; however, it should make sure that its use of I/O
devices will not conflict with the system. For more information on IOT-USER
mode, see its description in Appendix 1.
Spacewar modules running on P2 can never execute UUOs (except for the DISMIS UUO
to terminate the current activation). Any attempt by such a process to execute
a UUO will result in termination of that activation (as by DISMIS). Spacewar
modules running on P1 are allowed to do certain UUOs. However, any UUO that
must wait for something to happen will not work from a spacewar module.
Finally, some illegal UUOs will cause the SPACEWAR LOSSAGE message to be printed
and the spacewar modules to be killed. With those warnings in mind, note that
spacewar modules on P1 can in general do any of the IOT UUOs, that is, those
with opcodes over 700 (including the display UUOs) but not until the process
gets itself out of IOT-USER mode!! See the preceding paragraph.
Each time a spacewar process is started up, the system loads up several
accumulators with data that might be needed by the spacewar module. The ACs set
up and the data they contain are listed below.
AC CONTENTS
1 The current value of the spacewar buttons. See the SPWBUT UUO on
page 260.
3 A warning value. This AC usually contains zero but is set up
with -1 if this is the last time your spacewar process will be
run for a while (because your job is being swapped out). The
next time your spacewar module runs, this AC will contain the
number of 60ths of a second for which your spacewar module was
suspended.
4 The number of the processor this spacewar module is running on.
This number is 1 for P1 and 2 for P2.
5 A flag indicating the status of the processor that this spacewar
process is NOT running on. This flag is zero if that processor
is running (normal state) and -1 if that processor is dead.
6 Your job status word. See the JBTSTS UUO on page 197. If the
run bit (bit 0--the 400000,,0 bit) of this word is zero, then
your main process has stopped for some reason; for instance,
control-C may have been typed.
If you initiate a spacewar process with the time between runs set to zero, then
the process will be run only once.
Whenever you do a RESET (see page 249), any spacewar modules active will be
killed. The EXIT UUO (see page 247) will also kill any spacewar modules you
have. Finally, the SPCWAR UUO can also be used to kill your spacewar modules;
see below.
8.1 Spacewar UUOs
Here are the UUOs used to initiate and to kill spacewar processes and to
terminate spacewar activations.
SPCWAR [OP=043]
--------------------------------------------------
SPCWAR <number of ticks between startups>,<starting address>
The SPCWAR UUO initiates a spacewar process on P2. If P2 is not running, the
spacewar process will be run on P1 instead. The effective address of the UUO is
the process' starting address. The number of 60ths of a second between startups
is specified by the AC field of the instruction (possible values of 0:17). If
the AC field is zero, then the spacewar process will be run only once. Timeout
suppression is not possible with the SPCWAR UUO; any process started with this
UUO will time out if it runs for more than half a second during a single
activation.
If the effective address of this UUO is 636367 (that's 'SSW' in sixbit) and the
AC field is zero, then instead of a spacewar module being initiated, all your
spacewar modules will be killed. This is the normal way to kill spacewar
modules. The RESET UUO (see page 249) and all flavors of the EXIT UUO (see page
247) will also kill your spacewar modules.
SPCWGO [OP=047, ADR=400003] CALLI 400003
--------------------------------------------------
MOVE AC,[<Bits 0:1 (600000,,0 bits)= processors;
bits 2:3 (140000,,0 bits)= timeout suppression;
bits 14:17 (000017,,0 bits)= startup interval;
bits 18:35 (0,,777777 bits)= starting address>]
SPCWGO AC,
The SPCWGO UUO is used to initiate a spacewar process on either P1 or P2 or
both. The starting address of the spacewar module should be in the right half
of the AC. Bits 14:17 (17,,0 bits) of the AC should contain the time in 60ths
of a second between startups of the spacewar module. A zero time means run the
spacewar process only once and then kill it. Bits 0:1 (600000,,0 bits)
determine which processor(s) will run this module. If bit 0 (400000,,0 bit) is
a one, then the module will be run on P1; if bit 1 (200000,,0 bit) is a one, the
module will be run on P2. If both bits 0 and 1 are one, then both processors
will run this module, with each processor starting at the given starting
address. If both bits 0 and 1 are zero, then the module will be run on P2
unless P2 is dead, in which case the module will be run on P1. Bits 2:3
(140000,,0 bits) are used to specify timeout suppression separately for the P1
process (bit 2--100000,,0 bit) and the P2 process (bit 3--40000,,0 bit). If the
timeout-suppression bit is off for a process, then that process will time out if
it runs for more than half a second during a single activation. The remaining
bits in AC (bits 4:13--the 37760,,0 bits) are reserved for future use.
EXAMPLE: To initiate a spacewar process with starting address WAR to run every
17 ticks on P1 without timeout suppression, do the following:
MOVE AC,[400017,,WAR]
SPCWGO AC,
DISMIS [OP=047, ADR=400024] CALLI 400024
--------------------------------------------------
DISMIS
The DISMIS UUO is used by spacewar processes to terminate individual
activations. This UUO causes the process to be stopped until the next time it
is supposed to be run, at which time the process will be restarted at its
starting address.
This UUO has another (though similar) meaning in the user interrupt system; its
meaning there is explained on page 226.
SECTION 9--USER INTERRUPTS
The user interrupt system allows a program to take action upon the occurrence of
any of various special conditions, without the program having to test
continuously for these conditions. There are two versions of interrupts
available--the old style and the new style. The main differences between the
two are: 1) while you are processing an old-style interrupt you can still be
interrupted, which can cause all sorts of trouble, but while you are processing
a new-style interrupt you cannot receive another interrupt until you dismiss the
current one; 2) the only interrupts you can receive with the old system are
processor interrupts such as push-down overflow, illegal memory reference and
arithmetic overflow. You can also enable for clock interrupts with the old
system, but only clock ticks that occur while you are actually running will be
seen by your program. All interrupts are possible with the new system; and
clock interrupts will happen whether or not you are actually running at the
time. Before going into more differences between the old- and new-style
interrupts, I shall explain the basics of the interrupt system and the features
that are the same for both styles.
A user program indicates that it wants to use the interrupt system by enabling
itself for the particular interrupts that it is interested in. Interrupt
conditions that are not enabled for will be handled by the system. For
instance, if you get a push-down overflow, and if you are not enabled for
push-down overflow interrupts, then you will get the system error message PDL
OV. If, on the other hand, you ARE enabled for this interrupt, then you will
get an interrupt indicating that you had a push-down overflow. Some interrupt
conditions are ignored by the system unless you are enabled for them.
When an interrupt that you are enabled for does occur, your program is stopped,
the program counter (PC) and PC flags are saved in JOBTPC in your job data area
(see Appendix 2), the cause of the interrupt is saved in JOBCNI and your
interrupt handler is started at the address contained in JOBAPR.
The PC that you get in JOBTPC generally points to the next instruction that your
main process would otherwise have executed if the interrupt had not occurred.
However, there are certain conditions under which the value of this PC is not
quite obvious.
First of all, if you were executing a UUO (and hence your PC was in monitor mode
while executing some system code for that UUO), then the PC saved in JOBTPC will
not be your real (monitor mode) PC that you had at the time of the interrupt;
instead JOBTPC will contain the location of the UUO call in your core image, and
the user-mode bit (bit 5--the 10000,,0 bit) in the left half of JOBTPC will be
OFF to indicate this condition.
Secondly, when you receive a processor interrupt (either old- or new-style) such
as illegal memory reference, the PC saved in JOBTPC will point to the
instruction that caused the interrupt. However, if you jump to an illegal
location, then the PC returned with the illegal memory reference interrupt will
point to the illegal location. For instance, on an AOJA 1,777777, the AC will
have been incremented and the PC changed to 777777 before the ill mem ref
occurs, so the PC stored in this case would be 777777.
Finally, if an interrupt occurs in the middle of an ILDB or an IDPB instruction
after the byte pointer has been incremented but before the byte has been moved,
then JOBTPC will point to the byte instruction and the byte-increment
suppression flag (bit 4--the 20000,,0 bit), will be on in the left half of
JOBTPC. Thus the byte pointer will not be incremented again when (and if) the
instruction is resumed.
Each condition for which an interrupt can occur is represented by a specific
bit. You enable a given interrupt by setting to one the bit corresponding to
that condition; this can be done with various UUOs that will be described in
detail later. When you get an interrupt, the bit representing the cause of the
interrupt is given to you in the word at JOBCNI. For new-style interrupts this
word will have exactly one bit on. With old-style interrupts there may be some
extraneous bits on that do not represent old-style interrupts. The word
returned in this case is the CONI word from the processor, and the extra bits
currently set in this word are the 0,,6043 bits.
The interrupt conditions represented by the different bits are listed below.
Bits marked with an asterisk (*) represent the only conditions for which you can
receive interrupts under the old-style interrupt system. You are not allowed to
enable a given interrupt condition for both old- and new-style interrupts at the
same time.
NOTE: The RESET UUO (see page 249) clears all of your interrupt enablings.
BITS OCTAL NAME INTERRUPT CONDITIONS
0 400000,,0 INTSWW Your job is about to be swapped out.
1 200000,,0 INTSWD Your job has just been swapped back in. If
you enable for both INTSWW and INTSWD, then
you will receive these two interrupts as a
pair in the expected order every time your
job is swapped.
4 20000,,0 INTTTY Your user-level job would be activated by
terminal input if it were waiting for it.
When you are enabled for this interrupt, you
will be interrupted every time either a
character or a line is typed in, depending on
whether you are in character mode or line
mode. As long as you do not ask for more
than there is in the terminal input buffer,
you may read from the terminal at interrupt
level.
5 10000,,0 INTPTI A PTY you own has just gone into a wait state
waiting for some input from you (e.g.,
waiting for you to do a PTWR1W); the PTY may
be waiting either for a single character or
for a line.
6 4000,,0 INTMAIL Someone has just sent you a letter (see
Section 7). You may read the letter at
interrupt level.
7 2000,,0 INTWAIT A UWAIT UUO has just returned from finishing
the execution of a UUO. You cannot enable
for this interrupt, which is used by the
monitor to make the UWAIT UUO work (see page
227).
8 1000,,0 INTPTO A PTY you own has just output a character for
you to read (e.g., you can read it with
PTRD1W).
9 400,,0 INTPAR A parity error has occurred in your core
image. The address in which bad parity was
detected is given to you in AC 10.
10 200,,0 INTCLK A clock interrupt has just happened. The
default interval between clock interrupts is
a 60th of a second; this interval can be
changed by the CLKINT UUO, which also enables
clock interrupts. This bit is for new-style
clock interrupts only. For a more complete
description of new-style clock interrupts,
see the CLKINT UUO on page 225. See bit 26
below for old-style clock interrupts.
11 100,,0 INTINR IMP interrupt from foreign receive side. See
Section 12.14, specifically page 324, for
explanations of this and the following three
interrupt conditions.
12 40,,0 INTINS IMP interrupt from foreign send side.
13 20,,0 INTIMS IMP status change interrupt.
14 10,,0 INTINP IMP input waiting.
15 4,,0 INTTTI ESCAPE I has just been typed on the terminal
which is attached to this job. Any numeric
escape argument that was typed is given to
you in AC 10 in sign-magnitude form.
16 2,,0 INTQXF Your job is changing queues. Your new
positive queue number (see the queue names
and numbers in Appendix 5) is available from
accumulator 14; see page 220. Note: This
interrupt is not guaranteed to be generated
every time you change queues.
19 0,,200000 * POV A push-down stack overflow or underflow has
just occurred. If the instruction causing
this was a PUSHJ or a POPJ, then the PC
stored in JOBTPC is the one specified by the
instruction (PUSHJ) or by the stack (POPJ);
if the instruction is a PUSH or a POP, then
the PC will have been incremented and will
thus point to the instruction after the PUSH
or POP. In any case, the push-down pointer
will have been given its new value and any
value being pushed or popped will have been
moved to its indicated destination. For a
PUSHJ or a PUSH, the value pushed will now be
occupying the last location in the stack.
For a POPJ or a POP, the value popped will
have come from the first location before the
beginning of the stack.
20 0,,100000 INTELF The PDP-11 has just written a 1 into the
least significant bit of word 772566 on the
unibus. Device ELF must be yours for you to
get this interrupt.
22 0,,20000 * ILM An illegal memory reference has just
occurred; that is, you have just tried to
reference a memory location outside your core
image.
23 0,,10000 * NXM A non-existent memory reference has just
occurred; that is, you have just tried to
reference a memory location that apparently
does not exist. This should never really
happen; if it does, it generally means a
memory unit has failed.
26 0,,1000 * The clock has just ticked while you were
running. This bit is for old-style clock
interrupts only. See bit 10 above for
new-style clock interrupts. Any old-style
interrupt that is given will disable
old-style clock interrupts. An old style
clock interrupt is given only when the clock
ticks and the job is enabled and in user mode
(not in the middle of a UUO).
29 0,,100 * INTFOV A floating overflow has just occurred. The
PC saved will point to the word after the
instruction causing the overflow.
32 0,,10 * INTOV An integer overflow has just occurred. The
PC saved will point to the word after the
instruction causing the overflow.
The remaining bits are currently unused. As new interrupts are added they will
use the lower-numbered available bits.
9.1 New-style Interrupts
The new interrupt system is highly recommended over the old system; thus I will
explain the new system first. The bit representations of the particular
interrupts are the same in both systems (except for clock interrupts), but with
the new system there are more interrupts which you can enable.
When you receive a new-style interrupt, all sorts of things happen. First of
all, as usual your PC and flags are saved in JOBTPC and the bit representing the
cause of the interrupt is stored in JOBCNI. Unless you were executing a UUO at
the time of the interrupt, the PC word in JOBTPC will be perfectly accurate.
If, however, you WERE executing a UUO, then the PC saved in JOBTPC is really the
address in your core image where the UUO in progress is located; in this case,
the user-mode bit (bit 5--the 10000,,0 bit) in JOBTPC will be off. Thus the
user-mode bit in JOBTPC will tell you if a UUO was in progress when the
interrupt occurred.
With a new-style interrupt, your accumulators are saved. Then, before your
interrupt routine is started, certain ACs are loaded up with data as listed in
the table below. Your user-level ACs are saved in locations 20:37 of your core
image unless you were executing a UUO at the time of the interrupt, in which
case your ACs are saved somewhere in the system.
AC CONTENTS
1 The current value of the spacewar buttons. See the SPWBUT UUO on
page 260.
3 A warning value. This AC usually contains zero but is set up
with -1 if this is the last interrupt you will get before your
job is swapped out.
4 The number of the processor this interrupt module is running on.
This number is 1 for P1 and 2 for P2. Since interrupts are
(currently) always run on P1, this AC will always contain 1.
5 A flag indicating the status of the processor that this
interrupt-level process is NOT running on. This flag is zero if
that processor is running (normal state) and -1 if that processor
is dead.
6 Your job status word. See the JBTSTS UUO on page 197.
7 JOBREL for your upper segment, if any. This is the size, minus
one, of your upper segment, if you have one, and zero if you do
not.
10 The datum for this particular interrupt. Currently, the only
interrupts with data are the parity error interrupt, for which
you get here the address at which bad parity has been detected;
and the ESCAPE I interrupt, for which you get here the escape
argument in sign magnitude form: sign bit on if BREAK instead of
ESCAPE and magnitude of any numeric argument in the right half.
The datum can be invalid if you have some pending interrupts
which generate data (e.g., if you get several parity errors in a
row), in which case this is the last datum seen by the system.
14 Your positive queue number. This tells you which queue your
user-level process is in. See the queue names and numbers in
Appendix 5.
After these ACs have been set up, your interrupt routine is run at interrupt
level starting at the address contained in the right half of JOBAPR. The PC
flags for your interrupt-level routine are set from the bits in the left half of
JOBAPR. (The PC flags are explained in Appendix 1.) For example, if bit 6
(the 4000,,0 bit) in JOBAPR is on, your interrupt process will be started up in
IOT-USER mode (see Appendix 1). Your interrupt process is actually started by
the system doing a JRST 13,@JOBAPR (see the JRST instruction in the PDP-10
manuals) and you are then allowed to run uninterrupted (except for I/O interrupt
services) for up to 8 ticks (8/60 of a second). If you are still running at
interrupt level when that time runs out, you will get the system error message
I-LEVEL TIMEOUT and your program will be stopped.
When your interrupt-level routine finishes and wishes to return to the
interrupted program, it should issue the DISMIS UUO (see page 226). If,
however, the interrupt-level routine does not wish to return to the user-level
program but wants instead to BECOME the user-level program, then it should issue
the UWAIT UUO and then the DEBREAK UUO. This lets your interrupt-level process
keep running, but it will no longer be at interrupt level; it will be running at
user level. Note that neither UWAIT (see page 227) nor DEBREAK (see page 228)
causes any change in your PC flags. Thus, if you are in IOT-USER mode when you
give these UUOs, then you will still be in IOT-USER when you return from them!
If you UWAIT and DEBREAK and THEN want to return to the interrupted program, you
can do so simply by jumping to the interrupted address (contained in JOBTPC) by
doing a JRST 2,@JOBTPC which will also restore the flags of the interrupted
process. However, you should probably save JOBTPC somewhere else before
DEBREAKing because after you DEBREAK you can receive another interrupt, which
would clobber the old JOBTPC with a new one.
To allow users to enable both old- and new-style interrupts at the same time, a
user program can indicate a special three word block to be used with NEW-STYLE
interrupts in place of the three words at JOBCNI, JOBTPC and JOBAPR,
respectively. If JOBINT in your job data area contains a non-zero number, that
number will be interpreted as the address of this three word block. The normal
three words in the job data area will continue to be used for old-style
interrupts (and for new-style interrupts whenever JOBINT contains zero).
Now here are the UUOs used with the new-style interrupt system.
INTENB [OP=047, ADR=400025] CALLI 400025
--------------------------------------------------
MOVE AC,[<interrupt bits to be enabled>]
INTENB AC,
The INTENB UUO enables the interrupts that correspond to the bits on (ones) in
the AC and disables the interrupts corresponding to bits that are zero. This
overrides all previous enablings (of the new-style interrupts). If there is an
interrupt pending that you are now enabling, the interrupt will be taken
immediately. (See page 219 for the interrupt conditions represented by the
various bits.)
INTORM [OP=047, ADR=400026] CALLI 400026
--------------------------------------------------
MOVE AC,[<bits to be ORed in>]
INTORM AC,
The INTORM UUO enables the interrupts corresponding to the bits that are on
(ones) in the AC. The enablings of other interrupts are unchanged.
INTACM [OP=047, ADR=400027] CALLI 400027
--------------------------------------------------
MOVE AC,[<bits to be cleared>]
INTACM AC,
The INTACM UUO disables the interrupts corresponding to the bits that are on
(ones) in the AC. The enablings of other interrupts are unchanged.
INTENS [OP=047, ADR=400030] CALLI 400030
--------------------------------------------------
INTENS AC,
The INTENS UUO returns your new-style interrupt enablings in the AC; bits which
are on (ones) represent enabled interrupts.
CLKINT [OP=717]
--------------------------------------------------
CLKINT <number of ticks between interrupts>
The CLKINT UUO is used to set the interval between new-style clock interrupts.
If you enable for new-style clock interrupts without using this UUO, you get the
default interval of one tick (a 60th of a second); but with this UUO you can set
the number of ticks per clock interrupt to any number representable in 18 bits
(up to about an hour and twelve minutes).
This UUO enables for new-style clock interrupts and sets the interval (in ticks)
between interrupts to the number which is the effective address of the UUO.
This interval represents the amount of real time (not runtime) between your
clock interrupts. The mask bit for new-style clock interrupts is not altered by
this UUO (see the INTMSK UUO on page 233).
Here is a more comprehensive description of new-style clock interrupts. Clock
interrupts may be enabled by turning on the INTCLK bit in the interrupt
enablings. This starts the clock ticking regardless of the state of the
interrupt mask. If the clock interrupt should try to occur when it is masked
off, then the bit is set in JBTIRQ anyway, i.e., the interrupt is pending and
will occur as soon as it is masked on. Disabling the clock interrupt deletes
the clock request and any pending clock interrupt. The time between clock
interrupts is one tick. The CLKINT UUO enables clock interrupts and and sets
the time between interrupts to the effective address of the UUO. It no longer
masks on the interrupt so that it is possible to do a guaranteed indivisible
operation involving clock interrupts. Giving this UUO also flushes any pending
clock interrupts that may exist. If the effective address of the UUO is zero
then clock interrupts are disabled and any pending clock interrupt is flushed.
DISMIS [OP=047, ADR=400024] CALLI 400024
--------------------------------------------------
MOVE AC,[<source queue mask>,,<0:3 for destination queue>]
DISMIS AC, ;If AC=0, contents of AC are ignored.
AC Right New Queue to Enter
-------- ------------------
0 TQ
1 RUNQ
2 INTWQ
3 IOWQ
The DISMIS UUO is used to terminate an interrupt-level process. When you give
this UUO at interrupt level, the current interrupt is dismissed and your
user-level process is continued at the point where it was interrupted.
Normally, an interrupt process just does a plain DISMIS, with no AC field
specified (i.e., AC field of zero). However, if the AC field is non-zero, then
the contents of the specified AC will be interpreted as a request to requeue the
job to the queue indicated in AC right. The value of AC right must be between 0
and 3 inclusive and is interpreted according to the table shown above. Your job
will not be requeued unless it is currently in one of the queues indicated by
the mask in AC left, where a 1 in bit position N means that it is ok to requeue
the job out of queue number N (see the queue names and numbers in Appendix 5).
If your job is not in one of the queues whose mask bit is on in AC left, or if
AC right does not contain a number from 0 to 3, then no requeueing will be done.
In any case, the DISMIS UUO still dismisses the current interrupt.
This UUO is illegal at user level. (The DISMIS UUO has another related meaning
when given by a spacewar process; see page 218.)
UWAIT [OP=047, ADR=400034] CALLI 400034
--------------------------------------------------
UWAIT
The UWAIT UUO can be used by an interrupt-level process to ensure that the
interrupted program is not in the middle of executing a UUO. If a UUO was in
progress when the interrupt occurred, then UWAIT will wait for that UUO to
finish. UWAIT also returns with your user-level ACs set up (i.e., the ACs that
were saved when the interrupt occurred), so you should not expect any ACs to be
preserved through a UWAIT.
The mechanism used by UWAIT is the following. If no UUO is in progress, UWAIT
sets up your user-level ACs and returns immediately. Otherwise, bit 7 (2000,,0
bit) in your interrupt enablings is turned on, the address of the instruction
after the UWAIT (to which you will want to return later) is saved, and your
user-level process is resumed, in the middle of some UUO. When that UUO
finishes execution, the system notes that you are enabled (bit 7) for a
UUO-completion interrupt; so bit 7 is cleared and your interrupt-level routine
is continued at the saved address, with your user-level ACs already having been
set up. At this point you are once again at interrupt level and are subject to
its timeout.
After you have done a UWAIT, you can terminate your interrupt-level process with
either of two UUOs. You can DISMIS and leave interrupt level the normal way
with no side effects for having done the UWAIT, or you can DEBREAK to make your
interrupt-level process into your user-level process (see the DEBREAK UUO below
for more details).
If you do a UWAIT and do not return immediately, then while the interrupted UUO
is finishing other interrupts may occur and you may even do another UWAIT. When
the UUO finally completes, the interrupt-level routine to regain control will be
the last one that did a UWAIT.
If you are in the middle of a SLEEP UUO (see page 248) when you do a UWAIT, the
SLEEP is terminated immediately; you do not wait until the time when it would
normally have ended.
The UWAIT UUO is illegal except at interrupt level.
DEBREAK [OP=047, ADR=400035] CALLI 400035
--------------------------------------------------
DEBREAK
The DEBREAK UUO is used to turn an interrupt-level process into a user-level
process. In order to assure that you were not in the middle of a UUO when the
interrupt occurred, you should give a UWAIT UUO before you DEBREAK. After
debreaking, you will no longer be at interrupt level. However, you will have
the same accumulators that you had before debreaking. DEBREAK does not alter
the flow of instructions (as DISMIS does); the next instruction executed is the
one following the DEBREAK, but it will be executed at user level.
After you do a UWAIT and a DEBREAK, you can return to your interrupted process
by jumping to the address that was placed in JOBTPC when the interrupt started.
Note, however, that as soon as the DEBREAK is done, you may receive further
interrupts since you are now at user level; thus JOBTPC may get clobbered, so
you might want to save it before you DEBREAK. See also the INTDEJ UUO on page
237.
The DEBREAK UUO is illegal except at interrupt level.
IWAIT [OP=047, ADR=400040] CALLI 400040
--------------------------------------------------
IWAIT
The IWAIT UUO causes your job to go into a wait state (INTW) that will be
terminated only when an interrupt occurs.
IENBW [OP=047, ADR=400045] CALLI 400045
--------------------------------------------------
MOVE AC,[<interrupt bit enablings>]
IENBW AC,
The IENBW UUO is used to set your interrupt enablings and to put your user-level
process into the interrupt-wait state, both at the same time in order to prevent
a race between going into interrupt wait and getting an interrupt. This UUO has
the same effect (except for timing) that would be gotten from doing an INTENB
followed by an IWAIT.
INTGEN [OP=047, ADR=400033] CALLI 400033
--------------------------------------------------
MOVE AC,[<bits to interrupt with>]
INTGEN AC,
The INTGEN UUO generates an interrupt for you for each bit on in the AC. This
will cause the interrupts to take place immediately, but you must be enabled for
all of the interrupts you are generating or you will get a system error message.
INTIRQ [OP=047, ADR=400032] CALLI 400032
--------------------------------------------------
INTIRQ AC,
The INTIRQ UUO returns in AC the bits representing the interrupts you currently
have pending. Usually this will be zero unless you are at interrupt level.
This will also be non-zero if between the time an interrupt is requested and the
time it is serviced it is disabled, which can happen if your interrupt-level
routine changes the interrupt enablings. Finally, this can be non-zero if you
have masked off some interrupts (see the INTMSK UUO below).
INTMSK [OP=720]
--------------------------------------------------
INTMSK ADR
ADR: <interrupt mask>
The INTMSK UUO is used to set your interrupt mask. In this mask, a 1 means the
interrupt is masked on, a 0 means it is masked off. Your interrupt mask is
initially all 1's. The only interrupts you can receive are those that are both
enabled and masked on. If an enabled interrupt is masked off (with this UUO or
with one of the following UUOs), then when that interrupt condition arises, the
interrupt will remain pending until it is masked back on, at which time it will
interrupt immediately.
IMSKST [OP=721]
--------------------------------------------------
IMSKST ADR
ADR: <bits to be turned on in interrupt mask>
The IMSKST UUO ORs the contents of location ADR into your interrupt mask (see
the INTMSK UUO above). Thus this masks ON the indicated interrupts.
IMSKCL [OP=722]
--------------------------------------------------
IMSKCL ADR
ADR: <bits to be turned off in interrupt mask>
The IMSKCL UUO turns off, in your interrupt mask, the bits that are on in
location ADR. Thus this masks OFF the indicated interrupts. See the INTMSK UUO
above.
INTUUO [OP=723]
--------------------------------------------------
INTUUO <function>,ADR
INTUUO is an interrupt system extended UUO that uses the AC field to determine
which of several functions is to be executed. The different functions are
described separately below.
INTDEJ [OP=723, AC=0] INTUUO 0,
--------------------------------------------------
INTDEJ ADR
ADR: <interrupts bits to be ORed in>
<PC word to go to>
The INTDEJ UUO solves an special race condition. Suppose you have masked off
some interrupts, done a UWAIT followed by a DEBREAK, fooled around in user level
for a while, and now wish to mask on your interrupts again and return to the
original user-level process. You presumably have the PC word stored in a
location somewhere. If you mask on your interrupts and then try to jump back to
the original user-level process, you may get interrupted between the
mask-setting UUO and the jump. The second interrupt may want to do the same
thing and may in the process overwrite your PC word with a new and different PC.
This UUO solves this race by masking on the interrupt bits marked with 1's at
ADR and jumping to the PC contained in ADR+1 all in one indivisible operation,
so that if another interrupt occurs, the PC it will interrupt will be the one
specified in ADR+1.
IMSTW [OP=723, AC=1] INTUUO 1,
--------------------------------------------------
IMSTW ADR
ADR: <mask bits>
The IMSTW UUO sets your interrupt mask (see the INTMSK UUO above) and then puts
you into INTERRUPT WAIT. The effective address of this UUO should point to a
word containing the mask bits you want set.
IWKMSK [OP=723, AC=2] INTUUO 2,
--------------------------------------------------
IWKMSK ADR
ADR: <bits for interrupts that should awaken>
The IWKMSK UUO sets the mask that determines which interrupts will awaken the
main process out of an interrupt wait state. When an interrupt occurs while the
main process is in interrupt wait, if the bit for that interrupt in on in the
wakeup mask, then the main process is awakened. If the bit is off, the main
process is left in interrupt wait. The default value for the wakeup mask is all
1's. The interrupt-level process is run regardless of the setting of the wakeup
mask.
INTDMP [OP=723, AC=3] INTUUO 3,
--------------------------------------------------
INTDMP ADR
<error return - error code in ADR+1>
ADR: <job name or number>
<block of 5 words for returned information>
Error codes:
1 job not logged in
2 ambiguous job name
3 non-existent job name
The INTDMP UUO returns 5 words of information about a particular job. The
effective address of the UUO specifies a six word block; the first word of this
block should contain the number or sixbit name of the job you want to find out
about, where zero means your own job. If the UUO is successful, the skip return
is taken and words 1 through 5 of the block are filled with the information
indicated below. If the value in ADR specifies an ambiguous or non-existent job
or an impossible job number, then the direct (error) return is taken and an
error code (see list above) is returned in ADR+1.
WORD VALUE
0 Unchanged (job name or number).
1 Interrupt enable bits of specified job.
2 Interrupt mask.
3 Zero.
4 Wakeup mask (interrupt bits which will awaken the job from
IWAIT; see IWKMSK UUO above).
5 Number of the queue the job is in. See the queue names and
numbers in Appendix 5.
INTIPI [OP=723, AC=4] INTUUO 4,
--------------------------------------------------
INTIPI ADR
<error return - code in ADR+1>
ADR: <job name or number>
<bits for interrupts you want generated>
Error codes:
1 job not logged in
2 ambiguous job name
3 non-existent job name
4 job not enabled for interrupts specified
The INTIPI UUO is used to send one or more interrupts to any job on the system.
ADR should contain the number or sixbit name of the job which you want to get
the interrupt(s); zero means your own job. The specific interrupts you want
generated should be indicated by bits on in the word at ADR+1. The job you
choose must be enabled for the interrupts you send. If this UUO is successful,
the skip return is taken; otherwise, the direct (error) return is taken and an
error code (see list above) is returned in the word at ADR+1.
IMSKCR [OP=723, AC=5] INTUUO 5,
--------------------------------------------------
IMSKCR ADR
ADR: <bits to be turned off in interrupt mask>
The IMSKCR UUO turns off, in your interrupt mask, the bits that are on in
location ADR. Thus this masks OFF the indicated interrupts. After masking off
these interrupts, this UUO returns your OLD mask in the word at ADR. This
avoids timing errors in saving and restoring a mask. See the INTMSK UUO above.
9.2 Old-style Interrupts
When you receive an interrupt under the old interrupt system, here is what
happens: Your PC and flags are saved in JOBTPC, the CONI word from the processor
is stored in JOBCNI (one old-style interrupt bit will be on in this word
indicating the cause of the interrupt), and your PC is changed to that in the
right half of JOBAPR. Your interrupt routine may run as long as it wants; as
far as the system is concerned, your interrupt routine is now your main process
and no further special action will be taken by the system for the interrupt.
When your interrupt routine is finished, it can do a
JRST 2,@JOBTPC
to return to the interrupted program. This will restore the PC and flags to
their states when the interrupt occurred.
Note that since your interrupt routine is not treated at all specially by the
system, it can be interrupted itself by an interrupt of the same or a different
type. If this happens, JOBTPC and JOBCNI will be clobbered with the values for
the second interrupt; then when processing resumes for the first interrupt, the
address (in the main program) to which control should return will no longer be
in JOBTPC. Unless this address was saved by your interrupt handler, the program
will probably not be able to continue successfully. The new interrupt system
avoids this problem by not allowing you to be interrupted while you are
processing a new-style interrupt.
The processor CONI word stored in JOBCNI with old-style interrupts will have
some extraneous bits on in addition to the bit representing the interrupt. The
extra bits currently set in this word are the 0,,6043 bits.
Here are a couple of UUOs to enable old-style interrupts.
APRENB [OP=047, ADR=16] CALLI 16
--------------------------------------------------
MOVE AC,[<interrupt bits to be enabled>]
APRENB AC,
The APRENB UUO enables your job to receive old-style interrupts upon any of the
conditions represented by the bits in the AC. Only bits 19, 22, 23, 26, 29 and
32 (0,,231110 bits) can be enabled by the old interrupt system. See page 219
for the interrupt conditions these bits represent.
Any old-style interrupt that is given will disable old-style clock interrupts.
An old style clock interrupt is given only when the clock ticks and the job is
enabled and in user mode (not in the middle of a UUO).
SETPOV [OP=047, ADR=32] CALLI 32
--------------------------------------------------
MOVEI AC,<address of interrupt routine>
SETPOV AC,
The SETPOV UUO is used to enable for old-style interrupts on push-down stack
overflow and underflow. This UUO takes the address in AC and stores it in
JOBAPR; thus this should be the address of your interrupt handling routine.
Then you are enabled for old-style push-down interrupts, with any previous
old-style enablings discarded. Thus you cannot use this UUO if you want any
old-style interrupts other than push-down overflow/underflow.
SECTION 10--MISCELLANEOUS UUOS
This section describes various UUOs which did not seem to fit in any other
sections. These UUOs include the common and useful EXIT, SLEEP, RESET and SWAP
UUOs. Also in this section are the UUOs RUN, TMPCOR, TMPCRD, UUOSIM, WAKEME,
JOBRD, LOCK, UNLOCK, SETDDT, SPWBUT, EIOTM, LOGIN, and LOGOUT.
EXIT [OP=047, ADR=12] CALLI 12
--------------------------------------------------
EXIT <code>,
The EXIT UUO is used to cause your program to stop and exit to the monitor. If
<code> is 0, then all I/O channels you have open will be closed (as if by the
RELEAS UUO with no inhibit bits on; see page 45), then a RESET (see the RESET
UUO below) will be done, "EXIT" will be typed out, and you will not be permitted
to CONTINUE your program after exiting. If <code> is 1, then this UUO will not
affect any of your I/O channels nor will it do a RESET nor type "EXIT"; a
subsequent CONTINUE monitor command will cause your program to resume execution
at the instruction immediately following the "EXIT 1," instruction. Other
values of <code> are reserved for future use.
Both forms of this UUO kill any spacewar modules you have.
A job detached or running without JLOG set (see the JBTSTS UUO on page 197)
giving either form of this UUO will have its I/O channels closed, and then the
job will be killed.
SLEEP [OP=047, ADR=31] CALLI 31
--------------------------------------------------
MOVEI AC,<number of seconds to sleep>
SLEEP AC,
The SLEEP UUO causes your job to be stopped for the number of seconds specified
by the contents of the AC, which is interpreted (approximately) modulo =69. If
AC contains zero, your job will sleep for 1/60 of a second. When the sleep time
is up, your program is resumed at the instruction immediately after the SLEEP.
If you type control-C or execute a UWAIT UUO at interrupt level while you are
sleeping, the SLEEP is terminated immediately.
RESET [OP=047, ADR=0] CALLI 0
--------------------------------------------------
RESET
The RESET UUO is used to reset various conditions pertaining to your job. All
monitor commands that get a new program into your core image do a RESET first.
Also, the "EXIT 0," UUO (see above) does a RESET just before exiting. Here is a
list of the things that happen when a RESET is done:
All your I/O channels (including any currently saved with the IOPUSH
UUO) are released without being closed. That is, the result is the same
as that from doing a RELEAS <channel>,3 for every channel you have open.
See the RELEAS UUO on page 45.
The state of program-controllable echoing of typed characters is reset
to echo all characters. This is done by clearing the NOECHO bit (bit
28--the 0,,200 bit) and the NOECHB bit (bit 27--the 0,,400 bit) in the
terminal's I/O status word (see Section 12.2). See also Section 3.1.
The special-activation-mode bit (bit 11--the 100,,0 bit) is cleared in
your line characteristics word (see the GETLIN UUO on page 77), and your
special activation table is reset to the standard special activation
table (including extra bits at the end of the table--see the SETACT UUO
on page 84). Also, the XON bit (bit 16--the 2,,0 bit), which inhibits
linefeed insertion after carriage returns, is cleared in your line
characteristics unless you are running on a PTY.
JOBFF in your job data area is reset from the value in the left half of
JOBSA. See Appendix 2.
Your user interrupt enablings (both new- and old-style) are cleared.
See Section 9.
UUO simulating is disabled. To re-enable it, you must do another UUOSIM
UUO (see page 254).
Your core image is unlocked from core. See the LOCK and UNLOCK UUOs on
page 257.
If you have a simulated upper segment created by the SETPR2 UUO (see
page 164), it goes away. Note that the RESET UUO does not affect any
real upper segment you may have nor any pseudo upper segment which the
system may have created for you (using SETPR2) if you tried to RUN or
GET an SSAVEd program at a time when there were no job slots available
for its upper segment.
Any spacewar processes you have are killed. See Section 8.
If there is a letter in your mailbox, it is thrown away. See Section 7.
Any pseudo-teletypes (PTYs) you have are released along with any jobs
logged in on those PTYs. See Section 3.5.
Any extra Data Disc channels you have are released. See Section 4.7.
If you are on a display, your display is reset to its initial state as
would be done by a DPYCLR UUO (see page 146 and Section 4 in general).
If you are on a Data Disc display, your video switch map is reset to the
permanent map. See Section 4.8.
If you are on a III or Data Disc display, your audio switch connection
is reset to the permanent connection. See Section 4.9.
SWAP [OP=047, ADR=400004] CALLI 400004
--------------------------------------------------
MOVE AC,[SAVADR,,GETADR]
SWAP AC,
SAVADR: <device name in sixbit>
<file name in sixbit>
<file name extension in sixbit>,,<1 if saving upper segment>
<core size in 1K blocks>,,<starting address>
<project-programmer name>
GETADR: <device name in sixbit>
<file name in sixbit>
<file name extension in sixbit>,,<mode bits>
<core size in 1K blocks>,,<starting address increment>
<project-programmer name of file>
<project-programmer name for new job>
The SWAP UUO is used to save your core image in a file and/or get or run another
core image from a file. This UUO can also be used to create a job and to start
up a program on that job. The format of the files used by this UUO is exactly
that of the SAVE, GET, RUN and R monitor commands. SWAP does a RESET (see the
RESET UUO above) before saving or getting a core image.
If AC left is non-zero, then your core image will be saved in the file described
by the block pointed to by AC left. After that, if AC right is non-zero, then
the core image contained in the file described by the block pointed to by AC
right is run or set up as either your core image or that of a new job. If both
halves of AC contain zero, the SWAP UUO is a no-op.
Now for a few details.
If the left half of the AC is zero, no core image is saved. If it is non-zero,
it should point to a five-word block which contains (as shown at SAVADR above)
the specifications for the dump file to be saved. These specifications include
the device name, file name and extension, and project-programmer name for the
file, a flag indicating whether the upper segment is also to be saved, the
amount of (lower-segment) core (in 1K blocks) to be saved, and the starting
address for the dump file. Before the core image is saved, your job name is
changed to the primary name of the file to be written. Your upper segment, if
any, will not be saved unless the low order bit (bit 35--0,,1 bit) is on in the
right half of SAVADR+2 (the word containing the file name extension). If the
(lower-segment) core size specified is zero, the amount of core you currently
have will be used. If the starting address is zero, the current starting
address of your job will be used. If the starting address is non-zero, it will
be copied into the right half of JOBSA in your job data area before the core
image is saved. If the extension is zero, 'DMP' will be used. If the
project-programmer name is zero, your current Disk PPN is used (see page 20).
Next, if the right half of AC is zero, then no new core image is run. If it is
non-zero, it should point to a block which contains (as shown at GETADR above)
the specifications for the dump file to be run. These include the device name,
file name and extension, and project-programmer name of the dump file, the core
size it is to be run in, the starting address increment, some special mode bits
and, if the dump file is to be run as a new job (independent of the job giving
the SWAP UUO), the project-programmer name under which that job should be logged
in. The new core image gets the same values in its ACs as the original core
image had. The starting address increment is added to the starting address
saved in the dump file to determine where the program is to be started. The
name of the job into whose core image the dump file is read is set to the
primary name of the file being read. The mode bits are in the right half of the
file extension word and have the following meanings:
BITS OCTAL MEANINGS OF 1'S IN MODE BITS OF SWAP UUO
35 0,,1 The dump file will not be started; instead, the message
JOB SETUP will be typed out and the job will be put
into monitor mode.
34 0,,2 The right half of GETADR+3 will be taken as an absolute
starting address rather than as an increment.
33 0,,4 The program will be started on a new job which will be
logged in under the project-programmer name at
GETADR+5; if this PPN is zero, your logged in PPN will
be used for the new job. If this bit is off, then the
word at GETADR+5 is ignored.
32 0,,10 If starting up another job (bit 33 on), the job will be
started up as a phantom rather than as a normal job
(see the WAKEME UUO on page 255). This means that the
JLOG bit in the job status word (see the JBTSTS UUO on
page 197) for the new job will not be turned on; thus
that job will go away if it hits any sort of error
condition (such as a parity error or a push-down stack
overflow).
When you start up a new job with this UUO by having bit 33 on in GETADR+2, the
job number of the new job is returned in the AC specified in the UUO. A zero is
returned if no new job could be started because there were no job slots left.
When a new job is successfully started, its ACs are copied from your ACs; but in
the AC specified in the SWAP UUO, the new job will get your job number instead
of its own. Thus the old job is given the number of the new job and the new job
is given the number of the old one. A new job started up this way is given the
same privilege bits as the old job (the one executing the SWAP) provided the new
job's login PPN is the same as the old job's login PPN. Otherwise, the new job
gets only a copy of the old job's LUP (local user) privilege.
If the ENTER fails on the file specified at SAVADR, or if the LOOKUP fails on
the file specified at GETADR, an error message will be typed out and the program
stopped.
RUN [OP=047, ADR=35] CALLI 35
--------------------------------------------------
MOVE AC,[<starting address increment>,,GETADR]
RUN AC,
GETADR: <device name in sixbit>
<file name in sixbit>
<file name extension in sixbit>,,<mode bits>
0
<project-programmer name of file>
<core size in words>
The RUN UUO is DEC's version of the SWAP UUO. Except for a slightly different
parameter format (see RUN UUO calling sequence above), the only differences
between SWAP and RUN are that with the RUN UUO, no core image can be saved and
no phantom job can be started up (mode bits 32:33 are ignored). For details,
see the SWAP UUO above.
TMPCOR [OP=047, ADR=44] CALLI 44
--------------------------------------------------
MOVE AC,[<code>,,ADR]
TMPCOR AC,
<error return>
ADR: <filename>,,0
IOWD BLEN,BUF
BUF: BLOCK BLEN
Code Function
0 Return in AC the number of words of free TMPCOR space.
1 Read specified file.
2 Read and delete specified file.
3 Write specified file (deleting old version, if any).
4 Read TMPCOR directory.
5 Read and clear TMPCOR directory.
6 Read TMPCOR directory for all ALIASes.
7 Read and clear TMPCOR directory for all ALIASes.
The TMPCOR UUO allows a job to leave several short files in core from the
running of one program to the next. A RESET will not affect these files, but
all of a job's TMPCOR files are deleted when the job is killed. TMPCOR files
are provided mainly for communication between programs running on the same job;
however, the TMPCOR files of other jobs can be read (but not written) with the
TMPCRD UUO described below. This system of temporary storage improves response
times by reducing the number of disk operations necessary for storage and
retrieval of temporary data. A TMPCOR file must be written or read all in one
dump-mode operation¬you cannot pick up reading or writing where you left off;
however, when reading a TMPCOR file, you do not have to read the entire file.
The sum of the sizes of all the TMPCOR files for a single job is not allowed to
exceed 400 words.
Each TMPCOR file has an EXPLICIT three-character sixbit file name and an
IMPLICIT project-programmer name (PPN). When you create a temporary file, the
file is given your current ALIAS (Disk PPN) as its project-programmer name. To
reference the file later using the TMPCOR UUO either to read, delete or
overwrite it or to find it in a TMPCOR directory, your ALIAS must be equal to
the file's PPN (i.e., your ALIAS when the file was written). The TMPCRD UUO
(see below) allows you to access files written with PPNs other than your current
ALIAS.
For the TMPCOR UUO, AC left should contain a code that indicates which one of
several functions is to be performed. AC right should hold the address of a
two-word block which contains, as indicated above, the name of the file being
referenced (if any) and the length (BLEN) and location (BUF) of the user buffer
area from which or into which data is to be written or read. When this UUO
returns, AC will contain a value that depends on the function executed. This
UUO skips on successful completion of the function and takes the direct (error)
return otherwise. Each function is described separately below.
CODE FUNCTION
0 Get free TMPCOR space. The number of remaining words of TMPCOR
space available to the job is returned in AC. This function
always takes the skip return. (The two-word block at ADR is not
referenced by this function.)
1 Read file. If the specified file exists, as much of it as
possible is read into the user's buffer area (at BUF), the length
of the file is returned in AC and the skip return is taken. If
the file does not exist, the number of words of free TMPCOR space
is returned in AC and the direct (error) return is taken.
2 Read and delete file. This function is the same as function 1
except that the file is deleted after it is read.
3 Write file. If a file already exists with the specified name, it
is deleted. Next, if there is enough TMPCOR space for the new
file (whose size is given by BLEN), then the file is written (with
the data at BUF), the number of remaining free TMPCOR words is
returned in AC and the skip return is taken. If there is not
enough space to write the file completely, then the file is not
written, the number of remaining free TMPCOR words is returned in
AC and the direct (error) return is taken.
4 Read directory. The number of different TMPCOR files with the
appropriate PPN (ALIAS) is returned in AC and a 1-word entry is
made in the user's buffer area (beginning at BUF) for each such
file until either there is no more space or all the files have
been listed. The entry for a file has the following format:
<name>,,<size>
where <name> is the filename and <size> is the file length in
words. This function always takes the skip return.
5 Read and clear directory. This function is the same as function 4
except that after the directory is read, all of the user's TMPCOR
files with the appropriate PPN (ALIAS) are deleted.
6 Read directory for all ALIASes. The number of different TMPCOR
files (with any PPNs/ALIASes) is returned in AC and a 2-word entry
is made in the user's buffer area (beginning at BUF) for each such
file until either there is no more space or all the files have
been listed. The entry for a file has the following format:
<PPN/ALIAS>
<name>,,<size>
where <PPN/ALIAS> is the ALIAS of the job when the file was
created, <name> is the filename, and <size> is the file length in
words. This function always takes the skip return.
7 Read and clear directory for all ALIASes. This function is the
same as function 6 except that after the directory is read, all of
the job's TMPCOR files (for all PPNs/ALIASes) are deleted.
TMPCRD [OP=047, ADR=400103] CALLI 400103
--------------------------------------------------
MOVE AC,[<code>,,ADR]
TMPCRD AC,
<error return>
ADR: <filename>,,<job number>
IOWD BLEN,BUF
<PPN for TMPCOR file>
BUF: BLOCK BLEN
Code Function
0 Return in AC the number of words of free TMPCOR space.
1 Read specified file.
2 Read and delete specified file.
3 Write specified file (deleting old version, if any).
4 Read TMPCOR directory.
5 Read and clear TMPCOR directory.
6 Read TMPCOR directory for all ALIASes.
7 Read and clear TMPCOR directory for all ALIASes.
The TMPCRD UUO is like the TMPCOR UUO above except that it allows access to the
temporary files of any job and the PPN of files to be referenced can be
specified explicitly. The number of the job whose files you want to reference
should be in the right half of the filename word at ADR. A zero job number
means your own job. Only function codes 0, 1, 4, and 6 are allowed when
accessing another job's temporary files; other function codes will result in an
ILLEGAL UUO. The PPN used is that contained in the word at ADR+2, unless that
word is zero, in which case the login PPN (NOT ALIAS) of the specified job is
used. See the precise explanations of the various functions under the TMPCOR
UUO above. All the functions skip on success.
UUOSIM [OP=047, ADR=400106] CALLI 400106
--------------------------------------------------
MOVEI AC,ADR
UUOSIM AC,
ADR: <PC saved here for normal UUOs>
<UUO saved here for normal UUOs>
<PC to transfer to for normal UUOs>
ADR+3: <PC saved here for I-level UUOs>
<UUO saved here for I-level UUOs>
<PC to transfer to for I-level UUOs>
ADR+6: <PC saved here for spacewar UUOs>
<UUO saved here for spacewar UUOs>
<PC to transfer to for spacewar UUOs>
The UUOSIM UUO allows a user to have all UUOs trap to certain locations in his
core image instead of being executed by the system. At the same time the user
can still have the system execute whatever UUOs the user needs. The UUOSIM UUO
passes to the system the address of a 9-word block which consists of three
contiguous 3-word blocks, each specifying what the system should do when a
certain kind of UUO is given. The first 3-word block indicates what should be
done on UUOs given by the user's main program; the second 3-word block pertains
to UUOs given at interrupt level; the third block is for UUOs given at spacewar
level on P1. (Note that UUOs can NEVER be executed on P2.) The address of the
9-word block should be in the AC specified in the UUOSIM UUO. After this UUO is
executed, subsequent UUOs will cause the following action, using the appropriate
3-word block as mentioned above.
If the second word of the block is non-zero or if the third word is zero, then
the UUO is executed by the system in the usual manner. Otherwise, the PC at the
time the UUO was encountered is saved in the first word of the block, the UUO
itself is stored in the second word of the block and control is transferred to
the PC specified in the third word of the block. Note that the PC stored in the
first word has already been incremented; it points to the instruction
immediately following the UUO. Note also that the UUO stored in the second word
has already had the effective address calculation carried out; the effective
address is in the address field and the indirect and index fields will be zero.
The prior test for the second word being non-zero has the effect of disabling
user handling of UUOs issued by the user's UUO handler itself.
To undo the above effect of the UUOSIM UUO, give the UUOSIM UUO with zero in the
specified AC and with ADR+1 (from the original UUOSIM given) containing a
non-zero value so that this UUO will not simply be handed back to you. The
RESET UUO (see page 249) will also disable further special user handling of
system UUOs (but again you must force the system to handle the RESET itself).
WAKEME [OP=047, ADR=400061] CALLI 400061
--------------------------------------------------
MOVEI AC,ADR
WAKEME AC,
<error return>
ADR: <phantom's jobname in sixbit>
<phantom's PPN in sixbit>
<data>
data < 0 means never start this job
data = 0 means start this job now if it is not already running
data > 0 means start this job at the time specified by <data>,
where <data> = <date>,,<time in minutes>
The WAKEME UUO is used to start up, or prevent from starting up, any of the
system phantom jobs. A phantom is a job started by the system to do some
system-related work but which runs as a user job. Phantom jobs run detached
with the JLOG bit off in the job status word (see the JBTSTS UUO on page 197).
The JLOG bit being off means that the job will go away if it hits an error (such
as a parity error or illegal memory reference). Also, if you type a monitor
command line to a job with the JLOG bit off, the job will go away immediately.
For this UUO, AC should contain the address of a three word block. The first
two words of this block should have, in sixbit, the name of the phantom to be
started up and the project-programmer name where that phantom lives. The third
word of the block should contain a code indicating what the system should do
about the phantom. A negative code indicates that the phantom should never get
started up, a zero code means that the phantom should be started now unless it
is already running, and a positive code represents a date (left half) and time
(right half) when the phantom should be started up. The date is in system date
format (see the DATE UUO on page 177) and the time is in minutes after midnight.
If there is no phantom in the system's table with the jobname and PPN given, the
error return is taken. Otherwise, the skip return is taken.
N.B. You should not use this UUO unless you are the person responsible for the
phantom you are referencing or unless you are absolutely sure that what you are
doing is okay.
JOBRD [OP=047, ADR=400050] CALLI 400050
--------------------------------------------------
MOVEI AC,ADR
JOBRD AC,
<error return - code in ADR+1>
ADR: <job name or number>
-<word count>,,<address of data in his core image>
<address in your core image where data is to go>
Error codes: 1 job not logged in
2 ambiguous job name
3 non-existent job name
4 address out of bounds (either in your
core image or in his)
5 job not logged in
6 block too large (more than 1K)
The JOBRD UUO allows you to read a block of data out of the core image of
another job. The data is BLTed from his core image to yours. AC should contain
the address of a three word block, the first word of which should contain either
the sixbit name or the number of the job whose data you wish to copy. The left
half of the second word should contain the negated count of the number of words
to be read; the right half of the second word should contain the address of the
block in the other job that you want to copy. The third word should contain the
address in your core image where you want the data to be put. The maximum size
block that can be read using this UUO is 1K (=1024 words).
If this UUO fails for any reason, the direct (error) return is taken and a code
indicating the cause of failure is placed in ADR+1. A list of the possible
error conditions and their codes is given above. If this UUO succeeds in
transferring the data, the skip return is taken.
LOCK [OP=047, ADR=400076] CALLI 400076
--------------------------------------------------
LOCK AC,
The LOCK UUO is used to lock your job in core so that you can be sure that you
will not be swapped out. Upon return from this UUO, you will have been locked
in core.
Jobs with upper segments are not allowed to lock themselves in core.
To undo the effect of the LOCK UUO, you can use the UNLOCK UUO (see below) or
the RESET UUO (see page 249). Any system-detected error condition will also
cause an UNLOCK to be done, as will any attempt to change your core size with
the CORE UUO (see page 184). The LOCK UUO itself will first do an UNLOCK before
locking you in.
The LOCK UUO should be used only when really necessary. When users are locked
in core, there is less core available for normal users who are being swapped in
and out.
UNLOCK [OP=047, ADR=400077] CALLI 400077
--------------------------------------------------
UNLOCK
The UNLOCK UUO is used to unlock your job from core after you have used the LOCK
UUO (see above) to lock it. Many other things also cause an UNLOCK to be done.
These are listed under the LOCK UUO above.
SETDDT [OP=047, ADR=2] CALLI 2
--------------------------------------------------
MOVEI AC,<address of DDT or RAID>
SETDDT AC,
The SETDDT UUO is used to tell the system the starting address of DDT or RAID in
your core image. This address is saved in JOBDDT in your job data area (see
Appendix 2); however, you are not allowed to change this value directly--you
must use this UUO instead. The DDT monitor command starts your program at the
address contained in JOBDDT if that address is non-zero.
SPWBUT [OP=047, ADR=400000] CALLI 400000
--------------------------------------------------
SPWBUT AC,
The SPWBUT UUO returns in the AC the value of the spacewar buttons. Each
spacewar button controls one bit in this value. The bit is a one if the circuit
represented by that bit is open and a zero if the circuit is closed. Only bits
22:26 and 28:35 (the 0,,37377 bits) are currently wired up. If the buttons are
unplugged, the wired-up bits will all be on (value of 0,,37377).
The regular spacewar buttons only utilize the low-order 8 bits (bits 28:35--the
0,,377 bits). At the time of this writing, these buttons use normally-closed
switches (bit values of zero). This means that with the buttons plugged in and
not depressed, the value of the spacewar buttons is 0,,37000. No claim is made,
however, that new buttons will not replace those that are described in this
paragraph. To be sure what kind of switches are in the buttons, find and
examine the buttons yourself.
EIOTM [OP=047, ADR=400005] CALLI 400005
--------------------------------------------------
EIOTM
The EIOTM UUO puts you into IOT-USER mode, in which opcodes from 700 up are
executed as machine I/O instructions rather than as UUOs. This mode is
described further in Appendix 1.
LOGIN [OP=047, ADR=15] CALLI 15
--------------------------------------------------
MOVE AC,[-N,,ADR]
LOGIN AC,
ADR: <project programmer name>
<privilege bits>
The LOGIN UUO is used by the LOGIN program to log in a job. This UUO is illegal
if JLOG in your job status word is already set (i.e., if you are already logged
in). If JLOG is not already set, then this UUO turns it on and turns off JACCT
in your job status word. Also, it is used to set the logged in PPN for the job
and the job's privilege bits. AC right should contain a pointer to a table of
up to two words. The first word in the table should contain the PPN the job is
to get and the second word should contain the privilege bits the job is to get.
AC left should contain the negative of the number of words in the table that are
to be set as indicated. Thus to set both PPN and privileges, AC left should
contain -2; to set only the PPN, AC left should be -1. Values (of the PPN and
privileges) that are not set from the table at ADR are cleared to zero. The
privilege bits are set both in your active privileges and in your passive
privileges (see the GETPRV UUO on page 190).
LOGOUT [OP=047, ADR=17] CALLI 17
--------------------------------------------------
LOGOUT
The LOGOUT UUO is provided for the LOGOUT program to kill its job. This UUO is
illegal if JACCT is not on in your job status word. If JACCT is on, the job is
killed.
SECTION 11--OBSOLETE OR OTHERWISE USELESS UUOS
This section documents some UUOs that still work but which, for various reasons,
are obsolete. Mentioned at the end of this section are some other UUOs that are
even more obsolete in that they do not work. In general, there are better ways
to do the things all of these UUOs do, but the documentation is included for
completeness and for the benefit of people trying to decode rusty old programs
which use these UUOs. Users are to be discouraged from using these in any new
pieces of code.
11.1 Old UUOs
Here are some UUOs that still work although they are generally unnecessary.
INTIIP [OP=047, ADR=400031] CALLI 400031
--------------------------------------------------
INTIIP AC,
The INTIIP UUO is designed to be given by a process running at interrupt level.
It returns in AC the bit representing the source of the current interrupt. This
is a copy of the value of JOBCNI at the time your interrupt-level routine is
started up. Thus it is much more efficient to do a MOVE AC,JOBCNI and the
results are the same. If you give this UUO when you are not at interrupt level,
then zero is returned in AC.
USKIP [OP=047, ADR=400041] CALLI 400041
--------------------------------------------------
USKIP
<return if no UUO in progress>
The USKIP UUO can be used by an interrupt-level process to determine if the
interrupted program was in the middle of executing a UUO. USKIP will skip if
there was a UUO in progress at the time the interrupt occurred and will take the
direct return if no UUO was being executed. Thus this UUO will tell you whether
a UWAIT will return immediately. The same information can be obtained by
examining the user-mode bit (bit 5--the 10000,,0 bit) in JOBTPC; the user-mode
bit will be on unless a UUO was in progress.
The USKIP UUO is illegal except at interrupt level.
LIOTM [OP=047, ADR=400006] CALLI 400006
--------------------------------------------------
LIOTM
The LIOTM UUO gets you out of IOT-USER mode, thus making opcodes over 700 into
UUOs again. However, this function can be achieved without doing a UUO at all.
For instance, the instruction
JRST 2,@[.+1]
will also get you out of IOT-USER mode. See the writeup of IOT-USER mode in
Appendix 1.
DDTIN [OP=047, ADR=1] CALLI 1
--------------------------------------------------
MOVEI AC,ADR
DDTIN AC,
ADR: <21 word block for returned characters>
The DDTIN UUO is used to read in all characters that have been typed on the
terminal attached to your job. This UUO does not wait for any special
activation character; it just reads whatever is in the terminal input buffer and
returns those characters in the block pointed to by the contents of AC. This
block should be at least 21 words long in order to hold all the characters being
read; at most =84 characters will be read. The characters are returned as an
asciz string at ADR (7 bits per character, 5 characters per word, with a null
(zero) byte after the last character read).
If the terminal input buffer is empty, this UUO will not return until a
character is typed. Thus at least one character is returned each time this UUO
is given.
TTYUUO (see Section 3.3) provides generally more convenient ways of reading
characters from the terminal.
DDTOUT [OP=047, ADR=3] CALLI 3
--------------------------------------------------
MOVEI AC,ADR
DDTOUT AC,
ADR: <asciz string to be typed out>
The DDTOUT UUO types out an asciz string on the terminal. AC should contain the
address of the first word of the string. The string is terminated by the first
null (zero) byte. The OUTSTR UUO (see page 74) is the recommended way of typing
out strings although this UUO still works.
GETCHR [OP=047, ADR=6] CALLI 6
--------------------------------------------------
MOVE AC,[<device name in sixbit, or channel number>]
GETCHR AC,
The GETCHR UUO does exactly the same thing as the DEVCHR UUO; see page 61.
SETNAM [OP=047, ADR=400002] CALLI 400002
--------------------------------------------------
MOVE AC,[<sixbit job name>]
SETNAM AC,
The SETNAM UUO is used to change your job name to that given in the AC. Any job
name is legal. This UUO does exactly the same thing as the SETNAM UUO which is
CALLI 43.
SEGSIZ [OP=047, ADR=400022] CALLI 400022
--------------------------------------------------
SEGSIZ AC,
The SEGSIZ UUO returns in AC the size of your upper segment. The size returned
is the number of words in your upper segment minus one. If you have no upper
segment attached, zero is returned.
This segment size can be found out more easily by looking at the right half of
JOBHRL in the job data area (see Appendix 2).
11.2 Useless UUOs
Each of the following unimplemented UUOs is either illegal or a no-op.
DDTGT [OP=047, ADR=5] CALLI 5
DDTRL [OP=047, ADR=7] CALLI 7
TRPSET [OP=047, ADR=25] CALLI 25
TRPJEN [OP=047, ADR=26] CALLI 26
GETSEG [OP=047, ADR=40] CALLI 40
GETTAB [OP=047, ADR=41] CALLI 41
SPY [OP=047, ADR=42] CALLI 42
RUNMSK [OP=047, ADR=400046] CALLI 400046
GDPTIM [OP=047, ADR=400065] CALLI 400065
LTHUUO [OP=047, ADR=400120] CALLI 400120
[OP=042]
[OP=044]
[OP=045]
[OP=046]
[OP=052]
[OP=053]
[OP=054]
[OP=700]
[OP=706]
[OP=707]
SECTION 12--INDIVIDUAL DEVICE DESCRIPTIONS
This section reveals the idiosyncrasies of each of the various I/O devices and
of the system in handling these devices. Each device is described in a separate
subsection. For features common to all (or most) of these devices, consult
Section 2. For the common bits in the device I/O status word, see specifically
Section 2.6.
12.1 The Disk (DSK and new-mode UDPn)
Except where noted below, all explanations in this section apply to device DSK
and to new-mode usage of device UDPn (n=1 to 2). However, these are different
devices, each with its own MFD (Master File Directory); that is,
DSK:OPTION.TXT[S,SYS] and UDP1:OPTION.TXT[S,SYS] are different files.
Disk storage is organized by files. Each file is allocated one or more disk
blocks depending on the size of the file. Each block is 2.25K words long and
consists of =18 records of =128 (200 octal) words each. All disk activity is in
terms of whole records. In buffered mode, this means that exactly 200 words of
data are transferred for each buffer, regardless of the actual buffer size; thus
using a non-standard size buffer for disk I/O should not be attempted. In dump
mode an output command to write a number of words that is not a multiple of 200
will cause the last record written by the command to be filled with zeroes.
These zeroes will not be included in the word count for the file if and only if
they are part of the last record in the file.
Note: Dump mode output using the ACs as data is illegal. Dump mode command
lists, however, are permitted in the ACs.
In buffered mode, disk I/O is optimized to account for block boundaries. On
output, this means that filled buffers will not actually get written out until
there is only one empty buffer left or until enough buffers have been filled to
finish out a whole block. On input, as much of a whole block as will fit into
your buffers is transferred all at one time. Currently, the recommended number
of buffers for disk I/O is =19; using that many allows a whole disk block always
to be read or written in one transfer.
Each file belongs to some project-programmer name (PPN). For each PPN, there is
a special file called the UFD (User File Directory) which contains the names of
all the files on that disk area (i.e., all the files with that PPN). Every UFD
is a file on the disk area [1,1]. The filename for a given PPN's UFD consists
of the PPN itself as the primary name (project code in the left half, programmer
name in the right half, each half being right-justified), the extension .UFD and
a PPN of [1,1]. For example, the UFD for the disk area [FOO,BAZ] is the file
FOOBAZ.UFD[1,1]. The date and time written for a UFD on device DSK: are the
date and time of the last LOGOUT done by that PPN.
The UFD for disk area [1,1] is " 1 1.UFD[1,1]" and is called the MFD (Master
File Directory). The MFD does not contain an entry for itself, even though it
is on [1,1]; however it does contain the names of all the other files on [1,1],
which files are in fact the UFDs for all the other disk areas. There is one MFD
on each disk device (DSK or UDPn).
Any UFD (including the MFD) can be read just like any other file. Every UFD
consists of a number of contiguous 20-word entries, each of which either points
to a file or is unused. The first three words of a file's entry are exactly the
same as the first three words you get back from a successful LOOKUP (see page
32) of that file. The fourth word of a file's entry contains a disk pointer to
the file. The remaining 14 words are currently zero but will soon hold other
information about the file, such as its length. The first word of an entry not
in use is zero.
Long Block LOOKUPs, ENTERs and RENAMEs
If the 0,,400 bit (bit 27) is on in the I/O status word when you give a LOOKUP,
ENTER or RENAME UUO for the disk, then the UUO uses a 6-word block rather than
the usual 4-word block (see these UUOs starting on page 32). An ENTER using the
6-word block will set the file's date and time written directly from the second
and third words of the block rather than from the current time and date.
The fifth word of the block sets or returns the date (in system date format) on
which the file was last referenced. The sixth word of the block contains the
date the file was last dumped on magnetic tape for disk backup. The format of
this word is as follows:
BITS OCTAL MEANINGS OF FIELDS IN DUMP-DATE WORD
4 20000,,0 This bit is a one if this dump-date word is invalid.
21:35 0,,77777 This is the date last dumped, in system date format
(see the DATE UUO on page 177).
0 400000,,0 This bit is a one if the file was last dumped on a
temporary class dump. This bit is zero if the dump was
of system permanent class.
9:20 777,,700000 These bits hold the number of the tape on which the
file was last dumped.
1:3 340000,,0 These bits hold the number of times this file has been
dumped in permanent class dumps.
Record Offset
In the normal case, the data in a disk file starts in the first record of the
first block allocated to the file. However, it is sometimes convenient to use
the first few records of a file to store special data which is associated with
the file but which is not really part of the file. To this end, the record
offset feature is provided in the disk system. This feature allows a user to
HIDE any number of records at the beginning of a file simply by specifying the
PHYSICAL record number of the first record of the normal part of the file. When
this is done, any program doing normal disk I/O with this file will never see
the hidden records; however, any programs that need to access the hidden part
can do so easily.
In a disk file, LOGICAL record number 1 is the first record of the normal part
of the file. The last hidden record is LOGICAL record number 0, and preceding
records are given successive negative numbers. Thus, in a file with N hidden
records, the first PHYSICAL record of the file would be LOGICAL record number
-N+1, the remaining hidden records would be numbered, -N+2, -N+3, ..., -1, and
0. The first LOGICAL record of such a file would be PHYSICAL record number N+1.
To access the hidden records (which come before LOGICAL record 1), use the USETI
and USETO UUOs (see Section 2.14) with the appropriate LOGICAL record number.
Note that in these UUOs the effective address is interpreted as a signed
twos-complement number which specifies the LOGICAL record number of interest.
To set the record offset for a file, a special form of the MTAPE UUO for the
disk is used. MTAPE for disk has several uses; you indicate the one you want by
specifying a function number along with the MTAPE UUO. The function number for
the set-offset UUO is 21. Another MTAPE (function number 20) can be used to
retrieve the current value of the record offset. In both of these MTAPEs the
actual offset number used is the PHYSICAL RECORD NUMBER OF THE FIRST LOGICAL
RECORD of the file, i.e., the number of hidden records plus one. Note that the
record offset is stored in the file's retrieval as the number of hidden records;
MTAPEs that read the retrieval directly thus return that number. The get-offset
and set-offset UUOs are described in detail below in the MTAPE writeup; see
MTAPEs with function numbers 20 and 21 on page 281.
It is legal for a file's record offset to be bigger than the entire file. In
this case, the file's logical size will be zero.
NOTE: Setting the PHUBIT (bit 29--0,,100 bit) in the disk I/O status word will
force all UUOs that normally use LOGICAL record numbers to use PHYSICAL record
numbers instead. See the PHUBIT below.
Disk I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
26 0,,1000 RAQBIT When an ENTER is done to go into Read-Alter
mode, the date and time written and the date
referenced for the file will NOT be updated
to the current date and time. In fact, the
file will not be changed (written) at ENTER
time at all. Programs that open huge files
in Read-Alter mode should set this bit to
save time and disk ops.
27 0,,400 DMPBIT Use 6-word blocks in LOOKUP, ENTER and
RENAME.
28 0,,200 GARBIT Suppress error message when disk is full or
bad retrieval from LOOKUP, ENTER or RENAME;
take error return instead.
29 0,,100 PHUBIT Make the record offset of the disk file open
on this channel be ignored by all UUOs except
those that explicitly set or return the
record offset. With PHUBIT on, the UUOs
USETI, USETO, UGETF, and MTAPE (functions 0
and 16) take and/or return PHYSICAL record
numbers instead of LOGICAL record numbers,
and the UUOs LOOKUP and ENTER return the
PHYSICAL size of the file rather than the
LOGICAL size. In other words, with PHUBIT ON
record numbers are taken as PHYSICAL (record
offset ignored), and with PHUBIT OFF record
numbers are taken as LOGICAL (thus allowing
some records at the beginning of the file to
have negative record numbers). MTAPE
functions 20 and 21 (read and set record
offset) are not affected by this bit.
MTAPE UUOs for the Disk
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR ;MTAPE form for the DISK
ADR: SIXBIT /GODMOD/
<function number>
<other arguments depending on function>
...
This form of the MTAPE UUO is used to do special things with the disk. The
exact meaning of this UUO depends on the contents of the words at ADR and ADR+1.
To execute any of the functions listed below, you must have INITed or OPENed the
disk on the channel indicated by the AC field of the UUO.
If the word at ADR contains -1 (instead of SIXBIT /GODMOD/ as shown in the
sample call above), then the program will be stopped with the message ILLEGAL
UUO. If the word at ADR contains neither -1 nor 'GODMOD', then the USET pointer
for the file open on this channel will be returned in the word at ADR. This is
the value which can be set by a USETI, USETO or UGETF UUO (see Section 2.14).
If the word at ADR contains 'GODMOD', then the function to be executed is
determined by the function number contained in ADR+1. The various such
functions are explained below along with descriptions of what the block at ADR
should contain when the UUO is called for that function. Some of these
functions require that a file be open on the indicated channel. Also, some
functions take the skip return on success and the direct return on errors; other
functions always take the direct return. Finally, some of these functions
require you to have certain privileges in order to execute them. See the
writeups below for details.
Absolute disk addresses specified in the MTAPEs below for a UDP are taken
relative to the first block (the SAT block) of the particular UDP and are
limited to blocks on that UDP. MTAPEs for device DSK can reference all disk
blocks, including UDP blocks.
The SATID for a UDP is a sixbit name which is intended to agree with the name
written on the pack label. This is not to be confused with the UDP password.
The last block of a UDP is still used for a password, as with old-mode UDPs.
However, the password need not be given for new-mode operations, which are
protected by the same protection-key scheme used with the DSK. The UDP password
is also stored as the password for the UDP disk area [1,1].
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;GET USET POINTER
0
Function 0 for a disk MTAPE gives you the current value of the USET pointer for
the file open on this channel. This is the value which can be set by a USETI,
USETO or UGETF UUO (see Section 2.14). The pointer is returned in ADR+1 (where
the 0 was).
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;DISK ABSOLUTE READ
1
IOWD <word count>,<first address>
<record number>,,<disk block address>
Function 1 for a disk MTAPE reads into your core image from a specified absolute
location on the disk. The address where you want the data to go and the number
of words to be read should be in an IOWD word at ADR+2. The disk block that you
want to read from and the record number within the block where you want to start
reading should occupy the right and left halves respectively of the word at
ADR+3. You cannot read from more than one block at a time with this UUO. If
this function is successful, it takes the skip return; if there are any errors,
the direct return is taken. You must have the INF privilege to execute this
function.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;DISK ABSOLUTE WRITE
2
IOWD <word count>,<first address>
<record number>,,<disk block address>
Function 2 for a disk MTAPE writes data from your core image to a specified
absolute location on the disk. The address of the data in your core image and
the number of words to be written should be in an IOWD word at ADR+2. The disk
block that you want to write and the record number within the block where you
want to start writing should occupy the right and left halves respectively of
the word at ADR+3. You cannot write on more than one block at a time with this
UUO. If this function is successful, it takes the skip return; if there are any
errors, the direct return is taken. You must have the DAW privilege to execute
this function.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;SET SAT BIT
3
<disk block address>
Function 3 for a disk MTAPE sets the SAT bit corresponding to a particular disk
address. The SAT table indicates which blocks on the disk are in use; blocks in
use have the corresponding bit on and blocks unused have the bit off. You must
have the DAW privilege to execute this function, which marks a block as in use.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;CLEAR SAT BIT
4
<disk block address>
Function 4 for a disk MTAPE clears the SAT bit corresponding to a particular
disk address. You must have the DAW privilege to execute this function, which
marks a block as unused.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;READ SAT TABLE
5
IOWD <word count>,<first address>
<relative address in SAT table>
Function 5 for a disk MTAPE reads a portion of the SAT table into your core
image. The amount and destination of the read is indicated in an IOWD word at
ADR+2. The address in the SAT table where you want to start reading (relative
to SATTAB) is specified in ADR+3. The SAT table indicates which blocks on the
disk are in use; blocks in use have the corresponding bit on and blocks unused
have the bit off.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;WRITE SAT TABLE
6
IOWD <word count>,<first address>
<relative address in SAT table>
Function 6 for a disk MTAPE writes a portion of the SAT table from your core
image. The amount and address of the data to be written is indicated in an IOWD
word at ADR+2. The first address in the SAT table (relative to SATTAB) that you
want to write is specified by the word at ADR+3. You must have the DAW
privilege to execute this function.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;FORCE SAT TABLE TO BE WRITTEN OUT
7
Function 7 for a disk MTAPE forces the SAT table which the system has in core to
be written out onto the disk.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;READ SPECIAL 4 WORDS OF FILE INFORMATION
10
<address of 4-word block to receive file information>
Function 10 for a disk MTAPE reads the special 4 words of information for a file
into your core image. A successful LOOKUP must have been done on this channel.
The address where you want the 4 words to go should be in the word at ADR+2. If
this function succeeds, the skip return is taken. If no LOOKUP has been done,
the direct (error) return will be taken. You must have the INF privilege to
execute this function. The information kept in these special 4 words is
described below separately for normal files and for UFDs.
WORD CONTENTS OF SPECIAL 4 WORDS FOR NORMAL FILES
0 Zero.
1 Zero.
2 The name of the job that created this file. This will be the same
as the name of the file if it was created with either of the
monitor commands SAVE and SSAVE.
3 The login PPN of the job that created this file.
WORD CONTENTS OF SPECIAL 4 WORDS FOR UFDS
0 The password for this PPN, in sixbit and right justified.
1 The privilege bits for this PPN. See the descriptions of the
privilege bits under the GETPRV UUO on page 190.
2 The date and time of the last login by this PPN, not counting
logins using the delimiter period (.). The date is in the left
half in system date format, and the time is in the right half in
minutes after midnight.
3 Bits 0:8 (777000,,0 bits) of this word contain the default
protection for this UFD. If bit 9 (the 400,,0 bit) in this word
is on, then this PPN is allowed to log in from remote locations
without giving a password and this PPN is not given the LUP
privilege when it logs in.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;WRITE SPECIAL 4 WORDS OF FILE INFORMATION
11
<address of 4-word block to be written out>
Function 11 for a disk MTAPE writes out the special 4 words of information into
the retrieval for the file open on this channel. The address of the 4 words you
want written out should be in the word at ADR+2. If this function succeeds, the
skip return is taken. If there is no file open on this channel, the direct
(error) return will be taken. You must have the DAW privilege to execute this
function. The information kept in the special 4 words is described above
separately for normal files and for UFDs.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;Get USET pointer
12 or 13
Functions 12 and 13 for a disk MTAPE, formerly READ FLOPPY DISK and EXECUTE
DIAGNOSTIC PROGRAM, now just return in the word at ADR+1 the USET pointer for
the file open on this channel.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;READ FILE RETRIEVAL
14
IOWD <word count>,<first address>
Function 14 for a disk MTAPE reads up to 40 words of file retrieval into the
user's core image. The number of words to be read and the address where they
are to go should be indicated in an IOWD word at ADR+2. There must be a file
open on this channel. If this function is successful, the skip return is taken;
if no file is open, the direct (error) return is taken. If you use this
function to read the retrieval of a file on the disk area [1,1], then the first
of the special 4 words of file information for that file will be returned as
zero unless you have the INF privilege (the word returned as zero normally holds
the password for that UFD).
Note that if you use this function to read the record offset of a file directly
from the file's retrieval, then the number you will get will be the number of
hidden records, NOT the physical number of the first logical record.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;COMPARE ONE OF 4 SPECIAL WORDS OF FILE INFO
15
<number of the word you want to compare with, from 0 to 3>
<data to be compared>
Function 15 for a disk MTAPE compares a data word from your core image with one
of the special 4 words of file information for the file open on this channel.
Which word you want to compare with is indicated by a number from 0 to 3 in
ADR+2. The data word you want to compare against the magic word should be
located at ADR+3. If the words compared are the same, this function takes the
skip return. If the words are different, or if there is no file open on this
channel, then the direct return is taken. The information kept in the special 4
words is described above separately for normal files and for UFDs; see disk
MTAPE number 10 above ("read special 4 words of file information").
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;INCLUDE RECORD IN FILE
16
<record number>
Function 16 for a disk MTAPE allows you to include an existing record in the
word count for a file. This is useful if you have managed to write out some
data to extend a file but the file was never closed (system crash, etc.). The
number of the last record you wish added to the file should be in ADR+2. If
this function is successful, the skip return is taken and the USET pointer for
the file is left pointing to the indicated record with IODEND (end of file flag)
cleared. (If the record specified is not beyond the end of the file, the only
result will be to have changed the USET pointer and to have cleared IODEND, and
the skip return will be taken.) If there is no file open on this channel, or if
the record you specified does not exist, the direct (error) return is taken.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;UPDATE RETRIEVAL
17
Function 17 for a disk MTAPE forces all pointers and header information for the
file being written on this channel to be updated. This is mainly useful when
extending a file in Read-Alter mode. After this function has been executed, all
the data written into the file is included in the retrieval. So if the system
crashes, the word count for the file will be up to date.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;GET RECORD OFFSET
20
<record number returned here>
<physical file length returned here>
Function 20 for a disk MTAPE returns the PHYSICAL record number of the first
LOGICAL record of the file open on this channel. This record number is returned
at ADR+2; the physical length of the file in words, including any hidden
records, is returned at ADR+3. See the record offset feature on page 278.
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: SIXBIT /GODMOD/ ;SET RECORD OFFSET
21
<physical record number of first logical record>
Function 21 for a disk MTAPE is used to set the record offset for the file open
on this channel. The PHYSICAL record number of the record which is henceforth
to be considered the first LOGICAL record of the file should be in the specified
at ADR+2. If this function succeeds, the skip return is taken. If there is no
file open on this channel, or if some other error occurs, then the direct
(error) return is taken. See the record offset feature on page 278.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;GET FREE BLOCK COUNT
22
<address of word to receive result>
Function 22 for a disk MTAPE is used to get the count of free blocks on the
device. The word at ADR+2 should contain the address of the word into which the
free block count is to be placed.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;GET SATID
23
<address of word to receive result>
Function 23 for a disk MTAPE is used to get the SATID of the device. The word
at ADR+2 should contain the address of the word into which the SATID is to be
placed. The SATID for a UDP is a sixbit name which is intended to agree with
the name written on the pack label. This is not to be confused with the UDP
password.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;READ DISK IN DUMP MODE INTO P3 MEMORY
24
<IOWD for transfer relative to beginning of P3 memory>
<address of =38 words in your core image where ECC data goes>
<first ECC status word returned here>
<second ECC status word returned here>
<block>,,<track> ;Relevant only on old-mode UDPs.
Function 24 for a disk MTAPE is used to do dump-mode input from the disk into P3
memory. This function can read UDPs in either new or old mode. The complete
explanation of this MTAPE function is on page 315, in Section 12.11 on device
SIX (P3).
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: SIXBIT /GODMOD/ ;WRITE DISK IN DUMP MODE FROM P3 MEMORY
25
<IOWD for transfer relative to beginning of P3 memory>
<block>,,<track> ;Relevant only on old-mode UDPs.
Function 25 for a disk MTAPE is used to do dump-mode output to the disk from P3
memory. This function can write UDPs in either new or old mode. The complete
explanation of this MTAPE function is on page 316, in Section 12.11 on device
SIX (P3).
12.2 Terminals
Here are the meanings of some special bits in the terminal I/O status word
(device TTYn, n=0 to 144). For meanings of bits common to all devices, see
Section 2.6.
BITS OCTAL NAME MEANINGS OF 1'S IN TTY I/O STATUS WORD
0 400000,,0 TTYIOW The job using this terminal is waiting for
some input from this terminal.
1 200000,,0 SNKWAT The job attached to this terminal is waiting
in the SNEAKW UUO for a character to be typed
on the terminal.
2 100000,,0 TTYHLD Typeout on this non-display terminal is being
held (by control-B).
3 40000,,0 (unused)
4 20000,,0 SYNC An activation character has been typed on
this terminal.
5 10000,,0 TOIP Typeout is in progress on this terminal.
6 4000,,0 PTLIP A PTLOAD or PTL7W9 UUO is in progress on this
terminal.
7 2000,,0 TTYDTC This is a detached TTY DDB (not connected to
any terminal).
8 1000,,0 DDTM This terminal is in DDT mode (activates on
every character).
9 400,,0 TPMON The terminal is in monitor mode. This bit is
usually turned off when your job is running,
but you can make it stay on by giving a
CSTART or CCONTINUE monitor command. When
this bit is on, your program will not be able
to get any input from the terminal because
all the characters will be going to the
monitor's command decoder.
10 200,,0 IRMA The system is waiting for a transmitter
interrupt for this terminal. If one does not
occur within a second, the system will
restart output on this terminal.
11 100,,0 USRB TPMON will be cleared when the current output
finishes.
17 1,,0 IOW If both this bit and IOACT (see below) are
on, then the job using this terminal is
waiting either for terminal output to finish
or for input to be typed. The latter is
indicated by the TTYIOW bit also being on
(see above).
23 0,,10000 IOACT If both this bit and IOW (see above) are on,
then the job using this terminal is waiting
either for terminal output to finish or for
input to be typed. The latter is indicated
by the TTYIOW bit also being on (see above).
26 0,,1000 IOSUPR Control-O (ESCAPE O on displays) has been
typed. When this bit is on, nothing your
program outputs to the terminal will be typed
out. You can clear this bit implicitly by
doing any terminal input operation or
explicitly with any of the UUOs INIT, OPEN,
SETSTS or TTYSET. On non-displays, a second
control-O will clear this bit as will BREAK O
on displays.
27 0,,400 NOECHB Characters typed to the program running on
this terminal will not have the CONTROL and
META keys echoed. These keys are always
echoed when the terminal is in monitor mode
(TPMON bit on--see above). The NOECHB bit
can be turned on and off only by the OPEN,
INIT, SETSTS and TTYSET UUOs, except that a
RESET (see page 249) will clear this bit,
thus turning echoing of CONTROL and META back
on.
28 0,,200 NOECHO Characters typed to the program running on
this terminal will not be echoed to the
terminal by the monitor; see Section 3.1.
This bit can be turned on and off only by UUO
(INIT, OPEN, SETSTS, TTYSET), but a RESET
(see page 249) will clear this bit, thus
turning this type of echoing back on.
12.3 The Line Printer
The line printer (device LPT) has its own character set which differs slightly
from the system ascii character set (see Appendix 6). Because of this, the
system normally does character conversion to insure that what you get is what
you want. However, the LPT has no ALTMODE character; ALTMODE (175) always
prints as CLOSE BRACE (}).
You can get the line printer to print one of several special characters or to
execute one of several special carriage-control functions by sending a 177
character followed by one of the codes in the following table.
CODE CHARACTER (OR FUNCTION) IF CODE PRECEDED BY 177
000 Center dot. (A period moved up to center it on the line.)
011 Gamma.
012 Small delta.
013 Integral sign.
014 Plus-or-minus sign.
015 Circle-plus sign.
020 Skip to top of double form (TODF).
021 Space down 1 line; write over page boundary.
022 Space down 3 lines.
023 Space down to next 1/2 page boundary.
024 Space down to next 1/6 page boundary.
177 Backslash.
Line printer paper has =66 lines/page but the LPT usually skips to the top of
form after =54 lines. This automatic page ejection can be overridden by use of
the '177&'21 character in place of linefeeds.
If you initialize the line printer with the LPTNCC bit on (bit 32--the 0,,100
bit) in the I/O status word, then the conversion from system ascii to line
printer codes is inhibited. In this mode, you get the following differences in
characters:
CODE MODE 0 CHARACTER MODE 100 (LPTNCC) CHARACTER
030 _ (underline) ← (left arrow)
032 ~ (tilde) ↑ (up arrow)
100 @ (at sign) ` (left quote)
134 \ (backslash) ~ (tilde)
136 ↑ (up arrow) circumflex (similar to LPT's tilde)
137 ← (left arrow) _ (underline)
140 ` (left quote) @ (at sign)
174 | (vertical bar) overline (similar to LPT's tilde)
176 } (close brace) | (vertical bar)
Finally, under normal circumstances, if the line printer runs out of paper, gets
jammed, or suffers some other physical ailment, you will get a system error
message from which point you can CONTINUE after correcting the situation. If,
however, you initialize the line printer with the HNGTRP bit on (bit 28--the
0,,200 bit) in the I/O status word, then when the LPT is ill an error bit will
be turned on in the LPT I/O status word and the error return will be taken by
any OUTPUT UUO you try; no error message will be printed.
LPT I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
26 0,,1000 SUPRFF Suppress the TODF (top of double form) that
would otherwise automatically precede the
first output following a CLOSE; also suppress
the three TODFs that normally occur at
RELEAS. This feature is provided especially
for programs that use special forms, e.g.,
labels. Users of this feature should
explicitly send a TODF ('177&'20) to the LPT
before the final RELEAS in order to
initialize the LPT for the next user.
28 0,,200 HNGTRP No error message on hung device (see above).
29 0,,100 LPTNCC No character conversion (see above).
12.4 The XGP
The Xerox Graphics Printer (device XGP) provides a means of making a hardcopy
listing of virtually any drawing that can be expressed as a one-bit raster. The
XGP accepts as data a bit array describing each scan line that is printed. Each
scan line is approximately 1700 bits; scan lines are spaced at about 200 per
inch along the paper. A picture is built by sending successive scan lines to
the XGP. (The number of bits per scan line and the number of scan lines per
inch are adjustable on the XGP and hence are not necessarily constants.)
There are presently two distinct modes of operating the XGP: video mode and
character mode.
Video Mode
In video mode, 36-bit words are interpreted as video data. Words are grouped
together into portions of a scan line by the use of a Group Command Word (GCW).
The GCW precedes the data portion of the group and specifies how many words of
video data are to be found in this group. Also the GCW allows the video data to
be positioned anywhere along the scan line. The exact format of the GCW is
given below.
BITS OCTAL NAME VALUES OF FIELDS IN GCW
0 400000,,0 MARK If this bit is a 1, then after the data is
sent the paper will be marked for cutting.
Paper cutting is not exact so a MARK should
be preceded and followed by several blank
scan lines.
1:11 377700,,0 LNSKIP The paper will be advanced by LNSKIP scan
lines before printing. LNSKIP = 1 is used
for normal, single spacing. LNSKIP = 0
prevents any advance to the next scan line
and prints on the same scan line as the last
group.
12:23 77,,770000 COLSKP The column register in the XGP interface will
be set to COLSKP before the data is
transmitted. This means that the first data
bit in this group will appear in this column.
24:29 0,,7700 unused This field has no meaning currently. It
should be set to zero to avoid confusion in
case some meaning is attached to it in the
future.
30:35 0,,77 DWCNT DWCNT words following the GCW will be
transmitted to the XGP as video data (for
each bit, 0 means white, 1 black). The word
following those DWCNT words is then taken to
be another GCW. If DWCNT = 0 then there are
no data words in this group and the next word
is another GCW.
Modes 17 and 117 are used for video data. These modes accept the format that is
described above.
In mode 17, the effective address of the OUTPUT UUO points to a standard dump
mode command list. The command list specifies the data to send to the XGP.
Each OUTPUT will wait until the entire command list is processed before
returning to the user. The paper will be cut at the completion of each command
list.
Mode 117 is like mode 17 except that the OUTPUT UUO returns to the user while
data is being sent to the XGP. In this mode the user can overlap the input of
one data block with the output of another. Three data blocks are needed in this
mode: one being emptied by the XGP, another pending, and another being filled by
the user program. The first two OUTPUT UUOs will return immediately (having
established the current and pending output blocks). After the user fills his
third block and gives an OUTPUT UUO he will be forced to wait until the current
block is empty (at which time the pending block becomes current and the block
specified in this OUTPUT will become the new pending block). When the third
OUTPUT returns, the first block will be free to use. In video mode the XGP
requires up to 10,000 words of data per second. Care should be exercised in
programming to always have data ready for the XGP.
Another requirement of mode 117 is that the command lists that point to the
three data blocks must be disjoint. The actual requirement is that the command
list for each block must be valid while the block is being output. In
particular, don't use the same physical location in your program for more than
one command list.
In mode 117 you must do a CLOSE UUO after the last OUTPUT to force the
transmission of all buffers to the XGP. It is possible that a user program may
not be able to supply data fast enough in mode 117. In this event, the paper
will be cut wherever the data runs out. A status bit, (bit 25--the 0,,2000 bit,
IOTEND), is provided which warns the program that this has occurred. This bit
is set only in mode 117 when the data runs out and no CLOSE has been done.
Character Mode
In character mode, the XGP can be used to print text using one or more fonts and
to draw vectors. Modes 0 and 13 are the character modes for the XGP. In these
modes, each 36-bit word is interpreted as five 7-bit bytes. There is no fixed
mapping between byte values and particular graphic symbols. The graphic symbol
for any byte is defined by the current font in use. Certain byte values have
special meanings consistent with ascii, and one byte value, octal 177, is used
as an escape which gives the bytes that follow a special meaning.
Character mode permits vectors and multiple active text lines. The system must
be presented with vectors and text sorted by ascending values of Y0 (top scan
line number for text or vectors); otherwise, the output will be wrong.
The 7-bit bytes taken from the user's buffer in character mode are interpreted
as follows:
Byte Value Usual meaning Escape meaning
0 Null -- byte is ignored Normal
1 Normal XGP ESCAPE 1
2 Normal XGP ESCAPE 2
3 Normal XGP ESCAPE 3
4 Normal XGP ESCAPE 4
5:10 Normal Reserved
11 TAB Normal
12 LF Normal
13 Normal Reserved
14 FF Normal
15 CR Normal
16:37 Normal Reserved
40:176 Normal Normal
177 ESCAPE Normal
NORMAL means that the definition of this byte in the current font will be
printed. If this byte is undefined in the current font, it will be ignored.
ESCAPE means that the next byte will have an alternate meaning selected from the
column ESCAPE MEANING.
TAB produces a column select to the first column which is at least the width of
a blank to the right of the current column position, and some multiple of 8
blank widths to the right of the left margin.
LF activates the current text line. The current text will be queued to be
printed, and then the default Y-position of text will be advanced by the number
of scan lines it takes to draw this text line, plus the number of scan lines
specified by the current interline spacing value XLINE (see functions 2 and
3--read and set margins--of the XGP MTAPE UUO on page 289). This new default
Y-position will be used for the next text line (unless changed by a vector
command or ESCAPE 3).
FF activates the current text line, then causes a page eject after the current
text line is printed, and sets the default Y-position to the first scan line
below the top of page margin (TMAR) on the new page. See also functions 2 and
3--read and set margins--of the XGP MTAPE UUO on page 289 for the effects of FF.
CR causes a column select to the current left margin to be generated.
XGP ESCAPE 1 ('177&'001) causes the next 7-bit byte to be read as a special
operation code. The following codes are implemented:
CODE XGP ESCAPE 1 MEANING
0:17 FONT SELECT. The code, 0 to 17, is taken as the font
identification number of the font to be used.
20:37 Reserved for future use.
40 COLUMN SELECT. The next 14 bits (2 bytes) are taken modulo =4096
as the absolute X-position to print at next. The intention is to
allow arbitrary-width spaces for text justification.
41 UNDERSCORE. The next 7-bit byte is taken in two's complement as
the relative number of the scan line on which the underscore is
to occur, where zero represents the baseline of the text,
negative values represent scan lines above the baseline and
positive values scan lines below it. The next 14 bits (2 bytes)
are taken modulo =4096 as the length of the underscore. The
underscore starts at the current column. After the underscore
command, the column position will be that before the command plus
the length of the underscore. If the underscore command is the
first thing done on a new text line, the baseline used will be
the baseline of the current font.
42 LINE SPACE. The current text line is activated and queued to
print. Then the default Y-position of text is advanced by the
number of scan lines it takes to draw this text line, plus the
number of scan lines given by the next byte. Thus, this is like
LF (linefeed) but allows using a different interline spacing
value (XLINE) for this one text line.
43 BASELINE ADJUST. The next 7 bits are taken in two's complement
as the baseline adjustment to the current font. The adjustment
sticks until reset by another BASELINE ADJUST or by a FONT
SELECT, or until modified by a RELATIVE BASELINE ADJUST (52
below). The intention is to allow a font to be used for
subscripts and superscripts. Increment baseline for superscript,
decrement for subscript. Values 0:77 are increments; 100:177 are
decrements: 100 means -100, 177 means -1.
44 PRINT THE PAPER PAGE NUMBER. The paper page number is set to 1
by an FF (formfeed). It is incremented each time the paper is
cut. The decimal value of this count is printed.
45 ACCEPT HEADING TEXT AND PRINT IT NOW. The next byte is a count
of the number of bytes of heading text to follow. Those bytes
will be read into the heading line, which will be printed 1) now
and 2) immediately after an FF is inserted to begin a new page
because of an LF (linefeed) or LINE SPACE command that has set
the Y-position for printing to a scan line beyond the end of the
page body (as defined by PMAR). Only one text line is allowed in
the heading, which must end with an LF or a LINE SPACE (unless
the byte count is zero). A zero byte count means flush any
previously specified heading text.
46 START UNDERLINE. Set the left end of an underline. See the STOP
UNDERLINE command below.
47 STOP UNDERLINE. The next byte is taken in two's complement as
the relative number of the scan line on which the underline is to
be written (same meaning as in UNDERSCORE--41 above: zero
represents the baseline of the text, negative values represent
scan lines above the baseline and positive values scan lines
below it). The extent of the underscore is defined by this
command and the START UNDERLINE command above. If this command
is not preceded by a START UNDERLINE command, the results will be
unpredictable. No underline will happen until this command is
given. Beware of column selects.
50 SET INTERCHARACTER SPACING. The next byte is interpreted as the
intercharacter spacing, which is not currently used for anything.
This code is included for compatibility with MIT.
51 STOP UNDERLINE OF SPECIFIED THICKNESS. This is just like STOP
UNDERLINE (47 above) except that the first byte after the 51 is
interpreted as the desired thickness (in scan lines) of the
underlining. The second byte after the 51 is taken in two's
complement as the relative number of the first scan line on which
the underline is to be written (same meaning as in UNDERSCORE--41
above: zero represents the baseline of the text, negative values
represent scan lines above the baseline and positive values scan
lines below it).
52 RELATIVE BASELINE ADJUST. This is the same as BASELINE ADJUST
(43 above) except that the baseline is adjusted relative to any
previous adjustment. The next 7 bits are taken in two's
complement as the relative baseline adjustment to the current
font. The adjustment sticks until reset by a BASELINE ADJUST
(43) or a FONT SELECT, or until modified by another RELATIVE
BASELINE ADJUST.
XGP ESCAPE 2 ('177&'002) causes the next 7-bit byte to be taken as a
twos-complement column increment. Values 0:77 are positive increments; 100:177
are negative increments: 100 means -100, 177 means -1.
XGP ESCAPE 3 ('177&'003) causes the next 2 bytes to be taken as the scan line
number on which to start this text line. Scan line 0 is the first scan line on
the page (immediately following the cut). The topmost scan line of the present
text line will be placed on the scan line indicated in this command. If there
is no current text line, the next text line will be put there. The system is
not able to queue text or vectors for scan line 0 of the first page of a
transfer; if it is necessary to queue things on scan line 0, it is recommended
that a page be output prior to that attempt.
XGP ESCAPE 4 ('177&'004). This escape is used to specify a vector. It is
followed by =11 bytes describing the vector:
2 bytes of Y0 Number of first scan line of vector.
2 bytes of X0 Column position of left edge of first scan line of the
vector.
3 bytes of DX Delta X: 1 bit of sign; 11 bits of integer; 9 bits of
fraction.
2 bytes of N The number of scan lines on which this vector is visible.
2 bytes of W The column width of each scan line.
The system must be presented with vectors and text sorted by ascending values of
Y0. Otherwise, the output will be wrong.
The escape significances of codes 5 through 10, 13, and 16 through 37 are not
defined at the present time but are reserved for future use.
XGP I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
18 0,,400000 IOIMPM Illegal mode, P2 not responding, or XGP not
responding.
19 0,,200000 IODERR P2 detected error: XGP reporting something
wrong (out of paper, etc.), buffered mode
data miss, or text line too complex.
20 0,,100000 IODTER Font Compiler lossage.
25 0,,2000 IOTEND Data ran out before CLOSE given in mode 117.
XGP MTAPE UUO
The MTAPE UUO is used to provide extended control and status reporting of the
XGP. MTAPE is not synchronized with the data stream except that certain MTAPEs
imply CLOSE before their operation.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: <function number>
<other data depending on function number>
...
An MTAPE which specifies a channel on which the XGP is open is interpreted as
follows. The effective address of the MTAPE (ADR) points to a word containing a
function number which determines the meaning of the UUO. The data at ADR+1 and
following depends on the function selected.
FUNCTION MEANING
0 Return error status.
ADR+1/ Major error code.
ADR+2,3,4/ Error data (see below).
1 Font compile and select.
ADR+1/ Font file name in sixbit.
ADR+2/ Font file name extension.
ADR+3/ PPN of font file.
ADR+4/ Font identification number: 0:17.
Note: This function skips if there is no error.
The font named will be read by the font compiler. It will
be assigned the font identification number that is
supplied. The identification number is used only by font
select commands.
2 Read margins. Names Current defaults
ADR+1/ Top of page margin. TMAR =200
ADR+2/ Page body size. PMAR =1800
ADR+3/ Bottom of page margin. BMAR =200
ADR+4/ Left side margin. LMAR =200
ADR+5/ Right side margin. RMAR =1650
ADR+6/ Interline space. XLINE =4
TMAR is the number of scan lines left blank at the top of
each page; this many scan lines are skipped after every FF
(formfeed). PMAR is the number of scan lines in the page
body, which is the area used for printing text on each
page; if you attempt to start a text line beyond the end of
the page body, then a FF is inserted in front of that text
line (note that the last text line on a page can extend
beyond the page body but cannot start beyond it). BMAR is
the number of scan lines in the bottom of page margin--this
area is left blank at the bottom of each page (except that
the last line of text may extend into this area). The
length of a page in scan lines is TMAR+PMAR+BMAR unless
PMAR or BMAR is zero. If BMAR is zero, there will not be
any paper cuts. If PMAR is zero, there will be no paper
cuts except that when an FF (formfeed) is encountered, the
blank space specified by BMAR will be put out and then a
cut will be made.
LMAR is the column position (in raster points) selected by
a carriage return. RMAR is the column position (in raster
points) beyond which a character is not allowed to start.
When a character would start beyond this point, a CR
(carriage return) and an LF (linefeed) are inserted forcing
the character to be placed at the beginning of the next
line. XLINE is the number of scan lines left blank between
successive lines of text when a LF is encountered.
Nominally, the XGP has =200 raster points per inch
horizontally and =200 scan lines per inch vertically.
Although we try to keep the XGP adjusted, the actual number
of scan lines per inch may vary slightly over time. Also,
the horizontal sweep of the XGP is known to be non-linear;
if you try to do exact graphics, you will probably fail.
3 Set margins (see margin explanations above).
ADR+1/ Top of page margin; must be ≤ 37777.
ADR+2/ Page body size; must be ≤ 37777.
ADR+3/ Bottom of page margin; must be ≤ 37777.
ADR+4/ Left side margin; must be ≤ 3777.
ADR+5/ Right side margin; ≤ 7777 and > left mar.
ADR+6/ Interline space; must be ≤ 3777.
4 Get status.
ADR+1/ The I/O status word for the XGP.
ADR+2/ -1 if a data transfer is in progress,
0 otherwise.
ADR+3/ -1 if the XGP has OK status,
0 if manual intervention required.
5 Pseudo close. Hardly different from CLOSE UUO.
6 Set node counts.
ADR+1/ Number of text nodes (default: =16).
ADR+2/ Number of vector nodes (default: =100).
If either node count is zero, the default value is used for
that count.
The number of nodes needed for text increases with the
complexity of the text (number of font switches, etc.).
The number of nodes needed for vectors is related to the
number and size of the vectors. Generally the default
numbers of nodes is sufficient, and when it is not, there
may not be enough time for P2 to do the output correctly,
even if the number of nodes is increased.
Here are the meanings of the error codes returned from MTAPE function 0.
MAJOR ERROR MEANING
(ADR+1)
0 No error.
1 Font Compiler lossage: no job slots.
2 Font Compiler lossage: no initial response.
3 Font Compiler lossage: no intermediate response.
4 Font Compiler lossage: illegal response.
ADR+2 contains the FC response:
0 Ready.
1 Allocation made.
2 Compilation done.
3 Font compiler error.
ADR+3 contains the error type:
0 Illegal command.
ADR+4 contains the rejected command.
1 Not enough core.
2 LOOKUP Failure.
ADR+4 contains the LOOKUP error code.
3 File error -- unexpected EOF.
ADR+4 contains last character assembled.
4 File error -- character redefined.
ADR+4 contains last character assembled.
5 Disk error.
6 Logical font number too large.
7 File error -- other illegal format.
ADR+4 contains last character assembled.
5 Interrupt-level data missed in buffered mode.
6 XGP hung timeout.
7 Illegal mode.
10 Text line too complex. The line compiler ran out of room
while compiling a text line.
11 Out of order. Y0 of a vector or text line is smaller than
the last item (either vector or text) that was queued.
That is, the input was not properly Y-sorted.
12 XGPSER missed. Somehow, the system has failed to start a
vector or text node at the right place. Possibly there are
too many vectors. ADR+2 contains the current scan line
number, and ADR+3 contains the desired scan line number for
the text or vector that missed.
13 Page too long. You started a vector below the bottom of a
page.
14 Illegal vector parameters. A vector you specified will go
off the page.
15 Font Compiler core image moved or disappeared while the XGP
was running.
XGPUUO UUO
XGPUUO is of interest only to the Font Compiler. This UUO is a no-op for
everyone except the Font Compiler.
XGPUUO [OP=047, ADR=400075] CALLI 400075
--------------------------------------------------
MOVE AC,[CSB,,NSB]
XGPUUO AC,
CSB and NSB are the addresses of 20 word blocks. CSB is the Current Status
Block. The Font compiler reports its state to the system by the data it puts in
the CSB before giving this UUO. NSB is the New Status Block. The system issues
commands to the Font Compiler by the data it stores in the NSB when returning to
the Font Compiler from this UUO. This UUO will not return until the system has
something for the Font Compiler to do.
Word 0 of the status block is the opcode. All subsequent words are operands.
OPCODE MEANING TO FC FROM SYSTEM MEANING TO SYSTEM FROM FC
0 Go away now. No-op (ready).
(System is finished with FC.)
1 Allocate. Allocation made.
(Word 1 has size (Word 1 has location
to allocate.) of allocation.)
2 Compile. Finished compiling.
(File name, ext, PPN (Word 1 has location
are in words 1, 2, 3; of base table.)
word 4 contains the
logical font number, 0:17.)
3 Lock in core. Compiler error.
(System wants to (Word 1 contains
send data to XGP.) error code; see below.)
Error codes (in word 1 of block):
0 Illegal command. Word 2 has the rejected opcode.
1 Not enough core.
2 LOOKUP failure -- font file was not found.
Word 2 has the LOOKUP error code.
3 File error -- unexpected EOF.
4 File error -- redundant character.
5 Disk error.
6 Logical font number too big.
7 File error -- other illegal format.
12.5 Dectapes
A dectape (device DTAn, n=1 to 4) consists of a sequence of 1102 200-word blocks
(numbered from 0 to 1101) which can be allocated to dectape files. There are
several formats that have been used for allocating blocks to files. The format
in use at Stanford is called OLD DECTAPE FORMAT (or sometimes PDP-6 FORMAT).
Stanford's system is capable of reading/writing only the old dectape file
format. However, the user can read and/or write almost any block on a tape
(block 0 cannot be written because of the hardware) and can thus simulate any
format desired (see the UDSD bit below). The system program TENDMP is provided
for reading and writing dectapes in PDP-10 FORMAT (NEW DECTAPE FORMAT), which is
NOT explained in this manual. If you need to know about PDP-10 dectape format,
see a system programmer.
Dectape I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
21 0,,40000 IOBKTL Dectape block number out of bounds.
29 0,,100 UDSD The system should treat the tape as if it had
no directory. In this mode, the user can
read and/or write blocks on the tape in any
format he desires. The USETI and USETO UUOs
(see Section 2.14) can be used to select
which block will be read next and which block
will be written next. The UGETF UUO (see
page 54) will return a word whose left half
contains the number of the next block to be
read and whose right half contains the number
of the next block to be written.
Old Dectape Format
In the old format (still standard at Stanford) block 0 is not used, block 1 is
the directory which contains names of and pointers to all the files on the tape,
and blocks 2 through 1101 are available for data.
Word 0 of the directory contains:
<LBU>,,5
where <LBU> is the number of the last block in use on the tape. When you do a
UGETF UUO (see page 54) this number gets incremented by one and the result is
returned as the number of the block you may use. The "5" points to the word
within the directory block where the file entries begin.
Words 1:4 of the directory are not used at all. Words 5:174 are grouped in
4-word entries, one for each file on the tape. Thus a tape can hold a maximum
of =30 files in the old format. The four words of a file's directory entry
contain the following information:
<file name>
<extension>,,<number of first block of file>
<date file written>
<value from 4th word of ENTER block when file was created>
A zero entry marks the end of the directory.
Note: A LOOKUP UUO on a dectape does NOT return precisely these four directory
words in exactly this format. See page 32 for the format of data returned by a
successful LOOKUP on a dectape.
For files written in buffered mode, each block contains (at most) 177 words of
data, with the first word of each block containing
<BN>,,<WC>
where <BN> is the number of the next block in the file, or zero if none, and
<WC> is the count of data words in this block.
Files written in dump mode have 200 words of data in each block and have no
block-to-block pointers or word counts. Such files are always written on
consecutive blocks of the tape. When a user writes a dectape file in dump mode,
no information is stored with the file to indicate how long it is. Normal
procedure for writing dump mode files is to put the dump mode command (which
will write out the entire file) into the fourth word of the ENTER block before
the ENTER is done. In this way, the length of the file will be returned by a
LOOKUP because the fourth word of the ENTER block is copied into the fourth word
of the file's directory entry and then into the fourth word of the LOOKUP block
when a LOOKUP is done for the file.
UTPCLR [OP=047, ADR=13] CALLI 13
--------------------------------------------------
UTPCLR <channel number>,
The UTPCLR UUO causes the directory of the dectape initialized on the channel
indicated to be cleared. This means that the free block pointer is set to point
to block number 2 and all file entries in the directory are zeroed. The tape
can then be reused as if it were a new tape. This UUO is a no-op for all
devices but dectapes.
12.6 Magnetic Tapes
Data on magnetic tapes (device MTAn, n=0 to 1) is written in files with each
file being terminated with an end-of-file mark. The logical end of tape is
indicated by two consecutive end-of-file marks with no intervening data.
(The mag tape is NOT a directory device. No filenames are associated with mag
tape files, and the LOOKUP, ENTER and RENAME UUOs are no-ops with mag tapes.)
Data on mag tapes can be written in any of the standard modes. Dump mode (modes
16 and 17) transmits data as one record per dump mode command.
Magnetic Tape I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
24 0,,4000 IOBOT The tape is at load point.
25 0,,2000 IOTEND The physical end of the tape has been
reached. If you reach the end of the tape
while reading or writing, the IOIMPM error
bit will also be turned on.
26 0,,1000 IOPAR The tape is being written or read in even
parity, which is non-standard.
27:28 0,,600 These two bits indicate the tape density: 0
and 2 mean 556 bits per inch, 1 means 200
bpi, and 3 means 800 bpi. Although 800 bpi
is the most efficient, 556 bpi is more
reliable; 200 bpi is relatively inefficient.
29 0,,100 IONRCK No re-reading is to be done. Re-reading is
usually done on both output and input when an
error is detected. After =10 tries the
system gives up and sets an error bit.
MTAPE UUO for Magnetic Tapes
The following UUO is provided for doing all the special things necessary with
mag tapes.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,<function number>
If there is a mag tape open on the channel indicated by the AC field of an MTAPE
UUO, the above form of MTAPE is assumed. The effect of the MTAPE then depends
on the function number appearing in the address field. The function numbers and
their meanings are given below. Function numbers not listed below are illegal.
FUNCTION MEANING
0 Wait for any operation going on to complete.
1 Rewind the tape.
3 Write an end-of-file mark on the tape.
6 Advance the tape one record.
7 Backspace the tape one record.
10 Advance the tape to the logical end of tape. Logical end of
tape is signified by two consecutive end-of-file marks. The
tape is left positioned between the two marks by this
operation.
11 Rewind the tape.
13 Write three inches of blank tape. The purpose of this is to
cause a bad spot on the tape to be ignored. Perfectly blank
tape looks like an end-of-record mark to the controller and
is ignored. The monitor automatically writes blank tape over
bad spots on the tape.
16 Advance the tape one file. The tape is positioned after the
end-of-file mark that terminates the file.
17 Backspace the tape one file. The tape is positioned before
the end-of-file mark at the end of the previous file.
12.7 Plotter (PLT)
The plotter (device PLT) is normally used in mode 10. In this mode, the
right-most eight bits (bits 28:35--the 0,,377 bits) of each word are transmitted
to the plotter. The remaining bits in each word are ignored. This is the mode
used with the plotter because the bits are sent exactly as they appear in your
buffer.
12.8 Paper Tape Punch
The paper tape punch (device PTP) can be operated in any of several different
modes. These modes are explained below.
MODES MEANING
0,1 Character modes. Seven bit characters are punched with the
eighth hole as an even parity bit. A delete (ascii 177) is
punched after every carriage return, vertical tab and
horizontal tab, and 30 frames of blank tape are fed after
every formfeed.
10,110 Image binary modes. The right-most eight bits (bits
28:35--the 0,,377 bits) of each word are punched directly as
the eight bits on a frame of paper tape.
13 Binary mode. Every word in your buffer is punched on 6 paper
tape frames with 6 bits in each frame. The seventh hole is
never punched and the eighth hole always is.
14 Checksum mode. This mode is the same as mode 13 except that
before each buffer is punched, the checksum of that buffer and
its data word count are punched. These two numbers appear in
the left and right halves respectively of the first word (6
frames) punched. After the data words have been punched, 30
frames of blank tape are fed and then a zero word is punched
(a zero word is 6 frames each with only the eighth hole
punched).
100,101 No-conversion modes. These are buffered character modes in
which 7-bit characters are extracted from your buffer and
punched in the first seven holes of each frame on the paper
tape. The eighth hole is always punched and nothing special
is done for any characters.
113,114 No-eighth-hole modes. These modes are the same as mode 13
except that the eighth hole is never punched.
12.9 Paper Tape Reader
The paper tape reader (PTR) has four distinct modes, which are very similar in
operation to the first four modes of the paper tape punch. Each mode and its
meaning is explained below. See also Section 12.8 on the paper tape punch.
MODES MEANING
0,1 Character modes. From each frame on the paper tape a 7-bit
byte is taken, with the eighth hole ignored. These 7-bit
bytes are packed 5 to a word in your input buffer. Nulls
(ascii 0) and deletes (ascii 177) on the tape are ignored.
10 Image mode. Each frame on the paper tape is returned to you
exactly as it appears on the tape, with each 8-bit frame
placed in the low order bits (bits 28:35--the 0,,377 bits) of
a single buffer word.
13 Binary mode. Only those tape frames with the eighth hole
punched are looked at in this mode. The seventh hole of each
frame is ignored completely and the first 6 holes of each
frame with the eighth hole punched are returned packed 6
frames to a buffer word.
14 Checksum mode. This mode is the same as mode 13 except that
the tape is assumed to contain a checksum and word count at
the front of each buffer of data. The checksum is checked on
input to insure accuracy of the transfers.
Paper Tape Reader I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
21 0,,40000 IOBKTL This bit comes on in mode 1 (Ascii Line mode)
if no activator (LF or FF) is seen before
filling the buffer or in mode 14 (Checksum
mode) if the data word count (right half of
the first word of a block) exceeds the buffer
size.
12.10 User Disk Pack
A user with a large quantity of data that he needs to have available on
high-speed storage can make use of a User Disk Pack (device UDPn, n=1 to 2).
UDPs can be used in either of two manners: old-mode usage treats the UDP as a
special device which can be operated only in dump mode; new-mode usage treats
the UDP almost exactly the same as the DSK.
It is illegal to INIT a UDP unless it has first been ASSIGNed. The ASSIGN
command for device UDPn, unlike for other devices, does not necessarily prevent
access by other users; it is needed, however, to set the manner in which the UDP
will be used. There are three ways of ASSIGNing a UDP:
PUBLIC new-mode usage; other jobs may use the UDP.
PRIVATE new-mode usage; other jobs may not use the UDP.
OLD old-mode usage; other jobs may not use the UDP.
The syntax of the ASSIGN command is:
ASSIGN [mode] dev [logname]
where the items in brackets are optional; the mode (if specified) must be one of
the three listed above (the default is PUBLIC), dev is the device name, and the
optional logname is a logical device name you are giving the device. The mode
may be changed between PUBLIC and PRIVATE by new ASSIGN commands except that you
must be the only user of the UDP to make it PRIVATE. However, to change between
old- and new-mode usage, you must first DEASSIGN the UDP and there must be no
one using it.
Once a UDP has been assigned by someone as PUBLIC, any job can INIT or OPEN it
without having to ASSIGN it itself.
A pack to be used in the new mode must first be formatted. (That is, it must
have a SAT and an MFD.) Once a pack has been formatted, attempts to write on it
in old mode will fail unless you have the UDP privilege; old-mode reading of
formatted packs is legal (so much for read protecting UDP files). Attempts to
read or write in new mode on an unformatted UDP will, of course, fail.
For details on operating a UDP in the new mode, see Section 12.1 on the special
features of the DSK and new-mode UDPs and Section 2 on General I/O. The
remainder of this section is devoted to a description of old-mode UDP usage.
Old-Mode UDP Usage
A UDP ASSIGNed in mode OLD can only be read/written in dump mode. A disk pack
has =15485 blocks, numbered 0 to =15484; the last block (number =15484) is used
to hold a password. Each block consists of =19 records, numbered 0 to =18;
record 0 is 40 words long and each of records 1 to =18 is 200 words long.
The first record of the last (password) block of a UDP contains the value SIXBIT
/PASS/ in the first two words and the UDP's password in the third word.
Unlike most other devices that can operate in dump mode, device UDPn accepts not
a list of dump mode commands but only a single dump mode command for each input
or output operation. A UDP dump mode command consists of two words, the first
of which is the same as a normal dump mode command and the second of which
contains the UDP location where the transfer is to start. Thus a UDP dump mode
command looks like this:
-<word count>,,<in-core location of data>-1
<record number>,,<block number>
where <block number> should be in the range from 0 through =15484 and indicates
on which block of the pack the transfer is to start and <record number> should
be in the range from 0 through =18 and indicates at which record within the
specified block the transfer is to start. At most one cylinder (=19 blocks) of
data can be tranmitted in a single transfer; this means that the maximum
<word count> permitted is =19 * (=18*200 + 40) words. To effect a UDP data
transfer, an INPUT or OUTPUT UUO is given with the effective address pointing to
the dump mode command, whose format is shown above.
WARNING: When an output indicates that only part of a record is to be written,
the remainder of the record is written with zeroes.
Before any data can be written onto a UDP, the program desiring to do the output
must do an ENTER UUO to check the UDP password. The RENAME UUO is used to
change a UDP password. Data can be read from a UDP without first giving the
password. The scratch/swapping pack has password *SWAP*. This password is
treated specially by the monitor in two ways: any password is accepted in an
ENTER, and it is impossible to change the password with a RENAME unless you have
the UDP privilege. A zero password means any password is accepted in an ENTER.
If a disk error occurs during a RENAME or ENTER UUO, then unless bit 28 (the
0,,200 bit--GARBIT) is on in the I/O status word, an error message ("BAD
RETRIEVAL") will be typed out and the program stopped. If bit 28 is on when a
disk error is detected, the error return is taken and an error code of 10 is
returned in the right half of the word after the password.
ENTER [OP=077]
--------------------------------------------------
ENTER <channel number>,ADR
<error return>
ADR: <password>
<returned error code in right half>
An ENTER must be done to check the password before any data can be written on a
UDP. The word at location ADR is compared against the password written on the
UDP, if any. If there is no password on the UDP, or if the UDP password is zero
or *SWAP*, or if the word at ADR matches the UDP password, or if you have the
UDP privilege, then write permission is granted to the program and the skip
return is taken from the ENTER. Otherwise write permission is rejected and the
direct error return is taken with an error code of 2 (protection violation)
returned in the right half of ADR+1.
RENAME [OP=055]
--------------------------------------------------
RENAME <channel number>,ADR
<error return>
ADR: <new password>
<returned error code in right half>
The RENAME UUO is used to change the password for a UDP. An ENTER must have
been done to acquire write permission for the UDP unless you have the UDP
privilege. The password specified in location ADR replaces the old UDP
password. A zero password means an ENTER (see above) will always succeed. If
the change of password is successful, the skip return is taken. If no ENTER has
been done and you do not have the UDP privilege, then an error message will be
typed out and the program stopped. If the old password was *SWAP* and you do
not have the UDP privilege, then the error return will be taken with an error
code of 2 (protection violation) returned in the right half of ADR+1.
UDPn I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
28 0,,200 GARBIT Suppress error message upon a disk error from
ENTER or RENAME; instead take error return
with code 10.
The following I/O UUOs are illegal with device UDPn: LOOKUP, USETO, USETI, UGETF
and MTAPE.
12.11 Device SIX
The system's third processor, P3, can be used by anyone by INITing or OPENing
the sharable device SIX. There are basically two different things you can do
with P3 from P1--send messages and do disk transfers. Sending messages is done
with device SIX. Disk transfers are done with device DSK or UDPn.
Device SIX can only be operated in mode 17. Many different people can have it
open at once, but it only makes sense for each person (job) to have it opened
once. You do an OUTPUT to it to send a message to P3 and you do an INPUT to
receive a message from P3. In addition, there is a UUO (an MTAPE) to find out
if there is a message waiting for you to read it, and an interrupt bit you can
set to receive a user interrupt each time a new message comes in.
The format of messages is described on page 317.
The interrupt bit is called INTSIX and is bit 21 (0,,40000 bit) in the interrupt
word. See Section 9 for how to enable interrupts.
When you CLOSE or RELEASE the device SIX, the system sends out an MCLRJOB
message automatically. This will clear everything P3 knows about you, flush any
buffers you have, stop the real-time job if you have initialized it, etc.
The UUOs for the SIX follow.
OUTPUT [OP=067]
--------------------------------------------------
OUTPUT <channel number>,ADR
ADR: IOWD <word count>,<first memory address>
The OUTPUT UUO for device SIX sends a single message to P3. This is the
standard system OUTPUT UUO, except that it takes a single IOWD dump mode command
instead of a dump mode command list. The IOWD should point to a single message.
The first word (or the first two words if it is a multiple-word message) must be
in the standard message header format (see page 317). The system will deposit
the sequence number it assigns your message into the second word of the message
(if any). The message will be sent out (essentially) immediately. The maximum
message length is 2000 words. Anything longer than this must be broken up into
2000-word pieces.
INPUT [OP=066]
--------------------------------------------------
INPUT <channel number>,ADR
ADR: IOWD <word count>,<first memory address>
The INPUT UUO for device SIX reads a message for you from P3. This is the
standard system INPUT UUO, except that it takes only a single IOWD dump mode
command instead of a dump mode command list. The IOWD should point to a place
where a single message is to be placed by the system. If the IOWD you give is
not big enough to hold the message, you will only get as much of it as will fit.
If there are no messages ready for you, this UUO will wait until one comes in.
You will only get messages that are specifically directed to your job.
Generally, you will not get messages from P3 unless you have sent some messages
to P3.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR
<error (no-messages) return for function 0>
ADR: <function number>
<some data may be returned here>
The MTAPE UUO for device SIX currently has two functions. The number of the
desired function is specified at ADR.
Function 0 skips if there is a message waiting for you from P3, in which case
the length (total length, including header) of the message is returned in ADR+1.
If there is no message waiting for you from P3 (that is, if your next INPUT UUO
would have to wait), this function does not skip.
Function 1 waits for a message for you from P3 and then returns its length in
ADR+1. This function never skips.
Disk Transfers to and from P3 Memory
Disk transfers to and from P3 memory are done using device DSK or UDPn in the
normal way, except that instead of using INPUT and OUTPUT UUOs, you use MTAPE
UUOs, and you have to take care of the error correction yourself. The ECC
(error correction code) bytes are returned to you and you have to send them to
P3 using the MECC message.
The disk must be open in mode 17 (dump mode) or else you will get an illegal UUO
from the following MTAPEs.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR ;(For device DSK or UDPn)
ADR: SIXBIT /GODMOD/ ;READ DISK IN DUMP MODE INTO P3 MEMORY
24
<IOWD for transfer relative to beginning of P3 memory>
<address of =38 words in your core image where ECC data goes>
<first ECC status word returned here>
<second ECC status word returned here>
<record>,,<block> ;Relevant only on old-mode UDPs.
Function 24 for a disk MTAPE reads data from the disk into P3 memory in dump
mode (mode 17). Unless you are using an old-mode UDP, you must have done a
LOOKUP of the file you want to read. With old-mode UDPs, you must give the
record and block numbers where you want to start reading. In either case, you
specify a single IOWD indicating the number of words to transfer and their
destination address. The address you give in this IOWD refers to an absolute
location in P3 memory, of which there is roughly 64K. The ECC data itself is
two words per entry. There may be up to =19 entries, so your table of the ECC
data must be at least =38 words long. These two words of data for each error
are decoded as follows.
BITS OCTAL NAME CONTENTS OF FIRST WORD OF ECC DATA
0:11 777700,,0 BYTEC Byte number within ailing record of bad byte.
12:35 77,,777777 BITS Three 8-bit ECC bytes to be XORed with three
data bytes.
BITS OCTAL NAME CONTENTS OF SECOND WORD OF ECC DATA
0:17 777777,,0 Negative word count.
18:35 0,,777777 P3 memory address of first byte of ailing
record.
The first word gives the byte number within the ailing record of the first bad
byte (8 bits), and the three ECC bytes to be XORed in with three data bytes to
make the correction. The next word gives in the right half the absolute address
in P3 memory of the first word of the ailing record. Thus you take this word
and start XORing bytes at BYTEC bytes into this record. The channel packs nine
8-bit bytes into 2 words in the following manner.
************************************************************
* * * * * *
* BYTE 0 * BYTE 1 * BYTE 2 * BYTE 3 * BYTE *
* * * * * 4A *
************************************************************
************************************************************
* * * * * *
* BYTE * BYTE 5 * BYTE 6 * BYTE 7 * BYTE 8 *
* 4B * * * * *
************************************************************
BITS OCTAL BYTE PACKING FORM
0:7 776000,,0 (1st word) Entire byte 0
8:15 1774,,0 (1st word) Entire byte 1
16:23 3,,770000 (1st word) Entire byte 2
24:31 0,,7760 (1st word) Entire byte 3
32:35 0,,17 (1st word) High-order 4 bits of byte 4
0:3 740000,,0 (2nd word) Low-order 4 bits of byte 4
4:11 37700,,0 (2nd word) Entire byte 5
12:19 77,,600000 (2nd word) Entire byte 6
20:27 0,,177400 (2nd word) Entire byte 7
28:35 0,,377 (2nd word) Entire byte 8
If you decide you have to do the error correction yourself, you have to decide
first which word pair it is in, then figure out what byte within the word pair
it is, and start XORing. Luckily, device SIX will do this for you if you just
send the MECC message.
The first ECC status word returned describes the state of the transfer. If the
left half is not exactly 1, then this word will contain -N,,ADRS, where ADRS is
the first unused location in your error correction data table and N is the
number of unused words at the end of this =38 word table. This means there were
(=38-N)/2 errors and there are =38-N words of ECC data returned in the table
(thus if N is =38, there were no errors). Unless there were no errors, the ECC
data should be sent to the SIX in an MECC message to have it correct the errors.
If the left half of the first ECC status word is exactly 1, then there were more
than =19 errors over the transfer and some ECC information was lost. You got
corrections for the first =19 errors, and the second ECC status word will
contain the first absolute address in P3 memory of the first record whose ECC
information was lost. The =38 words of ECC information should be sent to the
SIX in an MECC message and the remainder of the transfer retried. To retry, you
will have to know how the addresses map into blocks and records. For the
regular disk and the new-mode UDPs, it is very simple; there are 200 words to
each record. For old-mode UDPs, it is a little more complicated because you
must give the disk address in terms of the block number and the record number
within that block (see Section 12.10). With old-mode UDPs, there are =19
records per block. The first record is 40 words long and every succeeding
record is 200 words long. Thus the length of each block is =18*200+40.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR ;(For device DSK or UDPn)
ADR: SIXBIT /GODMOD/ ;WRITE DISK IN DUMP MODE FROM P3 MEMORY
25
<IOWD for transfer relative to beginning of P3 memory>
<record>,,<block> ;Relevant only on old-mode UDPs.
Function 25 for a disk MTAPE writes data to the disk from P3 memory in dump mode
(mode 17). Unless you are using an old-mode UDP, you must have done a ENTER of
the file you want to write. With old-mode UDPs, you must give the record and
block numbers where you want to start writing. In either case, you specify a
single IOWD indicating the number of words to transfer and their source address.
The address you give in this IOWD refers to an absolute location in P3 memory.
Since there can be no errors on output (according to the disk manual), there is
no need for ECC. Thus, it is much simpler to write from P3 memory. Things
should be pretty self-explanatory by this point.
P1/P3 Message Formats
P1 and P3 exchange messages with specific formats that control the various
functions of P3. Very little validity checking is done on these messages, so it
is not difficult to kill the P3 submonitor. It is much harder to kill P1.
Each message has a 1 or 2 word header in the format shown below.
BITS OCTAL NAME FIELDS IN FIRST WORD OF MESSAGE HEADER
0 400000,,0 F6TO10 Direction is from P3 to P1. If this bit is
OFF, this is a message from P1 to P3.
1 200000,,0 FNOWDS This bit on means that this is the only word
of the message.
2 100000,,0 FNCOMP This message is incomplete for some reason
(e.g., hardware).
3 40000,,0 FDMISS Data was missed on this message, which may be
incomplete.
4:5 30000,,0 (unused)
6:17 7777,,0 Message type code.
18:26 0,,777000 Job number of source (P1→P3) or destination
(P3→P1) of message. The P3 real-time job is
job 400.
27:35 0,,000777 Device number of source (P3→P1) or
destination (P1→P3) of message. The P3
submonitor is device 0.
BITS OCTAL NAME FIELDS IN SECOND WORD OF MESSAGE HEADER
0:17 777777,,0 Number of data words following this word.
18 0,,400000 This message was originated on P3 (rather
than just being a reply to a message from
P1).
19:35 0,,377777 Sequence number of this message.
Following a 2-word header, there will be the number of words specified by the
left half of the second word of the header (possibly zero).
Messages from P1 to P3 are distinguished from messages from P3 to P1 by the
message type code. With messages from P3 to P1, the high-order bit (400000,,0
bit) is always on. Most of the messages from P3 to P1 are responses to previous
messages from P1 to P3. In this case, the reply message has the same sequence
number as the original message. P3 can also originate messages, in which case
it turns on the 400000 bit of the sequence number to indicate an original
message. If P1 replies to this message, it repeats the sequence number.
The FNOWDS bit indicates that this is a 1-word message. The high-order six bits
of this word are flag bits of various kinds.
The first 1000 message codes are reserved for "system" type messages that are
valid on any "device". Since these messages are only valid in one direction,
the replies have the same message codes.
Some messages pass word counts and memory addresses back and forth. In each
case, a WCMA is passed, NOT an IOWD! That is, -<word count>,,<memory address>
is used.
There are a series of error codes that can be returned. Generally, when an
error is indicated, the type code and the sequence number match those of the
ailing message.
Here are the error codes that may be returned from the P3 system.
CODE NAME ERROR
1 ENOJ Operation on job attempted when no job was initialized.
2 ENOD This message required a datum and none was sent.
3 ENOJC From MJINI, means "Can't get 1K core for job".
4 ECNTC From MCONTJ, means "Can't continue" (job in ERRQ).
5 ENOB From MGIVB, means "No such buffer".
6 (unused)
7 EWCR From MWMEM, means "Word count longer than message".
10 EOOB From MWMEM, means "Addresses out of bounds".
11 ENOWC From MRMEM, means "Zero word count".
12 ENOFS From MRMEM, means "Not enough free storage to do this transfer".
13 ENED Means "not enough data in this message".
Note: A message can always be longer than necessary. Quite often in the P3
submonitor the same routine is used to transmit messages that do or do not
return data; thus a message that you might think should only be one word (like
MIAA below) might actually be a 3-word message, although the last two words
won't carry any extra information. You should distinguish messages on the basis
of the type code, not on the basis of the length.
Now here are the message types
Mnemonic: MRST Reset
Type code: 0
Datum: none
Reply: MRST with no datum
MRST causes the P3 submonitor to reinitialize itself completely. It forgets
anything it may have known about what jobs on P1 may have been doing on P3. It
is a quite drastic step and should not be done unless you know what you are
doing. This command is normally sent out by the regular timesharing monitor
when the system is reloaded. The P3 submonitor responds by asking for the time
and date (after reinitializing itself).
Mnemonic: MAYA Are you alive?
Type code: 1
Datum: none
Reply: MIAA, I am alive
MAYA is a quick test to see if the P3 system is alive at all. You should get
back very shortly a MIAA message.
Mnemonic: MIAA I am alive
Type code: 2
Datum: zero
MIAA is the reply to the MAYA code. MIAA will not be generated spontaneously.
Mnemonic: MRMEM Read memory
Type code: 5
Datum: WCMA to read from
Reply: Success → WCMA+data, Failure → ENOWC, EOOB, ENOFS
MRMEM reads data from P3 core. The only check is to make sure that the memory
requested is not out of the bounds of the physical memory. You can read the
system itself with this operation. You send a WCMA of the data in P3 core that
you want to read. On success, it returns you that WCMA, followed by that many
words. Upon failure, it returns one of the error codes ENOWC, EOOB, or ENOFS.
ENOWC means your message as received didn't have a WCMA in it. EOOB means that
the WCMA referred to memory that was not part of the physical memory of P3.
ENOFS means that we don't have enough free storage to copy this data into to
send it to you.
Mnemonic: MWMEM Write memory
Type code: 6
Datum: WCMA+data
Reply: Success → 0, Failure → EOOB, EWCR
MWMEM writes data into P3 memory. The message contains the WCMA of the area to
write in followed immediately by that much data. If you don't send as much data
as specified in the WCMA, you get the EWCR error. If you try to deposit into
the monitor itself, or above physical memory, you get the EOOB error. Zero is
returned upon success.
Mnemonic: MHMFC How much free core?
Type code: 7
Datum: none
Reply: Number of words of free core
MHMFC finds out how much free core there is in P3 memory that has not already
been allocated either to free storage (where buffers come from) or to the
real-time job. It does not tell you how much unused room free storage has due
to checkerboarding.
Mnemonic: MMERR Memory error in 6
Type code: 10 (Currently not generated)
Datum: (not defined yet)
MMERR may at some point in the future be enabled to tell the P1 user about P3
parity errors. It will probably return the absolute address of the error, the
data, and the PC at that time. Currently this code is not generated.
Mnemonic: MNON Nonsense, P3→P1
Type code: 11
Datum: none
MNON is returned by P3 if P3 can't make any sense out of the last message it
got.
Mnemonic: MECC Error Correction code data, P1→P3
Type code: 13
Data: ECC word pairs from the disk service
MECC tells P3 to make error corrections to data read from the disk into P3
memory. The format for these words is described under the disk MTAPE UUO
function 24 on page 315. The data is the list of ECC pairs exactly as they come
from the disk service. There should be an even number of words in the data.
Mnemonic: MTIME Time of day
Type code: 14
Data: Date and time
MTIME is used by P3 to ask for the time and date. You should send it back the
same code, with the date as the first datum and the time as the second datum.
You can send it the time and date at any point. It will update the P3 system's
idea of the time and date.
Mnemonic: MCLRJOB Clear job, P1→P3
Type code: 16
Datum: none
MCLRJOB clears everything the P3 system knows about the P1 job whose number is
in the message header. It blasts all the devices that job had initialized, it
clears the real-time job if it belonged to this P1 job, and it releases any
buffers that job may have had. This goes out when you release the device SIX.
Mnemonic: MDBLAST Blast device, P1→P3
Type code: 33
Datum: none
MDBLAST takes the device code in your message and blasts that device. That
releases any buffers associated with the device, it stops the device
amid-transfer if it is running, and so on. If two different devices are using
the same buffer, there may be a conflict here.
Mnemonic: MGBUF Get Buffer, P1→P3
Type code: 17
Datum: Number of Words
Reply: Success → WCMA, Failure → Free core
MGBUF claims a length of contiguous free core in P3 memory. The success reply
is the WCMA of the buffer claimed. Your job number is associated with this
buffer so that if you release the SIX device, these buffers will go away. If
there is not enough free storage to give you the buffer, the reply is the number
of words of free core (a positive number). A WCMA is minus the number of words
in the left half and the absolute core address of the first word of the buffer
in the right half (not to be confused with an IOWD!).
Mnemonic: MGIVB Release Buffer, P1→P3
Type code: 20
Datum: Address of first word of buffer
Reply: Success → 0, Failure → ENOB (=5)
MGIVB releases a buffer. It returns 0 upon sucess and the ENOB error if it has
no record of such a buffer. This might happen if P3 got reloaded or restarted
out from under you.
There are various hazards involved with buffers. For instance, no checking is
done to see if some device (like the DAC or the ADC) is running in a current
buffer before it is released. Thus, you should be very sure to kill the device,
or to make sure you got a "buffer done" reply before you release the buffer.
Mnemonic: MLP Loop data
Type code: 21
Datum: Whatever you wish
Reply: MLPR message with a copy of that data
MLP is a test message to make sure the P3 system is functioning. It just sends
the data to P3 and receives it back.
Mnemonic: MLPR Loop data return
Type code: 22
Datum: Copy of data in previous MLP message
Reply: none
MLPR is the reply message to the MLP message above.
Mnemonic: MAUTOL Automatic reload, P1→P3
Type code: 36
Datum: none
Reply: none
MAUTOL causes the P3 system to load itself into the accumulators and start
counting down. When it reaches zero, it jumps to 200 and restarts itself. This
is what SIXFIX uses to reload the system.
12.12 Interlock Devices for P3
The following devices are provided by the system solely to provide interlocking
between programs that might otherwise interfere with each other in use of P3
(the third processor). These non-sharable devices can be INITed or OPENed just
like any other device, but only in mode 0, and the UUOs IN, INPUT, OUT, OUTPUT
and MTAPE are illegal. The UUOs CLOSE, USETI, USETO, UGETF and UTPCLR are
no-ops when done for these devices, and LOOKUP, ENTER and RENAME are no-op UUOs
that always skip.
See also the description of device SIX (P3) in Section 12.11.
The P1 interlock devices for P3, and the actual P3 devices they represent, are
listed in the following table.
SAM Systems Concepts Digital Synthesizer
DAC DA converter
ADC AD converter
FRM Dick Moore's digital synthesizer
KIM Paralyser panel (real-time console) interface
RTJ Real-time job on the P3
12.13 TV Cameras
For reading the TV cameras, it is recommended that you use already existing
routines rather than write your own. However, for those who are stubborn enough
to want to do it themselves, here is an explanation of how to read the cameras.
To read a television camera (device TV), you first INIT or OPEN it in mode 17
and then do dump mode inputs. The maximum size of a dump mode input is =18
pages (9K).
The TV does not take standard dump mode command lists. The effective address of
an INPUT UUO for the TV should point to a 4-word block that contains the
following information:
-<word count>,,<address of first word>
<TV camera CONO bits>
<TV camera DATAO word>
<CONI bits from 167 returned here upon completion>
Thus the first word of this block contains the negative of the number of words
of data to be input and the address of the first word of the block where this
data is to go. (Note that this is not standard IOWD format!) The second word
contains (in the right half) the CONO bits for the TV. These bits have the
following meanings:
BITS OCTAL NAME MEANINGS OF TV CAMERA CONO BITS
18:20 0,,700000 BCLIP The bottom converter clip level. Each sample
is a 4-bit number representing the intensity
at a given point. The =16 levels are taken
from the voltage range specified by BCLIP and
TCLIP (see below); thus you can control the
camera's exposure setting from your program.
A voltage of 1.0 is put out at a very bright
spot and a voltage of 0 is put out at a
completely dark spot. BCLIP indicates the
voltage which is to represent a sample of
zero. Only voltages above this value will
produce non-zero samples. See the table
below for the voltage levels indicated by the
various possible values for BCLIP.
21:23 0,,70000 TCLIP The top clip level. This value determines
the voltage which is to represent the maximum
sample value of 17. All higher voltages will
also produce a sample of 17. See BCLIP above
and the table below showing voltage levels
corresponding to the possible values of TCLIP
and BCLIP.
VALUE BCLIP TCLIP
0 .875 1.000
1 .750 .875
2 .625 .750
3 .500 .625
4 .375 .500
5 .250 .375
6 .125 .250
7 .000 .125
24:26 0,,7000 CAMERA The camera number. There are eight possible
camera numbers, but not all of them are wired
in permanently. Number 0 is the cart
receiver, number 1 is variable, number 2 is
the Sierra camera, and number 3 is video
switch output for shadow line 400.
27:29 0,,700 VRESOL The vertical resolution divided by two, minus
one. A zero here gets you every other line,
a one every fourth line, etc.
30:34 0,,76 This field must contain a 1.
35 0,,1 Horizontal 1/2-sample offset. If this bit is
a one, the samples within each line will be
taken from positions approximately 1/2 sample
width to the right of the usual positions.
By doing two transfers, one with this bit off
and one with it on, you can essentially
double the horizontal resolution.
Now here are the meanings for the bits in the DATAO word (third word of block
pointed to by the INPUT UUO).
BITS OCTAL NAME MEANING OF TV CAMERA DATAO WORD
0:8 777000,,0 YDISP The Y-coordinate displacement. Here 0 is the
top of the screen; the bottom is about 400.
This is the Y-coordinate of the top line that
you will receive. Since you can receive at
most every other line (see VRESOL above), to
get an entire picture you can read the
picture twice, first with YDISP set to 0 for
the even numbered lines and then with YDISP
set to 1 for the odd numbered lines.
9:17 777,,0 XDISP The X-coordinate displacement. Here 0 is the
left side of the picture; the right side is
approximately 515.
18:26 0,,777000 WWIDTH The width of the picture in words. Each word
returned will contain nine 4-bit samples.
WWIDTH specifies the number of words returned
for each line. Thus you will get 9*WWIDTH
samples per line. The range for this field
is from 0 to 44.
The data you get from an INPUT is packed with nine 4-bit samples to a word. The
first sample is from the upper left hand corner of the picture specified by the
X and Y displacements, horizontal width and word count. Successive samples are
from points just to the right of previous points until the end of a line, after
which the next sample is from the leftmost point on the next line (the exact
line depending on the vertical resolution).
When the transfer is finished, the CONI bits from the IOP (the 167 data channel)
are returned in the fourth word of the block pointed to by the INPUT UUO. Also,
if an error occurred during the transfer and bit 29 (0,,100 bit) was on in the
TV's I/O status word, then the address within your core image where the transfer
was terminated is returned to you in the left half of the CONI word (fourth word
of block). The important bits in this fourth word are explained below:
BITS OCTAL MEANINGS OF 1'S IN 167 CONI WORD
30 0,,40 DATA MISSED. A word (9 samples) was missed by the
memory and the transfer was terminated. You cannot be
sure that you have a complete picture; thus you should
do the transfer again.
31 0,,20 NON-EX MEM. The camera referenced a non-existent
memory location. This should never happen!
32 0,,10 JOB DONE. If the transfer has been completed
successfully, then this bit will be on. If this bit is
not on, then the camera is hung and not responding; for
instance, the camera's power might be off or your
specifications might have been illegal somehow.
TV I/O Status Word Summary
BITS OCTAL MEANING OF A 1
29 0,,100 Return data address at time of error in left half of
CONI word.
12.14 The IMP
The Interface Message Processor (device IMP) is the interface between the system
and the ARPA network (ARPAnet). To do anything over the network, it is
necessary to use the IMP. (Our IMP is a Honeywell 316 TIP (terminal IMP) which
supports dialup lines in addition to being the network interface.)
This section does not purport to document the ARPAnet protocols. It is assumed
that the reader is already familiar with the network documentation, the most
important part of which is the ARPANET PROTOCOL HANDBOOK, which is published by
the Network Information Center. Please refer to that handbook when attempting
to use one of the official network protocols. Other good sources of information
are the <NETINFO> directory at SRI-KL and the NETDOC; directory at MIT-DMS,
where some network documents are kept online. For some sample programming for
the IMP, see the file NETWRK.FAI[SUB,SYS].
In order to make the rest of this section a little clearer, I will define some
network terms first. However, the user should still read the ARPANET PROTOCOL
HANDBOOK to gain a complete understanding of what's going on.
Glossary of Network Terms
CONNECTION: A one-way path for data to flow from one host to another. Usually,
when two programs are communicating through the ARPAnet, there will be two
connections--one going each direction--so that each program can "talk" to the
other.
SOCKET: A single end of a connection. A connection between two hosts involves
two sockets--a send (odd numbered) socket on one end and a receive (even
numbered) socket on the other end. In a normal interaction, there will be two
connections so that data can flow both ways; thus four sockets are involved: a
local send socket, a local receive socket, a foreign send socket, and a foreign
receive socket. Socket numbers are 32-bit values used to keep different
interactions separate. For a connection to be established, the transmitting
process must know the socket number that the receiving process is expecting a
connection on.
RFC: Request For Connection. When a connection is to be established, the
originating host sends to the destination host an RFC with arguments including a
local socket number and a foreign socket number. The destination host can
complete the connection by returning an RFC with the same socket numbers, or can
refuse the connection by returning a close code. A completed RFC establishes a
simplex (one-way) connection. To establish a duplex connection, a pair of
connections has to be made; see ICP below.
BYTE SIZE: The number of bits per data byte on a particular connection. Data is
transmitted over the network as a bit stream; the transmitting side packs its
data bytes into a continuous stream of bits and the receiving side then unpacks
the bit stream back into bytes. The transmitting side indicates in its RFC what
the byte size of the connection is to be. The receiving side of the connection
has no choice in the matter except to refuse a connection that specifies a byte
size it doesn't like. All hosts are required to allow 32-bit bytes (the ICP
connection byte size) and 8-bit bytes (the normal TELNET and FTP byte size) if
they use the network protocols. Stanford allows byte sizes of 1, 2, 3, 4, 6, 8,
9, 12, 16, 18, 32, and 36 bits. However, many hosts allow only 8-, 32-, and
36-bit bytes, which are the most common byte sizes used. The standard TELNET
connection is 8 bits with the rightmost 7 bits of each byte being an ascii
character unless the high-order bit (200 bit) is on; characters with the 200 bit
on have a special meaning which is documented in the network protocols. A byte
size is established for the life of a connection and may not be changed without
breaking and then re-establishing the connection. When you do IMP input
(output), the data received (sent) is packed (unpacked) into (from) your buffers
with IDPB (ILDB) instructions using the connection byte size. Thus in buffered
mode, after you have INITed the IMP, you should change your buffer header's byte
pointer byte size to the connection byte size. In dump mode, you should unpack
(pack) the data with ILDBs (IDPBs) using the connection byte size.
LINK: "Link" is a historial term that refers to a set of resources needed for a
single connection. The host number concatenated with the "link number" (the
high order 8 bits of the message-id field) serves to uniquely identify the
connection to the network. Each connection is assigned its own link number.
ALLOCATION: A value which specifies the maximum amount of information which may
be transmitted on a given connection. The receiving host gives allocations to
the transmitting host. These allocations are made in two dimensions--bits and
messages. When the transmitting host uses up either the bit allocation or the
message allocation, that host must wait until the receiving host sends a new
allocation. This prevents data from coming in faster than it can be read or
buffered; the allocation reflects the buffering capability.
ICP: The Initial Connection Protocol. Most network services function by having
the user connect its receive socket (an even number, call it U) to a special
send socket (an odd number) provided by the server to get that service. The
server then sends a receive socket number S to the user and then both user and
server close that connection. Next, the user and the server connect the
server's (receive) socket number S to the user's (send) socket number U+3, and
the server's (send) socket number S+1 to the user's (receive) socket number U+2,
thus establishing a duplex connection. Secondary connections (such as for FTP
purposes) are made with S+2 and U+3 (for data to the server) and S+3 and U+4
(for data to the user), etc. The most common official ICP sockets are 3 for FTP
and 27 for TELNET.
NCP: Network Control Program. This is the process within a particular host
which acts as an interface between user programs and the network.
Special Note on 8-Bit Byte Size
Due to the way the system handles buffered mode I/O, the number of bytes
transferred to or from a buffer is always a multiple of the number of bytes per
word. This means that often there are padding null bytes at the end of the
buffer. Normally this does not cause any problems, since most programs will
ignore nulls. However, some programs treat nulls as significant data.
Therefore, when you do buffered IMP I/O with an 8-bit byte size (the standard
TELNET connection byte size), the four low-order bits (bits 32:35--0,,17 bits)
of the last data word of each buffer are used to indicate which of the four
8-bit bytes in that word contain real data and which are merely padding. This
permits the use of the null byte as significant data distinguishable from
padding nulls. Bytes that are just padding are marked by having the
corresponding low-order bit on. On input from the IMP, a padding byte is never
followed by a data byte in the same word. Programs that ignore nulls can also
ignore the low-order marking bits. On output, the bytes you have marked as
padding are not transmitted to the IMP; on input, the bytes of nulls used to pad
the input to a full word boundary are marked with the corresponding low-order
bits on. The following table gives the correspondences between bytes in the
last data word of a buffer and the low-order bits of that word that are used to
mark padding.
BITS OCTAL BYTE MARKED AS PADDING
32 0,,10 First byte: 776000,,0
33 0,,4 Second byte:1774,,0
34 0,,2 Third byte: 3,,770000
35 0,,1 Fourth byte:0,,7760
IMP I/O
The IMP is similar to any other sharable I/O device in that it may be
initialized with an INIT and released with a RELEAS, but it is different in that
one must first open a connection before one may exchange data. Connections are
opened and closed separately for the receive side and the send side, even though
the I/O channel number is the same. One may open and close connections
liberally without having to do more than one INIT. The INPUT and OUTPUT UUOs
are used to read data from, and to send data over, a connection. The CLOSE UUO
may be used to close one or both of the send and receive connections (the
close-inhibit bits determine which sides are closed--see the CLOSE UUO in
Section 2.12). To open a connection or to get one of several special functions,
the user does an MTAPE UUO with the effective address pointing to a variable
length table whose first word is a code number. This number determines the
function of the UUO. These functions will be explained below, but first here
are explanations of some bits relevant to the IMP.
The status of a connection is contained in several places. The actual
connection status is in a status word, one for each connection. If you have
both a receive and a send connection, then you will have two status words.
MTAPE 2 gives you these status words. The bits are decoded as follows:
BITS OCTAL NAME MEANING OF A 1
1 200000,,0 RFCS RFC sent.
2 100000,,0 RFCR RFC received.
3 40000,,0 CLSS Close sent.
4 20000,,0 CLSR Close received.
11 100,,0 INTINR Interrupt by receiver.
12 40,,0 INTINS Interrupt by sender.
The normal state of an open connection is 300000 in the left half, possibly with
other bits on that are not mentioned above (some bits are used internally by the
system). A connection is open if and only if both RFCR and RFCS are on. When a
connection is closed or closing, CLSS or CLSR will be on. No more data may be
transmitted or received over the connection at this point, and the appropriate
open bit (RFCR or RFCS) will go off.
A user program can tell if a connection attempt (MTAPE 0) is refused, since CLSR
will be on (and RFCR off). If neither RFCR or CLSR are on, and none of error
bits in the I/O status word are on, then the connection attempt timed out.
The foreign host may send us interrupts. It can send an interrupt from receiver
or an interrupt from sender. These can be received as user interrupts or can be
tested for explicitly by MTAPE 14. Interrupts can be sent using MTAPE 11;
interrupts generated by this UUO will not appear in the connection status words
for the user generating them. These interrupts are often used to indicate that
output should be aborted and that the host receiving the interrupt should scan
its input data stream for one of several matching network commands. Note that
it is not guaranteed that the network will send the interrupt faster than the
matching network command; hence user programs should keep a count, incrementing
it when a network interrupt is received and decrementing it when the matching
network command is read. Data from the data stream should be flushed whenever
the count is greater than zero.
More status bits occur in the I/O status word, which can be gotten with a GETSTS
UUO, or examined with a STATZ or STATO UUO, or cleared with a SETSTS UUO. These
bits are as follows:
BITS OCTAL NAME MEANINGS OF 1'S IN IMP I/O STATUS WORD
19 0,,200000 IODERR Device detected error. Almost all network
errors set this bit. You should check the
other status bits to find out what happened.
If none of them are set, the problem is an
incomplete transmission, which means that the
foreign host probably crashed.
20 0,,100000 IODTER Device detected error. This means either our
NCP is down or the destination host or IMP is
dead. Examining the other status bits and
variables can tell you which.
22 0,,20000 IODEND End of File. This means that you read all
the input that was available from the IMP and
that there is no more forthcoming (i.e., the
connection is closed).
25 0,,2000 HDEAD Destination host or IMP dead. This means
that the last message sent stayed in the IMP
network for a certain length of time without
being read by the destination. In this case,
the IMP flushes the message and sends us back
a HOST DEAD message.
26 0,,1000 CTROV Allocation overflow. The foreign host goofed
and sent more bits than we allocated it. The
system closes the connection when this
happens. This should not occur.
27 0,,400 RSET Reset received from foreign host. The
foreign host sent us a reset, which asks us
to clear all our tables of references to that
host. The connection is closed. Some sites
(including CMU and Harvard) will, as standard
procedure, send a reset the first time we
connect to them after their system has come
up. In this case, trying again will succeed.
In the more common case, RSET means the host
has just crashed and been brought up again.
28 0,,200 TMO Timeout occurred. Your job was in a wait
state and timed out (see MTAPE 17).
User interrupts can be taken on a number of conditions. These are described
below. See Section 9 to find out how to enable and receive interrupts.
BITS OCTAL NAME INTERRUPT CONDITION
11 100,,0 INTINR Interrupt from foreign receive side.
12 40,,0 INTINS Interrupt from foreign send side.
13 20,,0 INTIMS Status change. One or more of the bits CLSS,
CLSR, RFCS, RFCR has changed.
14 10,,0 INTINP Some new input has arrived. The next INPUT
UUO will not wait. The INTINP interrupt is
generated every time a regular data message
is received by the system. One can test for
data received and waiting in the system with
an MTAPE 10 UUO.
IMP MTAPEs
Now on to the MTAPEs themselves.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: <function number>
<other data depending on function number>
...
This is the general form of the IMP MTAPE UUOs. The function number specified
at ADR determines the meaning of the UUO. What is expected and/or returned in
the words following ADR is also dependent on the function number. The various
functions are explained below.
Some of these functions may go into a wait state. They will be awakened either
with their normal wakeup conditions or with some special conditions. Some of
the special conditions that may occur are specified by the bits in the right
half of the I/O status word. For instance, if you are waiting for input and a
reset arrives, the job is awakened and RSET is set. An I/O error bit (one of
IODTER, IODERR, or IODEND) will be set if the wakeup was due to a special
condition, so the normal IN and OUT UUOs will skip if the wakeup was not due to
the normal wakeup condition.
In any operation which expects the status word to be returned in word 1
(CONNECT, LISTEN, etc), an error code may be returned instead in the rightmost 6
bits. These errors are as follows:
CODE NAME ERROR
1 SIU Socket in use. There is already a connection on the
specified local socket number.
2 CCS Can't change socket numbers. This means a foreign
socket number has already been set and an RFC received
for this local socket number. You can't change the
socket number because the foreign host already knows
what it is.
3 SYS Horrible system error. Can't happen. If it does, find
a wizard.
4 NLA No link available. System IMP capacity exceeded.
5 ILB Illegal byte size. You attempted to establish a
connection with an improper byte size.
6 IDD IMP dead. Our NCP is not running, probably because the
IMP or the ARPAnet is dead. If you get this, see a
wizard.
Here are the various IMP MTAPE functions available.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 0 ;CONNECT
ADR+1: <status bits returned here>
ADR+2: <local socket number, 32 bits, right-justified>
ADR+3: <wait flag: non-zero for wait for connection>
ADR+4: <byte size if sending, else byte size returned here>
ADR+5: <foreign socket number>
ADR+6: <host number, 8 bits, right-justified>
An RFC is sent to the host whose number is in word 6 with the local socket
number taken from word 2 and the foreign socket number taken from word 5. If
word 3 is non-zero, the user program goes into RFC wait until timed out (see
MTAPE 17) or until an RFC with matching socket numbers and host number arrives.
If a matching RFC has already arrived from the foreign host, this UUO will not
wait, but will complete the connection immediately. If you wish to open a
receive connection, the local socket number must be even and the foreign socket
number odd. To open a send connection, the local socket number must be odd and
the foreign socket number even.
If you are opening a receive connection (local socket number even), and either
the wait flag (word 3) is on or a matching RFC was already waiting, then the
connection byte size is returned in word 4. If you are opening a send
connection (local socket number odd), you must specify the connection byte size
in word 4.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 1 ;LISTEN
ADR+1: <status bits returned here>
ADR+2: <local socket number>
ADR+3: <wait flag: non-zero for wait>
ADR+4: <byte size if sending, else byte size returned here>
ADR+5: <foreign socket number returned here>
ADR+6: <host number returned here>
This function is used to listen for an RFC from a foreign host to a specific
socket number here and to connect to that foreign host automatically when the
RFC is received. If word 3 is non-zero, this UUO will wait for the connection
to be made.
When an RFC for the specified socket arrives from a foreign host, a connection
is made. If the local socket number is even (receive side), and either the wait
flag (word 3) is on or the RFC was already waiting for you, then the connection
byte size is returned in word 4. If the local socket number is odd (send side),
you must specify the byte size in word 4. The foreign socket number to which
you get connected is returned in word 5; a -1 is returned if no connection has
been made (wait flag off). The foreign host number is returned in word 6.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 2 ;GET STATUS
ADR+1: <status bits for local send side returned here>
ADR+2: <status bits for local receive side returned here>
This function returns the status bits for both the send side and the receive
side of a connection. These bits are explained on page 324. If the connection
is not open, zero is stored. If a reset has been received, both CLSS and CLSR
will be on.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 3 ;TERMINATE CONNECTION
ADR+1: <status bits returned here>
ADR+2: <local socket number>
ADR+3: <Wait flag: non-zero to wait for close>
This sends a close to the foreign host for the socket specified in word 2. If
word 3 is non-zero, the job is placed in CLS wait until a return close is
received, or the CLS timeout occurs (signified by TMO being on in the I/O status
word).
The CLOSE UUO may also be used to close one or both of the send and receive
connections (the close-inhibit bits determine which sides are closed--see the
CLOSE UUO in Section 2.12).
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 4 ;WAIT FOR CONNECTION COMPLETION
ADR+1: <status bits returned here>
ADR+2: <socket number>
This is meaningful only if a CONNECT or LISTEN was given without waiting (word 3
= 0). In this case, the job is put into RFC wait until an RFC arrives or a
timeout occurs.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 5 ;DUMP MONITOR TABLES
ADR+1: <number of words of tables desired>
ADR+2: <address of place to put tables>
This dumps a specified amount of the monitor's IMP tables into your core image.
The IMP tables are shown on page 327.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 6 ;WAKEUP MAIN PROCESS
This function is valid only when given at interrupt level. This will wake up
the main process if it is in any wait state due to the IMP. It also sets TMO in
the I/O status bits.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 7 ;GET SOCKET NUMBERS AND HOST-LINK NUMBERS
ADR+1: <host-link number for send side>
ADR+2: <local send socket>
ADR+3: <foreign receive socket>
ADR+4: <host-link number for receive side>
ADR+5: <local receive socket>
ADR+6: <foreign send socket>
This function returns the above socket numbers and host-link numbers. A
host-link number is a 16-bit right-justified quantity. The first 8 bits are the
host number and the last 8 bits are the link number.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 10 ;SKIP IF ANY INPUT PRESENT
This function skips if there is input waiting that has not yet been transferred
to the user's buffers. Otherwise the direct return is taken.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 11 ;SEND INTERRUPT
ADR+1: <status bits returned here>
ADR+2: <local socket number>
This function sends an interrupt by receiver (INR) if the socket number is even
(receive side) and an interrupt by sender (INS) if the socket number is odd
(send side).
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 12 ;RESURRECT IMP IF DOWN
This is a privileged UUO and is applicable only if the NCP is not running, in
which case it attempts to restart it; i.e., if the IMP system is down this will
try to bring it back up. This will not work if there are any jobs on the system
which are trying (unsuccessfully) to use the network. If the NCP is not running
but the network appears to be up, find a wizard instead of trying to bring it up
yourself.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 13 ;NO-OP (formerly BLESS HOST)
This UUO is now a no-op. It was formerly used to clear the system's host-dead
bit for a particular host but the system no longer keeps a table of dead hosts.
All hosts are assumed alive except for an instant after the IMP network has
returned a HOST DEAD message in response to an attempt by us to send that host a
message.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 14 ;TEST AND CLEAR INTERRUPTS
ADR+1: <-1 returned here if any send side interrupts>
ADR+2: <-1 returned here if any receive side interrupts>
This UUO tells you if you have received either an interrupt by foreign sender or
an interrupt by foreign receiver. It also clears the interrupt condition. For
each of the two types of interrupts, a minus one is returned if the
corresponding interrupt has been received, and a zero is returned if no
interrupt has been received. When one of these interrupts arrives, the
corresponding bit (INTINS or INTINR) is set in the status word for that
connection, and if you are enabled for that interrupt condition, a user
interrupt is generated.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 15 ;ALLOCATE
ADR+1: <function code: 0 for as specified, 1 for system max,
2 for system min, and 3 for system default values>
ADR+2: <number of bits of allocation (for function 0)>
ADR+3: <number of messages of allocation (for function 0)>
This changes the allocation we have given the foreign host. If this UUO is not
given, the system default value is used, which is fairly small. The system
maximum is =1024 words, and the system minimum is 2 words. The default value is
about =50 words. Allocation is in two dimensions; you can allocate both the
number of bits and the number of messages the foreign host may send. Since free
storage blocks are about =50 words long, the system maximum number of messages
is 1024/50. If the function code (ADR+1) is 0, the new allocation is taken from
ADR+2 and ADR+3, clipped to fit within the system maximum and minimum, and set
accordingly. Notice that if the connection is not yet open, this UUO does not
actually cause the allocation to happen; it just sets the values that will be
given. The foreign host is not given the allocation until the first IN, INPUT,
or MTAPE 10 UUO is given. Do not expect any input interrupts until one of these
UUOs has been given; the foreign host cannot send anything until you allocate it
something.
There are several advantages to changing the allocation. Using larger
allocations is much more efficient and much faster, but it also means that
unless you are handling network interrupts and output resets, it will take a
long time before an output abort operation takes effect, since that much more
data is being buffered. Having a smaller allocation means faster response to
abort operations at the expense of much less efficiency and speed. File
transfer programs should always use the system maximum allocation; a TELNET-type
user program may or may not want to use it depending upon whether or not it
processes output aborts using the network interrupt mechanism. TELNET server
programs probably want system maximum message allocation and a smaller bit
allocation.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 16 ;GET ALLOCATIONS
ADR+1: <number of bits we have allocated foreign host>
ADR+2: <number of messages we have allocated foreign host>
ADR+3: <number of bits foreign host has left>
ADR+4: <number of messages foreign host has left>
ADR+5: <number of bits in free storage>
ADR+6: <number of messages in free storage>
ADR+7: <number of bits foreign host has allocated us>
ADR+10: <number of messages foreign host has allocated us>
Function 16 returns the above allocation values.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 17 ;SET TIMEOUTS
ADR+1: <word of 6-bit bytes: number of 2-second units
for timeouts on CLS, RFNM, ALLOC, RFC, INP;
0 means never timeout.>
A job can enter a wait state waiting for any one of five different kinds of
messages to arrive over the network: CLS (a return close of a connection), RFNM
(a request for new message, indicating that the last message sent reached its
destination), ALLOC (an allocation from a foreign receive socket, needed so that
we can send some data), RFC (a request for connection, necessary to complete a
connection), or INP (input data from a foreign host). In each of these cases, a
timeout may be set. IMP MTAPE function 17 takes 6-bit fields from word 1 for
five timeout values: CLS timeout is in bits 0:5 (770000,,0 bits), RFNM in bits
6:11 (7700,,0 bits), ALLOC in bits 12:17 (77,,0 bits), RFC in bits 18:23
(0,,770000 bits), and INP in bits 24:29 (0,,7700 bits). The value in each field
is the number of 2-second units of timeout duration. The maximum timeout
duration is thus =126 (2*63) seconds. Zero in any field means never time out
waiting for that condition (i.e., wait forever for that condition). Bits 30:35
(0,,77 bits) are not currently used.
When a RFNM, ALLOC or INP timeout occurs, one or more I/O status error bits are
set (which will cause an IN or OUT UUO to take the error return). When an RFC
or CLS timeout occurs, the UUO in progress just goes on as if it had never tried
to wait. When any of the five timeouts occurs, the timeout bit (TMO) is set in
the connection status word.
Note that we can go into CLS wait inside a CONNECT or LISTEN if the local socket
has a half-closed connection associated with it. For this reason, it is always
good to wait at least a few seconds for the return CLS. Also, when picking a
local socket to use, it is conventional to use the job number in the left half
and a random number (such as the time of day) in the right half, to avoid
accidentally getting a half-closed socket left by somebody else.
The system default timeout values are 6 seconds for CLS, 40 seconds for RFNM,
and no timeout for ALLOC, RFC, and INP.
When establishing a connection you will want to set timeouts for RFC and INP in
case the other host does not have anything listening on that socket and never
bothers to refuse the connection. Otherwise the connection attempt will hang
forever. The timeout should be picked to be short enough to be useful but
reasonably long to allow for a loaded system at the other end.
--------------------------------------------------
MTAPE <channel number>,ADR
ADR: 20 ;GET TIMEOUTS
ADR+1: <current timeout word returned here>
Function 20 returns the current timeout word as defined above in function 17.
System IMP Tables
Here are the system IMP tables that you can get with IMP MTAPE 5 (see page 326).
; BEGINNING OF SYSTEM IMP DATA TABLES
L0BLOK: BLOCK 10 ; BLOCKED-LINK-0 BIT FOR EACH HOST, 32 BITS PER WORD
LNKMAX: MAXNLK ; MAXIMUM NUMBER OF LINKS
LNKTAB: BLOCK MAXNLK ; BITS 28:35 ARE LINK NUMBER, 20:27 ARE HOST NUMBER
IMPDDB: BLOCK MAXNLK ; CONTAINS ADDRESS OF DDB ON THIS CONNECTION
IMPLS: BLOCK MAXNLK ; LOCAL NUMBER
IMPFS: BLOCK MAXNLK ; FOREIGN SOCKET
IMPBS: BLOCK MAXNLK ; CONNECTION BYTE SIZE
IMPSTB: BLOCK MAXNLK ; STATUS BIT TABLE
IMPRFQ: BLOCK MAXNLK ; LIST OF RFCS WAITING FOR CONNECTION ON THIS SOCKET
FFLNK: 0 ; INDEX OF FIRST FREE LINK
; THE FOLLOWING ARE COUNTERS OF THE NUMBER OF TIMES VARIOUS EVENTS HAVE HAPPENED
FRMIMP: 0 ; WE RECEIVED A MESSAGE FROM THE IMP
FLNOPS: 0 ; WE RECEIVED A NO-OP FROM THE IMP
TRACES: 0 ; TRACE MESSAGE
ERWOMI: 0 ; ERROR WITHOUT MESSAGE IDENTIFICATION
NIMPDN: 0 ; WE RECEIVED AN IMP GOING DOWN MESSAGE
NBLNKS: 0 ; BLOCKED LINK
LTFULL: 0 ; LINK TABLE FULL
ERWMI: 0 ; ERROR WITH MESSAGE IDENTIFICATION
INCMTR: 0 ; INCOMPLETE TRANSMISSION
ILLMT: 0 ; ILLEGAL MESSAGE TYPE
BDRFNM: 0 ; RFNM RECEIVED ON AN UNBLOCKED LINK
NODDBS: 0 ; NO DDB WHEN ONE WAS CALLED FOR
UNKLNK: 0 ; WE RECEIVED A MESSAGE TO A NON-EX LINK
NRFNL: 0 ; WE RECEIVED A RFNM WITH NO LINK IN LINK TABLE
NILLOP: 0 ; ILLEGAL SECOND LEVEL PROTOCOL OP CODE
BSILL: 0 ; BYTE SIZE FOR SECOND LEVEL COMMAND ILLEGAL
BCMM: 0 ; BYTE COUNT TOO SMALL FOR SECOND LEVEL COMMAND
RERRM: 0 ; WE RECEIVED AN ERROR MESSAGE
SPRRP: 0 ; RESET REPLY WITH NO RESET GIVEN
N2RFCS: 0 ; TWO RFCS FROM THE SAME HOST WERE RECEIVED
NNOCLS: 0 ; NO CLOSE WAS SENT WHEN ONE WAS RECEIVED
NILLST: 0 ; THE TABLES WERE IN AN ILLEGAL STATE
NNCOR: 0 ; WE DIDN'T HAVE ANY FREE STORAGE AT UUO LEVEL
NNOCLW: 0 ; WE DIDN'T ACKNOWLEDGE A CLS
NOLKS: 0 ; WE COULDN'T ASSIGN A LINK NUMBER
NHOST0: 0 ; WE GOT A MESSAGE FOR HOST ZERO
SLNOPS: 0 ; SECOND LEVEL NO-OP RECEIVED
NHANGS: 0 ; INPUT STOPPED DUE TO LACK OF FREE STORAGE
NDPBLK: 0 ; WE TRIED TO STEAL F.S. FROM DPYSER
NSPSUS: 0 ; SPARE F.S. BLOCKS WE USED
NRSETS: 0 ; WE RECEIVED A RESET
NMESIN: 0 ; WE RECEIVED A MESSAGE
NMESOU: 0 ; WE SENT A MESSAGE
NNOLNK: 0 ; WE RAN OUT OF TABLE SPACE
NSCLSS: 0 ; WE RECEIVED AN UNSOLICITED CLSS
NOPADB: 0 ; NO PADDING BIT FOUND
OPTMO: 0 ; THE INTERFACE TIMED OUT
IERBIT: 0 ; THE IMP ERROR BIT CAME UP
SLUNLK: 0 ; SECOND-LEVEL UNKNOWN LINK
RWNOSS: 0 ; REGULAR MESSAGE WITH NO SEND OR RECEIVE SOCKET
NIWCNO: 0 ; REGULAR MESSAGE RECEIVED WITHOUT CONNECTION OPEN
NSSC: 0 ; REGULAR MESSAGE RECEIVED FOR CLOSED SOCKET
NALWNC: 0 ; ALLOCATION FOR UNCONNECTED LINK
12.15 The PDP-11 Interface: ELF
The PDP-11 interface (device ELF) allows programs running on P1 to access the
PDP-11 and can be operated only in dump mode (mode 16 or 17). The IN/INPUT and
OUT/OUTPUT UUOs should point to a single IOWD word, which does NOT need to be
followed by a zero word.
The ELF can interrupt a user job through the user interrupt system. The INTELF
bit (bit 20--0,,100000 bit) enables this interrupt, which occurs when the PDP-11
writes a 1 into the least significant bit of word 772566 on the unibus. Device
ELF must be yours for you to get this interrupt.
ELF I/O Status Word Summary
BITS OCTAL NAME MEANING OF A 1
18 0,,400000 IOIMPM Improper mode specified in INIT or OPEN.
19 0,,200000 IODERR An error occurred during the last data
transfer, turning on one of the bits: NXM11,
BUSTO, PARITY, or HUNG.
20 0,,100000 (unused)
21 0,,40000 NXM11 No response from the addressed UNIBUS
location.
22 0,,20000 BUSTO Interface couldn't get the UNIBUS.
23 0,,10000 IOACT (unused)
24 0,,4000 BUSNIT You lost because a Unibus reset is going on.
25 0,,2000 PARITY Bad parity indication.
26 0,,1000 HUNG Interface is hung irretrievably.
27 0,,400 (unused)
28 0,,200 BGRAB Interface is holding onto the UNIBUS (the
PDP-11 is hanging).
29 0,,100 NRETRY Don't retry on NXM11 or HUNG.
If NXM11 or HUNG is on, the system has tried =10 times before giving up unless
NRETRY is on. It always retries =10 times on BUSTO.
UUOs with Special Meanings for ELF
USETI [OP=074]
--------------------------------------------------
USETI <channel number>,ADR
ADR: <flag and input mode>,,<flag and input UNIBUS address>
The USETI UUO to device ELF is used to set the input mode and/or the beginning
UNIBUS address for the next input operation. If bit 0 (400000,,0 bit) of the
word at ADR is on, the input mode is set from bits 13:17 (37,,0 bits) of ADR.
If bit 18 (0,,400000 bit) of ADR is on, the output UNIBUS address is set from
bits 19:35 (0,,377777 bits) of ADR. All of these bits are explained in the
table following the USETO UUO below.
USETO [OP=075]
--------------------------------------------------
USETO <channel number>,ADR
ADR: <flag and output mode>,,<flag and output UNIBUS address>
The USETO UUO to device ELF is used to set the output mode and/or the beginning
UNIBUS address for the next output operation. If bit 0 (400000,,0 bit) of the
word at ADR is on, the output mode is set from bits 13:17 (37,,0 bits) of ADR.
If bit 18 (0,,400000 bit) of ADR is on, the output UNIBUS address is set from
bits 19:35 (0,,377777 bits) of ADR. All of these bits are explained in the
table below.
BITS OCTAL NAME MEANING OF FIELD IN USETI/USETO WORD FOR ELF
0 400000,,0 If this bit is on, the mode for transfers in
the given direction (input if USETI, output
if USETO) is set from bits 13:17 (see below).
If this bit is off, the mode remains as it
was before.
13 20,,0 NOPAR Ignore parity errors.
14 10,,0 GRAB Hold on to the UNIBUS during and after the
transfer. Any error condition that sets
IODERR will release the bus.
15 4,,0 SGNEXT Extend the sign of input data.
16:17 3,,0 Data packing mode, decoded as follows
0--One PDP-11 word per word, right-justified.
1--Two words per word, right-justified in each halfword.
2--Two words per word, in right-most 32 bits.
3--Two words per word, in left-most 32 bits.
In the two-word modes, the higher-order
PDP-11 word is the one at the first UNIBUS
address. Sign extension has no effect in
mode 3; it operates on each halfword
separately in mode 1.
18 0,,400000 If this bit is on, the bus address for the
next transfer in the given direction is set
from bits 19:35. If this bit is off, the
address remains where the last transfer in
this direction left it (pointing to the
UNIBUS address immediately following the last
word transferred). Note that these are word,
not byte, addresses.
19:35 0,,377777 BUSADR If bit 18 above is on, this field holds the
UNIBUS address for the next transfer in the
given direction.
UGETF [OP=073]
--------------------------------------------------
UGETF <channel number>,ADR
ADR: <USETI word>
<USETO word>
The UGETF UUO for device ELF returns the states of the USETI and USETO pointers
and modes in the two-word block pointed to by the effective address of the UUO.
The USETI value is returned in the first word and the USETO value in the second
word of the block. The results are stored with bits 0 and 18 (400000,,400000
bits) on so that a subsequent USETI or USETO addressed to one of these words
will set both the mode and the bus address.
RELEAS [OP=071]
--------------------------------------------------
RELEAS <channel number>,
The RELEAS UUO for device ELF resets the interface, clears its interrupt
enablings, and sets the USET pointers to 400000,,400000.
MTAPE [OP=072]
--------------------------------------------------
MTAPE <channel number>,ADR
<error return>
ADR: <instruction>
<data>
The MTAPE UUO for device ELF does various things depending on the contents of
ADR. ADR+1 either contains data that will be written to the 11 or receives data
read from the 11. In case of an error, the appropriate error bits will be on in
the ELF's I/O status word. The general form of the <instruction> at ADR is as
follows:
BITS OCTAL MEANINGS OF FIELDS IN <INSTRUCTION>
0:8 777000,,0 Operation code, see explanations below.
9:12 740,,0 (unused)
13:17 37,,0 Mode, as in a USETI or USETO UUO (see above).
18 0,,400000 (unused)
19:35 0,,377777 UNIBUS address.
The mode and address of an MTAPE have no effect on the USET pointers or the
operation of subsequent INs and OUTs, except that the BGRAB state of the
interface (and the BGRAB bit of the I/O status word) reflect the state left by
the last operation performed. That is, the mode and address specified in an
MTAPE affect that MTAPE only (except for the BGRAB bit).
OPCODE NAME FUNCTION EXECUTED
1 FILL The <data> word is interpreted as <number>,,<const>.
The value <const> is written into <number> consecutive
words beginning at the specified address. Mode bits
16:17 (3,,0 bits) are ignored.
2 PEEK One or two PDP-11 words (depending on the mode) are
read into ADR+1.
3 POKE The <data> is written into one or two PDP-11 words
(depending on the mode) at the specified address.
4 BUSREL The interface is cleared and forced to release the
UNIBUS if it is in BGRAB mode. The BGRAB bit is
cleared. The mode field and the bus-address field are
ignored.
5 PWRTRP A power fail trap is simulated on the PDP-11, that is,
the PDP-11 traps through 24. Note that it does this
two times, once on power down and once on power up.
Also, the BGRAB bit is cleared.
Other MTAPEs for poking buttons on the PDP-11's console will be added when the
hardware is built.
12.16 The Cart Control Transmitter (CAR)
The cart control transmitter (device CAR) is used to send commands to the cart.
This device can be used only in mode 10. The default buffer size is =20 data
words and any data beyond the first =20 words in each buffer will be ignored.
Smaller buffers are permitted.
The cart control transmitter is controlled through the cart control interface.
The Cart Control Interface
The cart control interface consists of an array of =18 power transistors used to
operate the cart control transmitter and whatever lights, relays and similar
things happen to be connected to it at the moment. Each transistor is capable
of sinking up to two amps from a positive voltage of up to 60 volts to ground.
The transistors are labelled =18 through =35.
The on/off state of each transistor can be altered by a CONO to the cart control
interface. The right halfword of the CONO consists of two bits of control
information (bits 18:19--0,,600000 bits), and =16 bits of mask (one bit for each
of transistors =20 through =35 in bits 20:35--0,,177777 bits). A one bit in
this mask means the corresponding transistor is to be affected. The following
table gives the current use of each of the CONO bits to the cart control
interface.
BITS OCTAL CONO BITS TO CART CONTROL INTERFACE
18 0,,400000 This bit determines whether the transistors selected by
ones in bits 20:35 (0,,177777 bits) are to be turned on
or off. A zero in this bit position causes the
selected transistors to be on (i.e., to pull to
ground), whereas a one in this bit causes the selected
transistors to be off.
19 0,,200000 This bit being on causes retriggering of a one shot
which has a period of approximately one second; the one
shot controls the state of transistors 18 and 19.
Transistor 18 is off and 19 is on when the one shot is
active, and the reverse is true when the one shot has
timed out. Transistor 18 operates a relay which, when
off, causes the cart control transmitter to be on.
This means that the transmitter is on the air only as
long as cart CONOs with the 0,,200000 bit on are issued
at least once a second.
20:35 0,,177777 The transistors among =20 to =35 to be affected by this
CONO are those whose bits are on in this mask. The
effect on these selected transistors is determined by
the value of bit 18 (0,,400000 bit) above. The current
uses of these =16 transistors are indicated in the
following individual descriptions. Note that
transistors 27:35 (0,,777 bits) are never affected by
output to device CAR--see below.
20 0,,100000 (unused)
21 0,,40000 Controls the pan-left cart function.
22 0,,20000 Controls the pan-right cart function.
23 0,,10000 Controls the steer-left cart function.
24 0,,4000 Controls the steer-right cart function.
25 0,,2000 Controls the drive-on cart function.
26 0,,1000 Controls the cart drive direction.
27:34 0,,776 (unused)
35 0,,1 Operates the UDP unload light.
A CONI to the cart control interface returns a word with bits 20:35 (0,,177777
bits) indicating the current states of transistors 20:35, where a one in a
particular bit position means the corresponding transistor is off. Bits 0:19
(777777,,600000 bits) of the returned word will always be zero.
The Transmitter
Device CAR can be used to put the 0,,177000 bits of the cart control interface
through an accurately timed sequence of states without affecting the 0,,777
bits. This is done by outputting data words to device CAR in mode 10.
Each data word output to device CAR is interpreted as a cart command unless the
sign bit (bit 0--400000,,0) is on (see next paragraph). Bits 20:26 (0,,177000)
of each cart command contain a mask specifying a state for transistors 20:26 of
the cart control interface--a one in a particular bit position means that the
corresponding transistor is to be on. The left half of each cart command
(777777,,0 bits) contains the number of ticks (60ths of a second) for which this
state is to be maintained. The system executes commands from a buffer one at a
time, issuing CONOs with the 0,,200000 bit on at least once every half second.
When the last command in a buffer has finished, the system sends a default state
at a given rate. The default state is initially a 0 sent once every half
second, but this can be altered by including in any buffer a control word with
the sign bit on (bit 0--400000,,0). Bits 20:26 (0,,177000 bits) of such a
control word are taken as the default state for transistors 20:26, where a one
in a given bit position means the corresponding transistor is to be on. Bits
1:17 (377777,,0) of a control word are interpreted as the interval in 60ths of a
second between times this default state is sent. Control words of this kind do
nothing but set these defaults.
Bits 18:19 and 27:35 (0,,600777 bits) are unused both in cart commands and in
control words, and cart control interface transistors 27:35 are unaffected by
output to device CAR.
SECTION 13--SPECIAL I/O GADGETS
This section describes various special I/O gadgets that are not DEVICES (in the
standard system meaning) in that they cannot be INITed. Included here are the
dialer, the III display processor, the Data Disc display system and interface,
and the Datamedia display program interpreter (system software).
13.1 The Dialer
The automatic dialer is provided for programs that want to be able to dial up a
telephone number. The dialer is accessed through the DIAL UUO, which is
explained below.
DIAL [OP=047, ADR=400117] CALLI 400117
--------------------------------------------------
MOVEI AC,ADR
DIAL AC,
<error return, error code in AC>
ADR: <dialer number>,,<function number>
<area code if dialing--see format below>
<telephone number if dialing--see format below>
Error codes:
0 Illegal dialer number.
1 Dialer in use by someone else.
2 Do not have TTY11 open on an I/O channel.
3 Attempted to dial while call in progress (should hang up first).
4 Dialing failure.
The DIAL UUO permits program control of dialing out on the phone line which is
connected to the system as TTY11. After completion of a call, terminal input
and/or output can be done over the phone through TTY11. The AC specified in the
DIAL UUO should contain the address of a data block, the first word of which
specifies a DIALER NUMBER in the left half and a FUNCTION NUMBER in the right
half. Currently there is only one dialer and thus the dialer number must be
zero in all calls of this UUO. The function number determines what function the
DIAL UUO is to carry out. The various dialer functions are listed below; you
must do a CLAIM DIALER (function 0) before you can execute any of the other
functions (for a specific dialer number). The second and third words in the
data block are used only if the function number specifies dialing a number.
CODE FUNCTION FOR DIAL UUO
0 Claim dialer. This claims the indicated dialer for your job and must
be executed before any other function is performed with this dialer
number.
1 Get dialer status. This returns in AC left the dialer's CONI value as
of the last dialer interrupt and in AC right the value from a current
dialer CONI. The meanings of the dialer CONI bits are listed in the
table below.
BITS OCTAL MEANINGS OF 1'S IN DIALER CONI BITS
24 0,,4000 Data set answered, or voice call. Bit 28 ← 1.
25 0,,2000 Data set disconnect. Bit 28 ← 0.
26 0,,1000 Busy. The dialer or its dataphone is in use.
27 0,,400 Data phone not hung (OK).
28 0,,200 Data set connected.
29 0,,100 Voice call--connected to AD/DA after
completion.
30 0,,40 Power failure on the dialer.
31 0,,20 Interrupt. Bits 24, 25, 27 and 30 cause
interrupts.
32 0,,10 Interrupt enabled.
33:35 0,,7 Interrupt channel.
2 Dial a number. The word at ADR+1 holds the area code in the following
format:
BITS OCTAL DIALER AREA CODE FORMAT
0:17 777777,,0 (unused)
18:21 0,,740000 First digit of area code.
22:25 0,,036000 Second digit of area code.
26:29 0,,001700 Third digit of area code.
30:35 0,,77 (unused)
The word at ADR+2 holds the remaining seven digits of the phone number
in this format:
BITS OCTAL DIALER PHONE NUMBER FORMAT
0:5 770000,,0 (unused)
6 4000,,0 Dial area code if this bit is on.
7 2000,,0 Switch phone to AD/DA when call completed.
This feature is not implemented!
8:11 1700,,0 First digit of phone number.
12:15 74,,0 Second digit of phone number.
16:19 3,,600000 Third digit of phone number.
20:23 0,,170000 Fourth digit of phone number.
24:27 0,,7400 Fifth digit of phone number.
28:31 0,,360 Sixth digit of phone number.
32:35 0,,17 Seventh digit of phone number.
3 Hang up the dialer's phone.
4 Release dialer (automatically done if you release TTY11).
13.2 III Display Processor
The III display processor is itself a small computer. The instructions that it
executes form the display. In order for a user to use the display processor, he
must compile display instructions into his program and ask the system to give
these instructions to the display processor. See Section 4.1 and Section 4.5
for details on getting the system to run your display program. This section
explains the instructions that can be executed by the III display processor.
TSS Instruction
Test, set, and skip Opcode 12
_____________________________________________________________________
|0 7|8 15|16 23|24 30| 31 |32 35|
| RESET | SET | TEST | unused | I | 1010 |
|___________|____________|___________|___________|_______|__________|
A skip condition is generated if at least one of the eight flags is on and the
corresponding bit in the TEST field is on. If the exclusive or of the skip
condition and bit 31 is true, the next instruction is skipped. The flags are
then set or reset according to the set and reset field. If both set and reset
bits are on, the corresponding flag is complemented. The flags are as follows:
BITS OCTAL FLAG MEANING
0,8,16 401002,,0 Control bit. This bit may be set, reset, and tested
but has no other meaning to the processor.
1,9,17 200401,,0 Light pen flag. The bit is set if the light pen is
seen.
2,10,18100200,,400000Edge overflow flag. This bit is set if the beam is
ever positioned off the screen by any means.
3,11,1940100,,200000 Wrap-around flag. This bit is set if overflow occurs
in incremental vector mode.
4,12,2020040,,100000 Not running mask. If this bit is on, the processor
will interrupt if a halt is executed. This bit cannot
be set or reset by this instruction.
5,13,2110020,,40000 Light pen mask. If this bit is on, the processor will
interrupt if the light pen flag comes on.
6,14,224010,,20000 Edge overflow mask. If this bit is on, the processor
will interrupt if the edge overflow flag comes on.
7,15,232004,,10000 Wrap-around mask. If this bit is on, the processor
will interrupt if the wrap-around flag comes on.
LVW Instruction
Long vector word Opcode 06
_____________________________________________________________________
|0 10|11 21|22 24|25 27|28| 29 |30 31|32 35|
| X | Y | BRT | SIZE | | M | T | 0110 |
|___________|___________|_________|_________|__|_____|_____|________|
The long vector word draws one vector with mode, type and brightness as
specified by the M, T, and BRT fields respectively. A 0 in the BRT field
indicates no change in brightness. 1 is the dimmest intensity and 7 the
brightest. The brightness affects all vectors and characters until reset by
another long vector word.
Mode 0 indicates relative mode and 1 indicates absolute mode. In absolute mode,
the new position is given by the X and Y components relative to the center of
the screen. In relative mode the components are added to the current position
to give the new position.
TYPE MEANING
0 Visible.
1 End point.
2 Invisible.
3 Undefined, currently end point.
A visible vector is drawn from the current position to the new position; the
invisible vector moves the beam to the new position without displaying; the end
point vector moves the beam to the new position and then displays a point.
The size field sets the character size. The selected size is used for all
characters until reset by another long vector word with a non-zero character
size field. The sizes are:
SIZE CHARS PER LINE LINES PER SCREEN
0 no change no change
1 128 (smallest chars)64
2 85 42
3 73 36
4 64 32
5 42 21
6 32 16
7 21 (largest chars) 10
SVW Instruction
Short vector word Opcode 02
_____________________________________________________________________
|0 6|7 13|14 15|16 22|23 29|30 31|32 35|
| dX1 | dY1 | T1 | dX2 | dY2 | T1 | 0010 |
|_________|_________|________|_________|_________|________|_________|
The short vector word always draws two vectors in relative mode. The type of
each vector is specified by the corresponding T field (see the long vector word
above). The high order bits of the dX and dY fields are extended left to give
11-bit quantities.
CHR Instruction
Character word Opcode 1
_____________________________________________________________________
|0 6|7 13|14 20|21 27|28 34| 35 |
| character | character | character | character | character | |
| 1 | 2 | 3 | 4 | 5 | 1 |
|___________|___________|___________|___________|___________|_______|
The character word displays the five characters in order from left to right with
automatic spacing. All characters are displayed as printed on the line printer
with the following exceptions:
CODE III CHARACTER
011 None.
013 Integral sign.
014 Plus-or-minus sign.
177 Circumflex.
JMP Instruction
Jump Opcode 20
_____________________________________________________________________
|0 17|18 30|31 35|
| A | unused | 10000 |
|_________________________________|_____________________|___________|
The processor jumps to location A and continues executing.
HLT Instruction
Halt Opcode 00
_____________________________________________________________________
|0 17|18 30|31 35|
| unused | unused | 00000 |
|_________________________________|_____________________|___________|
The processor stops with its MA pointing to the location following the HALT.
The not running flag is turned on.
JMS Instruction
Jump to subroutine and save Opcode 04
_____________________________________________________________________
|0 17|18 31|32 35|
| A | unused | 0100 |
|_________________________________|______________________|__________|
The JMS instruction is not allowed in user III programs, but its description is
included here for completeness.
The following word of information is written into location A:
_____________________________________________________________________
|0 17|18 22|23 30|31 35|
| MA | CPC | unused | 10000 |
|_________________________________|____________|__________|_________|
where CPC is the contents of the CPC buffer register. This register is loaded
whenever the processor discovers an interrupt condition while processing a
character word or short vector word. It is set to the number of the character
being displayed (0-4) or the number of the vector of the short vector word
(0-1). It is reset by a CONO 430, with the clear flags bit on.
The following information is written in location A+1:
_____________________________________________________________________
|0 10|11 21|22 24|25 27|28 35|
| X | Y | BRT | SIZE | FLAGS |
|_____________|_____________|___________|___________|_______________|
Here are the meanings of the flag bits (see also the TSS instruction above).
BITS OCTAL MEANING
28 0,,200 Control bit.
29 0,,100 Light pen flag.
30 0,,40 Edge overflow flag.
31 0,,20 Wrap around flag.
32 0,,10 Wrap around mask.
33 0,,4 Light pen mask.
34 0,,2 Edge overflow mask.
35 0,,1 This bit is always 1.
After storing the above words at A and A+1, the program continues executing at
A+2.
Note that the word stored in A is in the form of a jump instruction. This
permits the subroutine to return by jumping to A.
JSR Instruction
Jump to subroutine Opcode 24
_____________________________________________________________________
|0 17|18 30|31 35|
| A | unused | 10100 |
|_________________________________|_____________________|___________|
The JSR instruction saves a PC word into location A and then executes code from
location A+1. The PC word is in the same format as the word stored in location
A by the JMS instruction. The word is a jump instruction so that the subroutine
return can be simply a jump to A.
SAVE Instruction
Save Opcode 64
_____________________________________________________________________
|0 17|18 29|30 35|
| A | unused | 110100 |
|_________________________________|_____________________|___________|
The save instruction saves a position word in location A. This word is in the
same format as the word put into A+1 by the JMS instruction and is in the
correct format to be used by the REST instruction below.
REST Instruction
Restore Opcode 14
_____________________________________________________________________
|0 17|18 29| 30 | 31 |32 35|
| B | unused | P | F | 1100 |
|_________________________________|____________|_____|_____|________|
The contents of location B are assumed to be in the format of the word stored in
location A+1 by a JMS or the word stored in location A by a SAVE. If bit 30 is
a 1, the X and Y position registers and the size and brightness registers are
reloaded from the corresponding fields of this word. If bit 31 is a 1, the
flags are restored.
SEL Instruction
Select (displays) Opcode 10
_____________________________________________________________________
|0 11|12 23|24 31|32 35|
| SET | RESET | unused | 1000 |
|____________________|_____________________|_______________|________|
If any of bits 0:11 (777700,,0 bits) are on, the corresponding displays are
selected. If any of bits 12:23 (77,,770000 bits) are on, the corresponding
displays are deselected. If both the select and deselect bits are on for a
given display, the state of selection of that display will be complemented.
Note that we have only 6 III displays at Stanford; only bits 0:5 (770000,,0
bits) and 12:17 (77,,0 bits) are relevant in the SET and RESET fields.
13.3 Data Disc Display System
The Data Disc display system uses a =64-track disc rotating at =60 r.p.s. to
store TV images. The terminals used with this system are standard television
monitors. Each picture on the disc uses one CHANNEL, which is two disc tracks.
The tracks are switched alternately every 60th of a second--one track for each
field of the standard television raster. Characters and graphics are sent to a
one-line buffer and then commanded to be written. Characters must be written
twice; once for each field.
There is an interface that takes display instructions from main memory and sends
data to the Data Disc. The display instructions are used to change the pictures
stored on the disc. A user can have his own display programs executed by the
Data Disc interface by using the UUOs explained in Section 4.5; see also Section
4.2. This section describes the display instructions, how they are handled by
the interface and their effects on Data Disc pictures.
The Data Disc system itself operates in two modes: text and graphics. In text
mode, each byte sent to the Data Disc is interpreted as a character and will be
displayed in the current column on the current line; each column position is one
character wide (6 bits wide in single width character mode, =12 bits wide in
double width character mode). Characters must be written on the disk twice,
once for each track of the given channel. In graphics mode, each byte is
interpreted as eight bits to be written on the disk exactly as sent. The bits
are written on the current line at the current column position. Each column
position in graphics mode is 8 bits wide.
Normally, in both graphics and text modes data is sent to the Data Disc line
buffer and is not written onto the disc until an execute is received by the Data
Disc system. It is possible, however, to write directly onto the disc without
use of the line buffer. See the Write Directly command in the command word
description below.
Now here are the display instructions which the interface will accept.
Text Word
Text word Opcode 1
___________________________________________________________
|0 6|7 13|14 20|21 27|28 34| 35|
| chr1 | chr2 | chr3 | chr4 | chr5 | 1 |
|__________|____________|__________|__________|_________|___|
| | | | | | | | | | | | |
A text word causes the interface to send five bytes to the disc's line buffer.
Tabs (011) and backspaces (177) are ignored unless preceded by a backspace, in
which case a special character is sent to the line buffer (e.g., a small "tb"
will be printed for 177&011). Nulls are always ignored. Carriage return and
linefeed are specially processed to do the right thing: If any characters have
been transmitted to the line buffer since the last execute command (see command
word below), an execute is generated. (Execute causes the line buffer to be
written onto the disc.) Carriage return then causes a select to column 2, and
linefeed increments the line address by =12. (If you are displaying
double-height text, then each line should be ended with a carriage return and
TWO linefeeds in order for subsequent lines to be positioned properly.) Both
carriage return and linefeed print special characters instead of the above
functions when preceded by a 177. Note: The Data Disc must be in text mode for
the bytes sent to it to be written onto the disc as text. In graphics mode,
these same bytes will be written as graphic bits.
Graphics Word
Graphics word Opcode 02
___________________________________________________________
|0 7|8 15|16 23|24 31|32 35|
| byte 1 | byte 2 | byte 3 | byte 4 | 02 |
|____________|_____________|____________|____________|______|
| | | | | | | | | | | | |
A graphics word causes the interface to send four 8-bit bytes directly to the
disc's line buffer with no modification. Note: The Data Disc must be in
graphics mode for the bytes sent to it to be written onto the disc as graphics
bits. In text mode, these same bytes will be written as characters.
Halt Instruction
Halt Opcodes 0, 40, 60
___________________________________________________________
|0 29|30 35|
| unused | X0 |
|_________________________________________________|_________|
| | | | | | | | | | | | |
A halt stops the interface, terminating the display program.
Jump Instruction
Jump Opcode 20
___________________________________________________________
|0 17|18 29|30 35|
| jump address | unused | 20 |
|_____________________________|___________________|_________|
| | | | | | | | | | | | |
A jump word causes the interface to take subsequent display instructions
starting at the address contained in the left half of the jump word.
No Operation
No-op Opcodes 06,16,26,36,46,56,66,76, 12,32,52,72
___________________________________________________________
|0 29|30 35|
| unused | XX |
|_________________________________________________|_________|
| | | | | | | | | | | | |
Opcodes ending in 6 or 12 have no function. The interface ignores them and
proceeds.
WARNING: Opcodes ending in 10 (10, 30, 50, 70), previously advertised as no-ops,
are not no-ops at all; they are actually command words, although their use as
such is not recommended because the 10 bit is part of the third command code (OP
3 in the command word below).
Command Word
Command word Opcode 4
___________________________________________________________
|0 7|8 15|16 23|2426|2729|3032|3335|
| data 1 | data 2 | data 3 |op 1|op 2|op 3| 4 |
|____________|____________|_____________|____|____|____|____|
| | | | | | | | | | | | |
A command word causes the interface to send the Data Disc three commands, as
indicated above by "op 1," "op 2" and "op 3." Sent with each command is an
8-bit data byte. The commands possible are as follows:
OP COMMAND NAME MEANING OF DATA DISC COMMAND WORD OP
0 Execute Write the line buffer onto the disc at the
position previously specified. The data
byte is irrelevant for this command.
1 Function code Load the function code register with the
given data byte. The meanings of the bits
in the function code register are explained
below.
2 Channel select Select the channel specified in the data
byte for writing. If the erase bit is on
and the graphics mode bit is set, the
channel selected is erased to the
background selected by the dark/light bit.
Only the first channel select in a DD
display program has any effect.
3 Column select The data byte is loaded into the column
register and the line buffer address
register. This sets the X-position of your
output. Column 0 is illegal and will hang
the controller. Column =85 is the last
column to be displayed with normal size
characters; characters sent for columns =86
through =128 are flushed, over =128, you
wrap around. A column select greater than
=85 will also hang the controller. The
last graphics column is =64 and columns
greater than that will hang the controller.
4 High order line address The data byte is loaded into the high
order 5 bits of the raster line address.
See the next command--"low order line
address".
5 Low order line address The data byte is loaded into the low
order 4 bits of the raster line address.
Line range is from 0 to 737 (octal). Line
addresses between 740 and 777 cause execute
commands to be ignored. Line addresses
above 777 wrap around. To specify the
first text line at the top of the screen,
use a raster line address of 0.
6 Write directly Data is written directly on the disc at the
location previously set up; the line buffer
is not used. The column address is
automatically incremented. Executes are
not necessary.
7 Line buffer address Data is loaded into the line buffer address
only. This allows some of the line buffer
contents to be changed and the rest
retained. The first character displayed
will be the one specified by the column
address, and the last character will be the
last one sent after this command.
The 8-bit function code register, which is loaded by command 1 above, has the
following format (individual bits are explained below):
Bit 0 1 2 3 4 5 6 7
_______________________________________________________________
| | |single |nospace|2 wide | dark | write |graphic|
|unused |unused |height | (add) |(erase)| back |enable | mode | 1
|_______|_______|_______|_______|_______|_______|_______|_______|
| | |double | space | | light |display| text |
|unused |unused |height | (rep) |1 wide | back |direct | mode | 0
|_______|_______|_______|_______|_______|_______|_______|_______|
| | |
BITS OCTAL MEANING
0:1 300 (unused)
2 040 Single height/double height. (Text mode only.)
This bit determines what height displayed characters
will have. Single height characters are =12 lines
tall; =10 lines above the "base" line and 2 lines
below. The top line of the character prints on the
line addressed. This bit has no effect in graphics
mode. If you are displaying double-height text, then
each line should be ended with a carriage return and
TWO linefeeds in order for subsequent lines to be
positioned properly.
3 020 Nospace/space. (Text mode only.)
When this bit is on, each character written is
substituted on top of the character previously written;
when this bit is off, the remainder of the line is
erased.
3 020 Additive/replacement. (Graphics mode only.)
When this bit is on, only 1 bits are written, ORed with
the bits already written; when this bit is off, 1's and
0's are written over previous data.
CAUTION: When replacing, the bits at the beginning and
end of the line segment you are writing should be the
same as the previous data or bit lossage may occur.
4 010 Double width/single width. (Text mode only.)
This bit determines what width displayed characters
will have. With this bit on, characters are =10 bits
wide with two 0 bits on the end (total =12 bits); when
this bit is off, characters are 5 bits wide with one 0
bit on the end (total 6 bits).
CAUTION: When using double width characters, do not
exceed =43 characters in a line or the controller will
hang. Double width characters often fail to get
displayed correctly anyway.
4 010 Erase/no erase. (Graphics mode only.)
If this bit and the graphics mode bit are on, a channel
select will cause the screen to be erased to the
background indicated by the dark/light bit below.
5 004 Dark/light.
When this bit is on, an erase causes the screen to go
dark and characters and graphic 1 bits are displayed as
light. When this bit is off, an erase makes the
background light and characters and graphic 1 bits are
displayed as dark.
6 002 Write/display directly.
When this bit is on, operations go to the disc (normal
mode). When off, data is displayed once on the
selected channel and then goes away and previous data
remains on the disc.
7 001 Graphics mode/text mode.
When this bit is on, you are in graphics mode; when it
is off, you are in text mode.
13.4 Datamedia Display Output
This section explains how Datamedia (DM) display programs are interpreted by the
system. DM display programs are started with the UPGIOT UUO (which can also run
III and DD display programs). UPGIOT accepts several flags that affect the
interpretation of a DM display program; the use of these flags is detailed in
the description of the UPGIOT UUO on page 136.
A DM display program consists of a sequence of 7-bit bytes (an ascii string),
which are normally interpreted as characters to display. However, nulls (000)
are ignored and the character 177 causes an escape to a command indicated by the
following byte. If the command byte (following the 177) is in the range 000:040
or in the range 175:177, the result is the normal control effect of the command
byte on a DM (see the table below). Thus to actually display the 177 character,
two consecutive 177s should be included in the display program. If the command
byte is a formfeed (FF, 014, the cursor positioning DM command), then the next
two bytes will be taken as the X-Y position for the cursor in standard DM
representation (see ** below). Command bytes in the range 041:174 are reserved
for future use.
When not preceded by a 177, a character with octal value 001:037 (except for TAB
(11), LF (12), and CR (15), which are not printing characters) is interpreted as
a Stanford character to display in one column. If the particular DM is capable
of displaying the full 128 characters, the character is displayed normally.
Otherwise, the character is represented on the display by the character which is
100 or 140 greater but blinking or bold (bold on most Stanford DMs, which have
been modified to interchange blinking and bold; blinking on unmodified DMs).
Thus bold (blinking) characters are used to represent the control characters
001:037.
Below are the effects of control characters transmitted to a DM display
terminal. To get these characters output from a display program, you must quote
them either with the DMQUOT flag (explained on page 136) or with a preceding 177
character. The characters TAB (11), LF (12), and CR (15) do not need to be
quoted in a display program in order to be transmitted to the display. (TAB
does need to be quoted if the system thinks the terminal either does not have
tab stops or does not have its tab stops set correctly; an unquoted tab in such
a case will be converted to the equivalent number of spaces.)
If the DM is in insert/delete (ID) mode, four of these control characters have
special effects; these are explained later. The remaining control characters
have generally undefined and in some cases weird effects in ID mode.
OCTAL CHAR ↑CHAR EFFECT ON A DATAMEDIA
000 NULL ↑@ no-op.
001 ↓ ↑A no-op.
002 α ↑B home. Moves cursor to upper-left corner.
003 β ↑C no-op.
004 ∧ ↑D no-op.
005 ¬ ↑E no-op.
006 ε ↑F no-op.
007 π ↑G bell. Beeps the DM's audio tone.
010 λ ↑H back cursor. Moves left one column unless at left margin.
011 TAB ↑I tab. Moves to next tab stop. Normally need not be quoted.
012 LF ↑J linefeed. Moves down a line, or to top line from bottom.
013 VT ↑K tab clear. Clears any tab stop at current column.
014 FF ↑L set cursor position from next two bytes. See ** below.
015 CR ↑M carriage return. Moves to left margin and down a line.
016 ∞ ↑N blink on. Subsequent characters will be blinking. See * below.
017 ∂ ↑O protected field on. Subsequent characters will be bold. See *.
020 ⊂ ↑P insert/delete on. Enters insert/delete mode. See ***.
021 ⊃ ↑Q transmit page to computer. This character never sent to DM.
022 ∩ ↑R transmit page to printer. This character never sent to DM.
023 ∪ ↑S transmit line to computer. This character never sent to DM.
024 ∀ ↑T no-op.
025 ∃ ↑U no-op.
026 ⊗ ↑V no-op.
027 ↔ ↑W erase from cursor to end of line.
030 _ ↑X cancel. Turns off blink, protected field, ID, & roll modes.
031 → ↑Y set tab. Sets a tab stop at current column.
032 ~ ↑Z up cursor. Move up a line unless on top line.
033 ≠ ↑[ no-op.
034 ≤ ↑\ forward cursor. Moves right a column, to next line from end.
035 ≥ ↑] roll on. Turns on roll mode. See **** below.
036 ≡ ↑↑ master clear. Clears screen, tabs, and all modes but roll.
037 ∨ ↑← erase screen. Clears unprotected text, all modes but roll.
* Stanford DM terminals have a hardward modification that interchanges the
effect of the blink-on and protected-field-on characters and that disables the
protectedness of characters sent with protected-field mode on. Thus, with this
mod, BLINK-ON will cause subsequent characters to appear as bold, and
PROTECTED-FIELD-ON will cause subsequent characters to appear as blinking and
not be protected. Furthermore, blinking protected-field characters that are
moved by ID operations will stop blinking.
** The FF character is used to move the cursor to an arbitrary X-Y position on
the screen. The position is determined by the next two bytes after the FF. The
first of these two bytes sets the X-position and the second the Y-position. The
actual X- or Y-position set by a byte is determined from the octal value of the
byte XORed with 140 and counting lines from 0 to =23 and columns from 0 to =79.
X- and Y-position characters that are out of range of the screen will select a
position of 0. If the X- or Y-position character is one of the characters: home
(↑B), FF (↑L), transmit page (↑Q or ↑R), cancel (↑X), master clear (↑↑), or
erase screen (↑←), then the cursor positioning command is aborted and the
aborting command is executed instead.
*** In Insert/Delete (ID) mode, the following four control characters have
these special effects rather than those listed above. Other control characters
have undefined effects in ID mode.
OCTAL CHAR ↑CHAR EFFECT IN ID MODE (CURSOR STAYS PUT)
010 λ ↑H delete character. Characters to the right shift left one space.
012 LF ↑J add row. A blank line is inserted, lines below move down.
032 ~ ↑Z delete row. Lines below move up one line.
034 ≤ ↑\ add character. Space is inserted, chars to the right move right.
**** In roll mode, a CR or LF sent while on the last line of the display will
cause the insertion of a blank line at the bottom of the screen to force the
whole screen text to scroll up one line. The cursor is left at the bottom
instead of moving to the top line as it would if roll mode were off. Note that
roll mode can only be cleared by the cancel character, ↑X.
SECTION 14--EXAMPLES
This section presents some examples of usage of UUOs. There are example
programs that do file I/O, run display programs and use interrupts. All of the
examples are written in FAIL; note the comments appearing alongside the code.
14.1 Example of General I/O
Here is a program that copies a text file called FOO into a new file called
GARPLY.TMP (copying is done character by character).
TITLE EXAMPLE OF GENERAL I/O
CHR←1 ;AC to hold character being copied into new file
P←17 ;AC for pushdown pointer
IC←←0 ;channel number used for input
OC←←1 ;channel number used for output
IOTEST: RESET ;Good thing to start with.
MOVE P,[IOWD LPDL,PDL] ;Set up pushdown pointer.
INIT IC,0 ;Initialize device DSK on channel IC
SIXBIT /DSK/ ; in mode 0 with input buffer
IBUF ; header at IBUF.
HALT . ;Impossible error: can't INIT the DSK.
SETZM INAME+3 ;Clear the PPN word of LOOKUP block--use
; current DISK PPN (ALIAS) for old file.
; This word is clobbered by LOOKUPs.
LOOKUP IC,INAME ;Open file FOO for reading.
JRST NOLOOK ;LOOKUP failed--find out why.
INIT OC,0 ;Initialize device DSK on channel OC
SIXBIT /DSK/ ; in mode 0 with output buffer
OBUF,,0 ; header at OBUF.
HALT . ;HALT on failure.
SETZM ONAME+3 ;Clear the PPN word of ENTER block--use
; current DISK PPN (ALIAS) for new file.
SETZM ONAME+2 ;Set protection to 000, use current
; date/time for date/time file written.
ENTER OC,ONAME ;Open file GARPLY.TMP for output.
JRST NOENTR ;ENTER failed--find out why.
LOOP: PUSHJ P,GETCH ;Get a character from input file.
JRST DONE ;End-of-file return from GETCH.
PUSHJ P,PUTCH ;Put character into output file.
JRST LOOP ;Loop until EOF.
DONE: RELEAS OC, ;Close output file and release DSK.
RELEAS IC, ;Close input file and release DSK.
EXIT ;Return to monitor level.
NOLOOK: OUTSTR [ASCIZ /
LOOKUP FAILED -- /]
HRRZ CHR,INAME+1 ;Get LOOKUP error code.
CAILE CHR,ERRMAX ;Make sure error code is reasonable.
MOVEI CHR,ERRMAX ;Unreasonable code.
OUTSTR @ERROR(CHR) ;Type appropriate error message.
HALT .
NOENTR: OUTSTR [ASCIZ /
ENTER FAILED -- /]
HRRZ CHR,ONAME+1 ;Get ENTER error code.
CAILE CHR,ERRMAX ;Make sure error code is reasonable.
MOVEI CHR,ERRMAX ;Unreasonable code.
OUTSTR @ERROR(CHR) ;Type appropriate error message.
HALT .
GETCH: SOSG IBUF+2 ;Decrement character count for input buffer.
IN IC, ;No more in current buffer. Read some more.
JRST GETCH1 ;Go get a character out of input buffer.
STATZ IC,20000 ;IN failed. Have we hit end of file?
POPJ P, ;Yes. Take direct return.
OUTSTR [ASCIZ /
INPUT FILE ERROR.
/] ;No. Type error message.
HALT . ;HALT on some input error.
GETCH1: ILDB CHR,IBUF+1 ;Get a character out of input buffer.
AOS (P) ;Take skip return from GETCH with
POPJ P, ; new character.
PUTCH: SOSG OBUF+2 ;Decrement character count for output buffer.
OUT OC, ;No room. Do output and get fresh buffer.
JRST PUTCH1 ;Go put character into output buffer.
OUTSTR [ASCIZ /
OUTPUT FILE ERROR.
/] ;OUT UUO failed--type error message.
HALT . ;HALT on any output error.
PUTCH1: IDPB CHR,OBUF+1 ;Put character into output buffer.
POPJ P, ;Return from PUTCH.
OBUF: BLOCK 3 ;Output buffer header
IBUF: BLOCK 3 ;Input buffer header
INAME: SIXBIT /FOO/ ;Block used for LOOKUP: file name of FOO.
BLOCK 3 ; No extension, space for date and PPN words.
ONAME: SIXBIT /GARPLY/;Block used for ENTER: file name of GARPLY,
SIXBIT /TMP/ ; extension of TMP.
BLOCK 2 ; Space for date word and PPN word.
LPDL←←10 ;Length of pushdown list
PDL: BLOCK LPDL ;Block for pushdown list
ERROR: [ASCIZ /NO SUCH FILE.
/]
[ASCIZ /ILLEGAL PPN.
/]
[ASCIZ /PROTECTION FAILURE.
/]
[ASCIZ /FILE BUSY.
/]
ERRMAX←←.-ERROR
[ASCIZ /HOORRIIBBLEL ERRO RNBR 87.
/] ;impossible error
END IOTEST ;End of program, starting address.
14.2 Example of Display Programming
Here is a simple program to display some (fixed) text on either a III, Data
Disc, or Datamedia. This program also positions the page printer at the bottom
of the screen and draws a vector across the screen just above the page printer
(except on Datamedias).
TITLE DISPLAY PROGRAMMING EXAMPLE
A←1
L←2 ;AC used to hold terminal line characteristics
DDDLIN←←20000 ;Data Disc bit in line characteristics.
IIILIN←←400000 ;III bit in line characteristics.
DMLIN←←40000 ;Datamedia bit in line characteristics.
; Data-Disc macros and definitions
; Command word -- alternating commands and parameters:
DEFINE CW(C1,B1,C2,B2,C3,B3) <
<BYTE (8)<B1>,<B2>,<B3> (3)<C1>,<C2>,<C3>>!4
>
; Command names for DD command bytes
EXCT←←0 ;Execute
FNCN←←1 ALPHBG←←6 ALPHA←←46 ;Function, usual value bytes
CHNL←←2 ;Channel select
COLM←←3 ;Column select
HILIN←←4 ;Set high 5 bits of line address
LOLIN←←5 ;Set low 4 bits of line address
DISPLA: RESET ;A good practice is to start with a RESET.
SETO L, ;Get TTY's line characteristics to find out
GETLIN L ; if TTY is a III or a Data Disc.
AOJE L,FINISH ;Jump if job is detached (no TTY).
TLNN L,DDDLIN!IIILIN!DMLIN
JRST NOTDPY ;Jump if TTY is not a display.
PPSEL 1 ;Select new piece of paper, and
DPYPOS -452 ; position near bottom of screen with
DPYSIZ 3002 ; 3 glitches and 2 lines per glitch.
JUMPL L,DOIII ;Jump if III (sign bit is IIILIN)
TLNN L,DDDLIN
JRST [MOVE A,[BYTE (7)177,36];Command to erase DM screen
MOVEM A,DPPROG ;Put into display program
MOVE A,[BYTE (7)177,14,140,143] ;Set cursor position
JRST DODM] ; to fourth line.
DDUPG [[CW FNCN,17,CHNL,0,FNCN,ALPHA↔0]↔2]
;Erase DD screen first.
MOVE A,[CW FNCN,ALPHA,CHNL,0,FNCN,ALPHA]
;DD command word to do channel select
; and set up function register for text.
MOVEM A,DPPROG ;Put into display program.
SKIPA A,[CW COLM,2,HILIN,2,LOLIN,4]
;DD command word to do column/line selects.
DOIII: MOVE A,[BYTE (11)<-777>,640 (3)2,3 (2)1,2 (4)6]
;III long vector word to draw an invisible
; absolute vector to the upper left corner
; of the screen, and select brightness
; of 2, size of 3.
DODM: MOVEM A,DPPROG+1 ;Store in display program.
UPGIOT 1,DPHEAD ;Run display program (on piece of
; glass number 1 if III).
JUMPL L,DOIII2 ;Jump if III.
TLNN L,DMLIN ;DMs can't draw vectors
UPGIOT DDDHDR ;Draw line across DD screen.
JRST FINISH
DOIII2: UPGIOT 2,IIIHDR ;Draw vector on III, using POG # 2.
FINISH: EXIT 1, ;Done. Don't do normal EXIT which
; would RESET the display.
EXIT ;In case user types CONTINUE.
NOTDPY: OUTSTR [ASCIZ /
This program only works on displays./]
EXIT
DPHEAD: 200000,,DPPROG ;Double-field mode bit,,address of disp prog
DPLEN ;Length of display program
0
DPPROG+1 ;Address of low order line select in DD prog
DPPROG: BLOCK 2 ;Space for command and position words.
ASCID /This is the text to be displayed on the first line.
And this is the text for the second line.
Note: The ASCID statement turns on the low order bit in each word
generated, thus causing such words to be taken as text words when
they appear in a display program for either III or DD.
Note: For DD, the last line of text must have a CRLF at its end, or
the display program must end with an execute; otherwise the last line
of text will not be displayed.
This is the last text line that will be displayed.
/
0 ;For DD, a HALT (zero) must end the program, or the
; system will zero the last word of the program.
; Zero also stops (but is unnecessary in) a III prog.
DPLEN←←.-DPPROG ;Length of display program.
DDDHDR: DDDVEC ;Address of DD display program to draw line.
LDDVEC ;Length of display program.
DDDVEC: CW FNCN,27,CHNL,0,FNCN,27 ;Graphics mode, own channel.
CW COLM,1,HILIN,27,LOLIN,0 ;Column 1, Line 560 (2*270).
REPEAT =13,<
BYTE (8)377,377,377,377 (4)2 ;Graphics word, all bits on.
> ;Draw a horizontal line =52 graphics bytes long.
CW EXCT,0,FNCN,27,FNCN,27 ;Execute to write out line.
0 ;End of DD program to draw a line.
LDDVEC←←.-DDDVEC
IIIHDR: IIIVEC ;Address of III display program to draw vector.
LIIVEC ;Length of display program.
IIIVEC: 0 ;All III programs must start with unused word.
BYTE (11)<-777>,<-400> (3)2,3 (2)1,2 (4)6
;Draw invisible absolute vector to left margin near bottom.
BYTE (11) 1777,0 (3)2,3 (2)0,0 (4)6
;Draw visible relative vector to right margin.
LIIVEC←←.-IIIVEC ;Length of program to draw III vector.
END DISPLA
14.3 Example of Using Interrupts
Here is a sample program that enables interrupts on the typing of ESCAPE I and
on the receiving of a letter through the inter-job mail system (see Section 7).
TITLE INTERRUPT EXAMPLE
A←1
INTMAIL←←4000 ;Interrupt bit for letter received.
INTTTI←←4 ;Interrupt bit for ESCAPE I typed
INTSAM: RESET ;A good beginning.
;Note that RESET clears all interrupt enablings.
MOVEI A,INTRPT ;Set up address of routine to
MOVEM A,JOBAPR↑ ; handle interrupts.
;The symbol JOBAPR is EXTERNed by the ↑.
SETZM ESCIFG ;Initialize ESCAPE I flag.
MOVSI A,INTMAIL!INTTTI;Interrupt bits we want to enable.
INTENB A, ;Enable interrupts for these bits.
<here is main program> ;Occasionally the main program will
... ; test ESCIFG and clear it and take
; appropriate action if it is set.
EXIT ;End of main program.
INTRPT: MOVS A,JOBCNI↑ ;Get bit which is cause of interrupt.
CAIN A,INTMAIL ;Did we get a letter?
JRST DOMAIL ;Yes. Go process it.
CAIN A,INTTTI ;User type ESCAPE I? (He must have.)
SETOM ESCIFG ;Set flag to tell user-level process
; that ESCAPE I has been typed.
DISMIS ;Dismiss the interrupt.
DOMAIL: SRCV LETTER ;Skip and read letter if one there.
DISMIS ;No letter (can't happen). Go home.
MOVE A,LETTER ;Get first word of letter.
CAME A,CODE ;See if letter has right format.
DISMIS ;Wrong format. Someone unknown
; has sent us a letter--ignore it.
<process letter here> ;Interrupt-level process must not
... ; go into wait state or take more
; than 8 ticks (8/60s sec) to finish.
DISMIS ;Dismiss the interrupt.
LETTER: BLOCK =32 ;Block for holding received letter.
CODE: SIXBIT /INTSAM/ ;Some special code to ensure we
; process only reasonable letters.
ESCIFG: 0 ;Flag indicating ESCAPE I was typed.
END INTSAM
APPENDIX 1--GENERAL INFORMATION ABOUT THE PDP-10
The PDP-10 is a 36-bit word, single address machine. Normal instructions
(excluding I/O instructions) take the following form.
BITS OCTAL MEANINGS OF FIELDS IN AN INSTRUCTION WORD
0:8 777000,,0 Instruction code.
9:12 740,,0 Accumulator.
13 20,,0 Indirect bit.
14:17 17,,0 Index register if non-zero.
18:35 0,,777777 Memory address.
For I/O instructions, the following format is used:
BITS OCTAL MEANINGS OF FIELDS IN I/O INSTRUCTIONS
0:2 700000,,0 This field is a 7 in all I/O instructions.
3:9 77400,,0 Code of I/O device.
10:12 340,,0 I/O instruction code.
13:35 37,,777777 Same as in normal instructions.
Machine I/O instructions are generally privileged in that opcodes corresponding
to these instructions trap to the monitor when given by a user-mode program
unless the program is in IOT-USER mode. User programs are not usually run in
IOT-USER mode and must do something special to get into this mode. See the
description of IOT-USER mode below on page 368.
For every instruction, an effective address calculation is carried out in the
following manner using bits 13:35 of the instruction. If the index register
field (bits 14:17) is non-zero, the contents of the specified index register are
added to the memory address found in bits 18:35 of the instruction. Then if the
indirect bit (bit 13) is 0, this result is the effective address for the
instruction. If the indirect bit is 1, then another word is picked up from the
location specified by the result so far. Then the effective address calculation
starts over using bits 13:35 of this new word. This process continues until the
indirect bit in some word used in this calculation is 0; the address (including
any indexing) specified by that word is then the effective address of the
instruction.
PC Flags
The PDP-10 has several flags that indicate the state of the program running.
These flags are commonly called the PC flags because their values are stored in
the left half of the PC word stored by the PUSHJ, JSR and JSP instructions. The
PC itself is stored in the right half of this PC word. The bit positions and
meanings of the flags are explained below. For further detail, see the PDP-10
instruction manuals.
Note that there are no flags in bits 13:17; these bits are always stored as zero
in the PC word so that when the PC word is addressed indirectly neither indexing
nor further indirecting will take place.
BITS OCTAL MEANINGS OF FLAGS IN THE PC WORD
0 400000,,0 Overflow. An arithmetic operation has resulted in an
incorrect result because of some kind of overflow.
1 200000,,0 Carry 0. An arithmetic operation has caused a carry
out of bit 0. This does not necessarily indicate an
overflow condition.
2 100000,,0 Carry 1. An arithmetic operation has caused a carry
out of bit 1. This also does not necessarily indicate
an overflow condition.
3 40000,,0 Floating overflow. A floating point instruction has
resulted in an incorrect result because of some kind of
overflow or underflow.
4 20000,,0 Byte-increment suppression. The next ILDB or IDPB
instruction will be executed without incrementing the
byte pointer. This flag is set when an ILDB or IDPB
instruction is interrupted after the byte pointer has
been incremented but before the byte has been moved.
This flag can also be set by a user program with the
"JRST 2," instruction.
5 10000,,0 User mode. The processor is in user mode.
6 4000,,0 User in-out. The processor is in IOT-USER mode. This
mode is explained below.
11 100,,0 Floating underflow. The exponent of the result of a
floating point operation was less than -128 (decimal).
12 40,,0 No divide. A division operation was not carried out
because either the divisor was zero or an overflow
would have resulted.
IOT-USER Mode
On the PDP-10, usually only the monitor is allowed to use the machine's I/O
instructions. In user programs, the opcodes (700:777) of these instructions are
usually interpreted as UUOs. However, there exists a special user mode, called
IOT-USER mode, in which the opcodes 700:777 are executed not as UUOs but as
machine I/O instructions.
A user program can get into IOT-USER mode by giving the EIOTM UUO (see page
261), which does nothing but put you into this mode. Also, an interrupt-level
process will be started up in IOT-USER mode after a new-style interrupt if bit 6
(the 4000,,0 bit) is on in JOBAPR; see Section 9. Finally, spacewar processes
are always started up in IOT-USER mode; see Section 8.
The simplest method for getting out of IOT-USER mode, whether at user, spacewar
or interrupt level, is to execute a
JRST 2,@[.+1]
This turns off all of the PC flags, except the user-mode flag. See the JRST
instruction in the PDP-10 manuals and note that DEC calls IOT-USER mode "user
in-out".
In summary, opcodes 700:777 are treated as UUOs unless the program executing
such instructions is in IOT-USER mode, in which case these opcodes are machine
I/O instructions.
Text Representations
There are several common representations used for storing text on the PDP-10.
These include ASCII, ASCIZ, ASCID and SIXBIT. In each of these four
representations, characters are stored left-justified in a block of one or more
words. The octal codes for ascii and sixbit characters are given in Appendix
6.
ASCII In this representation 7-bit characters are packed 5 to a word
with the low order bit (bit 35--the 0,,1 bit) always being
zero. A word count or character count is needed to determine
the length of an ASCII string.
ASCIZ This is the same as ASCII except that a null (zero) byte
follows the last character in the string to mark its end.
ASCID This is the same as ASCII except that the low order bit of
each word is always a one.
SIXBIT This representation packs 6-bit characters 6 to a word. The
characters representable in SIXBIT are those with ascii
representations from 40 to 137.
Assembler Features Relevant to this Manual
Here is an abbreviated list of PDP-10 assembler features, including those used
in the UUO writeups in this manual.
1. The form "[...]" is a literal whose value is the address at which the code
and/or data specified by "..." is placed in the program. The code/data can
consist of any number of words and can include other literals.
2. The form "A,,B" represents a word whose left half contains the value A and
whose right half contains the value B. This is equivalent to the form "XWD
A,B".
3. The form "IOWD A,B" is exactly equivalent to the form "-A,,B-1".
4. The forms "ASCII /.../", "ASCIZ /.../", "ASCID /.../" and "SIXBIT /.../"
represent blocks of words containing the string "..." in the ASCII, ASCIZ, ASCID
and SIXBIT representations respectively. See these representations above.
APPENDIX 2--JOB DATA AREA
The first 140 words of each core image are reserved for storage of various
parameters for that job. This block is called the user's Job Data Area. The
data here can be examined by the user, and he can change some of it directly
simply by storing new values in the appropriate words.
Part of this data, however, is important to the system and is protected from any
attempt by the user to change it. In particular, the block from JOBHCU to
JOBPFI (see table below) is copied into the monitor when the job is run so that
the user cannot change it. When the job is not running, this block is stored
back in the user's job data area to conserve space in the system.
References to locations in the job data area should be by their symbolic names
rather than by their absolute addresses. It is possible that some of these
locations might be moved around, and if that happens, programs that refer to
these locations symbolically will need only to be reloaded. All of the symbols
for these words are defined in a system library file; their definitions will
automatically be retrieved from there by the LOADER if the symbols are declared
EXTERNAL.
The table below explains the names and uses of the locations in the job data
area.
WORD SYMBOL EXPLANATION
0 JOBAC The user's accumulators are stored in the 20 words beginning
here during UUO execution.
20 JOBDAC The user's accumulators (whether Exec mode or user mode) are
stored in the 20 words beginning here when a clock interrupt
occurs while this user is running.
40 JOBUUO User UUOs (opcodes 001:037) encountered are stored here
after the effective address calculation has been done. See
Section 1.4.
41 JOB41 The instruction in this location is executed whenever a user
UUO (opcodes 001:037) is encountered. This instruction is
often a JSR to the user's UUO-handling routine. See Section
1.4.
42 JOBERR This word is used by SNAIL to pass errors to the LOADER, in
the following way. Initially, SNAIL zeroes the right half
before starting the first translator. If a translator
detects a source program error from which it can continue,
it should set the right half of JOBERR non-zero. The LOADER
checks this halfword to decide whether to start execution or
to type the "EXECUTION DELETED" message.
43 JOBENB The user's APR trap enablings (old-style interrupt
enablings) are stored here. See Section 9.
44 JOBREL The highest address in the job's core image (excluding any
upper segment) is stored here.
45 JOBNM1 This is the first of several words used for temporary
storage by the system.
46 JOBTM2 This is the second word of temporary storage.
47 JOBTM3 This is the third word of temporary storage.
50 JOBTM4 This is the fourth word of temporary storage.
51 JOBTM5 This is the fifth word of temporary storage.
52 JOBPDL This is the first of several words used as a push-down stack
by the system.
70 This is the last word in the push-down stack beginning at
JOBPDL.
71 JOBINT If this word is non-zero, it specifies the address in the
user's core image of a block of three words to be used in
place of JOBCNI, JOBTPC and JOBAPR, respectively, for
new-style interrupts. See Section 9.
72 JOBHCU (Also know as JOBPRT.) The number of the highest I/O channel
in use by this job is stored here. This is also the first
location of the job data area block that is copied into the
system to protect it while the job is running. JOBPFI (114
below) is the last word in the block copied into the system
when you run. The words in this block (from JOBHCU to
JOBPFI) are guaranteed correct only when you are not
running; they will in general also be correct when you are
running if you have not done any I/O since the last time you
were not running.
73 JOBPC Your program counter is stored here when your program is not
running. (This location is also known as JOBSAV, the last
location not saved by the SAVE command.)
74 JOBDDT If DDT or RAID is present in your core image, its starting
address is stored here. When you type the DDT monitor
command, your program is started at the address specified in
this word, unless this word contains zero. Also, when RAID
is present, bits 0:12 (the 777740,,0 bits) of this word hold
the version number of RAID. This is first word written into
a dump file by the SAVE monitor command.
75 JOBJDA This is the first word of a 20-word block containing the
status bits and system addresses of the device data blocks
(DDBs) for the devices you have open on the 20 logical I/O
channels. The information for channel N (0≤N≤17) is in the
word at JOBJDA+N. The left half of each of these words
contains the status bits for the corresponding channel (as
returned in the right half of an AC by the CHNSTS UUO, see
page 60). The right half of each word in this block
contains the address of the DDB for that channel. These
words are guaranteed correct only when you are not running;
they will in general also be correct when you are running if
you have not done any I/O since the last time you were not
running. Also, the words for channels higher than that
indicated by JOBHCU (see above) are not kept current (the
channels higher than JOBHCU are not in use) and may contain
garbage.
114 JOBPFI This is the last word of the 20-word block starting at
JOBJDA and is also the last word of the block (starting at
JOBHCU) that is copied into the system when you run.
115 JOBHRL The right half of this word contains the highest address in
your upper segment (e.g., 401777 for a 1K upper), and the
sign bit (400000,,0 bit) is on if your upper is write
protected. If you have no upper, this word is zero.
116 JOBSYM A pointer to your symbol table is placed here. If you have
no symbols in your core image, this word is zero.
Otherwise, the left half of this word contains the negative
of the length of the symbol table, and the right half
contains the address of the first word of the table.
117 JOBUSY A pointer to the table of undefined globals encountered is
placed here by the LOADER. This word has the same format as
JOBSYM above (i.e., -<word count>,,<table>). If there were
no undefined globals, the left half of this word will
contain zero.
120 JOBSA The right half of this word contains the starting address of
your program. The START and CSTART monitor commands cause
your program to be started at that address (unless it is
zero). The left half of this word contains the address of
the first location above your symbol table (or program if no
symbol table). The RESET UUO (see page 249) causes this
number to be stored in JOBFF (see below).
121 JOBFF The address of the first free (unused) location in your core
image is stored here. The words from that address up to
that in JOBREL are not used. Whenever the system sets up an
I/O buffer for you, it is put at the address specified by
JOBFF and JOBFF is then increased to point to the first word
beyond the buffer. The RESET UUO causes JOBFF to be reset
to the value stored in the left half of JOBSA (see above).
122 JOBS41 The contents of JOB41 (see above) are stored here just
before the core image is written into a dump file by a SAVE
or SSAVE monitor command or by the SWAP UUO. JOB41 is
restored from this word when the file is read by a GET, RUN
or R command or by the SWAP UUO.
123 JOBEXM This is a temporary cell used by the EXAMINE and DEPOSIT
monitor commands.
124 JOBREN This word contains the address at which the program should
be started when the REENTER monitor command is given. A
zero in this word means REENTER will not work.
125 JOBAPR This word should contain the address at which you wish your
interrupt routine started when an interrupt occurs. See
Section 9.
126 JOBCNI When an interrupt occurs, a bit indicating the cause is
stored here. See Section 9.
127 JOBTPC When an interrupt occurs, the program counter word is stored
here before control is given to your interrupt routine. See
Section 9.
130 JOBOPC When you start the program with a START, CSTART, DDT or
REENTER monitor command, the program counter word (picked up
from JOBPC) is stored here.
131 JOBCHN This word is used for FORTRAN chaining. The left halt is
the first location after the first FORTRAN loaded program.
The right half is the first location after the first FORTRAN
block data to be used for job chaining.
132 JOBFDV This word is used for temporary storage by the FINISH
command.
133 JOBCOR This word contains the core size for the job for the SAVE,
GET and RUN commands.
134 HINAME The name of your upper segment, if any, is stored here just
before your core image is written onto a dump file by a SAVE
or SSAVE monitor command or by the SWAP UUO.
135 HILOC The location within the dump file of your upper segment is
stored here prior to writing a dump file with the SSAVE
monitor command. The sign bit is set prior to writing if
the upper segment is write protected. Remember, the dump
file is written starting at core location JOBSAV+1, so the
upper segment begins at C(HILOC) only if the file is loaded
starting at JOBSAV+1. While a job is in core, the sign bit
of JOBHRL is used to indicate that the upper segment is
write-protected.
137 JOBVER This is the location for storing the job version number.
140 JOBDA This is the first word in your core image that is not part
of the job data area.
APPENDIX 3--LOW CORE ADDRESSES OF USEFUL POINTERS IN THE MONITOR
The table below lists the contents of some absolute locations in the monitor.
These locations contain pointers to various system tables (such as the job table
of login PPNs), pointers to special words (monitor variables), and system
parameters (such as the highest legal job number). Any word in memory may be
examined by use of either the PEEK UUO (see page 200) or the SETPR2 UUO (see
page 164).
To get the address of a particular job's entry in a job table, add the job
number to the base address of the table.
WORD CONTENTS EXPLANATION
210 JBTSTS This is the address of the job table of status words. The
bits in each entry are explained with the JBTSTS UUO on page
197.
211 PRJPRG This is the address of the job table of project-programmer
names.
212 JBTSWP This is the address of the job table of swapper data. The
left half (bits 0:17--the 777777,,0 bits) of each entry
contains 400000+the first logical band number used to swap
this job. Bits 18:26 (0,,777000 bits), called IMGOUT,
contain the size of the job (in pages) as stored on the
disk. Bits 27:35 (0,,777 bits), called IMGIN, contain the
size of the job (in pages) as it will appear when it is
swapped in.
213 SPWGO This is the address of the job table of P1 spacewar
processes. The right half (bits 17:35--0,,777777 bits) of
each entry contains the user-specified starting address of
the spacewar process. Bits 14:17 (17,,0 bits) contain the
number of ticks between startups, and bits 10:13 (36,,0
bits) contain the number of ticks until the next startup.
This word is zero for jobs that do not have P1 spacewar
processes running. See Section 8.
214 TTIME This is the address of the job table of total run times (in
ticks). The time for job 0 is the null time (idle time)
since the last system reload.
215 UPTIME This is the address of a word that contains the length of
time in ticks since the last system reload.
216 CORMAX This is the address of a word that contains the largest size
(in words) a user program can be and still fit in core.
217 DEVLST This is the address of the header word for the list of all
device data blocks (DDBs). The left half of the header word
contains the address of the first DDB. DDBs are described
in Appendix 4.
220 TTYTAB This is the address of the table of pointers to TTY DDBs.
Index into this table with the terminal line number. The
entry for a terminal not in use is zero. The entry for a
terminal in use contains the following information.
BITS OCTAL NAME CONTENTS OF FIELD IN TTYTAB ENTRY
0 400000,,0 COMBIT This bit is on if the terminal has a
monitor command yet to be processed.
1 200000,,0 DLYBIT This bit is on if the terminal has a
delayed command yet to be processed.
2 100000,,0 PAUSEB This bit is on if the terminal has a
command waiting for the output buffer to
empty.
3 40000,,0 KILTTY TTYSER has called TTYKIL for this
terminal and is through with the DDB,
which will be released by DPYKIL when and
if the DPY header is released.
11:17 177,,0 (talk) If the terminal is in a talk ring, this
field contains the line number of the
next terminal in the ring. Otherwise,
this field contains the terminal's own
line number.
18:35 0,,777777 (DDB) This is the address of the terminal's
DDB.
221 BYTE (9) SCNNUM,DPYNUM,DDNUM,PTYNUM These four quantities are the
numbers of 1) teletype lines, 2) III display lines, 3) Data
Disc display lines and 4) pseudo-teletype lines,
respectively.
222 JOBN-1 This is the highest possible job number.
223 CHKBEG This is the first location in the checksummed part of the
system
224 JBTQ This is the address of the job table of entries in the job
queues. The queues are circular with each entry containing
a forward pointer in the right half and a backward pointer
in the left half. The pointers are all relative to JBTQ: a
pointer that is positive points to another job's entry in
the table; a pointer that is negative points to the queue's
header word, which itself is just another entry in the
circular queue and which contains both forward and backward
pointers. The magnitude of a negative pointer indicates the
number of the queue the entry is in. See also the contents
of absolute locations 231, 234, and 235 below and the queue
names and numbers in Appendix 5.
225 JOBNAM This is the address of the job table of sixbit job names.
226 JOB This is the address of a word that contains the number of
the currently running job.
227 CONFIG This is the address of an asciz string that gives the title
of the current system.
230 SP2GO This is the address of the job table of P2 spacewar
processes. The format of this table is the same as that of
the SPWGO table; see word 213 above.
231 JOBQUE This is the address of the job table of queue numbers. Each
entry in this table contains either the queue number or the
negative of the queue number for the particular job. See
the queue names and numbers in Appendix 5.
232 JBTPRI This is the address of the job table of calculated
priorities.
233 JBTJL This is the address of the job table of pointers to
instantaneous job load tables.
234 NQUES This is the number of different queues. The queues are
numbered from 0 to this number. See the queue names and
numbers in Appendix 5.
235 QNAMS This is the address of a table of the ascii names of the
various queues. Index into this table with the queue's
number. These names are also listed in Appendix 5.
236 JBTLIN This is the address of the job table of attached terminals.
The entry in this table will be -1 for a detached job. For
an attached job the entry will contain the terminal line
number in the right half and the permanent terminal line
characteristics in the left half. There may be bits on for
non-permanent characteristics, but these bits are not kept
up to date in this word. See LINTAB in word 302 below for
the current line characteristics; see also the GETLIN UUO on
page 77.
237 LETAB+20 This is the address of the entry for the first III (TTY20)
in the table of pointers to the displays' line editor
headers (DPY headers). The right half of each entry
contains a pointer to the free storage block for that
display. The left half holds various flags used by the line
editor. When a display is not in use, its entry here is
zero. Index into LETAB with a terminal's line number.
240 JBTJLH This is the address of the job table of oldest job loading.
241 STATS This is the address of a table of system statistics.
242 JBTGSL This is the address of the job table of guaranteed service
level.
243 STATLEN This is the length of the STATS table of system statistics.
244 STATPTR This is the address of a byte pointer into the STATS table
of system statistics.
245 STATNUM This is the address of a word containing the number of times
the STATS table has been filled.
246 INTIME This is the address of a word containing the number of ticks
(one tick=1/60th of a second) the system has spent at
interrupt level since the system has been up.
247 STBEG This is the address of another table of system statistics.
250 JBTKCJ This is the address of the job table of kilo-core-jiffies
(KCJs) used by each job. A jiffie is a tick, i.e., 1/60th
of a second. One KCJ represents a job running for one tick
with 1K of core.
251 JBTBTM This is the address of the job table of login times. Each
entry in this table contains the date and time when the
particular job logged in, with the date (in system date
format) in the left half and the time (in seconds after
midnight) in the right half.
252 DQCNT This is the address of a word containing the number of disk
operations waiting to be started.
253 TTYLOK This is the address of a word used as a flag to prevent
users from typing anything on their terminals.
254 MAINTMODE This is the address of a word used as a flag to indicate
that system maintenance is going on.
255 CORPTR This is address of a block of words describing the state of
the swapper. The first 4 words are 0, FINISH, FORCE, and
FIT.
256 LASTDISASTERTIME This is the address of a word containing the system
uptime when the last disaster occurred.
257 (unused)
260 STEND2 This is the address of the last word in the table of system
statistics beginning at STBEG (see above).
261 (unused)
262 EXPMOD This is the address of a word used as a flag to LOGIN to
type out the file X.TXT[2,2].
263 (unused)
264 FSRPQ This is the address of a table containing the number of free
storage requests by size.
265 SYSTOP This is the address of a word that contains the physical
address of the first word after the system (where free
storage begins).
266 CORTAB This is the address of a table that indicates the usage of
each page of core. There is one word per core page. The
interesting part of each word is a 9-bit byte in bits 18:26
(0,,777000 bits). This field for a given page contains
either 1) the number of the job occupying the page, 2) a 101
if the page is part of the system, 3) a 103 if the page is
non-existant, 4) a 105 if the page is part of free storage,
5) a 110 if the page is a page map, or 6) a 0 if the page is
unused.
267 NOLOGIN This is the address of a word used as a flag to prevent
anyone from logging in.
270 PTYJOB This is the address of the table of owners of
pseudo-teletypes (PTYs). Each entry contains the number of
the job that owns that PTY. Index into this table with the
PTY line number minus 121.
271 JBTPRV This is the address of the job table of active privileges.
272 UCLLEN*1000+UCLDLN,,UCLTAB The right half of this word contains
UCLTAB which is the address of the CALL UUO name table.
This table is made up of two parts. The first UCLDLN words
contain the names of DEC CALLs, and the next UCLLEN-UCLDLN
words contain the names of the special Stanford CALLs
(numbers from 400000 up). Thus the total length of the
table is UCLLEN, which is in bits 0:8 (777000,,0 bits) of
word 272; the length of the first part of the table, UCLDLN,
is in bits 9:17 (777,,0 bits) of word 272. The CALL names
within each part are in their expected order by CALLI
number.
273 DSKPPN This is the address of the job table of Disk PPNs (ALIASes).
If a job has no ALIAS, its entry in this table is zero.
Disk PPNs are explained on page 20.
274 FTIME This is the address of the job table containing each job's
time last run. Each entry contains the date and time when
the particular job was last run, with the date (in system
date format) in the left half and the time (in seconds after
midnight) in the right half.
275 NJOBS This is the address of the job table that gives the number
of users for each upper segment. Each entry contains the
number of jobs attached to the given upper segment. Index
into this table with the upper segment's job number.
276 DSKOPS This is the address of the job table containing the number
of disk operations each job has done. The entry for job 0
is the total number of disk operations since the system was
reloaded.
277 INITIM This is the address of a word that contains the date and
time of the last system reload. The date (in system date
format) is in the left half and the time (in seconds after
midnight) is in the right half.
300 -DISPL,,COMTAB COMTAB is the address of the table of monitor
commands names in sixbit, and DISPL is the number of
commands in that table.
301 (unused)
302 LINTAB This is the address of the table of terminal line
characteristics. Each entry in this table corresponds to a
particular terminal. The terminal's line characteristics
are in the left half (see the GETLIN UUO on page 77 for the
meanings of these bits). The right half is used to store
ESCAPE/BREAK arguments (for terminals that are displays).
Index into this table with terminal's line number.
303 ASTAB This is the address of the audio switch connection table.
There is a word here for each III and Data Disc display;
index into this table with the display's line number minus
20. The data in each entry of this table is as follows (for
more details about the audio switch, see Section 4.9):
BITS OCTAL VALUES OF FIELDS IN ASTAB ENTRY
0 400000,,0 One if a UUO is waiting for a temporary connection
to finish on this display.
1 200000,,0 One if the current connection is a temporary
connection.
2 100000,,0 One if a page interruption is happening at this
display.
3 40000,,0 One if a delayed beep is pending.
4 20000,,0 One if the permanent audio channel is not page
interruptible.
5 10000,,0 One if the permanent channel is not beep
interruptible.
6:7 6000,,0 Beep disposition for temporary channel.
8:9 1400,,0 Page disposition for temporary channel.
10:13 360,,0 Temporary channel number.
14:17 17,,0 Permanent channel number.
18:35 0,,777777 Remaining duration of temporary connection (0 for
infinite).
304 JB2PRV This is the address of the job table of passive privilege
bits.
305 -LFTLEN,,LFTTAB This word contains the number (LFTLEN) and address
(LFTTAB) of the table of left-half privilege bits and their
names. Each entry in this table is of the form <sixbit
name>,,<half-word bit value>.
306 -RHTLEN,,RHTTAB This word contains the number (RHTLEN) and address
(RHTTAB) of the table of right-half privilege bits and their
names. Each entry in this table is of the form <sixbit
name>,,<half-word bit value>.
307 JBTSIN This is the address of the job table of entries in the list
of jobs to be swapped in.
310 JBTGLU This is the address of the job table of cells used to mark
jobs which must not be swapped out.
311 JOBNM1 This is the address of a word containing the current maximum
number of jobs the system can support.
312 DDFCNT This is the address of a word containing the number of Data
Disc channels that are currently available.
313 DSTBLN,,DSTBUF This word contains the length (DSTBLN) and address
(DSTBUF) of a table of statistics for the disk.
314 COMWHO This is the address of the first of several words used to
hold the system wholine in ascid representation for
displaying. The system wholine ends with a CR and LF.
315 NPARIN This is the address of a word which contains the number of
parity errors detected with indeterminate locations. The
word at NPARIN-1 is called NPARER and contains the total
number of parity errors detected.
316 JBTMAP This is the address of the job table of pointers to each
job's page map.
317 XMSET This points to 9 words of XGP default settings for TMAR,
PMAR, BMAR, LMAR, RMAR, XLINES, XTNODE, XVNODE and XGPBLN.
(XGPBLN is not settable by users.)
320 RTRHCT This points to a table of error counts for the disk per head
per pack.
321 TBLKPT,,TPJMP Offsets within the piece of paper control block.
322 DPHPOS,,PPCALL Offsets within the piece of paper control block.
323 PPRJMP,,PPNO Offsets within the piece of paper control block.
324 JBTPAG This is the address of the job table of core image sizes.
The left half of each entry contains the size of the job in
pages; the right half contains the number of pages that are
above FSLIMIT.
Core is divided into three major parts, which are, in order
of physical addresses (lowest first): SYSTEM, FREE STORAGE,
USERS. The system part occupies a fixed amount of core (in
a given version), and its ending address is stored in
SYSTOP. Free storage grows and shrinks as more or less core
is needed, and its ending address is stored in FSTOP.
(SYSPAG and FSPAG contain page rather than word versions of
the same ending addresses.) It does not matter where the
256K word boundary is, as long as it is after the end of
free storage. User core is everything after FSTOP. If free
storage needs to expand, then the user at FSTOP is swapped
out. If a job were locked in core at FSTOP he might get
swapped out. To get around this, user core is divided into
two regions, high and low, which are exactly the same,
except that locked jobs exist completely within the high
region. The dividing line between the high and low regions
is called FSLIMIT and is set big enough so that free storage
will never get that big. The process of locking a job in
core involves first checking to see if it is entirely in the
high region. If it is, the JLOCK bit is set in JBTSTS and
the job is considered locked. If not, then the job is
swapped out and the LOKSWP bit is set instead. This bit
indicates to the swapper that the job must be swapped into
the high region. The job will be swapped in when there is
enough high region core available for it and then the LOKSWP
bit will be turned off and the JLOCK bit turned on.
325 MTRLST This is the address of the first word of a linked list of
meter control blocks used by the system when the performance
meter is in "background" mode.
326 SKIPP1 This is an I/O instruction to execute which will skip if it
is executed on processor 1 (P1).
327 SKIPP2 This is an I/O instruction to execute which will skip if it
is executed on processor 2 (P2).
330 LEBUF Offset within the DPY header of the line editor buffer.
331 LDSHF*1000+LDPWR,,LDAVG LDAVG contains the current load average
multiplied by 2↑(LDPWR+LDSHF). The load average is updated
every 60th of a second by adding the following value to
LDAVG: Q * 2↑LDSHF - OLD.LDAVG * 2↑(-LDPWR), where Q is
the instantaneous number of jobs in the RUNQ and TQ, and
OLD.LDAVG is the previous value in LDAVG. Thus, the load
average is the smoothed average of the number of jobs in
RUNQ or TQ, where the smoothing period is 2↑LDPWR 60ths of a
second.
332 DDQSIZ This is the address of a word containing the size of the
queue of terminals waiting for Data Disc channels.
333 DDQREQ,,LSTESC LSTESC is a table with one word per terminal.
Contained in LSTESC are the Data Disc channel wait queue,
the last escape command typed on each (physical) terminal,
and the physical terminal "responsible" for each logical TTY
line. The responsible terminal is the last terminal to type
a character (while mapped) to the given logical TTY line.
To find the terminal responsible for a logical TTY line,
index into LSTESC with the logical TTY line number and pick
up a byte from the indexed word with the byte position
DDQREQ.
334 LEPOS Offset within the DPY header of the line editor position
word. If the line editor for this display has been
positioned by an LEYPOS UUO, then the sign-bit of this word
will be on and the position of the line editor (in LEYPOS
format, see page 131) will be the two's complement value in
bits 11:21 (177,,740000) of this word.
335 VDTIE This is the table that tells what Data Disc line number each
TV monitor (Data Disc display) is tied to. Index into this
table with the TV monitor number minus 26. The entry
contains the line number that the given TV monitor is tied
to, or zero if the TV monitor is untied. See the VDSMAP UUO
on page 152 for an explanation of tied and untied TV
monitors.
APPENDIX 4--DEVICE DATA BLOCKS (DDBS)
For each device used, there is a Device Data Block (DDB) in the system in which
is kept a collection of data pertinent to the device. Certain devices
(including the disk, the IMP, and terminals) do not have DDBs when they are not
in use; other devices' DDBs are permanently built into the list. With sharable
devices such as the disk, there is a DDB for each user I/O channel with the
device open.
All the DDBs are linked together in one big list. The header for this list is
located at DEVLST; the left half of the word at DEVLST points to the first DDB.
(The word DEVLST is pointed to by the word at absolute memory address 217; see
Appendix 3.) All pointers to DDBs point to word 0 of the DDB, which is the word
containing the device's physical name as explained below.
The data common to all DDBs is explained below. Other data is device dependent.
WORD NAME CONTENTS
-1 DEVCMR This is a word of some special characteristics for the
device. Bit 0 (400000,,0 bit) is on if the device has an
internal system buffer. Bit 1 (200000,,0 bit) is on if the
device service routines can be called even if the device is
active. Bit 2 (100000,,0 bit) is on if the device is
sharable (e.g., the disk). Bit 3 (40000,,0 bit) is on if
the device cannot be assigned or INITed by jobs without the
LUP privilege. Bit 4 (20000,,0 bit) is on if the device
must be ASSIGNed before it can be INITed (e.g., UDP).
0 DEVNAM This is the device's physical name in sixbit.
1 DEVCHR Bits 0:5 (770000,,0 bits) of this word contain the number of
the job the device belongs to, or zero if the device is
unused; if this field contains zero and the device is
ASSIGNed (see the DEVCHR UUO on page 61), then the device
has been detached from the system (probably for
maintenance).
Bits 6:11 (7700,,0 bits) contain the current hung time count
down in seconds.
Bits 12:17 (77,,0 bits) contain the hung time in seconds.
Bits 18:24 (0,,774000 bits) contain the unit number for
multiple unit devices like dectapes and magnetic tapes.
Bits 25:35 (0,,3777 bits) contain the size in words of the
buffer this device uses.
2 DEVIOS This is the device's I/O status word. See Section 2.6.
3 DEVSER The right half of this word contains the address in the
system of this device's UUO dispatch table. The left half
contains the address of the next DDB in the list, or zero if
this is the last DDB.
4 DEVMOD This is the word returned by the DEVCHR UUO (see page 61).
5 DEVLOG This is the device's logical name in sixbit, if any.
6 DEVBUF The left half of this word contains the user address of the
output buffer header, if any. The right half contains the
user address of the input buffer header, if any.
7 DEVIAD The right half of this word contains the user address of the
input buffer currently being used for this device, or zero
if none. The left half of this word contains in the index
field (bits 14:17--the 17,,0 bits) the number of a system AC
(PROG) used for indirecting through this word to the input
buffer.
10 DEVOAD The right half of this word contains the user address of the
output buffer currently being used for this device, or zero
if none. The left half of this word contains in the index
field (bits 14:17--the 17,,0 bits) the number of a system AC
(PROG) used for indirecting through this word to the output
buffer.
11 DEVFIL For directory devices like the disk and dectapes, this word
contains the sixbit name of the file that is currently open,
or zero if no file is open.
12 DEVEXT For directory devices, the left half of this word contains
the file name extension of the file currently open; the
right half contains the normal right half returned in the
extension word by a LOOKUP UUO (see page 32).
13 FILPRO For directory devices, this is the normal third word
returned by a LOOKUP UUO (see page 32).
14 FILPPN For disk files this word contains the project-programmer
name of the file currently open.
APPENDIX 5--QUEUE NAMES AND NUMBERS
The table below lists the various queues which a job can be in along with the
codes representing the queues. The queue a job is in can be found from the job
table at JOBQUE, whose address is contained in the word at absolute 231 (see
Appendix 3). A job's entry in that table may be either the positive code or the
negative of the code for the queue. See also the contents of absolute locations
224 (JBTQ), 234 (NQUES), and 235 (QNAMS) in Appendix 3.
CODE NAME QUEUE'S SIGNIFICANCE FOR JOBS IN IT
0 FUCKQ (This queue is unused.)
1 STQ Waiting for system tape to be free. (This queue is
unused.)
2 DTQ Waiting for dectape controller to be free.
3 DCQ Waiting for data controller (for magtape and dectape) to
be free.
4 MTQ Waiting for magtape controller to be free.
5 IOWQ Waiting for I/O to finish.
6 DIOWQ Waiting in core for I/O to finish.
7 DWQ Waiting for device to be available.
10 NULQ No core assigned.
11 STOPQ Job stopped.
12 INTWQ Waiting for an interrupt to occur.
13 SEGQ Upper segment waiting to be swapped in.
14 RUNQ Generalized run queue.
15 TQ High-priority run queue.
16 CMQ Waiting to be swapped in for a monitor command to be
processed.
APPENDIX 6--STANFORD CHARACTER SET
The table below gives the octal codes for characters in the Stanford character
set. The octal code for an ascii character is three digits and is obtained for
a character in the table by adding the ASCII label of the character's row to the
label of the character's column. For example, the ascii code for "G" is 100+7,
or 107. Similarly, the octal code for a sixbit character is two digits and is
obtained by adding the SIXBIT label of the character's row to the label of the
character's column. For example, the sixbit code for "G" is 40+7, or 47. The
sixbit code for a character is always 40 less than the ascii code for that
character. Note that the only characters with sixbit representations are those
with ascii codes in the range 40:137.
The abbreviations used for special characters in the table are explained below.
0 1 2 3 4 5 6 7
ASCII
000 NUL ↓ α β ∧ ¬ ε π
010 λ TAB LF VT FF CR ∞ ∂
020 ⊂ ⊃ ∩ ∪ ∀ ∃ ⊗ ↔
SIXBIT 030 _ → ~ ≠ ≤ ≥ ≡ ∨
00 040 SPC ! " # $ % & '
10 050 ( ) * + , - . /
20 060 0 1 2 3 4 5 6 7
30 070 8 9 : ; < = > ?
40 100 @ A B C D E F G
50 110 H I J K L M N O
60 120 P Q R S T U V W
70 130 X Y Z [ \ ] ↑ ←
140 ` a b c d e f g
150 h i j k l m n o
160 p q r s t u v w
170 x y z { | ALT } BS
NUL (0) is a null.
TAB (11) is a tab.
LF (12) is a linefeed.
VT (13) is a vertical tab.
FF (14) is a formfeed.
CR (15) is a carriage return.
SPC (40) is a space.
ALT (175) is an altmode.
BS (177) is a backspace.
APPENDIX 7--UUOS BY NUMBER
-----UUOs----- ----CALLIs---- ----CALLIs----
Opcode Name Number Name Number Name
040 CALL 0 RESET 400014 TTYIOS
041 INIT 1 DDTIN 400015 CORE2
043 SPCWAR 2 SETDDT 400016 ATTSEG
047 CALLI 3 DDTOUT 400017 DETSEG
050 OPEN 4 DEVCHR 400020 SETPRO
051 TTYUUO 5 DDTGT 400021 SEGNUM
055 RENAME 6 GETCHR 400022 SEGSIZ
056 IN 7 DDTRL 400023 LINKUP
057 OUT 10 WAIT 400024 DISMIS
060 SETSTS 11 CORE 400025 INTENB
061 STATO 12 EXIT 400026 INTORM
062 GETSTS 13 UTPCLR 400027 INTACM
063 STATZ 14 DATE 400030 INTENS
064 INBUF 15 LOGIN 400031 INTIIP
065 OUTBUF 16 APRENB 400032 INTIRQ
066 INPUT 17 LOGOUT 400033 INTGEN
067 OUTPUT 20 SWITCH 400034 UWAIT
070 CLOSE 21 REASSI 400035 DEBREA
071 RELEAS 22 TIMER 400036 SETNM2
072 MTAPE 23 MSTIME 400037 SEGNAM
073 UGETF 24 GETPPN 400040 IWAIT
074 USETI 25 TRPSET 400041 USKIP
075 USETO 26 TRPJEN 400042 BUFLEN
076 LOOKUP 27 RUNTIM 400043 NAMEIN
077 ENTER 30 PJOB 400044 SLEVEL
31 SLEEP 400045 IENBW
32 SETPOV 400046 RUNMSK
33 PEEK 400047 TTYMES
701 DPYCLR 34 GETLN 400050 JOBRD
702 PPIOT 35 RUN 400051 DEVUSE
703 UPGIOT 36 SETUWP 400052 SETPR2
704 UINBF 37 REMAP 400053 GETPR2
705 UOUTBF 40 GETSEG 400054 RLEVEL
706 unused 41 GETTAB 400055 unused
707 unused 42 SPY 400056 unused
710 MAIL 43 SETNAM 400057 unused
711 PTYUUO 44 TMPCOR 400060 unused
712 POINTS 400061 WAKEME
713 UPGMVE 400000 SPWBUT 400062 GETNAM
714 UPGMVM 400001 CTLV 400063 SNEAKW
715 PGIOT 400002 SETNAM 400064 SNEAKS
716 CHNSTS 400003 SPCWGO 400065 GDPTIM
717 CLKINT 400004 SWAP 400066 SETPRV
720 INTMSK 400005 EIOTM 400067 DDCHAN
721 IMSKST 400006 LIOTM 400070 VDSMAP
722 IMSKCL 400007 PNAME 400071 DSKPPN
723 INTUUO 400010 .SYML 400072 GETHI
724 IOPUSH 400011 SHOWIT 400073 SETCRD
725 IOPOP 400012 FREEZE 400074 CALLIT
726 IOPDL 400013 JBTSTS 400075 XGPUUO
----CALLIs---- ----TTYUUOs---
Number Name Number Name
400076 LOCK 0, INCHRW
400077 UNLOCK 1, OUTCHR
400100 DAYCNT 2, INCHRS
400101 ACCTIM 3, OUTSTR
400102 UNPURE 4, INCHWL
400103 TMPCRD 5, INCHSL
400104 DEVNUM 6, GETLIN
400105 ACTCHR 7, SETLIN
400106 UUOSIM 10, RESCAN
400107 PPSPY 11, CLRBFI
400110 ADSMAP 12, CLRBFO
400111 BEEP 13, INSKIP
400112 WHO 14, INWAIT
400113 TTYJOB 15, SETACT
400114 NULMES 16, TTREAD
400115 GETPRV 17, OUTFIV
400116 TTYSKP
400117 DIAL
400120 unused ----PTYUUOs---
400121 TTYSET Number Name
400122 MTRUUO 0, PTYGET
400123 RDLINE 1, PTYREL
2, PTIFRE
3, PTOCNT
---MAIL UUOs-- 4, PTRD1S
Number Name 5, PTRD1W
0, SEND 6, PTWR1S
1, WRCV 7, PTWR1W
2, SRCV 10, PTRDS
3, SKPME 11, PTWRS7
4, SKPHIM 12, PTWRS9
5, SKPSEN 13, PTGETL
14, PTSETL
15, PTLOAD
----INTUUOs--- 16, PTJOBX
Number Name 17, PTL7W9
0, INTDEJ
1, IMSTW
2, IWKMSK
3, INTDMP ----PPIOTs----
4, INTIPI Number Name
5, IMSKCR 0, PPSEL
1, PPACT
----PGIOTs---- 2, DPYPOS
Number Name 3, DPYSIZ
0, PGSEL 4, PPREL
1, PGACT 5, PPINFO
2, PGCLR 6, LEYPOS
3, DDUPG 7, PPHLD
4, PGINFO 10, CURSOR
INDEX
.SYML UUO (CALLI 400010) 201
167 data channel 319
: 8
= 8
AC contents on system startup 175
ACCTIM UUO (CALLI 400101) 181
ACTCHR UUO (CALLI 400105) 94
activation table 77, 84
ACWPRV bit (40,,0--privileges) 190
ADC device 318
ADSMAP UUO (CALLI 400110) 154
ALIAS 20
ALLACT bit (0,,40--SETACT fourth word) 84
allocation, definition of ARPAnet 322
APRENB UUO (CALLI 16) 244
ARPA network 321
ascii character codes 375
ASCII, ASCID and ASCIZ representations 369
ASSIGN command 46
ASTAB 372
ATTPRV bit (0,,400000--privileges) 190
ATTSEG UUO (CALLI 400016) 161
audio switch 153, 372
autologout, suppressing 190
bad retrieval 36
beep disposition, audio switch 153
BEEP UUO (CALLI 400111) 88
BELOW bit (0,,10000--DM state flags) 89
BETWEE bit (4000,,0--UPGIOT flags) 136
BGRAB bit (0,,200--ELF I/O status) 329
bit numbers 8
bits, groups of 8
bits, references to 8
bless host 326
BLNKON bit (0,,10--DM state flags) 89
BMAR 290
BSACT bit (0,,20--SETACT fourth word) 84
buffer diagram 15
buffer header 13
buffer pointers 14
buffer rings 13
buffer rings, setting up 25
buffer sizes, nonstandard 28
buffer-creating UUOs 25
buffered mode 11
buffers 14
BUFLEN UUO (CALLI 400042) 30
BUSNIT bit (0,,4000--ELF I/O status) 329
BUSTO bit (0,,20000--ELF I/O status) 329
byte size, definition of ARPAnet connection 322
CALL UUO (UUO 040) 5
CALLI UUO (UUO 047) 5
CALLIT UUO (CALLI 400074) 199
cameras, TV 319
cart control transmitter (CAR) 336
channel number 10
channel use bits 60
channels, Data Disc SEE Data Disc channels
CHARACTER MODE 75
character set 375
CHASTE bit (1000,,0--UPGIOT flags) 136
CHKBEG 372
CHNSTS UUO (UUO 716) 60
CLKINT UUO (UUO 717) 225
CLKR bit (400,,0--job status) 197
clock interrupts 225
CLOSE UUO (UUO 070) 44
CLRBFI UUO (TTYUUO 11,) 80
CLRBFO UUO (TTYUUO 12,) 81
CLSR bit (20000,,0--IMP connection status) 324
CLSS bit (40000,,0--IMP connection status) 324
CMWB bit (200000,,0--job status) 197
COMBIT bit (400000,,0--TTYTAB) 372
compute time 182
CONFIG 372
CONNECT to socket 326
connection, definition of ARPAnet 322
CONTROL and META keys 68, 84, 109, 110, 113, 282
control-C by PTYUUO, sending 113
CONTROL-CR, disabling 84
CONTROL-CR, inhibiting once 89
COPY 19
CORE UUO (CALLI 11) 184
CORE2 UUO (CALLI 400015) 160
CORMAX 372
CORPTR 372
CORTAB 372
creation date 32
CSTART command 371
CTLV UUO (CALLI 400001) 97
CTROV bit (0,,1000--IMP I/O status) 324
CTYLIN bit (200000,,0--line characteristics) 77
CURSOR UUO (PPIOT 10,) 133
DAC device 318
DART 19
Data Disc channels 121, 149, 354
Data Disc channels, waiting for 372
Data Disc displays 121, 354
data modes 11
data switches, P1 console 198
Datamedia bits, special 89
Datamedia cursor, positioning the 133
Datamedia displays 122, 361
Datamedia output, freezing and controlling 137
Datamedia queues 122
date format, system 177
date last dumped 277
date last referenced 277
DATE UUO (CALLI 14) 177
dates and times from UUOs 176
DAWPRV bit (200000,,0--privileges) 190
DAYCNT UUO (CALLI 400100) 178
DD SEE Data Disc
DDBs 373
DDCHAN UUO (CALLI 400067) 150
DDDLIN bit (20000,,0--line characteristics) 77
DDFCNT 372
DDQREQ 372
DDQSIZ 372
DDT 259, 371
DDT command 259, 371
DDTGT UUO (CALLI 5) 274
DDTIN UUO (CALLI 1) 269
DDTM bit (1000,,0--TTY I/O status) 282
DDTOUT UUO (CALLI 3) 270
DDTRL UUO (CALLI 7) 274
DDUPG UUO (PGIOT 3,) 142
DEASSIGN command 46
DEBREAK UUO (CALLI 400035) 228
DEC UUOs 7
DECIMAL 8
dectapes 293
DELETE command 19
delete-protect bit (200--file protection) 19
deleting files 34
detached jobs 77
DETSEG UUO (CALLI 400017) 162
DEVCHR UUO (CALLI 4) 61
device characteristics word 61
device data blocks 373
device I/O status word SEE I/O status word
device names, logical and physical 22
device unit number, finding 64
DEVLST 372
DEVNUM UUO (CALLI 400104) 64
DEVPRV bit (400,,0--privileges) 190
DEVSBB bit (1000,,0--I/O status) 16
DEVUSE UUO (CALLI 400051) 62
DIAL UUO (CALLI 400117) 341
dialer 340
directory files 18, 276
disk error codes 36
disk file protection key 19
disk file record offset 278
disk files 276
Disk PPN 20
disk transfers with P3 memory 314
disk transmission error 36
disk, bad retrieval for 36
disk, full 36
DISLIN bit (400000,,0--line characteristics) 77
DISMIS UUO (CALLI 400024) 218, 226
display output 119
display programming, an example 364
display programs 135
display's screen height 89
display, defintion of a 8
displays, Data Disc 121, 354
displays, Datamedia 122, 361
displays, III 120, 342
displays, resetting 146
DLYBIT bit (200000,,0--TTYTAB) 372
DM SEE Datamedia
DM128 bit (0,,4000--DM state flags) 89
DMLIN bit (40000,,0--line characteristics) 77
DMPBIT bit (0,,400--disk I/O status) 279
DMQUOT bit (100000,,0--UPGIOT flags) 136
DPY headers 372
DPYCLR UUO (UUO 701) 146
DPYOUT 136
DPYPOS UUO (PPIOT 2,) 127
DPYSIZ UUO (PPIOT 3,) 128
DQCNT 372
DSK: the file disk 276
DSKOPS 372
DSKPPN 372
DSKPPN UUO (CALLI 400071) 21
DTAn: dectape 293
dump date for disk files 277
dump mode 11, 12
dump mode command lists 12
dump-never bit (400--file protection) 19
ECHARR bit (10000,,0--line characteristics) 77
echo suppression for terminals 67, 77, 97, 118, 282
EIOTM UUO (CALLI 400005) 261
ELF: the PDP-11 interface 328
EMODE bit (0,,10--SETACT fourth word) 84
end of file 16
ENTER UUO (UUO 077) 33, 307
ENTERs, long block 277
ENTRB bit (0,,20000--channel status) 60
escape commands, executing 89
ESCAPE I 220
example of display programming 364
example of general I/O 363
example of using interrupts 365
EXIT UUO (CALLI 12) 247
extended UUOs 4
F6TO10 bit (400000,,0--P1/P3 message header) 317
FAIL 4, 5
FCS bit (20,,0--line characteristics) 77
FDMISS bit (40000,,0--P1/P3 message header) 317
file dumping 19
file protection key 19
file's protection, mode written, and date/time written 32
file-status display on wholine 148
filenames 17
filenames, changing 34
files 17
files, creating 33
files, deleting 34
files, extending 54
files, opening 31
files, random access of 51
files, updating 35
FNCOMP bit (100000,,0--P1/P3 message header) 317
FNOWDS bit (200000,,0--P1/P3 message header) 317
Font compile and select 290
Font Compiler 291
FREEZE UUO (CALLI 400012) 137
FRM device 318
FSLIMIT 372
FSPAG 372
FSTOP 372
FTIME 372
full-character-set mode 77
FULTWX bit (4,,0--line characteristics) 77
gadgets, special I/O 339
GARBIT bit (0,,200--disk I/O status) 279
GARBIT bit (0,,200--UDPn I/O status) 309
GCW 286
GDPTIM UUO (CALLI 400065) 274
GETCHR UUO (CALLI 6) 271
GETHI UUO (CALLI 400072) 163
GETLIN UUO (TTYUUO 6,) 77
GETLN UUO (CALLI 34) 98
GETNAM UUO (CALLI 400062) 187
GETPPN UUO (CALLI 24) 186
GETPR2 UUO (CALLI 400053) 165
GETPRV UUO (CALLI 400115) 190
GETSEG UUO (CALLI 40) 274
GETSTS UUO (UUO 062) 56
GETTAB UUO (CALLI 41) 274
glitch hold count 130, 132
glitches 128
GRAB bit (10,,0--ELF USET) 332
Group Command Word 286
HDEAD bit (0,,2000--IMP I/O status) 324
hidden records 278
hidden terminals 89
high segments SEE upper segments
HNGTRP bit (0,,200--LPT I/O status) 284
horizontal position, terminal 89
HUNG bit (0,,1000--ELF I/O status) 329
I/O byte pointer and byte count 13
I/O channels 10
I/O channels, saving and restoring 47
I/O devices 275
I/O status error bits 38
I/O status testing and setting 55
I/O status word 16, 56, 57, 65
I/O UUOs, example sequence of 9
I/O, an example 363
I/O, general 9
I/O, synchronous 16
I/O, terminating 43
I/O, transferring data 37
I/O, TTY 66
IBUFB bit (0,,200000--channel status) 60
ICLOSB bit (0,,2000--channel status) 60
ICP (Initial Connection Protocol), definition of ARPAnet 322
IDON bit (0,,2--DM state flags) 89
IENBW UUO (CALLI 400045) 230
III displays 120, 342
illegal memory reference 219
ILM bit (0,,20000--interrupts) 219
IMP 321
IMP 8-bit byte size 323
IMP glossary 322
IMP tables, system 327
IMPBIT bit (1000,,0--line characteristics) 77
IMSKCL UUO (UUO 722) 235
IMSKCR UUO (INTUUO 5,) 242
IMSKST UUO (UUO 721) 234
IMSTW UUO (INTUUO 1,) 238
IN UUO (UUO 056) 38
INBFB bit (0,,400--channel status) 60
INBUF UUO (UUO 064) 26
INCHRS UUO (TTYUUO 2,) 73
INCHRW UUO (TTYUUO 0,) 71
INCHSL UUO (TTYUUO 5,) 76
INCHWL UUO (TTYUUO 4,) 75
Information International Inc. SEE III
information UUOs 174
INFPRV bit (20,,0--privileges) 190
INIT UUO (UUO 041) 23
INITB bit (0,,400000--channel status) 60
initializing a device 22
INPB bit (0,,10000--channel status) 60
INPUT UUO (UUO 066) 39, 312
input/output SEE I/O
INSKIP UUO (TTYUUO 13,) 82
INTACM UUO (CALLI 400027) 223
INTCLK bit (200,,0--interrupts) 219
INTDEJ UUO (INTUUO 0,) 237
INTDMP UUO (INTUUO 3,) 240
INTELF bit (0,,100000--interrupts) 219
INTENB UUO (CALLI 400025) 221
INTENS UUO (CALLI 400030) 224
interlock devices for P3 318
interrupt level 220
interrupt mask 233, 242
interrupt-wait wakeup mask 239
interrupts pending 232
interrupts, an example 365
interrupts, generating 231, 241
interrupts, new-style 220
interrupts, old-style 243
interrupts, user 219
INTFOV bit (0,,100--interrupts) 219
INTGEN UUO (CALLI 400033) 231
INTIIP UUO (CALLI 400031) 266
INTIMS bit (20,,0--interrupts) 219, 324
INTINP bit (10,,0--interrupts) 219, 324
INTINR bit (100,,0--IMP connection status) 324
INTINR bit (100,,0--interrupts) 219, 324
INTINS bit (40,,0--IMP connection status) 324
INTINS bit (40,,0--interrupts) 219, 324
INTIPI UUO (INTUUO 4,) 241
INTIRQ UUO (CALLI 400032) 232
INTMAIL bit (4000,,0--interrupts) 219
INTMSK UUO (UUO 720) 233
INTORM UUO (CALLI 400026) 222
INTOV bit (0,,10--interrupts) 219
INTPAR bit (400,,0--interrupts) 219
INTPTI bit (10000,,0--interrupts) 219
INTPTO bit (1000,,0--interrupts) 219
INTQXF bit (2,,0--interrupts) 219
introduction 2
INTSWD bit (200000,,0--interrupts) 219
INTSWW bit (400000,,0--interrupts) 219
INTTTI bit (4,,0--interrupts) 219
INTTTY bit (20000,,0--interrupts) 219
INTUUO UUO (UUO 723) 236
INTWAIT bit (2000,,0--interrupts) 219
INWAIT UUO (TTYUUO 14,) 83
IO SEE I/O
IO bit (20,,0--I/O status) 16
IOACT bit (0,,10000--ELF I/O status) 329
IOACT bit (0,,10000--I/O status) 16
IOACT bit (0,,10000--TTY I/O status) 282
IOBEG bit (2,,0--I/O status) 16
IOBKTL bit (0,,40000--DTAn I/O status) 294
IOBKTL bit (0,,40000--I/O status) 16, 38
IOBKTL bit (0,,40000--PTR I/O status) 304
IOBOT bit (0,,4000--MTAn I/O status) 298
IOCON bit (0,,40--I/O status) 16
IODEND bit (0,,20000--I/O status) 16, 38
IODEND bit (0,,20000--IMP I/O status) 324
IODERR bit (0,,200000--ELF I/O status) 329
IODERR bit (0,,200000--I/O status) 16, 38
IODERR bit (0,,200000--IMP I/O status) 324
IODERR bit (0,,200000--XGP I/O status) 288
IODTER bit (0,,100000--I/O status) 16, 38
IODTER bit (0,,100000--IMP I/O status) 324
IODTER bit (0,,100000--XGP I/O status) 288
IOEND bit (40,,0--I/O status) 16
IOFST bit (4,,0--I/O status) 16
IOIMPM bit (0,,400000--ELF I/O status) 329
IOIMPM bit (0,,400000--I/O status) 16, 38
IOIMPM bit (0,,400000--XGP I/O status) 288
IONRCK bit (0,,100--MTAn I/O status) 298
IOP 319
IOPAR bit (0,,1000--MTAn I/O status) 298
IOPDL UUO (UUO 726) 50
IOPOP UUO (UUO 725) 49
IOPUSH UUO (UUO 724) 48
IOSUPR bit (0,,1000--TTY I/O status) 282
IOT UUOs 7
IOT-USER mode 3, 261, 368
IOTEND bit (0,,2000--MTAn I/O status) 298
IOTEND bit (0,,2000--XGP I/O status) 288
IOW bit (1,,0--I/O status) 16
IOW bit (1,,0--TTY I/O status) 282
IOWC bit (0,,20--I/O status) 14, 16
IOWD 12, 370
IRMA bit (200,,0--TTY I/O status) 282
IWAIT UUO (CALLI 400040) 229
IWKMSK UUO (INTUUO 2,) 239
JACCT bit (100000,,0--job status) 197
JB2PRV 372
JBTBTM 372
JBTJL 372
JBTKCJ 372
JBTLIN 372
JBTMAP 372
JBTPAG 372
JBTPRI 372
JBTPRV 372
JBTQ 372
JBTSTS 372
JBTSTS UUO (CALLI 400013) 197
JBTSWP 372
JERR bit (20000,,0--job status) 197
JHLDIN bit (2,,0--job status) 197
JLOCK bit (0,,100000--job status) 197
JLOG bit (10000,,0--job status) 197
JNA bit (40000,,0--job status) 197
JOB 372
job data area 371
job information 183
job name 187, 188, 196
job number 185
job status word 197
job using a device 62
JOBAPR 219, 220, 243, 371
JOBCNI 219, 220, 243, 266, 371
JOBDDT 259, 371
JOBENB 371
JOBERR 371
JOBFF 25, 249, 371
JOBHCU 371
JOBHRL 155, 371
JOBINT 220, 371
JOBJDA 371
JOBNAM 372
JOBOPC 371
JOBPC 371
JOBQUE 372
JOBRD UUO (CALLI 400050) 256
JOBREL 25, 155, 371
JOBREN 371
jobs waiting for a device, number of 62
JOBSA 249, 250, 371
JOBSYM 371
JOBTPC 219, 220, 228, 243, 371
JSEG bit (1000,,0--job status) 197
JWP bit (1,,0--job status) 197
KILPRV bit (1000,,0--privileges) 190
KILTTY bit (40000,,0--TTYTAB) 372
KIM device 318
LEBUF 372
LEPOS 372
LETAB 372
letters, =32 word 203
LEYPOS UUO (PPIOT 6,) 131
LF insertion after CRs 67, 77
line characteristics 77, 78, 89, 115, 372
line characteristics, PTY 114
line editor Y-position 131
line editor, loading the 116, 117
line hold count 130, 132
LINE MODE 75
line number, finding TTY 77
line printer (LPT) 283
link, definition of ARPAnet 322
LINKUP UUO (CALLI 400023) 158
LINTAB 372
LIOTM UUO (CALLI 400006) 268
LISTEN for connect to socket 326
LIVPRV bit (0,,200000--privileges) 190
LMAR 290
LOCK UUO (CALLI 400076) 257
logical device name 22
LOGIN UUO (CALLI 15) 262
LOGOUT UUO (CALLI 17) 263
LOKSWP bit (4000,,0--job status) 197
LOOKB bit (0,,40000--channel status) 60
LOOKUP UUO (UUO 076) 32
LOOKUPs, long block 277
low core monitor pointers 372
lower segments SEE upper segments
LPT: the line printer 283
LPTNCC bit (0,,100--LPT I/O status) 284
LSTESC 372
LTHUUO UUO (CALLI 400120) 274
LUPPRV bit (1,,0--privileges) 19, 156, 190
MACRO 5
magnetic tapes 297
mail system, inter-job 203
mail system, inter-job, an example 365
MAIL UUO (UUO 710) 204
mail, receiving 208
mail, sending 205
mailboxes, peeking at 211
MAINTMODE 372
margins, XGP 290
MESPRV bit (2000,,0--privileges) 190
message formats between P1 and P3 317
META key SEE CONTROL and META keys
MFD (Master File Directory) 18, 276
microswitch keyboard bits 85
misc. UUOs 246
modes, I/O data 11
monitor calls 3
monitor commands, rescanning 79
monitor, peeking at the 195
MSTIME UUO (CALLI 23) 180
MTAPE UUO (UUO 072) 281, 290, 300, 313, 315, 316, 326, 335
MTAPE UUO for magnetic tapes 299
MTAPE UUO for reading disk into P3 memory 315
MTAPE UUO for the disk 280
MTAPE UUO for the ELF 335
MTAPE UUO for the IMP 325
MTAPE UUO for the SIX 313
MTAPE UUO for the XGP 289
MTAPE UUO for writing disk from P3 memory 316
MTAs: magnetic tapes 297
MTRUUO UUO (CALLI 400122) 202
NAMEIN UUO (CALLI 400043) 196
NCP (Network Control Program), definition of 322
network, ARPA 321
NJOBS 372
NO177 bit (0,,400--DM state flags) 89
NOBOLD bit (0,,2000--DM state flags) 89
NOECHB bit (0,,400--TTY I/O status) 282
NOECHO bit (0,,200--TTY I/O status) 282
NOEEOB bit (10000,,0--UPGIOT flags) 136
NOEEOL bit (20000,,0--UPGIOT flags) 136
NOINTR bit (0,,1000--DM state flags) 89
non-existent memory reference 219
NOPAR bit (20,,0--ELF USET) 332
NQUES 372
NRETRY bit (0,,100--ELF I/O status) 329
NULMES UUO (CALLI 400114) 92
NXM bit (0,,10000--interrupts) 219
NXM11 bit (0,,40000--ELF I/O status) 329
OBUFB bit (0,,100000--channel status) 60
OCLOSB bit (0,,1000--channel status) 60
OCTAL 8
OPEN UUO (UUO 050) 24
OUT UUO (UUO 057) 40
OUTBFB bit (0,,200--channel status) 60
OUTBUF UUO (UUO 065) 27
OUTCHR UUO (TTYUUO 1,) 72
OUTFIV UUO (TTYUUO 17,) 86
OUTPB bit (0,,4000--channel status) 60
OUTPUT UUO (UUO 067) 41, 311
OUTSTR UUO (TTYUUO 3,) 74
overflow, arithmetic 219
P1, P2 and P3, definition of 8
P1/P3 message formats 317
P3 memory 281, 314, 315, 316
P3, device SIX 310
P3, interlock devices for 318
page printer 123, 130
paging disposition, audio switch 153
paper tape 302, 303
PARITY bit (0,,2000--ELF I/O status) 329
parity error 219, 220
PAUSEB bit (100000,,0--TTYTAB) 372
PC flags 367
PDP-10 information 366
PDP-11 interface (ELF) 328
PEEK UUO (CALLI 33) 200
PGACT UUO (PGIOT 1,) 140
PGCLR UUO (PGIOT 2,) 141
PGINFO UUO (PGIOT 4,) 143
PGIOT UUO (UUO 715) 138
PGSEL UUO (PGIOT 0,) 139
phantom jobs 255
PHUBIT bit (0,,100--disk I/O status) 279
physical device name 22, 63
physical name of attached TTY 98
pieces of glass 120, 140, 143
PIECES OF PAPER 123
PJOB UUO (CALLI 30) 185
PLT: plotter 301
PMAR 287, 290
PNAME UUO (CALLI 400007) 63
POINTS UUO (UUO 712) 171
poping I/O channels 47
POV bit (0,,200000--interrupts) 219
PPACT UUO (PPIOT 1,) 126
PPHLD UUO (PPIOT 7,) 132
PPINFO UUO (PPIOT 5,) 130
PPIOT UUO (UUO 702) 124
PPN 17, 18, 20, 21, 186
PPREL UUO (PPIOT 4,) 129
PPSEL UUO (PPIOT 0,) 125
PPSPY UUO (CALLI 400107) 134
PRIPRV bit (400000,,0--privileges) 190
privacy bit 89
PRIVILEGES, ACTIVE 190
privileges, active 191
PRIVILEGES, PASSIVE 190
PRIVILEGES, TEMPORARY 190
PRJPRG 372
project-programmer name SEE PPN
PROPRV bit (100000,,0--privileges) 190
protection key for disk files 19
PROTLE bit (400,,0--UPGIOT flags) 136
PROTON bit (0,,4--DM state flags) 89
pseudo-teletypes 99
PTGETL UUO (PTYUUO 13,) 114
PTIFRE UUO (PTYUUO 2,) 105
PTJOBX UUO (PTYUUO 16,) 118
PTL7W9 UUO (PTYUUO 17,) 117
PTLIP bit (4000,,0--TTY I/O status) 282
PTLOAD UUO (PTYUUO 15,) 116
PTOCNT UUO (PTYUUO 3,) 106
PTP: paper tape punch 302
PTR: paper tape reader 303
PTRD1S UUO (PTYUUO 4,) 107
PTRD1W UUO (PTYUUO 5,) 108
PTRDS UUO (PTYUUO 10,) 111
PTSETL UUO (PTYUUO 14,) 115
PTWR1S UUO (PTYUUO 6,) 109
PTWR1W UUO (PTYUUO 7,) 110
PTWRS7 UUO (PTYUUO 11,) 112
PTWRS9 UUO (PTYUUO 12,) 113
PTY echoing 99
PTY line characteristics 114
PTY line characteristics, initial 99
PTY line numbers 99
PTYGET UUO (PTYUUO 0,) 103
PTYJOB 372
PTYLIN bit (4000,,0--line characteristics) 77
PTYREL UUO (PTYUUO 1,) 104
PTYs 99
PTYs doing display output 119
PTYUSE bit (200,,0--line characteristics) 77
PTYUUO UUO (UUO 711) 101
PTYUUOs to terminals 102
PTYWAK bit (400,,0--line characteristics) 77, 108
push-down stack overflow 219, 245
pushing I/O channels 47
QNAMS 372
queue names and numbers 374
RAID 259, 371
random access to files 51
RAPPED bit (0,,20000--DM state flags) 89
RAQBIT bit (0,,1000--disk I/O status) 279
RDLINE UUO (CALLI 400123) 90
re-edited line, activation character of 94, 130
re-edited line, number of characters in 83
re-editing lines with PTLOAD 116
Read-Alter (RA) mode 35
reading data 38
REAPRV bit (40000,,0--privileges) 190
REASSI UUO (CALLI 21) 46
record offset feature 278, 279, 281
REENTER command 371
reference date for disk files 277
RELEAS UUO (UUO 071) 45, 334
REMAP UUO (CALLI 37) 159
RENAME UUO (UUO 055) 34, 308
RENAMEs, long block 277
RESCAN UUO (TTYUUO 10,) 79
RESET UUO (CALLI 0) 249
responsible terminal 88, 89, 154, 372
RFC (Request For Connection), definition of 322
RFCR bit (100000,,0--IMP connection status) 324
RFCS bit (200000,,0--IMP connection status) 324
RLEVEL UUO (CALLI 400054) 194
RMAR 290
ROBTPD bit (40,,0--line characteristics) 77
ROLLON bit (0,,1--DM state flags) 89
RSET bit (0,,400--IMP I/O status) 324
RTJ device 318
RUN bit (400000,,0--job status) 197
RUN UUO (CALLI 35) 251
RUNMSK UUO (CALLI 400046) 274
RUNTIM UUO (CALLI 27) 182
SAM device 318
saving and restoring I/O channels 47
SAVJDA bit (0,,400000--job status) 197
screen height, display's 89
SDEAD1 bit (0,,20000--job status) 197
SDEADIN bit (0,,40000--job status) 197
second segments SEE upper segments
SEGNAM UUO (CALLI 400037) 172
SEGNUM UUO (CALLI 400021) 173
SEGPRV bit (200,,0--privileges) 190
SEGSIZ UUO (CALLI 400022) 273
SEND UUO (MAIL 0,) 206
service level 193, 194
SETACT UUO (TTYUUO 15,) 84
SETCRD UUO (CALLI 400073) 189
SETDDT UUO (CALLI 2) 259
SETLIN UUO (TTYUUO 7,) 78
SETNAM UUO (CALLI 400002) 272
SETNAM UUO (CALLI 43) 188
SETNM2 UUO (CALLI 400036) 170
SETPOV UUO (CALLI 32) 245
SETPR2 UUO (CALLI 400052) 164
SETPRO UUO (CALLI 400020) 169
SETPRV UUO (CALLI 400066) 191
SETSTS UUO (UUO 060) 57
SETUWP UUO (CALLI 36) 167
SGNEXT bit (4,,0--ELF USET) 332
SHOWIT UUO (CALLI 400011) 148
simulating UUOs 254
SIX device (P3) 310
SIX, interlock devices for 318
sixbit character codes 375
SIXBIT representation 369
SKPHIM UUO (MAIL 4,) 213
SKPME UUO (MAIL 3,) 212
SKPSEN UUO (MAIL 5,) 207
SLEEP UUO (CALLI 31) 248
SLEVEL UUO (CALLI 400044) 193
SNEAKS UUO (CALLI 400064) 93
SNEAKW UUO (CALLI 400063) 93
SNKWAT bit (200000,,0--TTY I/O status) 282
socket, definition of ARPAnet 322
sound sources 153
SP2GO 372
spacewar buttons 214, 260
spacewar level, executing UUOs at 214
spacewar mode 214
spacewar modules, killing 216
SPCBRK bit (100,,0--line characteristics) 77
SPCWAR UUO (UUO 043) 216
SPCWGO UUO (CALLI 400003) 217
special activation mode 77, 84
SPWBUT UUO (CALLI 400000) 260
SPWGO 372
SPY UUO (CALLI 42) 274
SRCV UUO (MAIL 2,) 210
SSAVE command 157
SSLPRV bit (100,,0--privileges) 190
Stanford UUOs 7
START command 371
STATO UUO (UUO 061) 59
status word, device I/O SEE I/O status word
STATZ UUO (UUO 063) 58
SUPACT bit (0,,200--SETACT fourth word) 84
SUPBTS bit (0,,1--SETACT fourth word) 84
SUPCCR bit (0,,2--SETACT fourth word) 84
SUPCT bit (0,,40000--SETACT fourth word) 84
SUPEOL bit (0,,400--SETACT fourth word) 84
SUPERS bit (0,,100--SETACT fourth word) 84
SUPRFF bit (0,,1000--LPT I/O status) 284
SUPSCM bit (0,,4--SETACT fourth word) 84
SWAP UUO (CALLI 400004) 250
SWITCH UUO (CALLI 20) 198
SWP bit (2000,,0--job status) 197
symbol definitions in the system 201
SYNC bit (20000,,0--TTY I/O status) 282
SYSDEV bit (0,,100--channel status) 60
SYSPAG 372
system date format 177
SYSTOP 372
TBSSET bit (0,,40000--DM state flags) 89
TBXPND bit (10,,0--line characteristics) 77
terminal horizontal position 89
terminal width 89
terminals SEE TTYs
terminology in this manual 8
TIMER UUO (CALLI 22) 179
TIP 321
TLKPRV bit (10,,0--privileges) 190
TLKRNG bit (1,,0--line characteristics) 77
TMAR 287, 290
TMO bit (0,,200--IMP I/O status) 324
TMPCOR UUO (CALLI 44) 252
TMPCRD UUO (CALLI 400103) 253
TOIP bit (10000,,0--TTY I/O status) 282
TPMON bit (400,,0--TTY I/O status) 282
TRPJEN UUO (CALLI 26) 274
TRPSET UUO (CALLI 25) 274
TRUNCA bit (40000,,0--UPGIOT flags) 136
TTCALL 69
TTIME 372
TTREAD UUO (TTYUUO 16,) 85
TTY 282
TTY echoing 67, 97
TTY I/O 66
TTY I/O status word 65, 89, 282
TTY input buffer, peeking at 93
TTY input buffers, clearing 80
TTY input, LF insertion 67
TTY input, reading a whole line of 90
TTY input, testing for 95
TTY line characteristics 77
TTY line number, finding 77
TTY output buffer, clearing 81
TTY UUOs, miscellaneous 87
TTY ARROW and TTY NO ARROW 77
TTY BLINK and TTY BOLD 89
TTY DM and TTY DM128 77
TTY DM128 89
TTY ECHO and TTY NO ECHO 77
TTY ESCAPE and TTY BREAK 89
TTY FILL and TTY NO FILL 77
TTY FULL and TTY NO FULL 77
TTY NO BOLD 89
TTY NO BS 89
TTY TAB and TTY NO TAB 77
TTY WIDTH 89
TTY's owner 96
TTY, physical name of attached 98
TTY, responsible 88, 89, 154, 372
TTY, sending a message to a 91, 92
TTYDTC bit (2000,,0--TTY I/O status) 282
TTYFIL bit (100000,,0--line characteristics) 77
TTYHLD bit (100000,,0--TTY I/O status) 282
TTYIOS UUO (CALLI 400014) 65
TTYIOW bit (400000,,0--TTY I/O status) 282
TTYJOB UUO (CALLI 400113) 96
TTYLOK 372
TTYMES UUO (CALLI 400047) 91
TTYSET UUO (CALLI 400121) 89
TTYSKP UUO (CALLI 400116) 95
TTYTAB 372
TTYUUO UUO (UUO 051) 70
TV cameras 319
typeahead, with PTLOAD and PTL7W9 116, 117
UDP unload light 337
UDPn: new disk-mode usage 276
UDPn: old-mode usage 306
UDPn: user disk pack 305
UDPPRV bit (10000,,0--privileges) 190
UDSD bit (0,,100--DTAn I/O status) 294
UFDs 18, 276
UGETF UUO (UUO 073) 54, 333
UINBF UUO (UUO 704) 28
understanding this manual 8
unit number of a device 64
UNLOCK UUO (CALLI 400077) 258
UNPURE UUO (CALLI 400102) 168
unused opcodes 3
UOUTBF UUO (UUO 705) 29
UPGIOT UUO (UUO 703) 136
UPGMVE UUO (UUO 713) 145
UPGMVM UUO (UUO 714) 144
UPGPRV bit (4000,,0--privileges) 190
upper segments 155
upper segments, making and killing 157
upper segments, protection keys of 156, 169
upper segments, simulated 164
upper segments, status of 166
upper segments, write protecting 156, 167
UPTIME 372
user disk pack (UDPn) 305
user interrupt system SEE interrupts, user
user level 220
user UUOs 6
USERGO bit (2000,,0--UPGIOT flags) 136
USET pointer 281
USETI UUO (UUO 074) 52, 331
USETO UUO (UUO 075) 53, 332
USKIP UUO (CALLI 400041) 267
USRB bit (100,,0--TTY I/O status) 282
UTPCLR UUO (CALLI 13) 296
UUO mnemonics 4, 199
UUO trapping 6
UUOs 3
UUOs at spacewar level 214
UUOs by number 376
UUOs, extended 4
UUOs, obsolete 264
UUOs, simulating 254
UUOs, user-defined 6
UUOSIM UUO (CALLI 400106) 254
UWAIT UUO (CALLI 400034) 227
VDSMAP UUO (CALLI 400070) 152
VDTIE 372
vectors, XGP 287
video switch 151
WAIT UUO (CALLI 10) 42
WAKEME UUO (CALLI 400061) 255
wakeup mask, interrupt-wait 239
WHO UUO (CALLI 400112) 192
wholine file-status display 147
width, terminal line 89
word count computation 16
WRCV UUO (MAIL 1,) 209
writing data 40
WRTPRV bit (20000,,0--privileges) 190
Xerox Graphics Printer (XGP) 285
XGP character mode 287
XGP escapes 287
XGP vectors 287
XGP video mode 286
XGP: Xerox Graphics Printer 285
XGPPRV bit (2,,0--privileges) 190
XGPUUO UUO (CALLI 400075) 292
XLINE 287, 290
XMSET 372
XON bit (2,,0--line characteristics) 77
Y-position of line editor 131