070 5925 00_4400_Series_Operating_Systems_Reference_Mar86 00 4400 Series Operating Systems Reference Mar86
User Manual: 070-5925-00_4400_Series_Operating_Systems_Reference_Mar86
Open the PDF directly: View PDF
.
Page Count: 330
| Download | |
| Open PDF In Browser | View PDF |
TEK
:1--·
Part No. 061-3@88 eo~
Product Group 07
OPERATING SYSTEM
REFERENCE MANUAL
_
\, c
_.~
l.:,-CO
NtFw ::p;.
4400 SERIES
OPERATING
SYSTEM
REFERENCE
()'lC?- S7"33 -aD
010
-S0C>:5. ~ of
a'lL' . SLD
, "-00
S 9'7..,S--
o~o-
() 10'
;s ~,c'l
-S'-' b "l.
- D~
~C"O
l.e t \-\ 00
4"; Y 0
'-l
CsfT, , D
\_(\ ~
f .1'--> '\1?f'. \- J\ eiL
,);: rz: ~ ~
(~, 'fi- PW{2..1Si !\J '-1£
r
,...) fi=" ~'if : C 'E" _
F~, t~J.-J)
''If () t\, b,~'·\ ~
",1
D.p
,. \i'f.
- t\J
(.;Wi \' ~i"i?w-)
Please Check for
CHANGE INFORMATION
at the Rear of This Manual
'St Printing MAR 1986
Tektronix~
' - /\ J\
t 'cl:'t!' ,,' \
f',J:::::,"1--1\
\ 1"'Tb~_
~
Copyright 1986 by Tektronix, Inc., Beaverton, Oregon. Printed in the
United States of America.
All rights reserved.
Contents of this
publication may not be reproduced in any form without permission of
Tektronix, Inc.
TEKTRONIX is a registered trademark of Tektronix, Inc..
Smalltalk-80 is a trademark of Xerox Corp.
UniFLEX is a registered trademark of Technical Systems Consultants,
Inc.
Portions of this manual are reprinted with permission of the copyright
holder. Technical Systems Consultants, Inc., of Chapel Hill, North
Carolina.
The operating system software copyright information is embedded in the
code. It can be read via the "info" utility.
WARRANTY
FOR
SOFTWARE PRODUCTS
Tektronix warrants that this software product will conform to the specifications set forth herein, when used
properly in the specified operating environment, for a period of three (3) months from the date of shipment, or
if the program is installed by Tektronix, for a period of three (3) months from the date of installation. If this
software product does not conform as warranted, Tektronix will provide the remedial services specified
below. Tektronix does not warrant that the functions contained in this software product will meet
Customer's requirements or that operation of this software product will be uninterrupted or error-free or
that all errors will be corrected.
In order to obtain service under this warranty, Customer must notify Tektronix of the defect before the
expiration of the warranty period and make suitable arrangements for such service in accordance with the
instructions received from Tektronix. If Tektronix is unable, within a reasonable time after receipt of such
notice, to provide the remedial services specified below, Customer may terminate the license for the
software product and return this software product and any associated materials to Tektronix for credit or
refund.
This warranty shall not apply to any software product that has been modified or altered by Customer. Tektronix
shall not be obligated to furnish service under this warranty with respect to any software product a) that is
used in an operating environment other than that specified or in a manner inconsistent with the Users
Manual and documentation or b) when the software product has been integrated with other software if the
result of such integration increases the time or difficulty of analyzing or serviCing the software product or the
problems ascribed to the software product.
TEKTRONIX DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE. TEKTRONIX' RESPONSIBILITY TO PROVIDE REMEDIAL SERVICE WHEN
SPECIFIED, REPLACE DEFECTIVE MEDIA OR REFUND CUSTOMER'S PAYMENT IS THE SOLE AND
EXCLUSIVE REMEDY PROVIDED TO CUSTOMER FOR BREACH OF THIS WARRANTY. TEKTRONIX
WILL NOT BE LIABLE FOR ANY INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
IRRESPECTIVE OF WHETHER TEKTRONIX HAS ADVANCE NOTICE OFTHE POSSIBILITY OF SUCH
DAMAGES.
PLEASE FORWARD ALL MAIL TO:
Artificial Intelligence Machines
Tektronix, Inc.
P.O. Box 1000 M.S. 60-405
Wilsonville, Oregon 97070
Attn: AIM Documentation
MANUAL. REVISION STATUS
PRODUCT:
4400 SERIES OPERATING SYSTEM REFERENCE
This manual supports the following versions of this product: 4404 Version 1.5, 4405 Version 1.1, and
4406 Version 1.1 •
REV DATE
MAR 1986
DESCRIPTION
Original Issue
4400 OPERATING SYSTEM REFERENCE
Table Of Contents
SECTION 1 INTRODUCTION
ABOUT THIS MANUAL
WHERE TO FIND INFORMATION
MANUAL SYNTAX CONVENTIONS
1-1
1-1
1-2
SECTION 2 USER COMMANDS
addpath
2-2
alias
2-3
asm ........................................................................................................................................... 2-4
backup ...................................................................................................................................... 2-6
cc ............................................................................................................................................ 2-14
chd .......................................................................................................................................... 2-16
commset ................................................................................................................................. 2-18
compare .................................................................................................................................. 2-20
conset
2-22
copy
2-24
crdir
2-28
create ...................................................................................................................................... 2-30
date
2-32
debug ...................................................................................................................................... 2-34
dir
2-43
dirs
2-47
dperm ...................................................................................................................................... 2-48
dump ..................................................... '................................................................................. 2-50
echo ....................................................... ,................................................................................. 2-52
edit
2-53
exit ........................................................ ', ................................................................................ 2-56
env
2-57
fdup
2-58
file type ...................................................,................................................................................ 2-59
find
2-60
format ...................................................................................................................................... 2-63
free
2-64
headset .................................................................................................................................... 2-66
help
2-70
history ..................................................................................................................................... 2-72
info
2-73
2-75
int
2-79
jobs
libgen .....................................................'................................................................................ 2-80
libinfo .....................................................'................................................................................ 2-82
2-84
link
2-86
list
2-88
load
login ....................................................................................................................................... 2-93
logout ..................................................................................................................................... 2-95
2-96
move
2-99
page
password .............................................................................................................................. 2-100
Table of Contenl4\-1
pat:1:l ......................................................................................................................................
perms ...... ............................. ...... ..... ........................ ........ ........................ ....... ............. .... ......
popd .....................................................................................................................................
pushd ................................... ................................ ........... ............. ..... ........................ ............
relinfo .................. ,................................................................................................................
remote ..................................................................................................................................
remove .................................................................................................................................
rename ..................................................................................................................................
restore .................................................... ........................ ......... ............... ....... ...... ..... ............
script ....................................................................................................................................
set .........................................................................................................................................
shell............. ........... ........ ............. ........... ......... ......... ............... ........................ .....................
status .............................. .................. ................... ........... .......... ........ .... ............... ......... ........
stop .......................................................................................................................................
strip ......................................................................................................................................
tail ........................................................................................................................................
touch ................... .................... .... ............................................ ........... .... .................. ............
unalias ..................................................................................................................................
unset .....................................................................................................................................
update ............................. ....... ................. .................... .... ....... ........................ .......................
wait ......................................................................................................................................
2-102
2-103
2-106
2-107
2-108
2-110
2-112
2-115
2-117
2-123
2-138
2-139
2-148
2-152
2-153
2-154
2-155
2-157
2-158
2-159
2-162
SECTION 3 SYSTEM UTILITIES
SYSTEM UTILITY DESCRIPfIONS .................................................................................... 3-1
adduser .......... ............. ......... ...... ........... .......................................... ........................................ 3-2
badblocks ................... ......... .................................................. ............... .................. ................ 3-4
blockcheck ............. ......... ................... ........... ......... ..................................... ......... .................. 3-5
deluser ....... ...... ....... ...... ........................ ..... ................. ........... ................................................. 3-6
devcheck ............................. ...... ............................................ ............. ............... .... ..... ............ 3-8
diskrepair .......................................................... ............................... .................................... 3-10
fdncheck ............................................................................................................................... 3-22
makdev ............ ....... .............................................................................................................. 3-23
mount ................................................................................................................................... 3-26
owner ................................................................................................................................... 3-28
unmount ............................................................................................................................... 3-30
SECTION 4 edit
INTRODUCfION ...................................................................................................................
SYNTAX .................................................................................................................................
CALLING THE EDITOR .. ........ ... ...... ............................. .......................... ...................... .......
Calling t:1:le Editor with a File Name ......................................................................................
Calling the Editor wit:1:l Two File Names ...............................................................................
Options ...................................................................................................................................
OPERATING SYSTEM INTERFACE ...................................................................................
Backspace Character ..............................................................................................................
Escape Character ...................................................................................................................
Line Delete Character ............................................................................................................
Horizontal Tab Character ......................................................................................................
Control-D: Keyboard Signal for End-of-File ........................................................................
Control-C: Keyboard Interrupt ..............................................................................................
Table of Contents-2
4-1
4-1
4-1
4-1
4-2
4-2
4-3
4-3
4-3
4-4
4-4
4-4
4-4
Control-: Quit Signal
THE EDITOR'S USE OF DISK FILES
Creating a New File
Editing an Existing File
Command Input From a File
F ataI Errors
EDITOR COMMANDS
Using Strings
Specifying a Column Number
Using the Don't-Care Character
The Command Repeat Character
Using the EOL Character
Using Tabs
Length of Text Lines
Commands
ENVIRONMENT COMMANDS
dkl
dk2
esave
eset
header
kl
k2
lkl
Ik2
numbers
renumber ............................................ "................................................................................ .
set ....................................................... "................................................................................ .
tab
verify
zone .....................................................,................................................................................ .
SYSTEM COMMANDS
abort
edit
log
stop
u
wait
4-4
4-5
4-5
4-5
4-6
4-6
4-6
4-6
4-8
4-8
4-9
4-9
4-9
4-10
4-10
4-11
4-11
4-11
4-12
4-13
4-13
4-14
4-14
4-15
4-15
4-16
4-16
4-17
4-18
4-18
4-19
4-20
4-20
4-20
4-21
4-21
4-22
4-22
x .......................................................................................................................................... . 4-23
4-24
CURRENT LINE MOVERS
4-24
bottom
find ...................................................................................................................................... . 4-24
4-25
next
4-26
position
4-26
top
4-27
EDITING COMMANDS
append .................................................................................................................................. 4-27
break .................................................................................................................................... 4-28
change .................................................................................................................................. 4-29
4-30
cchange
Table of Contents-3
copy ......................................................................................................................................
delete ....................................................................................................................................
expand ..................................................................................................................................
insert ....................................................................................................................................
insert ....................................................................................................................................
merge ...................................................................................................................................
move ....................................................................................................................................
overlay .................................................................................................................................
overlay .................................................................................................................................
print ......................................................................................................................................
replace ..................................................................................................................................
text .......................................................................................................................................
null .......................................................................................................................................
DISK COMMANDS ..............................................................................................................
flush .....................................................................................................................................
new .......................................................................................................................................
read ......................................................................................................................................
write .....................................................................................................................................
EDITOR MESSAGES ...........................................................................................................
4-30
4-31
4-32
4-33
4-34
4-35
4-35
4-36
4-37
4-37
4-38
4-39
4-39
4-40
4-40
4-40
4-41
4-42
4-43
SECTION 5 TERMINAL EMULATION
OVERVIEW ............................................................................................................................
Descri ption ..................................................................................... ............... .... .....................
Compliance With ANSI and ISO Standards ........................................................................
Compatibility with t11e DEC VT-I00 ..................................................................................
Compatibility with Tektronix Tenninals .............................................................................
Interface to the Operating System .........................................................................................
SUPPORTED ANSI COMMANDS ........................................................................................
Acknowledge Character (#6) ...............................................................................
Bell Character .......................................................................................................
Backspace Character ...............................................................................................
Character (#24) ....................................................................................................
Cursor Backward Tab ...........................................................................................
Cursor Horizontal Tab ........ .................... ............. ............................... ..................
Cursor Position Report ........................... ......... ........................ .............................
Carriage Return Character ......................................................................................
Control Representation Mode .............................................................................
Cursor Backward .................................................................................................
Cursor Down .................... ......... .......................... .......................... ..... ..................
Cursor FOlWard ........ ........................ ..... ........................................................... .....
Cursor Position .....................................................................................................
Cursor Up .............................................................................................................
Device Attributes ....................................................................................................
Character (#17) .....................................................................................................
Character (#18) .....................................................................................................
Character (#19) .....................................................................................................
Character (#20) .....................................................................................................
Delete Character ... ........... ......... .............................................. ...... ............. ..........
Character (# 127) .... ............. ........... ..... .................................................. ................
Delete Line ..............................................................................................................
Table of Contents-4
5-1
5-1
5-1
5-2
5-2
5-2
5-3
5-3
5-3
5-3
5-3
5-4
5-4
5-4
5-5
5-5
5-5
5-6
5-6
5-6
5-7
5-7
5-7
5-8
5-8
5-8
5-8
5-9
5-9
Character (#16) ..................................................... ~ ............................................... 5-9
Disable Manual Input ......................................................................................... ,. 5-9
Device Status Report .......................................................................................... 5-10
Erase Character ....... ......... ..... ........ ......... .... ... .......... .............. ............... ...... ........ 5-10
Erase in Display .................................................................................................... 5-11
Erase in Line .................................................................................................... ..... 5-11
Character (#25) ........ ..... ............. ................... ....... ...... ........................ ................... 5-11
Enable Manual Input ........... ....... ................. ........................................................ 5-12
Character (#5) .................................................................................................... 5-12
Character (#4) ..................................................................................................... 5-12
Character (#27) ................................................................................................... 5-12
Character (#23) ................................................................................................... 5-12
Character (#3) ..................................................................................................... 5-13
Form Feed Character ............................................................................................. 5-13
Character (#28) .......................................................................................... ............ 5-13
Character (#29) ..................................................................................................... 5-13
Horizontal Tab Character ...................................................................................... 5-13
Horizontal Tab Set ...................................................................................... ........ 5-14
Horizontal and Vertical Position ........................................................................ 5-14
Insert Character ........................................................................................... ... ..... 5-14
Insert Line .......................................................... ..................................................... 5-14
Index ............................................... ................................................................ ..... 5-15
Insertion/Replacement Modt~ .............................................................................. 5-15
Keyboard Action Mode ..................................................................................... 5-15
Line Feed Character .............................................................................................. 5-16
Line-Feed/New-Line Mode ............................................................................... 5-16
Character (#21) ........................................................................................ ~ ......... 5-16
Next Line ................. ......... .................................................................................. 5-16
Character (#0) .................................................................................................... 5-17
Private Use 1 ....................................................................................................... 5-17
..................................................................................................... 5-17
Reverse Index .... .... ...... ........... ....... ................. ......... .... ....... ................. ........... ... ..... 5-17
Reset to Initial State ..... ................................................................................ ........ 5-18
Reset Mode .......................................................................................... ~ ............... 5-18
Character (#30) ...................................................................................................... 5-19
Select Character Set ............................................................................................ 5-20
................................................................................................................... 5-20
Select Graphic Rendition .................................................................................... 5-21
Shift In Character ..................................................................................................... 5-22
Set Mode ................................................................................................................ 5-22
Shift Out Character ................................................................................................ 5-23
Character (#1) ...................................................................................................... 5-23
Space Character ...................................................................................................... 5-24
Send/Receive Mode ........................................................................................... 5-24
Character (#2) ..................................................................................................... 5-24
Character (#26) ................................................................................................... 5-24
Character (#22) ................................................................................................... 5-25
Tabulation Clear ................................................................................................. 5-25
Auto-Repeat Mode .................................................................................... 5-25
Auto-Wrap Mode ..................................................................................... 5-26
Table of Contents-5
Block Cursor Mode (Select Cursor) .......................................................
Blinking Cursor Mode ............................................................................
Cursor Key Mode ......................................................................................
Graphic Cursor Position Report ............................................................
Identify Terminal ...........................................................................................
Keypad Application Mode ......................................................................
Keypad Numeric Mode ...........................................................................
Mouse Button and Graphic Cursor Position Reporting ........................
ANSI Terminal Emulator Mouse Button and Position Reporting ...................................
Origin Mode .................................................................................................
Restore Cursor .. ......... ............. ......... ...... ......... ............... ........................... .....
Request Terminal Parameters ...... ...... ... ........ ..... ...........................
Request Graphic Cursor Position Report ................................................
Save Cursor ...................................................................................................
Screen Mode ...........................................................................................
Select Graphic Cursor Report Type ......................................................
Set Top and Bottom Margins ..................................................................
Character (#31) .....................................................................................................
Vertical Tab Character ..........................................................................................
KEYBOARD DETAILS ......... .................... ........ ....... ................................. ...........................
Shift, Ctrl, and Caps Lock Keys ..........................................................................................
Default ANSI Mode Meanings of Keys ... ...... ......... ............................................ ................
Alphanumeric Keys ...........................................................................................................
Numeric Pad Keys .............................................................................................................
Joydisk Keys ........ ...... ........................................................................................................
Function Keys ............ ............. ........... ... .......... ... ...... ......... ...... ..... ...... ... .......... ........... ..... ...
Special Function Keys .......................................................................................................
5-26
5-26
5-27
5-28
5-28
5-28
5-28
5-29
5-30
5-31
5-31
5-31
5-32
5-32
5-32
5-33
5-33
5-34
5-34
5-34
5-34
5-35
5-35
5-37
5-38
5-38
5-39
SECTION 6 ACCESSING SYSTEM RESOURCES
INTRODUCTION ................................................................................................................... 6-1
DEVICE DRIVERS ....... .......................................................................................................... 6-1
SCSI Peripherals .................................................................................................................... 6-1
Console Device .......... ............. ..... ................................ ..... ..................................................... 6-1
Communications Port ............................................................................................................ 6-2
Sound Generator .......... ............. ...................... ............................................................. .......... 6-2
Controlling the Sound Device ............................................................................................. 6-2
Idev/sound Operation and Commands ................................................................................. 6-2
Frequency Control ... .................... .... ............. ... ........ ..... ........ ... ...... ............. ............. ... ....... 6-3
Controlling Attenuation ..................................................................................................... 6-3
Controlling the Noise Generator .... ............. .................................................................... ... 6-4
Control Registers . .............................................................................................................. 6-5
Sound Examples .................................................................................................................... 6-6
Printer Port ................. .................. ...... ............... ..... ...... ............. ..... ...... ... ...... .... ........... ........ 6-10
Other Devices .. .......... ..... .......... ..... .... ............... ..... ........... ...... ..... .... ........... ...... ....... ......... ... 6-10
DISPLAY, MOUSE, AND KEYBOARD SUPPORT .......................................................... 6-11
Cursor and Mouse Tracking ..... ... ........... ............................................................. ............. ... 6-11
FLOATING POINT SUPPORT ............................................................................................ 6-11
Appendix A 4404 HARDWARE DEPENDENCIES
DISPLAY SUPPORT ............................................................................................................. A-I
Table of Contents-6
Display Panning ............ ....... ...... ........ ...... ...... .... ..... ...... ............. ......... ........... ......... ...... ....... .
MEMORY USE ......................................................................................................................
Overall Address Space ..........................................................................................................
Physical Memory ..................................................................................................................
Display Memory ...................................................................................................................
1/0 and ROM Memory Space ...............................................................................................
Processor Board I/O ..........................................................................................................
Peripheral Board I/O .........................................................................................................
A-I
A-3
A-3
A-3
A-3
A-3
A-4
A-4
Appendix B 4405 HARDWARE DEPENDENCIES
DISPLAY SUPPORT .............................................................................................................
Display Panning ....................................................................................................................
MEMORY USE ......................................................................................................................
Overall Address Space ..........................................................................................................
Physical Memory ..................................................................................................................
Display Memory ...................................................................................................................
1/0 and ROM Memory Space ...............................................................................................
Processor Board I/O ...........................................................................................................
Peripheral Board I/O ...................... "..................................................................................
B-1
B-1
B-3
B-3
B-3
B-3
B-3
B-4
B-4
Appendix C 4406 HARDWARE DEPENDENCIES
DISPLAY SUPPORT ..............................................................................................................
MEMORY USE .......................................................................................................................
Overall Address Space .......................................................... ......................................... ........
Physical Memory ...................................................................................................................
Display Memory ....................................................................................................................
1/0 and ROM Memory Space ................................................................................................
Processor Board I/O ...........................................................................................................
Peripheral Board I/O ..........................................................................................................
C-l
C-I
C-I
C-I
C-2
C-2
C-2
C-2
Figures
A-I. 640 X 480 Window Into 1024 X 1024 Bit-Map. .. .......................................................... A-2
B-1. 640 X 480 Window Into 1024 X 1024 Bit-Map. .. .......................................................... B-2
Examples
4-1..
4-2..
4-3..
4-4..
4-5..
.......................................................................................................................................
.......................................................................................................................................
.. .....................................................................................................................................
.......................................................................................................................................
.......................................................................................................................................
4-28
4-34
4-36
4-37
4-39
Tables
2-1 POSSIBLE INTERRUPTS ............................................................................................. 2-77
2-2 I/O Redirection ........... .......................... .... ............... ............. ..... ............... .... ..... ...... ... ... 2-126
2-3 SHELL EDITING KEYS AND FUNCfIONS ............................................................. 2-140
2-4 I/O Redirection ............................... ".... .... ............. ....... .... .... ........... ............... ... ........ ...... 2-144
2-5 shell COMMANDS ........................................................................................................ 2-145
Table of Contents-7
2-6 roSSIBLE TASK PRIORITIES ................................................................................... 2-148
3-1 System Utilities ....... ............. ........... ............. ........... ..... ...... ........... ........... ........... ......... ..... 3-1
3-2 Major Device Numbers ................................................................................................... 3-23
5-1 Parameter Meanings ........................................................................................................ 5-10
5-2 Valid Reset Mode Parameters ......................................................................................... 5-19
5-3 Character Set Selection ................................................................................................... 5-20
5-4 Set Mode Parameters ....................................................................................................... 5-23
5-5 Alternate Joydisk Meanings ............................................................................................ 5-27
5-6 Keypad Application Mode Key Meanings ...................................................................... 5-29
5-7 Mouse Button Reports ..................................................................................................... 5-30
5-8 ANSI Meanings of Alphanumeric Keys .......................................................................... 5-35
5-9 Applications Mode (TEKKPAM) Meanings of Keypad Keys ........................................ 5-37
5-10 ANSI Joydisk Key Meanings ........................................................................................ 5-38
5-11 ANSI Meanings of FUnction Keys ............................................................................... 5-38
5-12 ANSI Meanings of Special Function Keys ................................................................... 5-39
6-1 Frequency Selection (BYTE 1) ......................................................................................... 6-3
6-2 Frequencey Selection (BYTE 2) ....................................................................................... 6-3
6-3 Attenuation Control .......... .................. .......... ................ ................... ............. ..... ................ 6-4
6-4 Attenuation Byte Bit Assignments .................................................................................... 6-4
6-5 Noise Feedback Control .................................................................................................... 6-4
6-6 Noise Frequency Control ................................................................................................... 6-5
6-7 Noise-Control-Byte Bit Assignments ................................................................................ 6-5
6-8 Control Register Addresses ............................................................................................... 6-5
Table of Contents-8
~)ection
1
INTR~ODUCTION
ABOUT THIS MANU~~L
This manual is the primary user's and programmer's reference to the 4400 operating system and
hardware support. This manual contains summaries of the commands and utilities included with
your 4400 as standard software, and a summary of how to invoke and use each command. This
manual does not attempt to show you how to put commands together to perfonn a task; that
infonnation is covered in the 4400 User's Manual. The User's Manual also contains a complete
list of the other manuals available for thl~ 4400 series.
This manual has the following sections:
• User Commands
• System Utilities
• Text Editor
• Tenninal Emulation
In addition, the appendices contain information about the hardware of the 4400 series of products.
WHERE TO FIND INF'ORMATION
You have several important sources of information on the 4400:
• This manual, the 4400 Series Operating System Reference manual, contains the syntax and
details of commands and utilities. This manual also contains details about a text editor and
a remote terminal emulator.
• The 4400 Series Assembly Language Reference manual contains the details of the
assembler and linking loader.
• The 4400 Series C Language Refl~rence manual contains detail about the
language.
"c" programming
• The 4400 Users manual contains basic infonnation on system installation, startup,
installing software, and the other "how to put commands together" discussions. See the
index of the User's manual to find. how to perform particular tasks.
• The on-line "help" utility contains a brief description of the syntax of user commands.
• The Introduction to Smalltalk-80{tm) manual contains details and a short tutorial on the
Smalltalk-80 programming Iangu(llge.
• The reference manuals for the optional languages for the 4400 product family are also
available.
OPERATING SYSTEM REFERENCE
1-1
INTRODUCTION
MANUAL SYNTAX CONVENTIONS
Throughout this manual, the 4400 User's Manual, and in the on-line help files, the following
syntax conventions apply:
1.
Words standing alone on the command line are keywords. They are the words recognized
by the system and should be typed exactly as shown.
2.
Words enclosed by angle brackets ("<" and ">") enclose descriptions of variables that are
replaced with a specific argument. If an expression is enclosed only in angle brackets, it is
an essential part of the command line. For example, in the line:
addusr
you must specify the name of the user in place of the expression .
3.
Words or expressions surrounded by square brackets ("[" and "]") are optional. You may
omit these words or expressions if you wish.
4.
If the word "list" appears as part of a term, that term consists of one or more elements of
the type described in the term, separated by spaces. For example:
-
-
consists of a series (one or more) of file names separated by spaces.
Invoke and use each command. This manual does not attempt to show you how to put commands
together to perform a task; that infonnation is covered in the 4400 User's Manual.
1-2
!3ection 2
USER COMMANDS
You can use the commands and utilitic!s in this section from any user account. Some options,
however, require special privileges. These options are mentioned in the detailed description of
each command or utility.
OPERATING SYSTEM REFERENCE
2-1
USER COMMANDS
addpath
Add the specified directories to the search path of the shell. This is a shell command.
SYNTAX
addpath
DESCRIPTION
This addpath command, which is part of the shell program, adds the specified directories to the
search path of the shell. This is done by altering the shell environment variable PATH.
ARGUMENTS
list of directory names to add to the search path.
EXAMPLE
addpath fete
This example adds the directory tete to the shell search path, by adding the directory to the
environment variable PATH.
SEE ALSO
rmpath
set
shell
unset
2-2
USER COMMANDS
alias
alias
Defines or reports the list of alternate names (aliases) for a command sequence.
SYNTAX
alias []
[]
DESCRIPTION
The alias command, which is part of tht~ shell program, defines or reports the list of alternate
names (aliases) for a command sequence. With no arguments alias outputs the list of aliases
defined. If one argument is given the associated alias is printed. If two arguments are given then
the first is defined to be an alias for the second. Command line arguments are extracted via the
shell conventions.
ARGUMENTS
name of the alias.
may consist of combinations of utility commands and environment
variables surrounded by either single or double quotes (i.e. IIcopy $*"),
EXAMPLES
alias long 'dir +1 $* I page +30'
This example will create an alias long that will invoke the command dir +1, and pause every 30
lines until you press the space bar.
alias
This example will display the currently defined aliases.
SEE ALSO
shell
unalias
OPERATING SYSTEM REFERENCE
2-3
USER COMMANDS
asm
asm
The asm command is the MC68000/680 10 relocating assembler.
SYNTAX
asm [+befFlLnsStu]
(+o=]
DESCRIPTION
The asm command is used to assemble a program written in the standard 68000 instructions set.
The assembler accepts most of the standard mnemonics for instructions, and fully supports the
68000/68010/68020 instruction set. For more information, refer to 4400 Series Assembly
Language Reference.
ARGUMENTS
List of the names of files and directories to process. Default is the
working directory.
OPTIONS
b
Suppress binary output.
e
Suppress summary information.
f
Disable field formatting.
F
Enable fix mode. (Comments that begin with a semicolon, It;", are
assembled. )
Produce a listing of the assembled source.
L
Produce listing of input file during the first pass.
n
Produce decimal line numbers with the listing.
o=
Specifies the name of the binary file.
s
Produce a listing of the symbol table.
S
Limit symbols internally to 8 characters.
u
Classify all unresolved symbols as external.
2-4
USER COMMANDS
asm
EXAMPLES
asm asmfile
Assembles the source file asmfile and produces the relocatable binary file asmfile.r. The
assembler sends summary information to standard output, but produces no source listing. Any
errors detected are sent to standard outpUlt.
asm test.a +euo=test.r
Assembles the file test. a and produces the relocatable file test.r. No summary information is
produced, and all unresolved references are classified as external. If the assembler detects no
errors during the assembly, the user sees :no output from this command.
asm test.a test2.a test3.a +blns
Assembles the three files, but produces no binary output. A listing with a symbol table is sent to
standard output. The listing includes decimal line numbers.
SEE ALSO
4400 Series Assembler Language Programmer's Reference
OPERATING SYSTEM REFERENCE
2-5
USER COMMANDS
backup
backup
Copy files from the file system to the floppy device or streaming tape device.
SYNTAX
backup [+AbBCdlpr] [+a=days] [+t[=file_name]]
[] []
[+T[=]]
DESCRIPTION
The backup command is used to create and maintain archival backups of files or directories on
the system. It can operate in three distinct modes, selected by options: catalog mode, create
mode, and append mode. Catalog mode prints a list of the files on an existing backup. Create
mode copies the specified files or directories to the backup device, and destroys any data that is
already on the backup device. Append mode adds the specified files or directories to existing
files on the the backup device. Thus, it is possible to append, to an existing backup device, a file
whose path name is identical with one already backed up.
The backup command stores files and directories on the diskette (I devlfloppy) by default or on the
optional streaming tape drive (Idev/tapec). The backup command uses a unique file structure,
which is completely different from the standard operating system file structure. Therefore,
/deY/floppy or /dev/ tapec must not be mounted onto the file system using the mount command.
The only way to read devices written by backup is to use restore. The only other command that
you should use on a backup device is devcheck.
The backup diskette should be formatted before the back up operation begins. Although the file
structure created by the format command is destroyed by backup, the raw track formatting is
essential. During the back up process, you can request that backup formats diskettes before
writing to them. Do this by pressing f followed by Return, rather than Return when backup
prompts you to Hit C/R to continue:.
The backup tape may not be formatted, but the retensioning option rlt may be specified to avoid
reading-errors.
If
Backups may extend over more than one volume of the backup medium. There are no
restrictions on the sizes of files copied. If necessary, backup breaks files into segments and stores
each segment on a different volume.
As files are backed up, backup also stores the file owner ID number, permissions, and time/date
stamp of the file. This is used by restore when retrieving the files. After the files are restored,
they appear just as they were at the time of the backup. The user should be aware of several
potential problems.
First, it is possible for users with identical ID numbers to exist on different systems with different
names. Since only the owner ID number is saved with the file, not the owner's name, when the
file is restored, the apparent owner will be the name of the user in the password file that matches
the ID number. If the user ID number does not exist in the restoring system password file, the
owner of the file will be the ID number enclosed in double angle brackets, for example, «14».
Second, file permissions are respected during restore. If the restoring user does not have write
permission for a file, it will not be restored. One method to facilitate easy movement of files
2-6
USER COMMANDS
backup
among many machines is to always bac:kup and restore the files from the public user, which
exists on all machines. In any event, the user system can backup and restore any file as well as
change ownership and permissions.
ARGUMENTS
List of the nanles of files to process. Default is the working directory.
List of the nanles of directories to process.
-
-
If you specify a directory name as an argument in create or append mode, the program processes
only the files within that directory. If you also specify the "d" option, the program restores all
files within the given directory and its subdirectories.
OPTIONS
a=
Copy only those files that are no older than the specified number of days.
A value of 0 specifies files created since midnight on the current day; a
value of 1 specifies files created since midnight of the previous day, and so
forth.
A
Append to an existing backup.
b
Print sizes of files in bytes.
B
Do not back up files that end in .bak
C
Print a catalog of the files on an existing backup. If you specify "C", all of
the names in the are ignored.
d
Back up entire directory structures.
e
Erase entire streaming tape before any action.
u
It
•
List file names as they are copied.
p
Prompt user with each file name to determine whether or not the backup
procedure should bl~ performed on that particular file.
r
Retension streaming tape cartridge before any action. Using this option
may avoid reading errors from the streaming tape drive. This option must
be used in conjunction with the + T option.
t[=]
Back up only files that have been created or modified since the date in the
specified file. Whc:m the backup is finished, update the date in the file. If
you do not specify a file, the default is .backup.time.
T[=length]
Backup to the streaming tape instead of the floppy. The default parameter
for the tape length is 450 feet. To backup to a 300 foot tape, use +T=300.
With no options, backup is quiet. The "1" option allows you to see what the program is actually
doing.
If you specify the "t" option, but the .backup. time file specified as its argument does not yet exist,
backup copies all the files and directories listed on the command line. Thus, a user may obtain a
full backup (either without the "t" option or with a nonexistent backup time file) or a partial
OPERATING SYSTEM REFERENCE
2-7
USER COMMANDS
backup
backup, which includes only those files created or modified since the last backup_
2-8
USER COMMANDS
backup
EXAMPLES
backup +1
Backs up all files in the working directo:ry to the device Idevljloppy. The file names are listed as
they are copied to the device.
backup +ld fi1el fi1e2 dirl dir2
Copies (in order) the files filel and file2, then all files and sub-directories contained in the
directories dirl and dir2, listing the file names as they are copied.
backup +ld fi1el file2 dirl dir2 +a=5
Performs the same function as the previous example, except it copies only those files that are five
days old or less.
backup +It
Creates the same backup as the first exalmple, but only copies the files created or modified after
the time contained in the file .backup.time. If this file does not exist, all the files are copied and
the file .backup.time is created.
backup +lAt=backup_time
Adds a set of files to an existing backup. In particular, it adds exactly the files that were created
or modified since the creation of the fille backup_time. This is the most direct way to create
incremental backups of your files. The le:ngth of time between backups should reflect the amount
of activity you spend developing programs, etc.
backup +IT
Backs up all files in the working directory to the device Idevltapec. The file names are listed as
they are copied to the device.
OPERATING SYSTEM REFERENCE
2-9
USER COMMANDS
backup
NOTES
• When using append mode, the program appends files to the last volume, requesting
additional volumes as necessary. If there are many volumes in an existing set of diskettes,
place the last volume (diskette) in the backup device. In this case a message is issued
indicating the voulme is not the first and prompts for permission to continue. Respond
with a "y" and a CIR to the prompt. The program then appends files to that volume,
requesting new volumes as necessary.
• As files are backed up, backup makes an indication of the path name for each file. When
files are restored, the program uses the path name to place the file in its proper directory
location. If the path name is relative (i.e., does not begin with tit), the path name of the
restored directory is also relative. Thus, files backed up with a relative path name may be
restored to a directory location different from the one in which they were created.
An example should make this clear. If the working directory is backed up, either by
specifying no source files or by using the directory name".", the files are backed up with a
relative path of It.". When these files are restored, they are placed in the directory" .". This
directory might not be the same directory they originally came from. This feature allows
the manipulation of entire file systems in a general fashion. To specify a unique directory
location for a file, you should specify its entire path name, starting with If!".
MESSAGES
Backup to
Update backup on
These messages are printed when backup begins. They notify you of the function about to be
performed.
Several of the following messages prompt you for a positive or negative response. The program
interprets any response that does not begin with an upper or lowercase "nit as a positive response.
Copy (yin)?
If you specify the "pit option, the program prints this prompt before it takes any action. A
response of "n" or "Nit indicates that the operation should not be performed for the given file.
Any other response is interpreted as yes.
Device model name?
You should respond to this prompt with TEK4404.
2-10
USER COMMANDS
backup
Do you wish to abort append function and create a new backup?
This message is printed at the initiation of the append operating mode if an invalid header
(indicating a bad backup format) is detected. You can now abort from append mode and switch
to create mode.
Format program name?
This prompt is issued in response to a format request for the next diskette volume. It indicates
that the program could not find a format program name in the file IetcIJormat.control. You
should respond with format since you are backing up on a diskette. You can not format a
streaming tape cartridge.
Insert next volume -- Hit C/R to continue: .
This prompt is issued when the progranl needs a new backup diskette or tape cartridge. You
should type a carriage return only when the next device has been placed in the drive. When
creating new backups or when appending to an old backup, with diskettes, you may enter the
character tlf', followed by a carriage return. If the program is in append mode, it automatically
switches to create mode and starts a new backup. The tlf' indicates that the diskette has been
inserted in the drive, but that it must be formatted before continuing. In this case the program first
checks the file Ietc/format. control for a ftormat program name, and if found formats the diskette.
If it cannot find this file, it then prompts you for the format program necessary to format the
diskette. Subsequent format operations during this backup operation use the same information;
thus, all diskettes that were not previously formatted must have the same characteristics (e.g.
double-sided, double-density).
The program prints these messages as it takes the corresponding action during a creation
operation.
This is Volume # -- Expected Volume # -- Contin'--:
The program expects you to insert volum,es in sequential order. If a volume appears out of order,
backup prints this message. If you type a.nything except an tin" or an "N" as the first character of
the response to the message, backup ignores the fact that the volumes are out of order and
continues with the backup. Otherwise, it prompts you for another volume.
Volume name?
Each set of backup volumes has a name. You should enter a name that describes the contents, in
response to this prompt. The name may contain as many as 126 characters.
Volume of
When you are printing a catalog, whenever a new volume is inserted and properly validated the
program prints this message, which indicates the name of the backup volume and its sequence
OPERATING SYSTEM REFERENCE
2-11
USER COMMANDS
backup
number.
2-12
USER COMMANDS
backup
ERROR MESSAGES
*** Invalid Volume
Ht:ader -- Not a "backup" disk
***
The program validates each backup volurrle before using it. If this validation fails, the program
prints this message to indicate that something is wrong. You then have another chance to insert
the proper volume and continue. If validation fails while the program is in append mode, you
may abort from append mode and create a totally new backup instead.
Write error! - file
An 110 error occurred during the transfer of a file to the backup. An auxiliary message is printed
indicating the nature of the error: The program tries to recover from any error and continue.
backup: unknown options: '+'
The option specified by is not a valid option to the backup command.
**
**
**
**
Warning: directory is too large!
Some directories ~Tere ignored
Warning: directory is too large!
Some files were igrnored
The program uses some internal tables during the back up process. If the limits of these tables
are exceeded (highly unlikely), these messages are printed.
SEE ALSO
fonnat
restore
OPERATING SYSTEM REFERENCE
2-13
USER COMMANDS
cc
cc
Invoke the "c" compiler.
SYNTAX
cc [+acDfiIlLmMnNoOpPqrRsStUvwx]
[+l=] [+o=]
[+i=
-
-
List of the names of files and directories to process. Default is the working
directory.
OPTIONS
a
Produce as output assembly language source files with an .a extension and
stop.
c
Put comments in the assembly language file.
D [=] Command line "#define". This option must appear by itself.
f
Produce an output module suitable for firmware.
i=
Specify a directory for "#include" files. This option must appear by itself.
I
Produce as output intermediate language files with an ".i" extension and
stop.
l=
Specify a library name to be passed to the loader. This option must appear
by itself.
L
Produce a source listing and write it to standard output.
m
Produce load and module maps from the loader.
M
Leave the combined output as one" .r" file.
n
Run the first pass only, do not produce any output.
N
Produce a listing without expanding #include files.
o==
Specify the output file name.
o
Run the assembly language optimizer.
p
Use stand alone pre-processor.
p
Produce intermediate (.p) files and stop.
q
Produce code that does calculations on char and short variables without
first converting to into
2-14
USER COMMANDS
cc
r
Produce as output relocatable modules with an .r" extension and stop.
R
Produce as outpUlt relocatable modules with an
continues to produces an executable module.
t
Produce a shared-text, executable output module.
u
Produce a line-fee:d character ($OA) for "\n" rather than the default of
carriage return ($OD).
v
Show each phase of the compilation process (verbose mode).
w
Warn about duplicate n#define" statements.
II
It
.r" extension, and
Pass the options to the loader for processing.
For a full discussion of the "c" com.piler, refer to the manual 4400 Series C Language
Programmer's Reference.
NOTE
The "c" stand-alone pre-processor is the file /binlcpasses/cprep. If
you want to use it with anoth.er program, it takes its input from
stdin and writes its output to stdout.
EXAMPLES
cc blocks.c +0 +l=graphics
Compiles the program blocks.c, requesting the assembly language optimizer and passing the
library graphics to the loader.
cc labels.c +vLNr
Compiles the program lablels.c in verbose mode. The compiler produces a source listing,
without expanding any "#include" files, creating only a relocatable module labels.r.
cc access. c labels.:r +o=access
Compiles the source program access and the relocatable module labels.r producing a single
binary output file access.
cc rand.c +i=/mark/include +DTHROWS=300 +t +o=dice
Compiles the program rand.c, specifing a directory lmark/include for #include files and
specifying a command line define of TlfROWS to equal 300. A shared-text binary output file
dice is produced.
SEE ALSO
headset
load
OPERATING SYSTEM REFERENCE
2-15
USER COMMANDS
chd
chd
Change the user's working directory.
SYNTAX
chd []
DESCRIPTION
The ehd command, which is part of both the shell and script programs, changes the user's
working directory to the directory specified on the command line. If no directory is specified, the
default is the user's home directory (the directory entered on logging in). The user must have
execute permission in the directory specified.
ARGUMENTS
The name of the directory to use as the working directory. Default is the
user's home directory.
EXAMPLES
chd Imark
Changes the working directory to the directory lmark.
chd book
Changes the working directory to the directory book, which resides in the current working
directory.
chd
Changes the working directory to the user's home directory.
2-16
USER COMMANDS
chd
ERROR MESSAGES
Cannot change directories.
The operating system returned an error when the script program tried to change directories. This
message is preceded by an interpretation Clf the error produced by the operating system.
SEE ALSO
shell
script
perms
OPERATING SYSTEM REFERENCE
2-17
USER COMMANDS
commset
commset
Set or display the configuration of the communications port.
SYNTAX
cornmset []
DESCRIPTION
This utility allows you to examine or set certain I/O options on the RS-232 communications port.
With no argument, it reports the current setting of the options.
OPTIONS
The option strings are selected from the following set:
baud=nnn
=external
=nnnlmmm
=default
Set the transmit and receive baud rates. Valid values are 50, 75, 110, 134, 150, 300,
600, 1200, 1800, 4800, 9600, 19200 and 38400. The keyword external specifies that
the external clock should be used for the baud rate. The default of 9600 is used if the
keyword default is entered. If two values are entered, then the first specifies the
transmit rate and the second specifies the receive rate, otherwise both rates are set to
the same value.
flag=dtr
=input
=output
-inout
=none
=default
Set the type of flagging to be used. The keyword dtr specifies that the DTR and crs
signals should be used to flag input and output full conditions. The keywords input
and output specify that DC3/DC 1 (CTL-S/CTL-Q) flagging should be used for input
or output, respectively. The keyword inout specifies that DC3/DCl (CTL-S/CTL-Q)
flagging should be used for both input and output. The keyword none disables
flagging. The default is inout flagging.
2-18
USER COMMANDS
commset
parity =even
=odd
=high
=low
=none
=default
Set the type of parity to be used. The keyword even specifies that even parity be used.
The keyword odd specifies that odd parity be used. The keyword high specifies that
the parity bit should always be a one. The keyword low specifies that the parity bit
should always be a zero. The keyword none specifies that the parity bit is treated as
data. The default is low parilY.
stop=n
=default
Set the number of stop bits to be used. Valid values are 1 and 2. The default is one
stop bit.
crS=disable
=enable
Select whether to use the Clear-to-Send (CTS) data signal for communication
protocol. Disabling CTS me:ans to ignore the signal condition. With CTS enabled, a
CTS signal must be received before transmission is enabled.
reset
Reset the communications port, flushing any pending data and setting all options to
their default values.
show
Display the current settings for the options. This is the same as if no option is
specified.
C IMPLEMENTATION NOTES
The commset command uses the ttyset and ttyget system calls to communicate option settings to
the communications port device driver.
SEE ALSO
conset
Assembler Language Reference manual
OPERATING SYSTEM REFERENCE
2-19
USER COMMANDS
compare
compare
Compare two text files line by line and prints the differences.
SYNTAX
compare [+]
DESCRIPTION
The compare command compares two text files and indicates how they differ. The information
provided is usually sufficient to allow the user to change one file into the other. By default, the
compare command considers that it is in the same place in each of the files if three lines match.
The output from the command reports sets of lines which have been deleted from, added to, or
changed in either file. These messages are written from the point of view of how to change the
first file into the second file. For instance, the message
***** File lines deleted *****
-
-
means that if the lines following the message are deleted from , the two files will
be the same.
The program also reports the presence of additional lines in a file with the following message:
***** File lines inserted *****
This message means that if the lines following the message are inserted to , the
two files will be the same.
If a set of lines is deleted from one file and the following line is changed as well, compare reports
all those lines as lines that have been changed rather than inserted or deleted.
The compare command can handle files of any size, but can only process 250 lines at a time. If
the files differ in any spot by 250 lines, the program reports 250 lines changed in each file and
continues comparing them.
ARGUMENTS
The name of the first file to use.
The name of the file to compare to
OPTIONS
2-20
Use the integer as the number of matching lines required
before considering the files synchronized. The number specified must be
between 1 and 250, with a default of 3.
USER COMMANDS
compare
EXAMPLES
compare /michael/test /cathy/test
Compares the file test in the directory Imichael to the file test in the directory Icathy.
compare test test.bak +5
Compares the two files test and test.bak in the working directory. The window size for the
comparison is five lines.
ERROR MESSAGES
Syntax: compare [+]
The compare command expects two or three arguments. This message indicates that the
argument count is wrong.
OPERATING SYSTEM REFERENCE
2-21
USER COMMANDS
conset
conset
Set or display the configuration of the console port.
SYNTAX
conset
DESCRIPTION
The utility conset allows you to examine and set certain 110 options on the console port. With no
argument, it reports the current setting of the options.
OPTIONS
The option strings are selected from the following set:
+raw
-raw
Set or clear the raw mode.
+echo
-echo
Enable or disable character echoing.
+tabs
-tabs
Enable or disable automatic tab expansion.
+becho
-becho
Enable or disable spacelbackspace to erase on backspace.
+schar
-schar
Enable or disable single character mode.
+xon
-xon
Enable or disable CfRL-S/CfRL-Q (DC3/DC 1) flagging to suspend
output.
+any
-any
Enable or disable any character to restart suspended output.
+cml
-eml
Enable or disable RETURNs, to be displayed as returnlline-feed.
chardel=
n is a hex number specifying a character to be used as the delete character.
linedel =
n is a hex number specifying a character to be used as line delete character.
+screensave
-screensave
Enable or disable screen blanking after 10 minutes of inactivity.
2-22
USER COMMANDS
conset
+video
-video
Select normal video (black on white) or inverse video.
+cursor
-cursor
Select make graphic cursor visible or invisible.
+track
-track
Enable or disable graphic cursor tracking the mouse.
+mousepan
-mousepan
Enable or disable Jnouse panning of the viewport.
+diskpan
-diskpan
Enable or disable joydisk panning of viewport.
show
Display the curre:nt settings for the options. This is the same as if no
option is specified.
default
Restore default settings.
C IMPLEMENTATION NOTE:S
The conset command uses the ttyset and ttyget system calls to communicate the raw, echo, tabs,
becho, schar, xon, any, cmI, chardel and linedel option settings to the console port device driver
and it uses system traps to implement the: screensave, video, cursor, track, mousepan, and diskpan
options.
SEE ALSO
commset
OPERATING SYSTEM REFERENCE
2-23
USER COMMANDS
copy
copy
Copy a file or directory to the specified file or directory, or copy one or more files to the specified
directory.
SYNTAX
copy [+bBcdDlLnopPt]
copy [+bBcdDFlLMnopPt]
copy [+bBcdDFILMnopPt]
DESCRIPTION
Three forms of the copy command exist The first form makes a copy of a file and gives it the
specified name. The second form makes one copy of each specified file and places all copies in
the specified directory. The last component of each file name is preserved in the new directory.
The third form copies the contents of one directory to another.
In any case, if no file exists which has the same name as the name specified for the new copy, the
copy command creates one. If a file with that name already exists, it is deleted and recreated
before copying takes place. Thus, the original contents of the file is lost and replaced by the
contents of the file being copied. In addition, any links to the original file are broken.
The new file has the same permissions as the original file. The owner of the new file is always
the user who executes the command. The user must have execute permission in the directory in
which copies are to be made. He or she must also have write permission for the file being copied
to and, unless the "0" option is specified, in the directory that is to contain the new copy.
ARGUMENTS
The name of the file to copy.
The name of the new copy of the original file.
A list of the names of the files to copy to the specified directory.
The name of the source directory.
The name of the directory in which to place all copies.
2-24
USER COMMANDS
copy
OPTIONS
b
Do not copy a file u.nless it already exists in the destination directory.
B
Don't copy files ending in .bak.
c
Do not copy a file if it already exists in the destination directory. Cannot
be used with n.
d
Copy directory structure for all named directories.
o
ImpJicity specify 1he high level directory names. This option works
properly only in conjunction with the +d option. When used together with
+d, +D preserves the source directory structure within the destination
directory.
F
Copy/convert a directory to a regular file.
List the name of eac:h file as it is copied and the name of the new copy.
L
Do not unlink the destination file.
M
Convert RETURN/new-line to LINE-FEEO/new-Iine
n
Copy a file if it is newer than the copy in the destination directory. If no
copy exists, perforrrl the copy.
o
Retain original file ownership.
p
Prompt for permission to copy each file.
P
Preserve all the characteristics of the file - the modification time and the
ownership of the source file.
t
Do not copy source directory unless destination directory exists.
EXAMPLES
copy parts parts.bak
Copies the file named parts to a file named parts.bak. If a file named parts.bak already exists, it
is deleted and recreated before copying takl~s place.
copy letter /mark/letter +p
Copies the file letter in the working directory to the file lmarklletter. The copy command
prompts for permission to copy before proceeding. If the user denies permission, no copy is
made. For the command to succeed the user must have both write and execute permission in the
directory lmark as well as write permission for the file lmark/letter.
OPERATING SYSTEM REFERENCE
2-25
USER COMMANDS
copy
copy test_l test_2 memo /mark +10
Copies the files test_1, test_2, and memo to the directory /mark. The names of the new files are
Imarkitest 1, Imarkltest 2, and lmarkimemo. If a file with one of these names already exists, the
copy comiiland overwrites its contents without warning (the user does not need write permission
in the directory Imark). The name of each file and the name of the new copy are listed as copying
takes place. The command aborts immediately if it encounters an error (e.g., one of the files
listed does not exist).
Each copy created by these commands has the same permissions as the original file. The owner
of all copied files is the user executing the command.
copy dir_l /mark +dnolDLP
Copies the directory dir_1, and any sub-directories, to the directory /mark. For source files in
the destination directory a copy is made only if the source file is newer. the files are listed as
they are copied; preserving ownership, links, and modification times. The source directory
structure dir_1 will be preserved exactly in the directory /mark.
ERROR MESSAGES
Entry does not exist:
The user asked for a copy of a nonexistent file.
and are the same file
A file may not be copied onto itself. Both and refer to the same
file. (If their names are not the same, they are links to the same file.)
May not copy a directory:
The user asked for a copy of a directory. Directories may not be copied.
May not copy a special file:
The user asked for a copy of a block or character file. Such files may not be copied.
Must be a directory:
The form of the copy command being used requires the last argument to be an existing directory;
is not an existing directory.
Path cannot be followed:
One or more of the directories which make up the name of the file do not exist.
2-26
USER COMMANDS
copy
Permissions deny access to file:
The pennissions associated with or with the path leading to prevent
the user from accessing the file.
Read error on file:
A physical read error occurred while reading .
Syntax: copy [+bBcdDlLnopPt]
copy [+bBcdDFlLMnopPt]
The copy command expects at least two arguments. This message indicates that the argument
count is wrong.
Write error on file:
A physical write error occurred while writing to .
SEE ALSO
link
move
rename
OPERATING SYSTEM REFERENCE
2-27
USER COAIMANDS
crdir
crdir
Create a directory.
SYNTAX
crdir
-
-
DESCRIPTION
The crdir command creates a directory for each name listed as an argument to the command. The
user must have write permission in the directory in which the new directory is created. Each new
directory contains the entry tt.", which represents the directory itself, and the entry
which
represents its parent directory.
tf •• " ,
By default, crdir creates a directory with 7WXrwX permissions. However, any default permissions
set by the dperm command override these permissions. The owner may, of course, change the
permissions at any time by using the perms command.
ARGUMENTS
A list of the names of directories to create. All of the components of
the directory name (path name), except the last component, must
already exist.
EXAMPLES
crdir book
Creates the directory book in the working directory.
crdir /sarah/book
Creates the directory book in the directory Isarah. If the directory Isarah does not already exist,
the command fails.
2-28
USER COMMANDS
crdir
ERROR MESSAGES
Error creating :
The operating system returned an error when crdir tried to create the specified directory. This
message is followed by an interpretation of the error returned by the operating system.
Error linking to its . file:
The operating system returned an error when crdir tried to link the "." entry to the directory itself.
This message is followed by an interpretation of the error returned by the operating system.
Error linking .. to parent of :
The operating system returned an error when crdir tried to link the newly created directory to its
parent. This message is followed by an interpretation of the error returned by the operating
system.
Error setting owner for :
Initially, the crdir command creates the new directory with the owner system. It then changes the
owner to the user who executed the command. In this case, the operating system returned an
error when crdir tried to change the owner of the directory. This message is followed by an
interpretation of the error returned by the operating system.
Syntax: crdir
The crdir command expects at least one argument. This message indicates that the argument
count is wrong.
SEE ALSO
dperm
penns
remove
OPERATING SYSTEM REFERENCE
2-29
USER COMMANDS
create
create
Create an empty file for each file name on the command line.
SYNTAX
create
DESCRIPTION
The create command creates an empty file for each name specified on the command line. If the
file does not exist, it is created with rw-rw- permissions (unless altered with the dperm
command), and the owner is the user who executes the command. If the file already exists, the
owner and permissions remain intact However, the file is truncated to a length of O. You need
write permission in the directory that you are creating a new file.
ARGUMENTS
The name of the file to create. The last component of a file name may not
contain more than 55 characters. The create command ignores any
additional characters.
EXAMPLES
create test
Creates the file test in the user's working directory.
create /julie/test
Creates the file test in the directory Ijulie.
2-30
USER COMMANDS
create
ERROR MESSAGES
Error creating :
The operating system returned an error when create tried to create . This message is
followed by an interpretation of the error returned by the operating system.
Syntax: create
The create command requires at least one argument. This message indicates that the argument
count is wrong.
SEE ALSO
edit
OPERATING SYSTEM REFERENCE
2-31
USER COMMANDS
date
date
Display or set the time and date.
SYNTAX
date [ [-- [-
]]
:[:]
]
[+s]
DESCRIPTION
The date command has two fonns: with arguments and without. Any user may execute the date
command without any arguments. In response, the system returns the current date and time. The
user system may also use the date command with arguments to set the system date and time. If
the user system uses the +s option, the system reads the hardware clock and sets the date and time
accordingly.
ARGUMENTS
A number from 1 to 12 inclusive representing the month.
-
A number from 1 to 31 inclusive representing the day.
A two-digit number representing the last two digits of the year.
A number from 0 to 23 inclusive representing the hour. (Time must be
expressed as 24-hour-clock time.)
A number from 0 to 59 representing minutes past the hour.
A number from 0 to 59 representing seconds past the minute. The default
is O.
OPTIONS
s
2-32
The s option tells the system to set the system date from the internal
hardware clock.
USER COMMANDS
date
EXAMPLES
date 7-13-84 15:47:28
Sets the date to July 13, 1984, and the time to 3:47:28 P.M.
date 11:53
Sets the time to 11 :53 A.M. The date defaults to the date stored in memory and the value for
seconds defaults to zero.
date 7-13 17:5
Sets the date to July 13 and the time to 5:05 P.M. The value for the year defaults to the stored
value, and the value for seconds default:; to zero.
date
Displays the date and time currently stored in memory.
date +s
Sets the date and time to correspond to that in the system hardware clock.
ERROR MESSAGES
Invalid specified.
The value specified for the argument shown in the error message is not within the acceptable
range.
Only the system manager may change the date!
The user who tried to change the date is not the system manager.
Syntax: date [ [-- [ -
]]
: [ : ]
The syntax of the command line is incorrect. Most probably, the arguments specifying the time
are missing or mistyped.
OPERATING SYSTEM REFERENCE
2-33
USER COMMANDS
debug
debug
debug invokes a machine-language debugging system.
SYNTAX
DESCRIPTION
The debug command is used to aid in the testing and debugging of machine-language programs.
Because all programs are ultimately translated into machine language, any program may be
debugged using debug.
The debug command is used to examine or modify the image of a machine-language program.
This image can be (1) a post-mortem memory dump of a program which has been aborted by the
operating system, (2) a program image file, or (3) a program which is currently executing under
the control of debug. If no image file is specified on the command line, the default is the file
core in the working directory. The debug command examines the file to determine whether it is a
core image or an executable image file. If it is neither, debug issues the message Invalid image
type and terminates. The third type of image may be created only by specifying the name of an
executable image on the command line, followed by executing "x" command to create the
controlled task.
The commands available with debug allow the user to examine memory locations within the
program image, to modify memory locations, to set breakpoints, to execute single instructions (to
single step through the program), to examine and change registers, and more. Some commands,
such as single step, are applicable only when debug is being used to control the execution of a
task. However, most commands are available for use with all image types.
ARGUMENTS
The name of the file to debug. The default is the file core in the working
directory.
2-34
USER COMMANDS
debug
OPTIONS
The debug command normally works in an interactive environment. The basic command
structure is designed to be simple to use and to remember. In general, each command name is a
single character, which may be followed by one or more expressions.
Expressions may include the operators" +" and "_It, which are evaluated from left to right unless
parentheses are used. Expressions may also include any of the following terms:
$
The hexadecimal value of .
The hexadecimal value of . If this form is used, the number must
start with a digit. If it starts with a character, debug interprets it as a
symbol.
#
The decimal value of .
The value of the specified symbol. Symbol names must be completely
specified -
that is, all char characters are significant.
The contents of the specified register. The register may be DO through D7,
AO through A 7, SR, or PC. The letters used in specifying a register may be
either uppercase or lowercase. A It. tf means, the last memory address
accessed.
debug includes these commands:
+
Execute a shell cOlmmand.
Display the value of an expression in multiple formats.
?
Display the help rnenu.
b
Set a breakpoint.
B
List the breakpoinlts that are currently set.
c
Clear one or all brl!akpoints.
d
Dump a section of memory.
g
Continue execution of a program.
G
Execute the program until reaching a branch or a breakpoint.
Disassemble instructions.
I
Initialize symbol table.
k
Terminate the currently executing task.
K
Remove any pending signals for the controlled task.
m
Modify bytes in memory.
M
Display the current memory map.
n
Display the command line for the task.
q
Terminate debug.
r
Display the contents of all registers.
OPERATING SYSTEM REFERENCE
2-35
USER COMMANDS
debug
R
Set the contents of a register.
s
Execute a single instruction.
S
Set a temporary breakpoint at the instruction following the current
instruction and execute the current instruction.
T
Trace instructions until reaching a branch or a breakpoint.
x
Create a task to be executed under the control of debug.
A carriage return performs the same as the
Itt command, but with no
address.
The following paragraphs describe debug commands in more detail:
+
This command allows the user to execute a single shell command without exiting debug.
=
This command displays the value of the expression symbolically, in hexadecimal, and in decimal.
?
This command displays a menu of commands available from debug.
b []
The "b" command sets a breakpoint at the given location. When the program is executed, the
instruction at the given location is replaced by a special instruction which indicates to the
operating system that the user wants to break the flow of the program. When this instruction is
executed in the program, the operating system suspends the program and notifies debug, which
prints the location of the breakpoint and returns to command mode. If the user specifies a count,
the breakpoint is executed times before execution is halted and debug notified. Once the
count is exceeded, execution is halted every time the breakpoint is encountered unless it is reset
by another "b" command or cleared.
B
The "B" command lists each breakpoint which is currently set as well as the corresponding
if it is nonzero.
c []
If the user does not specify an address, the "c" command prompts for permission to clear all
breakpoints that are currently set. If the user does specify an address, it clears the breakpoint at
that address.
2-36
USER COMMANDS
debug
d
[]
The "d" command dumps the hexadecirnal contents and the ASCII equivalents of a range of
memory locations. Memory is displayed sixteen addresses to a line. Nonprintable characters are
represented in ASCII by a period.
If the user specifies only one argument, the command displays the contents of the specified
address. If the user specifies two arguments and the second one is greater than the first, the
command interprets the second argument as an address. It displays the contents of memory from
the first specified address to the second, inclusive. If the user specifies two arguments and the
second one is less than or equal to the first, the command interprets the second argument as a
count. It displays the contents of memory beginning at the first address and continuing for the
number of addresses specified by the second argument.
The dump may be aborted by typing the return key during the dump_ CTRL-C does not abort the
command.
g
The "g" command continues the execution of a controlled task. Execution continues until the
program terminates, receives a signal or encounters a breakpoint. The user may use this
command only when executing a controlled task.
G
The "G" command executes the program. until it encounters any branch instruction, any call
instruction, or any breakpoint.
i
[
[]]
The "i" command displays the contents of memory from the first specified address to the second,
inclusive. If the user specifies two arguments and the second one is less than or equal to the first,
the command interprets the second argu.ment as a count. The "i" command interprets the
specified location or range of locations as machine-language instructions and advances the
location counter to the start of the last complete instruction within the specified range. If the user
specifies no second argument or if the range specified by the second argument is shorter than the
complete instruction, the command displays the instruction which begins at the starting address
but does not move the location counter. A carriage return by itself is equivalent to the command
"i", except that the location counter is advanced to the beginning of the next instruction.
I
The "I" command initializes debug's intern.al symbol table. The symbol table is used to interpret
symbolic addresses and values. The "I" cOlnmand prompts for the name of the file containing the
symbol table to use. The file must be a binary image file. This command is normally for use
with a core image file, because such files do not contain any symbolic infonnation. Once the
symbol table is initialized, however, a core image file can be interpreted symbolically.
k
OPERATING SYSTEM REFERENCE
2-37
USER COMMANDS
debug
The "k" command tenninates execution of the current controlled task. If no controlled task
exists, the command is not allowed. This command need not be used, because the "x" command
implicitly kills any controlled task before creating another.
2-38
USER COMMANDS
debug
K
When a task running under the control of debug receives a signal, the operating system notifies
debug and suspends the task. The debug program then enters command mode, allowing the user
to execute any debug command. A user who wishes to ignore the signal may do so by entering
the "K" command. A user who wisht~s the signal to take effect should simply continue the
program with the "g" (or a similar) cOII11nand.
m
The "m" command modifies the contents of one or more memory locations in the image file. In
response to this command, debug first displays the specified address and its contents. The user
may change the contents by entering any expression, may leave the contents as is by entering a
period, or may terminate the command by entering just a carriage return. Unless the user
terminates the command, debug modifies the contents if appropriate, displays the next address
with its contents, and waits for input from the user.
If the image file is a core dump or an executable file, the file itself is modified. If the image file
is a controlled task (i.e., an "x" command has been executed), only the memory of that task is
altered. The executable file from which debug created the task is not changed. Therefore, when
patching code the user should be aware l:hat patches are applied only to the executing image file.
M
The "M" command displays a map of the logical addresses available to the task image. If the
image is either a core dump or a controlled task, the map contains the ranges of addresses being
used by the program. These ranges may change whenever the program executes a break or a
stack system call. If the image is an eXE~cutable file, the tlMtt command displays the ranges of the
addresses of the TEXT and DATAlBSS segments.
n
The "n" command displays the command line which was used to create the task. This is merely a
display of the command arguments passed to the program when it was created. In most cases the
command line consists of the shell command used to invoke the program. The command line for
a controlled task looks just like the corrlmand line entered with the "x" command that created it,
except that the "x" is replaced by the program name.
r
The "r" command displays the contents of the registers for the image file, as well as the address
of the program counter and the instruction located at that address. For a core dump it displays the
contents of the registers at the time the program was aborted by the system and the location of the
program counter at that time. The instruction displayed is the instruction that was in progress
when the program was aborted. For a controlled task, the "r" command displays the contents of
the registers as they will be when execution resumes, the address at which execution will resume,
and the instruction at that address. The registers for an executable file are undefined. For an
executable file, the "r" command disphlYs the contents of the registers as zeros and the address
and contents of the entry point of the program.
OPERATING SYSTEM REFERENCE
2-39
USER COMMANDS
debug
R
The "R" command, which may be used only if the image file is a controlled task, alters the
contents of a register. The register may be 00 through D7, AO through A7, SR, or PC. The
letters used in specifying a register may be either upper- or lowercase. The supervisor portion
(the upper byte) of the status register may not be altered.
s
The "s" command executes a single machine-language instruction. When the instruction is
complete, debug displays the state of the task (including the new program counter) and the next
instruction to be executed. The" sIt command uses system facilities provided by the operating
system. Thus, the user may safely single-step through macro operations such as system calls.
S
The S" command sets a temporary breakpoint at the instruction following the current instruction.
This breakpoint is removed as soon as it is encountered. If another SIt command is executed
before the breakpoint is encountered, it removes the original breakpoint. This command may be
used with any instruction, but it is normally used with a call to a subroutine.
It
If
T
The "T" command executes the program until it encounters any branch instruction, any call
instruction, or any breakpoint After the execution of every instruction, debug displays the
address of the next instruction and the instruction itself.
x []
[]
The "x" command creates a controlled task from an image file. In order to execute this
command, the user must first invoke debug with the name of an executable image file as the
argument. The task is halted before execution of its first instruction, so that debug can accept
commands to control its execution.
IJO redirection may be accomplished using the character "<" to redirect standard input, >" to
redirect standard output, and "%" to redirect standard error. No provisions are made for using
either append mode (») or implied mapping (>%).
fI
NOTE
The more breakpoints you set, the longer the program takes to
execute.
2-40
USER COMMANDS
debug
ERROR MESSAGES
Breakpoint table full!
The user has already set the maximum number of breakpoints.
Can't access core/image
The operating system returned an error when debug tried to access the specified file. Most
probably, either the file does not exist or the user does not have read permission in the file.
Can't open
The debug command was unable to open the file which the user specified as the file containing
the symbol table to use. Most probably, either the file does not exist or the user does not have
read permission in the file.
Can't write
The user tried to use the m" command to modify the contents of a memory location in the image
file, but debug was unable to write to Ihe file. Most probably, the user does not have write
permission in the file.
If
Command too complicated
The user tried to use the "+" command to execute a shell command from debug, but the command
line was too long for debug to interpret.
Error during EXEC -
The operating system returned an error when the user tried to create a controlled subtask using
the "x" command. This message is followed by the error number returned by the operating
system.
Error in expression
The expression used contains a syntax em)r.
Illegal address
The address specified is not in the user's address space.
Illegal command, , - ignored
The command specified by is not a valid command for debug. The character is ignored,
and debug prompts the user for another command.
OPERATING SYSTEM REFERENCE
2-41
USER COMMANDS
debug
Illegal file type
The "I" command cannot detennine the file type of the image file and, consequently, ignores the
file. All previously defined symbols are no longer defined.
Illegal register name
The register name specified by the user is not a valid register name. The register name must be
one of the following: DO through D7, AO through A7, SR, or PC. The letters used may be upperor lowercase.
is not executable
The user does not have execute pennission in the specified image file.
Invalid image file