forked from PDP-10/its
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ddt.33
executable file
·3848 lines (3160 loc) · 176 KB
/
ddt.33
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
-*-Text-*- Documentation file for DDT
File: DDT Node: Top Next: Conventions Up: (DIR)
DDT Primer and Reference Manual
describing DDT version 696.
(being updated to version 1000.)
DDT is the top-level command interpreter most often used on the
Incompatible Timesharing System (ITS). It provides three main types
of service to the user: invocation of system programs, manipulation
of files, and aid in debugging. ITS itself has no command processor,
and can be used only via a program. What appears to a user as the
"monitor command level" of ITS is actually DDT.
This file (the primer, INFO;DDT >) treats the general aspects
of DDT, grouping commands according to function; then, in the
"reference section" (.INFO.;DDT ORDER), all the commands will be
described in detail, in alphabetical order. Before using a command in
a complicated way, refer to the detailed description to verify that it
will function as intended.
* Menu:
* Conventions:: Conventions Used in This Document
* Rubout:: Type-in Conventions
* Startup:: When DDT Starts Up
* Login:: Logging in and out
* Files:: File-Manipulation Commands
* Programs:: Running Programs with DDT
* Jobs:: Job Manipulation
* Returning:: Returning Control to DDT from an Inferior Job
* Arithmetic:: Arithmetic in DDT
* Sophisticated:: Sophisticated Job Manipulation
* Loading:: Loading and Dumping Jobs
* Communication:: Communication with Other Users
* Announcements:: Announcements
* XFILE:: Commands from Files or Programs
* Symbols:: Symbols
* Memory:: Examining and Altering Memory
* Insns:: PDP-10 Instruction Type-in
* Literals:: Literals
* Text:: Text Type-in
* Modes:: Type-out Modes
* Type-out:: Type-out Commands
* Bit:: Bit Typeout Mode
* Pseudo:: Pseudo-memory locations in DDT
* Rings:: Address and Value Ring Buffers
* Execution:: Controlling Execution While Debugging
* MAR:: The MAR or address stop.
* Breakpoints:: Breakpoints
* Stepping:: Stepping
* Raid:: Raid Registers (Self-updating display of memory)
* Searches:: Word Searches
* Patching:: Patching Several Instructions over One.
* Services:: Services for Programs Running under DDT
* INLINE:: Allows reading commands from TTY in XFILES etc.
File: DDT, Node: Conventions, Previous: Top, Up: Top, Next: Rubout
Conventions Used in This Document
When examples of DDT commands are given, upper case letters are
intended to be typed in exactly as shown. Angle-brackets ("<" and
">") enclose "meta-variables" which stand for arguments to be supplied
by the user. Uparrow ("^"), known to some as circumflex, is used for
representing control characters: "^A" signifies a control-A. Other
non-alphanumeric characters are to be typed in as shown; some special
characters that would be confusing if represented by themselves are
represented by "meta-constants", such as "<cr>" for a carriage-return.
An alternate representation for a <cr> would be "^M". Other
characters sometimes represented by meta-constants include
<backspace>, <tab>, <lf>, <rubout>, <space>, and <comma>. Altmode is
represented by itself, and its appearance is . These conventions may
be violated in some places, but there will be a note to that effect
near the scene of the crime.
Numbers are octal, unless followed by a decimal point ("."), in
which case they are decimal (this is the same convention as DDT uses
for input). Following the ITS 1.5 manual, "bit <m>.<n>" means the
<n>'th bit from the bottom of the <m>'th 9-bit byte from the bottom,
out of the four 9-bit bytes in the 36.-bit word. Thus, bit 1.1 is 1,
bit 1.3 is 4, bit 1.7 is 100, and bit 2.2 is 2000. Bit 3.1 is 1,, and
bit 4.9 is the sign bit, 400000,, . The last sentence illustrates
another convention, that <lh>,, is <lh> shifted left 18. bits, or put
in the left halfword.
The term "ref <command>" will mean "see under <command> in the
appropriate part of the reference section". "See the reference
section <part>" will mean to refer to the named part of the reference
section.
File: DDT, Node: Rubout, Previous: Conventions, Up: Top, Next: Startup
DDT Type-in Conventions
DDT has several special action characters that have a specific
effect on whatever command is being typed, instead of simply becoming
part of the command. They are used for editing input, for aborting
operations, or for controlling where DDT's output goes.
The most important input editing character is <rubout> (ASCII code
177), which deletes the last input character. If possible, it will
be erased from the screen; otherwise, it will be typed back out to
show what is happening (sometimes <rubout> deletes several characters.
When that happens, it types them all out). Other input editing
characters are ^D, which cancels ALL unprocessed type-in (in other
words, as much as it's possible to cancel), and ^L, which clears the
screen and then retypes the unprocessed input.
^S turns off DDT output to the terminal for the command in
progress, and other all commands before the ^S itself. ^S is the
right character to use if you don't want to see all of a file or
directory listing you have printed. Many DDT commands will stop
executing if they are silenced, if they think that they are no longer
doing anything useful.
^G is a powerful abort command. It will return DDT instantly to
its main command-reading level at almost any time. It is so strong
that it is dangerous, because it can catch DDT in the middle of
updating a data base, such as a job's symbol table or the list of
jobs. ^G should be used as a last resort, when DDT hangs up in the
middle of a command and ignores other input. In less extreme
situations, ^S is usually enough.
One time when ^G is ineffective is when DDT has given control of
the terminal to another program. To stop the other program and tell
DDT to resume reading commands, the character ^Z may be typed on the
terminal (CALL, on TV terminals). ^Z or CALL is interpreted by ITS
itself, and causes a special unconditionally fatal interrupt to the
job that has control of the terminal. DDT notices the fatal interrupt
and takes control; it never sees the ^Z per se. There is no reason to
type ^Z when DDT itself has control of the terminal (assuming the DDT
is top level, as usual), and it causes an error message "??" to be
printed.
The characters ^W and ^V are used to turn terminal output off and
on for long periods of time -- for example, if it is desired to
execute several commands without any printout on the terminal. ^W
turns typeout off, and ^V turns it back on. Typeout will also be
turned on if any DDT command reports an error, or if any other program
run by DDT returns abnormally. There are also characters ^E and ^B
that turn off and on output to a script file. See the reference
section for more details.
^_ (BACK-NEXT, on TV's) is another character that is interpreted by
ITS directly. It is used for communicating with other users, and for
specifying various options connected with ITS's handling of the
terminal. See the file .INFO.;ITS TTY for details.
File: DDT, Node: Startup, Previous: Rubout, Up:Top, Next: Login
When DDT Starts Up
This section's title is purposefully ambiguous.
Since ITS has no internal command processor, it is impossible to do
anything with a terminal unless some job is deliberately taking input
from it. A free terminal is not being read by any job and what is
typed on it is ignored. There is an exception, of course, or else it
would be impossible to log in. When the character ^Z is typed on a
free terminal (or CALL, on a TV) ITS itself loads a copy of DDT to
read commands from the terminal. Through DDT, all of the system's
facilities are accessible.
On ITS, every running copy of a program must reside in a job, which
is a virtual machine much like a PDP-10. Every job has two names:
the UNAME which identifies the user it belongs to, and the JNAME which
distinguishes between the jobs belonging to one user. The first job
any user has is the one that ITS puts his DDT in; that job's JNAME is
always "HACTRN" (a parody of "FORTRN"). Other jobs may be created by
DDT to run other programs in. Note that "HACTRN" is the name of the
job; "DDT" is the name of the program that normally runs in it. It
is easy to make another copy of DDT run in a different job, and not
very hard to get some other program running in the job HACTRN.
The first thing DDT does when it starts up is print some status
information about the system, including the name of the machine being
used (AI, ML, DM, or MC), the version numbers of the DDT and ITS that
are running, and the number of users on the system. This information
can be obtained at any later time with the :SSTATUS and :VERSION
commands. In addition, DDT prints the files SYS:SYSTEM MAIL and
(except for network users) SYS:LOCAL MAIL, which contain notices so
urgent that everyone should see them before using the system.
The "fair share" included in the startup statistics is an indication
of what fraction of the total CPU time is available to any one user.
It is a measure of the load level on the system. If it is down to
10% or so, you might prefer to wait for the load to be less.
File: DDT, Node: Login, Previous: Startup, Up: Top, Next: Files
Logging in and out
Logging in is the way a user identifies himself to the system and
the other users. One should generally log in soon after the beginning
of any session. Although being logged in is not actually necessary
for most things, it is both convenient (mail you send will contain
your name, etc.) and respectful to the other users.
Logging in involves specifying a UNAME, or user name, of 6
characters or less (preferably letters). Each user has his own
customary UNAME (or several). If you don't have your own UNAME, pick
one that nobody else uses (do :WHOIS <uname><cr> to find out whether a
UNAME is in use already). Most users use their initials or one of
their names for a UNAME. For more information on what DDT does with
the UNAME specified, see the reference section "DDT's UNAMEs".
There are two commands for logging in: :LOGIN, which is a "colon
command", and U, which is a "DDT command". Colon commands all start
with a colon, which is followed by the name of the command. After the
command name come the arguments, if any. In the case of :LOGIN, the
argument is the UNAME to log in as. After the arguments, a <cr> ends
the command. If DDT is given a colon command with an unrecognized
name, it tries to run the system program (if any) with that name.
"DDT commands" all contain either a special character or at least one
altmode (or both); they can take either prefix or suffix arguments
depending on the command. As you see, the term "DDT command" is
ambiguous, and can mean any command that DDT understands, or can
exclude colon commands.
The dichotomy of colon commands and DDT commands reflects DDT's
evolution. Although most often used nowadays for file manipulation
and for running system programs, DDT's original use was in debugging.
The other functions were added when ITS was written and DDT was chosen
as its executive program. When DDT was used only for debugging, there
were no colon commands. Nowadays, the more cryptic DDT commands are
(usually) assigned to operations that either pertain to debugging or
are frequently used, while the longer but mnemonic colon commands are
assigned to operations that are either obscure and infrequent or
needed by unsophisticated users. Many important operations have both
a DDT command to save typing for expert users and a colon command for
new users. In such cases, the DDT command is called the "short form".
Logging in is such an operation, with the colon command ":LOGIN" and
the short form "U".
ITS normally knows the characteristics of hardwired terminals. For
non-local terminals, it may not know them automatically. In that
case, before you log in, you should tell ITS the terminal
characteristics using the TCTYP program. In the simplest case, that
is done by :TCTYP <terminal type><cr>.
For example, :TCTYP EXECUPORT<cr> tells ITS to treat the terminal as
an execuport. :TCTYP<cr> by itself tells what ITS belives about the
terminal at the moment. :TCTYP HELP<cr> will print more information
on the TCTYP program.
When you log in, if you have received mail from other users, or if
there are announcements on the system that you have not yet seen (see
:MSGS), DDT will normally offer to show them to you. The offer will
look like "--Mail--" or "--MSGS--", and the proper responses are
<space> meaning "yes, show me the mail or the MSGS", or anything else,
meaning "save them for later". This scheme has the property that an
unexpected offer never causes interference: if you type a command
after logging in, without waiting to see whether DDT offers mail or
not, DDT will obey the command and skip the printing of the mail. DDT
makes other offers at various times. They all begin and end with two
dashes, and all are answered approximately the same way (<space> for
"yes", anything else for "no"). See the reference section
"Unsolicited Offers" for full details. Meanwhile, :PRMAIL will print
mail at any time, and :MSGS will print new system messages.
When the :LOGIN or U command is finished, it prints a "*". Many
commands do this, to indicate that they are finished. The "*" is
known as the "prompt character", but, unlike the prompt characters of
many other programs, it means "operation completed" rather than "ready
for more input". Input may be typed at any time, and will be saved by
ITS until it is wanted. Some people like to change the "*" to some
other string. Ref ":DDTSYM PROMPT" for how.
DDT has an "init file" feature that allows a user to customize his
DDT. The init file is a file of DDT commands that will be executed
automatically on logging in. For details, see the section DDT
Commands from Files.
Here is a description of the :LOGIN command, in the format that
will be used throughout this document:
:LOGIN <name> or <name>U
logs in as <name>. Then, if there is a DDT init file, it is executed
as DDT commands. Otherwise, DDT will offer to print user <name>'s
mail and any system messages he hasn't yet seen. After logging in, a
second :LOGIN is not allowed. If <name> is already logged in
somewhere else, DDT will automatically try to log in as <name>0,
<name>1, etc. instead, until it finds a name that isn't in use. But
even if it logs in as <name>0, DDT will still remember that it was
"supposed" to log in as <name> (see the XUNAME in the reference
section "DDT's UNAMEs"), so it will print <name>'s mail instead of
trying to find mail sent to <name>0.
:CHUNAM <uname>
changes DDT's UNAME to <uname>. It has much the same effect as
logging out and logging back in again as <uname>, except that any user
options set in DDT by the previous user remain in effect. The same
holds for any ITS options pertaining to the terminal. However, DDT
will offer to --Reset All--, and if given a <space> it will make a
special effort to reset all such options to their normal states. This
involves loading a new copy of DDT from the disk so that all variables
in DDT are reinitialized (see U. in the reference section).
When finished using ITS for a time, you should "log out" to free
your resources for other users. The operation of logging out is the
inverse of typing ^Z and logging in. It destroys DDT and any other
jobs it has created (except for any that have been disowned), so be
sure to write out any files you are editing before logging out! The
terminal becomes free again, and will ignore everything typed on it
except for ^Z (or CALL) and ^_. ITS types a message on the console
stating that it is free and also giving the time of day.
:LOGOUT or U
logs the user out. Only the top-level job (HACTRN) can log out; if
the command is given to a DDT in a job that is not top-level, it is an
error.
DDT allows the user to have an "exit file" of DDT commands to be
executed when he logs out. See :LOGOUT and :OUTTEST in the reference
section for full details. One commonly used exit file prints an
amusing message or fortune; the file is called STAN.K;ML EXIT and you
can use it by making your exit file be a link to it (see :LINK,
below).
:DETACH
detaches the user's whole job-tree. The console becomes free just as
if it had logged out, but the jobs are not destroyed. They remain in
the system without a console. A detached job is just like a disowned
job (see :DISOWN), but got that way differently. The opposite of
detaching is attaching. There is a :ATTACH command which performs
that operation, but it is too primitive to be convenient in the usual
case (don't use it without reading the reference section). However,
after logging in DDT automatically checks for the existence of a
detached tree and offers to attach to it. After a <space> is typed,
the formerly detached tree will be connected to the console (which
need not be the same one it was detached from). The new DDT that did
the attaching will no longer exist.
If something "goes wrong" with the console, a tree may be detached
automatically by the system. For example, if a user coming over the
ARPA network closes his connection, his tree will be detached. The
same thing happens to all users of TV terminals if the TV front-end
PDP-11 crashes. When this happens, the detached tree will be
destroyed by the system after an hour goes by, unless it is attached
first. As described above, logging back in will automatically tell
the new DDT to look for the old detached one and offer to attach it.
There is a program called REATTACH designed specifically for
detaching jobs from consoles and attaching jobs to consoles. It can
be used to move your jobs to another console, from either the old
console, the new console, or someone else's console.
:REATTACH HELP<cr> will print its documentation.
File: DDT, Node: Files, Previous: Login, Up: Top, Next: Programs
DDT's File-Manipulation Commands
DDT provides commands for renaming, deleting, and copying files, as
well as many other file operations. File commands are followed by the
names of the files they operate on. If a command has several
arguments, they should be separated by commas. The whole command must
be ended with a <cr>. If not enough arguments are given before the
<cr>, DDT will read another line of input, after describing what it
wants for the next argument. Examples of file commands are
:DELETE FOO BAR<cr>
which deletes the file named FOO BAR in the current default directory,
and
:PRINT INFO;DDT > <cr>
which prints the file DDT > in the directory INFO (this file!).
An ITS file's name has four components: the device name, the SNAME
(pronounced "S-name"), and two filenames, called the FN1 and the FN2
(The term "filename" is ambiguous, and can refer either to an FN1 or
FN2 or to the whole set of four components). This document is a file,
and its FN1 is "DDT", its FN2 is "DOC", its SNAME is ".INFO.", and its
device name is "DSK". Commonly used device names include DSK which
specifies the machine's disk file structure, and AI, ML, MC and DM,
each specifying the disk file structure of the named machine (accessed
via the ARPA network if necessary). The meaning of the SNAME depends
on the device. For devices DSK and AI, ML, MC and DM, the SNAME is
the name of the disk directory that the file is stored in. The FN1
and FN2 identify the file in the selected directory. More generally,
the device name and SNAME are called the "directory". A directory
listing on ITS lists all the FN1-FN2 combinations that happen to
exist, at the moment, under a specific device-SNAME pair.
A "filespec" is the character string that specifies a file's name.
In DDT, a filespec can specify any or all of the four components of
filenames. A device name should be followed by a colon; an SNAME, by
a semicolon. The FN1 and FN2 have no special delimiter, but are
identified by their order of appearance. Thus,
DSK:RMS;FOO 100
specifies DSK as the device name, RMS as the SNAME, FOO as the FN1 and
100 as the FN2.
On ITS, the FN1 of a file usually identifies the program or
information it pertains to, and the FN2 is the type of file or the
version number of the file. Thus, DDT's source file is
SYSENG;DDT 626. Its binary file is SYSBIN;DDT BIN. When a listing is
made, it has the file name DDT @XGP. The names BIN and @XGP indicate
the type of file (binary and @-listing, respectively), while the
common FN1 of the files indicates that they are all logically
associated. The FN2 of the source file, namely 626, is composed of
just digits; that identifies it as a version number. By convention,
when DDT is edited the new version is written out with an FN2 that is
1 larger. To make this convenient, ITS interprets an FN2 of ">"
specially: when reading, it refers to the largest version number that
exists; when writing, it creates a new file with a version number 1
greater than the largest existing one. The name "<" is also special.
It can be used to delete the oldest (actually, lowest-numbered)
version of a file. Note that if there is no numbered version of a file
that these will find but there are other files with that FN1, ">" or "<"
will chose one of these to refer to, so you can screw yourself by deleting
non-numeric ones if you are not careful. This can also be convenient however,
if you're trying to refer to a single file where the FN1 is enough to be
unambiguous.
A filename component omitted in a filespec will be given a default
value by DDT, usually the last value specified for that component in
either the same command or an earlier one (filenames are "sticky").
For example, after specifying a particular SNAME, all file operations
will use that SNAME until a new one is specified. To refer to the
last file operated on, a null filespec will serve.
New users are often afraid to rely on filename defaults because
they aren't sure how exactly the defaults work. Such fear is
reasonable, but DDT has a feature to help dispel it. If altmode is
typed when DDT is reading a filename, DDT will print the defaults it
is using, and go back to reading. If the altmode FOLLOWS a filespec,
DDT will print the full name of the specified file, as obtained by
merging the filespec with the defaults. Then it will read another
filespec using the printed file names as the defaults. If the printed
names themselves are satisfactory, a null filespec is enough. This
altmode feature makes it easy to learn just what DDT will do with any
filespec, and what defaults it uses.
More information on features available in filespecs may be found in
the reference section "Reading of Filenames". More information on
filename defaulting is in that section and in the section "Defaulting
of Filenames".
Here are the simpler DDT file commands. Notice that some
operations have colon commands, some have DDT commands, and some (such
as the first one, :PRINT) have both. When there are both, they are
equivalent unless otherwise noted. Since all commands that take a
filespec as an argument must be terminated by a <cr>, the <cr> is not
explicitly mentioned.
:PRINT <file> or ^R <file>
types the file on the terminal. On display terminals, at the bottom
of the screen DDT will pause and offer to print the rest of the file:
"--More--". A <space> will tell DDT to print the next screenful of
the file. Any other command will be obeyed instead of printing the
rest of the file.
:DELETE <file> or ^O <file>
deletes the specified file. It cannot be undone. If you screw
yourself, there is some chance that the file can be recovered from the
magnetic tape backup storage. It is wise to follow <file> with an
altmode, so that you see exactly what file will be deleted, and have a
chance for a second thought. Unless you tell it otherwise, DDT will
supply the altmode for you (ref ..DELWARN).
:LISTF <directory> or <dev>^F or <sname>^F
lists the files in the directory. A directory is specified in :LISTF
just like a file, except that only the device name and SNAME are
meaningful; the FN1 and FN2 are meaningless and if one is mentioned
it will be taken to be the SNAME instead. The short form ^F has an
idiosyncratic syntax: either a device name or an SNAME may be given
as a prefix argument. With no argument, ^F is a very convenient way
to list the directory you have been using recently. See the reference
section for more details. Note that the text of the directory listing
is generated by ITS, not by DDT. Many programs on ITS have the
ability to list a directory, since it is so easy to do.
<arg>$$<n>^F
This is one of DDT's harrier commands, but it can make examining a
file directory in certain ways pretty convenient. It uses the DIR:
device to print the current default directory. The DIR: device can
make many types of abbreviated or sorted listings. (You can omit the
<arg> and the <n> arguments to this command.)
The display you see is controlled by the table of two-word sixbit
entries beginning at DIRFN1 (and DIRFN2) inside your DDT. For numeric
argument n, the nth FN1 and FN2 are used as DIR: arguments. If the
numeric arg is omitted it is assumed to be zero (and DDT uses the
arguments at DIRFN1+0 and DIRFN2+0).
If a DIRFN2 slot is zero: if there is no argument, we use the default
:PRINT FN1; else if there is an argument we use it and set the default
:PRINT FN1. If the DIRFN2 slot has something in it: if there is an
argument, we use that argument instead.
Here follow the DIR: arguments provided in DIRFN1.
You can patch them with :SELF if you have another preference.
DIRFN1: SIXBIT /NAME1/ ;Table of $$^F DIR: search options.
DIRFN2: SIXBIT /UP/
SIXBIT /FIRST/ ;$$1^F finds FN1
0
SIXBIT /SECOND/ ;$$2^F finds FN2
SIXBIT /BIN/
SIXBIT /CDATE/ ;$$3^F ascending in creation age
SIXBIT /DOWN/
SIXBIT /SIZE/ ;$$4^F descending in size
SIXBIT /DOWN/
SIXBIT /NOT/ ;$$5^F not backed up
SIXBIT /DUMPED/
SIXBIT /ONLY/ ;$$6^F just link pointers
SIXBIT /LINKS/
Examples of use:
FOO1 Shows DIR:FIRST FOO and sets FN1 to FOO
LISP2 Shows DIR:SECOND LISP
2 Shows DIR:SECOND BIN
3 Shows DIR:CDATE DOWN
UP3 Shows DIR:CDATE UP
PACK136 Shows DIR:ONLY PACK13
As an additional feature, if you set the DDT variable DIRDIR
to -1, $$^F (without a numeric argument) sets your default
:PRINT SNAME and otherwise ignores the argument. This lets
you look at other directories.
Examples:
$$0^F Does DIR:NAME1 UP
$$^F Still does DIR:NAME1 UP
FOOBAR$$^F Changes default dir to FOOBAR and does DIR:NAME1 UP
DOWN$$0^F Changes no defaults (now FOOBAR), does DIR:NAME1 DOWN
:RENAME <file>,<newname> or ^O <file>,<newname>
changes the specified file's name. Only the FN1 and FN2 can be
renamed, so the second argument to :RENAME must not contain a device
name or an SNAME.
:TPL <file>
queues the file for printing on the line printer. Ref also :TPLN.
:COPY <oldfile>,<newfile> or ^R <oldfile>,<newfile>
makes a new file containing the same data as an old one. The new
file's creation date is made the same as the old one. When you are
typing in <newfile>, the defaults are set to <oldfile>, but to its
ACTUAL name, rather than to the name you typed. Thus, if you gave
FOO > for <oldfile>, then the default for <newfile> might be FOO 4.
Thus, it is easy to copy a file keeping the same version number.
After the :COPY, the filename defaults revert to <oldfile>, as it
was specified, in case you want to delete it or copy it to other
places. See also th program INSTALL, which is useful for copying
a file from one machine to one or more other machines. Also ref
the :COPYN command.
:MOVE <old file>,<new file>
This is like :COPY, except that it deletes the old one when it's done.
It defaults the filenames like :COPY does, as well.
:LINK <newlink>,<linked to>
creates a "link", which is a type of file that actually contains the
name of another file to use instead. If RMS;MIDAS MID is the name of
a link that points at MIDAS;MIDAS >, then any program that tries to
read RMS;MIDAS MID will actually read MIDAS;MIDAS >. Such a link
could be created by :LINK RMS;MIDAS MID,MIDAS;MIDAS >. Deleting or
overwriting RMS;MIDAS MID will remove the link itself, but not touch
the file MIDAS;MIDAS > linked to. :LINK sets the defaults for future
commands from <newlink>, not from <linked-to>. If <newlink> already
exists, :LINK will refuse to work, thus preventing accidental deletion
of a file. :LINKN is an equivalent command that doesn't check, and
can be used to replace a file with a link. Because many inexperienced
users have assumed that ":LINK" set up a com link between terminals,
if ..DELWARN is set to 3, :LINK and :LINKN are disabled with warning
messages. :LINKF ("F" for "File"), however, is the same as :LINK, and
will still exist. It does give a warning message, but does not abort
out of it.
The commands :SFDATE, :SFAUTH, :SFREAP, and :SFDUMP set various
attributes of a file: its creation date, its author's name, its
don't-reap bit, and its backed-up-on-tape bit. The commands ^T, ^T,
^T, ^U, ^U, and ^U control "filename translations". See the
reference section for those commands. The :REAP command marks a file
as unimportant, and worthy of deletion as soon as it is backed up on
mag tape. There are several commands for handling microtapes:
:UINIT, :ASSIGN, :DESIGN, and :FLAP. Since microtapes are hardwarily
and softwarily unreliable on the ITS systems, their use is
discouraged.
File: DDT, Node: Programs, Previous: Files, Up: Top, Next: Jobs
Running Programs with DDT
The simplest way to tell DDT to run a system program is to use the
program's name as a colon command; for example, :TECO<cr> will load
and start a copy of the text editor TECO. Of course, this will not
work for a program whose name is identical to the name of one of DDT's
built-in colon commands (such as the DUMP program). DDT looks for the
program to be loaded as a file named TS <prgm name>, on any of several
disk directories: the user's home directory first, then the several
system program directories. The command :NFDIR (which see) can be
used to add any other directories to the list.
Once the other program is loaded and started, DDT gives it control
of the terminal. Commands typed on the terminal will all go to the
other program and not to DDT. DDT will not read any more commands
until the program decides to "return to DDT" or gets a fatal error.
However, you can at any time tell DDT to seize control and stop the
program by typing ^Z (CALL, on TV's). ^Z acts instantaneously, and
makes no attempt to be sure that the program has finished acting on
the last command you gave it. If you tell TECO to write out your
file, it is your responsibility to wait until the TECO says it is done
before typing ^Z; otherwise the file may not really exist yet.
If you don't want to wait, you might prefer to use ^_D (Control-_
followed by D; on TV's, Control-CALL), which stops the program only
when the program "tries to read" the ^_D. Thus, the program will
not be stopped until it finishes processing all previous input.
So you can type the ^_D in advance, as well as commands for DDT
to execute after the ^_D takes effect.
Every user should know about the INFO program for perusing
documentation files. Do :INFO<cr> and follow the instructions, which
will teach you how to find the topic you are interested in. The INFO
program is one of the two places to look for documentation on a
program; the other is the .INFO.; directory (See File Manipulation)
which contains the older documentation written before :INFO existed.
As described above, every program resides in a job, which is
identified by its UNAME and its JNAME. All the jobs created by DDT to
run programs in are "inferiors" of the DDT's job; their UNAMEs are
the same as DDT's, which was set by logging in, and their JNAMEs are
normally the same as the names of the programs that were run in them.
Thus, if user FOO runs TECO, it will be loaded into a new job named
FOO TECO. He can also do :DDT<cr> to load an "inferior DDT" into the
job FOO DDT, and that DDT can then do anything that the top-level DDT
in the job HACTRN can do (except log out). The name of a program,
such as TECO, is often used as a concrete noun to refer to jobs
running copies of it, as in "Now kill your LISPs and start another
TECO".
Running one program has no effect on any other jobs the user may
have, with other programs in them. Thus, after doing :TECO<cr>, using
^Z to get back to DDT, and doing :LISP<cr>, there will be two inferior
jobs: TECO and LISP. LISP will be running, and will have the
terminal; TECO will be stopped. The next section of this manual
tells how to go back to using the TECO again (with the :JOB and
:CONTINUE commands).
When running a program, it can be given arguments by putting them
between the program name and the <cr>. For example, :MIDAS FOO<cr>
would run the MIDAS assembler and give it the string "FOO" as an
argument. Programs treat their arguments in various ways; in this
example, MIDAS would assemble the file FOO > and call the binary FOO
BIN. Some programs ignore their arguments entirely.
What happens if :TECO<cr> is done when there is already a job named
TECO? That question is complicated, because the user has several
options. The best way to explain them is to describe several other
commands for running programs, which differ from :<prgm><cr> mainly in
what they do in this problematical situation.
The command <prgm>^H will run <prgm> if it isn't already loaded,
but simply simply give control back to an existing copy of <prgm> if
there is one. It can be thought of as giving control to the program
<prgm>, after loading it if necessary. The command <prgm>^K, on the
other hand, always loads a fresh copy of <prgm>, and destroys any old
copy. For naive users (see ..CLOBRF and :LOGIN), ^K asks for
confirmation when it is about to destroy a program. Note that "old
copy" really means "anything in a job named <prgm>". TECO^K when
there is already a job named TECO will overwrite whatever is in that
job, no matter what program it was. :RETRY <prgm><cr> is equivalent
to ^K, but makes it possible to specify an argument between <prgm> and
the <cr>. Finally, there is :NEW <prgm><cr>, which always loads a
fresh copy of the program, but never overwrites any old one! It does
this by choosing for the new job a JNAME that isn't in use yet. If
there is a job named TECO already, :NEW TECO<cr> will load another
copy of TECO into a job named TECO0; if TECO0 too is already in use,
it will make a job called TECO1, etc.
So what does :<prgm><cr> itself do when a job <prgm> exists? It
acts either like :RETRY <prgm><cr> or like :NEW <prgm><cr>, according
to a switch that the user can set (..GENJFL -- see the reference
section). Normally, :NEW is chosen, but for naive users :RETRY is
done instead, on some machines. That is to prevent them from
unwittingly making many copies of programs.
The commands to run programs have features that can be used to load
programs from any directory, and to request loading of the program's
symbols. The latter is useful mainly when the program is to be
debugged. See the reference section "Colon Commands" for full
details.
File: DDT, Node: Jobs, Previous: Programs, Up: Top, Next: Returning
Job Manipulation
After using the commands :<prgm>, :NEW, ^K, or ^H of the previous
section to load programs, one might want to start them and stop them,
and eventually get rid of them. DDT has commands for all of those
operations.
Jobs in ITS are arranged into trees. Each job is either
"top level" or has a specific "superior" job. A job can have up to
eight "inferiors"; it is their superior. The HACTRN job is always
top-level, and the jobs created by it are its inferiors (unless DDT
disowns them - see :DISOWN). DDT is capable of examining any job in
the system, but full control (starting, stopping, and depositing in
memory) is available only for direct inferiors. Even indirect
inferiors (inferiors of DDT's inferiors, etc.) can only be examined.
In order to act on a job, DDT must know which of the up to eight
jobs it has it should act on. For brevity of typing, the commands
don't say which job. Instead, most of them act implicitly on the job
DDT calls the "current" job. The :JOB command can be used to make any
of the existing jobs current, so it can be operated on:
:JOB <jname> or <jname>J
if DDT knows about a job named <jname>, makes the job current.
Otherwise, if such a job actually exists (presumably not a direct
inferior of DDT, since DDT always keeps track of those) DDT will
henceforth know about it. If it was a disowned job (see :DISOWN), and
the top of a tree (disowned jobs too can have inferiors), it is
"reowned", which means that it becomes DDT's inferior. In that case,
":REOWNED" is printed. If there is no job at all with the name
<jname> (and the same UNAME as DDT, of course), DDT will create an
inferior with that name. A job created in this way has 1K (1024.
words) of core (all zero), and no symbols. Its uses might include
explicitly loading a program into it, or depositing instructions with
DDT and executing them.
Whenever the new current job is not a direct inferior of DDT, DDT
types a "#" to tell the user. Whenever :JOB selects a job that DDT
didn't already know about, "!" is typed.
:JOB or J
picks a new current job "conveniently". If DDT knows about any jobs
other than the current one, one of those others becomes current. Its
name is printed out inside an J command, so that the user can see
which job DDT chose. Jobs that need attention (are "waiting to return
to DDT" because they have received fatal interrupts) are chosen first.
Repeated J commands will choose different jobs, and won't return to
any job until all the other jobs have been current. Thus, repeated
J's are an easy way to visit all of DDT's jobs.
Once a job is current, it can be acted on with these commands:
:CONTINUE or P
makes the current job resume running, and gives it control of the
terminal. DDT stops reading commands, and type-in goes to the program
in the current job instead. Hardly anyone uses or talks about the
long form of this command or the following one, so everyone should
know the short forms P and ^P. P undoes the effect of stopping a
job with ^Z (remember that ^Z stops a job and makes DDT take back
control of the terminal). Thus, after using a program, ^Z goes "back
up to DDT", and P can then be used to go "back down into the
program". If the current job is already running, but without the
terminal (see :PROCEED below), P just gives it the terminal.
:PROCEED or ^P
makes the current job resume running, but DDT keeps control of the
terminal. The job's program is not allowed to read from or type on
the terminal, but as compensation DDT continues to read commands even
while the job is running. If you should change your mind and decide
to give the terminal to the program, use P. A ^P'd job will keep
running even if DDT no longer considers it current; therefore, ^P can
be used to make several programs run at once. If ^P is done on a job
that is already running (eg, it has been ^P'd already), it has no
effect.
^P is not the only way to make a job run without the terminal, but
it is the most common way, so jobs running without the terminal are
often described as "^P'd" regardless of how they actually got that
way.
^P
causes the current job to run without the terminal, like ^P, except
that it IS allowed to type out. It can't read anything, however;
instead, DDT continues to read commands. Use this for a job which
you expect will type out briefly and infrequently in the middle of
its processing, so you can let it run while using the terminal
primarily with another job. Only one thing inhibits ^P'd jobs from
typing out; that is when the terminal belongs, not to DDT, but to
another inferior which has the 40 bit set in its ..URANDM word.
The bit can be set by the user (by deposit commands) or with
a .VALUE instruction.
^X
stops the current job, assuming it was ^P'd. ^X is analogous to ^Z --
they both leave a job in the same state -- but they are effective in
different situations: ^Z stops a job that DOES have the terminal,
while ^X stops a job that DOESN'T have the terminal. The reason that
they both exist is that ^Z is an ITS command, that tells ITS to stop
whatever job has the terminal, while ^X is a DDT command, and can't be
obeyed by DDT if DDT has given the terminal away and isn't paying any
attention to it.
:KILL or ^X.
"kills" the current job. It ceases to exist, and any data in it is
lost. Be sure not to kill a TECO without filing away any information
being edited in! The short form ^X does not take effect until a
period is typed, because it is so dangerous. After killing a job, DDT
tries to find a new current job by doing an J without argument. The
new current job's name is printed inside an J (select job) command,
as in ":KILL TECOJ", showing that the job TECO is now current (DDT
often says what it is doing by printing the very commands that the
user could give to request what DDT did).
<job>$^X
kills the job named <job>. It asks for confirmation by typing
"--Kill--"; a space tells it to go ahead. Whether you confirm the
killing or not, the current job afterward is the same as it was before
(unless it was the one you killed).
Although DDT can handle up to eight jobs at once, it is good
usership to kill jobs that are no longer needed to free their
resources for others. Some programs will commit suicide after
finishing their work; when that happens, DDT informs the user by
printing out ":KILL " just as if the user had killed the program
explicitly.
The :MASSACRE command kills all your jobs.
:LISTJ or V
prints a list of all the jobs DDT knows about. Each job gets its own
line, which contains the job's JNAME, status, and job number. The
current job is indicated by a "*" at the front of its line. A job's
status is usually "P" if it is stopped (proceedable) and "R" if it is
running; other states include "-" meaning "never started" (P isn't
allowed), and W meaning "interrupted and waiting to return to DDT".
Example:
TECO P 34
* DEBUG - 25
SRCCOM R 7
TECO is stopped, DEBUG has never been started, and SRCCOM is running.
See the reference section for more details. For users on slow
terminals, the J command prints out just the line describing the
current job.
:START or G
starts a job at the starting address of the program in it, unlike P,
which starts a job where it last stopped. Many programs do something
useful if they are started at their starting addresses after running
for a while. For example, a TECO that is hung can be made usable
again in that way, without losing any of the data being edited. The
G command is useful also after explicitly loading a program into a
job with L.
When DDT creates a job, it gives the job the name of your working
directory (in the variable .SNAME, which ref). Most programs will use
that variable as the default SNAME for files they reference. Of
course, many allow the SNAME to be specified explicitly in their
commands. The working directory name is known as the MSNAME (for
"Master SNAME"), and it is used also for many other purposes, to be
described when they are relevant (ref ..MSNAME). For convenience's
sake, 0^F is equivalent to <msname>^F; it lists the working
directory. The MSNAME can be set explicitly:
:CWD <new msname> or <new msname>^S
sets the MSNAME to <new msname>. Any jobs created subsequently will
be passed <new msname> as the default SNAME to use. Jobs that already
exist will not be affected. The MSNAME is to be distinguished from
the HSNAME, or home directory, which is initialized the same way
as the MSNAME but which is not changed by :CWD. Most programs do
not refer to the HSNAME; it is used for finding files that "belong to
you", such as your RMAIL file.
:CWD <return> or ^S
Reset your MSNAME to be your HSNAME.
:UJOB <uname> <jname>
Selects the specified job (which can be any job in the system) for
examination. If the job is disowned, it will have it's UNAME
changed to your UNAME and will be reowned. Otherwise it will
remain a foriegn job, i.e. can be examined but not modified or
proceeded.
:FJOB <uname> <jname>
Is just like :UJOB, except the job will never be reowned. Use
this if you ONLY wish to examine the job, but not touch it.
:FJOB <jname>
:FJOB with only one argument assumes the <uname> is your own
UNAME, and is otherwise identical to :FJOB with two arguments.
:JOBP <jname>
returns 0 if the job exists, non-zero otherwise.
:SELF
Selects the DDT executing it as the current job, regardless of
JNAME. :JOB HACTRN isn't adaquate because the DDT may be running
as an inferior, with a different JNAME (say, "DDT), so init files
need a different mechanism.
File: DDT, Node: Returning, Previous: Jobs, Up: Top, Next: Arithmetic
Returning Control to DDT from an Inferior Job
When DDT runs a program, it gives control of the terminal to that
program. From then on, DDT expects that your commands are intended
for the program instead of for DDT. Three things can change DDT's
mind:
The program can get into severe trouble
The program can tell DDT that it is finished
You can insist, by typing ^Z or ^_D.
If any of those three happens, DDT takes the terminal back from the
inferior job and resumes reading commands. We say that the job has
"returned to DDT" (which does not imply that the return was
voluntary). To inform the user of what has happened, DDT prints a
description of the job's status and why the it returned to DDT. The
conditions that can cause the job to return are called "fatal
interrupts", and each one has a name. DDT usually simply prints the
names of whichever fatal interrupts happened, but DDT understands some
interrupts more and can provide a more hand-tailored response.
When a job returns to DDT, DDT's actions depend on the reason for the job's
return. If the job is returning because it requested to do so, DDT simply does
whatever the program wanted it to do (but the user can disable this; ref
..PERMIT). In this case, DDT is likely just to print a "*" indicating
completion of a command, or ":KILL " indicating that the job decided
it was done or useless, and DDT got rid of it. If the job returned
because it tried to read past a ^_D, DDT just types a "[DDT]". If the
job was stopped by a ^Z, DDT normally prints [DDT], but if ..C.ZPRT is
set to zero, or if the job is stopped for an error, DDT prints a
message containing the job's PC and the next instruction it will
execute if P'd. This information is provided for debugging's sake,
and you should not be worried by it.
105) JRST 105
is the sort of message DDT prints when a program is stopped with a ^Z
(or a ^X!).
ILOPR; 0>> 0
indicates that the program ran into trouble: namely, an ILOPR
(illegal operation, in this case executing a zero). In general, the
">>" indicates that the program encountered an error, and the type of
error is named. A complete list of error condition names can be found
in the reference section "Returning to DDT".
Instructions which cause errors are usually "aborted", which means
that any side effects are undone and the PC is left pointing at the
instruction itself (instead of the next one). As a result, the
instruction printed by DDT is not only the next to be executed, but
also the one responsible for the problem. An unfortunate exception is
the PDLOV (stack overflow or underflow) error, which does not abort
the instruction; either the offending instruction is the one before
the instruction printed, or the .JPC (address of last jump
instruction) points to it.
If you see other names in parentheses, as in
ILOPR; (REALTM;) 0>> 0
they are names of other non-fatal interrupts which are pending for the
job. They are printed for debuggers' convenience, and have no
necessary relationship to the reason the job returned.
If a program has been ^P'd and is running without control of the
terminal, that doesn't stop it from getting into trouble or finishing,
and then trying to return. But since the terminal is being used for
DDT or some other program, DDT doesn't allow the program to return
just yet. Instead, the program has to wait, and in a :LISTJ or V
its status will be "W" for "waiting". DDT announces this development
to the user with a message such as "Job <jname> interrupting: ILOPR",
"Job <jname> finished", or "Job <jname> wants the TTY", or something