NAME ar -- archive
SYNOPSIS ar key afile name1 ...
DESCRIPTION ar maintains groups of files combined into a single archive file. Its main use is to create and update library files as used by the loader. It can be used, though, for any similar purpose.
is one character from the set drtux, option ally concatenated with v. afile is the archive file. The names are constituent files in the archive file. The meanings of the key characters are:
d means delete the named files from the archive file.
r means replace the named files in the archive file. If the archive file does not exist, will create it. If the named files are not in the archive file, they are appended.
prints a table of contents of the archive file. If no names are given, all files in the archive are tabled. If names are given, only those files are tabled.
u is similar to r except that only those files that have been modified.are replaced. If no names are given, all files in the archive that have been modified will be replaced by the modi fied version.
x will extract the named files. If no names are given, all files in the archive are extracted. In neither case does x alter the archive file.
v means verbose. Under the verbose option,
gives a file-by-file description of the making of
a new archive file from the old archive and the
constituent files. The following abbreviations
are used:
£ copy
a append
d delete
r replace
x extract
FILES /tmp/vtma, vtmb ... temporary
SEE ALSO ld
DIAGNOSTICS Bad usage , afile -- not in archive format
cannot open temp file", "name -- cannot open ,
11/3/71 AR (I)
name -- phase error , name -- cannot create , no archive file , cannot create archive file , name - not found
BUGS Option 1 (table with more information) should be impl ement ed.
There should be a way to specify the placement of a new file in an archive. Currently, it is placed at the end.
NAME as -- assembler
SYNOPSIS as name1
DESCRIPTION as assembles the concatenation of name1, .... as is based on the DEC-provided assembler PAL-11R [references], although it was coded locally. Therefore, only the differences will be recorded.
for use
In as the character ";" is a logical new line; several operations may appear on one line if separated by ; · Several new expressions opera tors have been provided:
left shift
remainder (no longer means register") one's complement
result has value of left, type of right For example, location 0 (relocatable) can be writ ten 0^. ; another way to denote register 2 is "2 2^r0
All of the preceding operators are binary; if a left operand is missing, it is taken to be 0. The ! operator adds its left operand to the one's complement of its right operand.
There is a conditional assembly operation code different from that of PAL-11R (whose condition als are not provided):
.. .
. end if
If the expression evaluates to non-zero the sec tion of code between the ".if" and the ·endif is assembled; otherwise it is ignored. ".if" 5 may be nested.
Temporary labels like those introduced by Knuth [reference] may be employed. A temporary label is defined as follows:
11/3/71
where n is a digit 0 ... 9. Symbols of the form "nf" refer to the first label n: following the use of the symbol those of the form "nb refer to the last n: · The same n may be used many times. Labels of this form are less taxing both on the imagination of the programmer and on the symbol table space of the assembler.
The PAL-11R opcodes ".eot and ",end" are redun dant and are omitted.
sp
pc
ac
mq
div
mul
lsh
ash
nor
c sw
are predefined with appropriate values. The sym bol csw refers to the console switches.
is the relocation constant and is added to each relocatable symbol; normally it is 40000(8); it may be changed to assemble a section of code at a location different from that in which it will be executed.
It is illegal to assign a value to · less than its current value.
The new opcode "sys is used to specify system calls. Names for system calls are predefined. See the section on system calls for their names.
Strings of characters may be assembled in a way more convenient than PAL-11's ".ascii operation (which is, therefore, omitted). Strings are included between the string quotes "(" and ">":
Escape sequences exist to enter non graphic and other difficult characters. These sequences are also effective in single and double character constants introduced by single (') and double (") quotes respectively.
T newline (012)
\0 NULL (000)
\> >
\t TAB (011)
\\ \
The binary output of the assembler is placed on the file a.out in the current directory. a.out also contains the symbol table from the assembly and relocation bits. The output of the assembler is executable immediately if the assembly was error-free and if there were no unresolved exter nal references. The link editor ld may be used to combine several assembly outputs and resolve global symbols.
The multiple location counter feature of PALIIR is not supported.
The assembler does not produce a listing of the source program. This is not a serious drawback; the debugger db discussed below is sufficiently powerful to render a printed octal translation of the source unnecessary.
FILES /etc/as2 pass 2 of the assembler
a.tmpl temporary
a.tmp2 temporary
a.tmp3 temporary
a.out object
SEE ALSO ld, nm, sh, un, db, a.out (format of output)
DIAGNOSTICS When an input file cannot be read, its name fol lowed by a question mark is typed and assembly ceases.
When syntactic or semantic errors occur, a single-character diagnostic is typed out together with the line number and the file name in which it occurred. Errors in pass I cause cancellation of pass 2. The possible errors are:
) parentheses error ] parentheses error
* Indirection (*) used illegally
B Branch instruction has too remote an ad dress
F error in local ( or "b") type symbol
G Garbage (unknown) character
M Multiply defined symbol as label
0 Odd-- word quantity assembled at odd
11/3/71 AS (I)
P Phase error-- · different in pass 2 from pass I value
BUGS Symbol table overflow is not checked.
NAME
SYNOPSIS DESCR IPT ION
FILES
SEE ALSO
DIAGNOST ICS BUGS
|
sh rc /usr/b/rc name
B is a language suitable for system programming. It is described is a separate publication B reference manual.
The canned shell sequence in /usr/b/rc will com pile the program name.b into the executable file a.out. It involves running the B compiler, the B assembler, the assembler and the link editor. The process leaves the files name.i and name.s in the current directory.
name.b, name.i, name.s.
/etc/bc, /etc/ba, /etc/brtl, /etc/brt2,
/etc/bilib, /etc/libb.a, B reference manual. see B reference manual
There should be a B command.
|
NAME bas bas basic
SYNOPSIS [file]
DESCRIPTION bas is a dialect of basic. If a file argument is provided, the file is used for input before the console is read.
bas accepts lines of the form:
statement
Integer numbered statements (known as internal statements) are stored for later execution. They are stored in sorted ascending order. Non- numbered statements are immediately executed. The result of an immediate expression statement (that does not have '=' as its highest operator) is printed.
Statements have the following syntax: (expr is short for expression)
expr
The expression is executed for its side effects (assignment or function call) or for printing as described above.
don e
draw is used to draw on a 611-type storage scope through a TSP-i plotter interface. The coordinates of the scope face are zero to one in both the x and y directions. (Zero,zero being the lower left corner.) The expressions are evaluated and design at- ed X, Y, and Z. A line is drawn from the previous X, Y to the new X, Y · If Z is non-zero, the line is visible, otherwise theline is invisible.
for name expr expr statement
for name expr expr
...
next
The for statement repetatively executes a statement (first form) or a group of state ments (second form) under control of a named variable. The variable takes on the value of the first expression, then is incremented by one on each loop, not to exceed the value of the second expression.
11/3/71
expr
The expression is evaluated, truncated to an integer and execution goes to the corresponding integer numbered statment. If executed from immediate mode, the inter nal statements are compiled first.
__ The statement is executed if the expression evaluates to non-zero.
list is used to print out the stored inter nal statements. If no arguments are given, all internal statements are printed. If one argument is given, only that internal statement is listed. If two arguments are given, all internal statements inclusively between the arguments are printed.
print expr
The expression is evaluated and printed.
The expression is evaluated and the result is passed back as the value of a function call.
r run
The internal statements are compiled. The symbol table is re-initialized. The random number generator is re-set. Control is passed to the lowest numbered internal statement.
Expressions have the following syntax:
name
A name is used to specify a variable. Names are composed of a letter ('a' - 'z') followed by letters and digits. The first four characters of a name are significant.
number
A number is used to represent a constant value. A number is composed of digits, at most one decimal point (".") and possibly a scale factor of the form e digits or e- digits.
( expr )
Parentheses are used to alter normal order
Common functions of two arguments are
abbreviated by the two arguments separated by an operator denoting the function. A complete list of operators is given below.
expr £ [expr [~ expr ...)) Functions of an arbitrary number of argu ments can be called by an expression fol lowed by the arguments in parentheses separated by commas. The expression evalu ates to the line number of the entry of the function in the internally stored state ments. This causes the internal statements to be compiled. If the expression evalu ates negative, an builtin function is called. The list of builtin functions appears below.
name expr [~ expr ...] 1.
Arrays are not yet implemented.
The following is the list of operators:
= is the assignment operator. The left operand must be a name or an array element. The result is the right operand. Assign ment binds right to left, all other opera tors bind left to right.
& (logical and) has result zero if either of its arguments are zero. It has result one if both its arguments are non-zero. (logical or) has result zero if both of its arguments are zero. It has result one if - either of its arguments are non-zero.
The relational operators (< less than, <= less than or equal, > greater than, >= greater than or equal, == equal to, K> not equal to) return one if their arguments are in the specified relation. They return zero otherwise. Relational operators at the same level extend as follows: a>b>c is the same as a>b&b>c.
+
arg
exp
log
sin
co s
atn
rnd
int
FILES
The following is a list of builtin functions:
Arg(i) is parameter
|
call.
|
the value of the ith actual on the current level of function
|
Exp(x) is the exponential function of x.
Log(x) is the logarithm bas e of x.
Sin(x) is the sine of x (radians).
Cos(x) is the cosine of x (radians).
|
the arctangent of x. (Not
Rnd() is a uniformly distributed random number between zero and one.
expr
Expr() is the only form of program input. A line is read from the input and evaluated as an expression. The resultant value is returned.
Int(x) returns x truncated to an integer.
/tmp/btma, btmb
|
temporary
|
SEE ALSO
|
DIAGNOST ICS
|
BUGS
|
Syntax errors cause the incorrect line to be typed with an underscore where the parse failed. All other diagnostics are self explanatory.
|
Arrays [] are not yet implemented. In general, program sizes, recursion, etc are not checked, and cause trouble.
|
11/3/71
|
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOST ICS
BUGS
OWNER
|
BCD (I)
|
bcd - binary coded decimal conversion bcd [ string J
bcd will convert a string into GECOS card code. If no argument string is provided, will read a line and convert it.
dmr
|
11/3/71
NAME
BUGS
SYNOPSIS DESCR IPT ION
|
/etc/boot
logically a command, and is kept in /etc only to lessen the probability of its being in voked by accident or from curiosity. It reboots the system by jumping to the read-only memory, which contains a disk boot program.
|
FILES
|
SEE ALSO
|
boot procedure
|
DIAGNOSTICS
Should obviously not be executable by the general user. Also, it should reboot in a more direct manner. The mechanism invoked by jumping to the ROM loader is sensitive to the contents of the console switches, which makes the whole procedure even more dangerous.
Rather than jumping to the ROM, boot should simu late the ROM action with 173700 in the switches. In this manner, It may be used when the switches are not. set, and even in installation without a
ROM.
NAME
SYNOPSIS
DESCRIPTION
|
cat -- concatenate and print cat file1
cat reads each file in sequence and writes it on the standard output stream. Thus:
|
cat file
is about the easiest way to print a file. cat filel file2 >file3
is about the easiest way to concatenate files.
If no input file is given cat reads from the standard input file.
|
Also:
|
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
|
pr, cp
none; if a file cannot be found it is ignored.
|
11/3/71
NAME
chdir -- change working directory
SYNOPSIS DESCRIPTION
|
chdir directory
directory becomes the new working directory.
|
Because a new process is created to execute each command, would be ineffective if it were written as a normal command. It is therefore recognized and executed by the Shell.
FILES
|
SEE ALSO
|
sh
|
DIAGNOST ICS BUGS
|
NAME
check -- file system consistency check
SYNOPSIS DESCRIPTION
FILES
SEE ALSO
DIAGNOST ICS
BUGS
|
check [ filesystem [ blockno1 ... ] ]
check will examine a file system, build a bit map of used blocks, and compare this bit map against the bit map maintained on the file system. If the file system is not specified, a check of both /dev/rf 0 and /dev/rkO is performed. Output in cludes the number of files on the file system, the number of these that are 'large', the number of used blocks, and the number of free blocks.
/dev/rf0, /dev/rkO
find
Diagnostics are produced for blocks missing, duplicated, and bad block addresses. Diagnostics are also produced for block numbers passed as parameters. In each case, the block number, i-number, and block class (i = ide, indirect, f free) is printed.
The checking process is two pass in nature. If checking is done on an active file system, ex traneous diagnostics may occur.
The swap space on the RF file system is not ac counted for and will therefore show up as 'miss ing'.
|
NAME
SYNOPSIS DESCRIPT ION
|
chmod octal file1
The octal mode replaces the mode of each of the files. The mode is constructed from the OR of the following modes:
|
40 set-UID
Only the owner of a file may change its mode.
FILES
|
SEE ALSO
DIAGNOSTICS
BUGS
|
stat, ls
|
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
|
chown owner file1 ...
owner becomes the new owner of the files. The owner may be either a decimal UID or a name found in /etc/uids.
Only the owner of a file is allowed to change the owner. It is illegal to change the owner of a file with the set-user-ID mode.
/etc/uids
stat
|
DIAGNOST ICS BUGS
|
NAME
SYNOPSIS DESCRIPTION
|
cmp file1 file
The two files are compared for identical con tents. Discrepancies are noted by giving the offset and the differing words.
|
FILES
SEE ALSO
|
DIAGNOSTICS
|
BUGS
|
Messages are given for inability to open either argument, premature EOF on either argument, and incorrect usage.
|
If the two files differ in length by one byte, the extra byte does not enter into the compari son.
|
NAME
cp -- copy
SYNOPS IS
DESCRIPTION
|
file11 file12 21 file22
Files are taken in pairs; the first is opened for reading, the second created mode 17. Then the first is copied into the second.
|
FILES
|
SEE ALSO
|
cat, pr
|
DIAGNOST ICS
|
BUGS
|
Error returns are checked at every system call, and appropriate diagnostics are produced.
|
The second file should be created in the mode of the first.
|
A directory convention as used in mv should ba adopted to £2.
|
11/3/71
NAME
SYNOPSIS
DESCRIPTION
FILES
SEE ALSO
DIAGNOSTICS
BUGS
OWNER
|
date -- print the date date
The current date is printed to the second.
sdate
dmr
|
NAME
SYNOPSIS DESCRIPTION
|
db [ core [ namelist ] ]
Unlike many debugging packages (including DEC's ODT, on which db is loosely based) db is not loaded as part of the core image which it is used to examine; instead it examines files. Typical ly, the file will be either a core image produced after a fault or the binary output of the assem- bler. Core is the file being debugged; if omit ted core is assumed. namelist is a file con taining a symbol table. If it is omitted, a out is the default. If no appropriate name list file can be found, db can still be used but some of its symbolic facilities become unavailable.
The format for most db requests is an address followed by a one character command.
Addresses are expressions built up as follows:
1. A name has the value assigned to it when the input file was assembled. It may be relocatable or not depending on the use of the name during the assembly.
2. An octal number is an absolute quantity with the appropriate value.
3. An octal number immediately followed by r is a relocatable quantity with the ap propriate value.
4. The symbol "." indicates the current pointer of db. The current pointer is set by many requests.
5. Expressions separated by "+" or (blank) are expressions with value equal to the sum of the components. At most one of the com ponents may be relocatable.
w
|
6. Expressions separated by - form an ex pression with value equal to the difference to the components. If the right component is relocatable, the left component must be relocatable.
7. Expressions are evaluated left to right. Names for registers are built in:
|
... rS
|
rO
sp pc
|
ac
mq
These may be examined. Their values are deduced from the contents of the stack in a core image file. They are meaningless in a file that is not a -core image.
If no address is given for a command, the current address (also specified by ".") is assumed. In general, . points to the last word or byte printed by ~.
There are db commands for examining locations interpreted as octal numbers, machine instruc tions, ASCII characters, and addresses. For numbers and characters,.either bytes or words may be examined. The following commands are used to examine the specified file.
/ The addressed word is printed in octal.
\ The addressed byte is printed in octal.
The addressed word is printed as two ASCII characters.
The addressed byte is printed as an ASCII character.
The addressed word is multiplied by 2, then printed in octal (used with B programs, whose addresses are word addresses).
? The addressed word is interpreted as a machine instruction and a symbolic form of the instruction, including symbolic ad dresses, is printed. Usually, the result will appear exactly as it was written in the source program.
& The addressed word is interpreted as a sym bolic address and is printed as the name of the symbol whose value is closest to the addressed word, possibly followed by a signed offset.
<nl> (i. e., the character "new line") This command advances the current location
if if
counter · and prints the resulting loca tion in the mode last specified by one of
This character decrements ".' and prints the resulting location in the mode last selected one of the above requests. It is
It is illegal for the word-oriented commands to have odd addresses. The incrementing and decre- menting of "·" done by the (nl> and requests is by one or two depending on whether the last com mand was word or byte oriented.
The address portion of any of the above commands may be followed by a comma and then by an expres sion. In this case that number of sequential words or bytes specified by the expression is printed. . is advanced so that it points at the last thing printed.
There are two commands to interpret the value of expressions.
- When preceded by an expression, the value of the expression is typed in octal. When
not preceded by an expression, the value of
is indicated. This command does not
" "
: An attempt is made to print the given ex pression as a symbolic address. If the expression is relocatable, that symbol is found whose value is nearest that of the expression, and the symbol is typed, fol lowed by a sign and the appropriate offset. If the value of the expression is absolute, a symbol with exactly the indicated value is sought and printed if found; if no matching symbol is discovered, the octal value of the expression is given.
The following command may be used to patch the file being debugged.
I This command must be preceded by an expres sion. The value of the expression is stored at the locaton addressed by the current value of . . The opcodes do not appear in the symbol table, so the user must assemble them by hand.
The following command is used after a fault has caused a core image file to be produced.
$ causes the contents of the general regis ters and several other registers to be printed both in octal and symbolic format. The values are as they were at the time of the fault.
11/3/71
The only way to exit from db is to generate an end of file on the typewriter (EoT character).
FILES
SEE ALSO DIAGNOSTICS
BUGS
OWN ER
|
as; core for format of core image.
"File not found,, -- if the first argument cannot be read; otherwise ?".
Really, db should know about relocation bits, floating point operations, and PDPII/45 instruc tions.
dmr
|
NAME
dbppt -- dump binary paper tape
SYNOPSIS DESCRIPT ION
FILES
SEE ALSO
|
dbppt name [ output ]
dbppt produces binary paper tape in UNIX standard format, which includes checksums and a zero- suppression feature. File name is dumped; if the argument is not given, output goes to / dev/ ppt.
/d ev/ppt
lbppt to reload the tapes. bppt for binary paper tape format.
|
DIAGNOST ICS BUGS
|
11/3/71AR (i)
11/3/71AS (I)
AS (I)
11/3/71AS (I)
11/3/71B (I)
11/3/71BAS (I)
BAS (I)
11/3/71BAS (I)
11/3/71BAS (I)
BOOT (I)
11/3/71CAT (I)
CHDIR (I)
11/3/71CHECK (I)
11/3/71CHMOD (I)
11/3/71CHOWN (I)
11/3/71CMP (I)
11/3/71CP (I)
11/3/71DB (I)
11/3/71DB (I)
11/3/71DB (I)
11/3/71DBPPT (I)
OWNERken, dmr
Expon eniat ion.
OWNER ken
OWNER ken
ken, dmr
OWNERken, dmr
OWNERken, dmr
OWNERken, dmr
OWNERken, dmr
OWNER dmr
OWNERken, dmr
OWNER ken