切换到宽版
  • 13572阅读
  • 38回复

富士贴片机MCS-16系统问题求教,很急啊!!! [复制链接]

上一主题 下一主题
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员
 

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看楼主 倒序阅读 使用道具 楼主  发表于: 2003-06-27
AAA
分享到
离线hou
在线等级:8
在线时长:504小时
升级剩余时间:36小时在线等级:8
在线时长:504小时
升级剩余时间:36小时
级别:一般会员
金币
1840
威望
5
贡献
2
好评
0
注册
2003-05-20
只看该作者 沙发  发表于: 2003-06-27
你有起動軟盤嗎?,可先插入起動軟盤試試.進入后再改回.
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看该作者 藤椅  发表于: 2003-06-27
多谢你的指点!
我是用OS9的启动盘启动,可启动后却不知该怎样操作.麻烦你能再详细说明一下吗?不胜感激!!!
离线sun-zh
在线等级:9
在线时长:551小时
升级剩余时间:99小时在线等级:9
在线时长:551小时
升级剩余时间:99小时在线等级:9
在线时长:551小时
升级剩余时间:99小时
级别:高级会员

金币
7369
威望
29
贡献
2
好评
1
注册
2003-06-25
只看该作者 板凳  发表于: 2003-06-28
如果只是改了 :env language=F,最多顯示?y碼,啟動因該沒影響啊!
是不是還改了其它?
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看该作者 报纸  发表于: 2003-06-28
没有啊,我只是把E打为F而已,
现在无法进入UCI界面,
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 地板  发表于: 2003-06-29
你能不能将具体的情况说清楚一点/
我原来碰到过一次,就是将系统的显示配置改错了,结果一开机显示不正常,而且也进不了系统.
MCS电脑的右上角有一个功能键可以进入那个配置画面的,(具体的细节我也记不得了,因为我有半年多没有用过这玩意儿了)只要开了电源就可以进入的,它里面有很多参数都可以进行更改的,如果参数不对就会出显上述情况.
你可以和我联系.13510433092
离线sun-zh
在线等级:9
在线时长:551小时
升级剩余时间:99小时在线等级:9
在线时长:551小时
升级剩余时间:99小时在线等级:9
在线时长:551小时
升级剩余时间:99小时
级别:高级会员

金币
7369
威望
29
贡献
2
好评
1
注册
2003-06-25
只看该作者 地下室  发表于: 2003-06-29
Shift+Set Up 可以显示一个设定菜单,看看有没有更改的地方.
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 7楼 发表于: 2003-07-01
你的系统语言环境被改成法语,但是系统中没有法语的语言资料,所以会报文件缺少。
用软盘启动系统,进行H0。
修改H0根目录下的一个系统配置文件,里面有关于语言的设置,改成英语设置应该可以。
具体的做操,你可以去找一份OS-9的系统操作手册。/
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看该作者 8楼 发表于: 2003-07-01
多谢你的指点!但具体是哪个文件,我不知道啊.
我没有OS-9的操作手册.
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 9楼 发表于: 2003-07-01
Two files, which are called startup[/COLOR] and OS9Boot[/COLOR] by onvention, need to be discussed here. startup is a shell procedure file that is processed immediately after the system starts running. startup may contain any legal OS-9 command or program. OS9Boot contains the OS-9 system modules that are read into memory.
The chapter on OS-9 system management contains information on changing the startup and OS9Boot files.
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 10楼 发表于: 2003-07-01
:em30
附件: using_2.pdf (50 K) 下载次数:155
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看该作者 11楼 发表于: 2003-07-01
非常感谢,我正在看.
能得到你的帮助,真的很高兴!!!:)
离线FG6
在线等级:5
在线时长:262小时
升级剩余时间:8小时在线等级:5
在线时长:262小时
升级剩余时间:8小时
级别:一般会员

金币
157
威望
5
贡献
1
好评
0
注册
2003-06-27
只看该作者 12楼 发表于: 2003-07-01
这部份在附件里没看到啊,你能再发一下吗?
The chapter on OS-9 system management contains information on changing the startup and OS9Boot files
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 13楼 发表于: 2003-07-01
对呀,你可以在网上找到OS-9的MANUAL。
里面有的。我马上找给你。
离线PFUJI
在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时在线等级:7
在线时长:385小时
升级剩余时间:55小时
级别:荣誉会员

金币
0
威望
77
贡献
12
好评
3
注册
2002-09-22
只看该作者 14楼 发表于: 2003-07-01
YOU NEED THE INFO ABOUT "EDT",OK?
GIVE YOU MORE!

Programmer Utilities: These utility programs are extremely helpful to the intermediate or advanced
programmer. They allow greater exploration of OS-9’s timesharing environment and more
dynamic file manipulation.
binex cfp cmp code compress count dump
ex exbin expand frestore fsave grep load
logout make printenv profile qsort save setenv
tape tee touch tmode tr unsetenv
¬ System Management Utilities: These utility programs are used primarily by system managers
and advanced assembly language programmers. Beginning programmers rarely need to use these
commands:
break dcheck deiniz devs diskcache events fixmod
ident iniz irqs link login mdir moded
os9gen romsplit setpr sleep tapegen tsmon unlink
xmode
Formal Syntax Notation
Each command section includes a syntactical description of the command line. These symbolic
descriptions use the following notations:
[ ] = Enclosed items are optional
{ } = Enclosed items may be used 0, 1, or many times
< > = Enclosed item is a description of the parameter to use:
<path> = A legal pathlist
<devname> = A legal device name
<modname> = A legal memory module name
<procID> = A process number
<opts> = One or more options specified in the command description
<arglist> = A list of parameters
<text> = A character string ended by end-of-line
<num> = A decimal number, unless otherwise specified
<file> = An existing file
<string> = An alpha-numeric string of ASCII characters

4 Using Professional OS-9
SYNTAX: attr [<opts>] {<path>} {<permissions>}
FUNCTION: attr is used to examine or change the security attributes (<permissions>) of the specified
file(s).
To use the attr utility, type attr, followed by the pathlist for the file(s) whose security
permissions you want to change or examine. Then, enter a list of permissions to turn
on or off.
You turn on a permission by giving its abbreviation preceded by a hyphen (-). You turn
it off by preceding its abbreviation with a hyphen followed by the letter n (-n). Permissions
not explicitly named are unaffected.
If no permissions are specified on the command line, the current file attributes are
displayed.
You cannot examine or change the attributes of a file you do not own unless you are the
super user. A super user can examine or change the attributes of any file in the system.
The file permission abbreviations are:
d = Directory file
s = Single user file. s denotes a non-sharable file.
r = Read permission to owner
w = Write permission to owner
e = Execute permission to owner
pr = Read permission to public
pw = Write permission to public
pe = Execute permission to public
NOTE: The owner is the creator of the file. Owner access is given to any user with
the same group ID number as the owner. The public is any user with a different group
ID number than the owner. You can determine file ownership with the dir -e command.
SPECIAL USE: You can use attr to change a directory file to a non-directory file if
all entries have been deleted from it. You may also use the deldir utility to delete
directory files. You cannot change a non-directory file to a directory file with this
command. The directory attribute can only be turned on when a directory is created
with the makdir utility.
attr Change/Examine File Security Attributes
The OS-9 Utilities attr
Using Professional OS-9 5
OPTIONS: -? Displays the options, function, and command syntax of attr.
-a Suppresses the printing of attributes.
-x Searches for the specified file in the execution directory. The file must
have execute permission to be found using -x.
-z Reads the file names from standard input.
-z=<file> Reads the file names from <file>.
EXAMPLES: $ attr myfile Displays the current attributes of myfile.
$ attr myfile -npr -npw Turns off the public read and public write
permissions.
$ attr myfile -rweprpwpe Turns on both the public and owner read, write, and
execute permissions.
$ attr -z Displays the attributes of the file names read from
standard input.
$ attr -z=file1 Displays the attributes of the file names read from
file1.
$ attr -npwpr * Turns off public write and turns on public read for all
files in the directory.
$ attr *.lp Lists the attributes of all files that have names ending
in .lp.
backup The OS-9 Utilities
6 Using Professional OS-9
SYNTAX: backup [<opts>] [<srcpath> [<destpath>]]
FUNCTION: backup physically copies all data from one device to another. A physical copy is
performed sector by sector without regard to file structures. In most cases, the devices
specified must have the same format and must not have defective sectors.
In the following discussions, the source disk is the disk you are backing up. The
destination disk is the disk to which you are copying.
Single Drive Backup
A single drive backup requires exchanging disks in and out of the disk drive.
NOTE: Before backing up a disk, you should write protect the source disk with the
appropriate write protect mechanism to prevent accidentally confusing the source disk
and the destination disk during exchanges.
To begin the backup procedure, put the source disk in the drive and type backup. The
system asks if you are ready to backup. Type y if you are ready.
Initially, backup reads a portion of the source disk into memory. backup then
prompts you to exchange disks. Remove the source disk from the drive, and insert the
destination disk. backup writes the previously stored data on to this disk. When the
backup is finished, an exchange is again requested. This places the source disk back
in the drive. This exchange process continues until all of the data on the disk is copied.
The -b option increases the amount of memory the backup procedure uses. This
decreases the number of disk exchanges required.
Two Drive Backup
On a two drive system, the names /d0 and /d1 are assumed if both device names are
omitted on the command line. If the second device name is omitted, a single unit backup
is performed on the drive specified.
To begin the backup procedure, put the source disk in the source drive and the
destination disk in the destination drive. By default, the source drive is /d0 and the
destination drive is /d1. Enter backup, the name of the source drive, and the name of
the destination drive. The system asks if you are ready to backup. Enter y if you are
ready. If no error occurs, the backup procedure is complete.
ERRORS: The backup procedure includes two passes. The first pass reads a portion of the source
disk into a buffer in memory and then writes it to the destination disk. The second pass
verifies that the data was copied correctly.
backup Make a Backup Copy of a Disk
The OS-9 Utilities backup
Using Professional OS-9 7
If an error occurs on the first pass, something is wrong with the source disk or its drive.
If an error occurs in the second pass, the problem is with the destination disk. If backup
fails repeatedly on the second pass, re-format the destination disk and try to backup
again.
OPTIONS: -? Displays the options, function, and command syntax of backup.
-b=<num>k Allocates <num>k of memory for the backup buffer to use. backup
uses a 4K buffer by default. backup runs faster if more memory is
used.
-r Causes the backup to continue if a read error occurs.
-v Prevents backup from making a verification pass.
EXAMPLES: This example backs up the disk in /d2 to the disk in /d3:
$ backup /D2 /D3
This example backs up the disk in /d0 to the disk in /d1 without making a verification
pass:
$ backup -v
This example allocates 40K of memory to use in backing up /d0 to /d2.
$ backup -b40 /d0 /d2
binex/exbin The OS-9 Utilities
8 Using Professional OS-9
SYNTAX: binex [<opts>] [<path1> [<path2>]]
exbin [<path1> [<path2>]]
FUNCTION: binex converts binary files to S-record files. The exbin utility converts S-record files
to binary.
S-record files are a type of text file containing records that represent binary data in
hexadecimal form. This Motorola-standard format is often directly accepted by commercial
PROM programmers, emulators, logic analyzers, and similar devices that use
the RS-232 interface. It can be useful for transmitting files over data links that can only
handle character type data. It can also be used for converting OS-9 assembler or compiler
generated programs to load on non-OS-9 systems.
binex converts the OS-9 binary file specified by <path1> to a new file with S-record
format. The new file is specified by <path2>. S-records have a header record to store
the program name for informational purposes and each data record has an absolute
memory address. This absolute memory address is meaningless to OS-9 because OS-
9 uses position-independent code.
binex currently generates the following S-record types:
S1 records Use a two byte address field
S2 records Use a three byte address field
S3 records Use a four byte address field
S7 records Terminate blocks of S3 records
S8 records Terminate blocks of S2 records
S9 records Terminate blocks of S1 records
To specify the type of S-record file to generate, use the -s=<num> option. <num> =
1, 2, etc., corresponding to S1, S2, etc.
exbin is the inverse operation. <path1> is assumed to be an S-Record format text file
which exbin converts to pure binary form in a new file, <path2>. The load addresses
of each data record must describe contiguous data in ascending order. exbin does not
generate or check for the proper OS-9 module headers or CRC check value required to
actually load the binary file. You can use ident to check the validity of the modules if
they are to be loaded or run. exbin converts any of the S-record types mentioned above.
Using either command, standard input and output are assumed if both paths are omitted.
If the second path is omitted, standard output is assumed.
OPTIONS: -? Displays the options, function, and command syntax of binex/exbin.
binex/exbin Convert Binary Files to S-Record/S-Record to Binary
The OS-9 Utilities binex/exbin
Using Professional OS-9 9
-a=<num> Specifies the load address in hex. This is for binex only.
-s=<num> Specifies which type of S-record format is to generate. This is for binex
only.
-x binex searches for <path1> in the execution directory. This is for
binex only.
EXAMPLES: The following example downloads a program to T1. This type of command downloads
programs to devices such as PROM programmers.
$ binex scanner.S1 >/T1
The next example generates prog.S1 in S1 format from the binary file, prog .
$ binex -s1 prog prog.S1
The following example generates CMDS/prog in OS-9 binary format from the S1 type
file, program.S1 .
$ exbin prog.S1 cmds/prog
break The OS-9 Utilities
10 Using Professional OS-9
SYNTAX: break
FUNCTION: break executes an F$SysDbg system call. This call stops OS-9 and all user processes
and returns control to the ROM debugger. The debugger g[o] command resumes
execution of OS-9.
You should only call break from the system’s console device, because the debugger
only communicates with that device. If break is invoked from another terminal, you
must still use the system’s console device to communicate with the debugger.
Only super users can execute break.
NOTE: break is used only for system debugging. It should not be included with or
run on a production system.
NOTE: If there is no debugger in ROM or if the debugger is disabled, break will reset
the system.
CAVEAT: You must be aware of any open network paths when you use the break
utility as all timesharing is stopped.
OPTION: -? Displays the function and command syntax of break.
break Invoke Sytem Level Debugger or Reset System
The OS-9 Utilities build
Using Professional OS-9 11
SYNTAX: build <path>
FUNCTION: build creates a file specified by a given pathlist.
To use the build utility, type build and a pathlist. A question mark prompt (?) is displayed.
This requests an input line. Each line entered is written to the output file. Entering
a line consisting of only a carriage return causes build to terminate. The build
utility also terminates when you enter an end-of-file character at the beginning of an input
line. The end-of-file character is typically <escape>.
OPTION: -? Displays the function and command syntax of build.
EXAMPLE: $ build newfile
? Build should only be used
? in creating short text files.
? [RETURN]
$ list newfile
Build should only be used
in creating short text files.
build Build a Text File from Standard Input
cfp The OS-9 Utilities
12 Using Professional OS-9
SYNTAX: cfp [<opts>] [<path1>] {<path2>}
FUNCTION: cfp creates a temporary procedure file in the current data directory and then invokes the
shell to execute it.
To create a temporary procedure file, type cfp, the name of the procedure file
(<path1>), and the file(s) (<path2>) to be executed by the procedure file.
All occurrences of an asterisk (*) in the procedure file (<path1>) are replaced by the
given pathlists, <path2>, unless preceded by the tilde character (~). For example, ~*
translates to *. The command procedure is not executed until all input files have been
read.
For example, if you have a procedure file in your current data directory called copyit
that consists of a single command line, copy *, all of your C programs from two
directories, PROGMS and MISC.JUNK, are placed in your current data directory by
typing:
$ cfp copyit ../progms/*.c ../misc.junk/*.c
If you use the “-s=<string>” option, you may omit the name of the procedure file, but
you must enclose the option and its string in quotes. The -s option causes the cfp utility
to use the string instead of a procedure file. For example:
$ cfp "-s=copy *" ../progms/*.c ../misc.junk/*.c
NOTE: You must use double quotes to force the shell to send the string -s=copy * as
a single parameter to cfp. The quotes also prevent the shell from expanding the asterisk
(*) to include all pathlists in the current data directory.
In the above examples, cfp creates a temporary procedure file to copy every file ending
in .c in both PROGMS and MISC.JUNK to the current data directory. The procedure
file created by cfp is deleted when all the files have been copied.
Using the -s option is convenient because you do not have to edit the procedure file to
change the copy procedure. For example, if you are copying large C programs, you
may want to increase the memory allocation to speed up the process.
cfp Command File Processor
The OS-9 Utilities cfp
Using Professional OS-9 13
You can allocate the additional memory on the cfp command line:
$ cfp "-s=copy -b100 *" ../progms/*.c ../misc.junk/*.c
You can use the -z and -z=<file> options to read the file names from either standard
input or a file. Use the -z option to read the file names from standard input. For example,
if you have a procedure file called count.em that contains the command count -l
* and you want to count the lines in each program to see how large the programs are
before you copy them, enter the following command line:
$ cfp -z count.em
The command line prompt does not appear because cfp is waiting for input. Enter the
file names on separate command lines. For example
$ cfp -z count.em
../progms/*.c
../misc.junk/*.c
When you have finished entering the file names, press the carriage return a second time
to get the shell prompt.
If you have a file containing a list of the files to copy, enter:
$ cfp -z=files "-s=copy *"
OPTIONS: -? Displays the options, function, and command syntax of cfp.
-d Deletes the temporary file. This is the default.
-nd Does not delete the temporary file.
-e Executes the procedure file. This is the default.
-ne Does not execute the procedure file. Instead, it will dump to standard output.
This option causes -d and -nd to have no effect because the temporary
procedure file is not created.
-s=<str> Reads <str> instead of a procedure file. If the string contains characters
interpreted by the shell, the entire option needs to be enclosed in quotes.
It does not make sense to specify both a procedure file and this option.
-t=<path> Creates the temporary file at <path> rather than in the current working directory.
-z Reads the file names from standard input instead of <path2>.
-z=<file> Reads the file names from <file> instead of <path2>.
cfp The OS-9 Utilities
14 Using Professional OS-9
EXAMPLE: In this example, test.p is a procedure file that contains the command line list * >/p2.
The command cfp test.p file1 file2 file3 produces a procedure file containing the following
commands:
list file1 >/p2
list file2 >/p2
list file3 >/p2
The following command accomplishes the same thing:
$ cfp "-s=list * >/p2" file1 file2 file3
The OS-9 Utilities chd/chx
Using Professional OS-9 15
SYNTAX: chd [<path>]
chx <path>
FUNCTION: chd and chx are built-in shell commands used to change OS-9’s working data directory
or working execution directory.
To change data directories, type chd and the pathlist to the new data directory. To
change execution directories, type chx and the pathlist to the new execution directory.
In both cases, a full or relative pathlist may be used. Relative pathlists used by chd and
chx are relative to the current data and execution directory, respectively.
If the HOME environment variable is set, the chd command with no specified directory
will change your data directory to the directory specified by HOME.
NOTE: These commands do not appear in the CMDS directory as they are built-in to
the shell.
EXAMPLES: $ chd /d1/PROGRAMS
$ chx ..
$ chx binary_files/test_programs
$ chx /D0/CMDS; chd /D1
chd/chx Change Current Data Directory/Current Execution Directory
cmp The OS-9 Utilities
16 Using Professional OS-9
SYNTAX: cmp [<opts>] <path1> <path2>
FUNCTION: cmp opens two files and performs a comparison of the binary values of the corresponding
data bytes of the files. If any differences are encountered, the file offset (address),
the hexadecimal value, and the ASCII character for each byte are displayed.
The comparison ends when an end-of-file is encountered on either file. A summary of
the number of bytes compared and the number of differences found is displayed.
To execute cmp, type cmp and the pathlists of the files to be compared.
OPTIONS: -? Displays the options, function, and command syntax of cmp.
-b=<num>[k] Assigns <num>k of memory for cmp to use. cmp uses a 4K memory
by default.
-s Silent mode. Stops the comparison when the first mismatch occurs
and prints an error message.
-x Searches the current execution directory for both of the specified files.
EXAMPLES: The following example uses an 8K buffer to compare file1 with file2.
$ cmp file1 file2 -b=8k
Differences
(hex) (ascii)
byte #1 #2 #1 #2
======== == == == ==
00000019 72 6e r n
0000001a 73 61 s a
0000001b 74 6c t l
Bytes compared: 0000002d
Bytes different: 00000003
file1 is longer
The following example compares file1 with itself.
$ cmp file1 file1
Bytes compared: 0000002f
Bytes different: 00000000
cmp Compare Two Binary Files
The OS-9 Utilities code
Using Professional OS-9 17
SYNTAX: code
FUNCTION: code prints the input character followed by the hex value of the input character.
Unprintable characters print as a period (.). The keys specified by tmode quit and
tmode abort terminate code. tmode quit is normally <control>E, and tmode abort is
normally <control>C.
The most common usage of code is to discover the value of an unknown key on the
keyboard or the hex value of an ASCII character.
OPTION: -? Displays the function and command syntax of code.
EXAMPLE: $ code
ABORT or QUIT characters will terminate CODE
a -> 61
e -> 65
A -> 41
. -> 10
. -> 04
$
code Print Hex Value of Input Character
compress The OS-9 Utilities
18 Using Professional OS-9
SYNTAX: compress [<opts>] {<path>}
FUNCTION: compress reads the specified text file(s), converts it to compressed form, and writes
the compressed text file to standard output or to an optional output file.
To use compress, type compress and the path of the text file to compress. If no files
are given, standard input is used.
compress replaces multiple occurrences of a character with a three character coded sequence:
aaaaabbbbbcccccccccc would be replaced with ~Ea~Eb~Jc.
Each compressed input file name is appended with _comp. If a file with this name already
exists, the old file is overwritten with the new file. Typical files compress about
30% smaller than the original file.
compress reduces the size of a file to save disk space. See the expand utility for details
on how to expand a compressed file.
WARNING: Only use compress and expand on text files.
OPTIONS: -? Displays the options, function, and command syntax of compress.
-d Deletes the original file. This is inappropriate when no pathlist is specified
on the command line and standard input is used.
-n Creates an output file.
-z Reads file names from standard input.
-z=<file> Reads file names from <file>.
EXAMPLES: In the first example, file1 is compressed, file1_comp is created, and file1 is deleted.
$ compress file1 -dn
In this example, file2 is compressed, file3 is created from the redirected standard output,
and file2 is deleted.
$ compress file2 -d >file3
compress Compress ASCII Files
The OS-9 Utilities copy
Using Professional OS-9 19
SYNTAX: copy [<opts>] <path1> [<path2>]
FUNCTION: copy copies data from <path1> to <path2>. If <path2> already exists, the contents
of <path1> overwrites the existing file. If <path2> does not exist, it is created. If no
files are given on the command line and the -z option is not specified, an error is returned.
You can copy any type of file. It is not modified in any way as it is copied. The
attributes of <path1> are also copied exactly.
NOTE: You must have permission to copy the file. You must be the owner of the file
specified by <path1> or have public read permission in order to copy the file. You
must also be able to write to the specified directory. In either case, if the copy procedure
is successful, <path2> has your group.user number unless you are the super user.
If you are the super user, <path2> has the same group.user number as <path1>.
If <path2> is omitted, the destination file has the same name as the source file. It is
copied into the current data directory. Consequently, the following two copy commands
have the same effect:
$ copy /h0/cmds/file1 file1
$ copy /h0/cmds/file1
copy is also capable of copying one or more files to the same directory by using the -
w=<dir> option. The following command copies file1 and file2 into the BACKUP
directory:
$ copy file1 file2 -w=backup
If used with wildcards, the -w=<dir> option becomes a selective dsave. The following
command copies all files in the current data directory that have names ending with .lp
into the LP directory:
$ copy *.lp -w=lp
Data is transferred using large block reads and writes until an end-of-file occurs on the
input path. Because block transfers are used, normal output processing of data does not
occur on character-oriented devices such as terminals, printers, etc. Therefore, the list
utility is preferred over copy when a file consisting of text is sent to a terminal or
printer.
copy Copy Data from One File to Another
copy The OS-9 Utilities
20 Using Professional OS-9
NOTE: copy always runs faster if you specify additional memory with the -b option.
This allows copy to transfer data with a minimum number of I/O requests.
OPTIONS: -? Displays the options, function, and command syntax of copy.
-a Aborts the copy routine if an error occurs. This option effectively cancels
the continue (y/n) ? prompt of the -w option.
-b=<num>k Allocates <num>k memory to be used by copy. copy uses a 4K memory
by default.
-f Rewrites destination files with no write permission.
-p Does not print a list of the files copied. This option is only for copying
multiple files.
-r Overwrites the existing file.
-v Verifies the integrity of the new file.
-w=<dir> Copies one or more files to <dir>. This option prints the file name after
each successful copy. If an error such as no permission to copy occurs,
the prompt continue (y/n) ? is displayed.
-x Uses the current execution directory for <path1>.
-z Reads file names from standard input.
-z=<file> Reads file names from <file>.
EXAMPLES: The following example copies file1 to file2. If file2 already exists, error #218 is
returned.
$ copy file1 file2
This example copies file1 to file2 using a 15K buffer.
$ copy file1 file2 -b=15k
This example copies all files in the current data directory to MYFILE.
$ copy * -w=MYFILE
This example copies all files in the current data directory that have names ending in .lp.
$ copy *.lp -w=MYFILE
This example copies /d1/joe and /d0/jim to FILE.
$ copy /d1/joe /d0/jim -w=FILE
This example writes file3 over file4.
$ copy file3 file4 -r
The OS-9 Utilities count
Using Professional OS-9 21
SYNTAX: count [<opts>] {<path>}
FUNCTION: count counts the number of characters in a file and optionally prints a breakdown
consisting of each unique character found and the number of times it occurred.
To count the number of characters in a file, enter count and the pathlist of the file to
examine. If no pathlist is specified, count examines lines from standard input.
count recognizes the tab, line feed, and form feed characters as line delimiters.
By using the -w option, count counts the number of words in a file. A word is defined
as a sequence of nonblank, non-carriage-return characters.
By using the -l option, the number of lines in a file is displayed. A line is defined by
zero or more characters ending in a carriage-return.
OPTIONS: -? Displays the options, function, and command syntax of count.
-b Counts characters and gives a breakdown of their occurrence.
-c Counts characters.
-l Counts lines.
-w Counts words.
-z Reads file names from standard input.
-z=<file> Reads file names from <file>.
EXAMPLE: $ list file1
first line
second line
third line
$ count -clw file1
"file1" contains 34 characters
"file1" contains 6 words
"file1" contains 3 lines
count Count Characters, Words, and Lines in a File
date The OS-9 Utilities
22 Using Professional OS-9
SYNTAX: date [<opts>]
FUNCTION: date displays the current system date and system time. The system date and time are
set by the setime utility.
OPTIONS: -? Displays the options, function, and command syntax of date.
-j Displays the Julian date and time.
-m Displays the military time (24 hour clock) after the date.
EXAMPLES: $ date
December 18, 1990 Tuesday 2:20:20 pm
$ date -m
December 18, 1990 Tuesday 14:20:24
The following example redirects the current date and time to the printer:
$ date >/p
date Display System Date and Time
The OS-9 Utilities dcheck
Using Professional OS-9 23
SYNTAX: dcheck [<opts>] <devname>
FUNCTION: dcheck is a diagnostic tool used to detect the condition and the general integrity of the
directory/file linkages of a disk device.
To use dcheck, type dcheck, the option(s) desired, and the name of the disk device to
check.
dcheck first verifies and prints some of the vital file structure parameters. It moves
down the tree file system to all directories and files on the disk. As it moves down the
tree file system, the integrity of the file descriptor sectors (FDs) is verified. Any
discrepancies in the directory/file linkages are reported.
From the segment list associated with each file, dcheck builds a sector allocation map.
This map is created in memory.
If any FDs describe a segment with a cluster not within the file structure of the disk, a
message is reported:
*** Bad FD segment (xxxxxx-yyyyyy)
This indicates that a segment starting at sector xxxxxx (hexadecimal) and ending at
sector yyyyyy cannot be used on this disk. The entire FD is probably bad if any of its
segment descriptors are bad. Therefore, the allocation map is not updated for bad FDs.
While building the allocation map, dcheck ensures that each disk cluster appears only
once in the file structure. If a cluster appears more than once, dcheck displays a
message:
Sector xxxxxx (byte=nn bit=n) previously allocated
This message indicates the cluster at sector xxxxxx has been found at least once before
in the file structure. byte=nn bit=n specifies in which byte of the bitmap this error
occurred and in which bit in that byte. The first byte in the bitmap is numbered zero.
For dcheck’s purposes, bits are numbered zero through seven; the most significant bit
is numbered zero. The message may be printed more than once if a cluster appears in
a segment in more than one file.
Occasionally, sectors on a disk are marked as allocated even though they are not associated
with a file or the disk’s free space. This is most commonly caused by media defects
discovered by format. These defective sectors are not included in the free space
for the disk. This can also happen if a disk is removed from a drive while files are still
open, or if a directory containing files is deleted by a means other than deldir.
dcheck Check the Disk File Structure
dcheck The OS-9 Utilities
24 Using Professional OS-9
If all the sectors of a cluster are not used in the file system, dcheck prints a message:
xxxxxx cluster only partially used
The allocation map created by dcheck is then compared to the allocation map stored
on the disk. Any differences are reported in messages:
Sector xxxxxx (byte=nn bit=n) not in file structure
Sector xxxxxx (byte=nn bit=n) not in bit map
The first message indicates sector number xxxxxx was not found as part of the file
system but is marked as allocated in the disk’s allocation map. In addition to the causes
previously mentioned, some sectors may have been excluded from the allocation map
by the format program because they were defective. They could be the last sectors of
the disk, whose sum is too small to comprise a cluster.
The second message indicates that the cluster starting at sector xxxxxx is part of the file
structure but is not marked as allocated in the disk’s allocation map. This type of disk
error could cause problems later. It is possible that this cluster may later be allocated
to another file. This would overwrite the current contents of the cluster with data from
the newly allocated file. All current data located in this cluster would be lost. Any
clusters reported as previously allocated by dcheck have this problem.
Repairing the Bitmap
dcheck is capable of repairing two types of disk problems using the -r and the -y
options. If a cluster was found in the file structure but not in the bitmap, the bit may be
turned on in the bitmap to include the cluster. If the cluster was marked in the bitmap
but not in the file structure, the bit in the bitmap may be turned off.
WARNING: Do not use either of these options unless you thoroughly understand what
you are doing. These errors could be caused by previously mentioned problems and
perhaps should not be repaired.
Restrictions:
&iquest; Only the super user (user 0.n) may use this utility.
&iexcl; dcheck should have exclusive access to the disk being checked. dcheck
can be fooled if the disk allocation map changes while it is building its
bitmap file from the changing file structure.
OPTIONS: -? Displays the options, function, and command syntax of dcheck.
-d=<num> Prints the path to the directory <num> deep.
-r Repair mode. Prompts to turn on or off bits in the bit map.
-y Repair mode. Does not prompt for repair, but answers yes to all
The OS-9 Utilities dcheck
Using Professional OS-9 25
prompts. This option must be used with the -r option.
EXAMPLE: $ dcheck /d2
Volume - ’Ram Disk (Caution: Volatile)’ on device /dd
$001000 total sectors on media, 256 bytes per sector
Sector $000001 is start of bitmap
$0200 bytes in allocation map, 1 sector(s) per cluster
Sector $000003 is start of root dir
Building allocation map...
$0003 sectors used for id sector and allocation map
Checking allocation map...
’Ram Disk (Caution: Volatile)’ file structure is intact
5 directories, 60 files
580096 of 1048576 bytes (0.55 of 1.00 meg) used on media
deiniz The OS-9 Utilities
26 Using Professional OS-9
SYNTAX: deiniz [<opts>] {<modname>}
FUNCTION: When a device is no longer needed, use deiniz to remove the device from the system
device table. deiniz uses the I$Detach system call to accomplish this. Information
concerning I$Detach is located in the OS-9 Technical Manual.
To remove a device from the system device table, type deiniz, followed by the name of
the module(s) to detach. <modname> may begin with a slash (/). The module names
may be read from standard input or from a specified pathlist if the -z option is used.
WARNING: Do not deiniz a module unless you have explicitly iniz-ed it. If you do
deiniz a device that you have not iniz-ed, you could cause problems for other users who
may be using the module.
OPTIONS: -? Displays the options, function, and command syntax of deiniz.
-z Reads the module names from standard input.
-z=<file> Reads the module names from <file>.
EXAMPLE: $ deiniz t1 t2 t3
deiniz Detach a Device
The OS-9 Utilities del
Using Professional OS-9 27
SYNTAX: del [<opts>] {<path>}
FUNCTION: del deletes the file(s) specified by the pathlist(s). You must have write permission for
the file(s) to be deleted. You cannot delete directory files with this utility unless their
attribute is changed to non-directory.
OPTIONS: -? Displays the options, function, and command syntax of del.
-e Erases the disk space that the file occupied.
-f Delete files with no write permission.
-p Prompts for each file to be deleted with the following prompt:
delete <filename> ? (y,n,a,q)
y = yes. n = no. a = delete all specified files without further prompts.
q = quit the deleting process.
-x Looks for the file in the current execution directory.
-z Reads the file names from standard input.
-z=<file> Reads the file names from <file>.
EXAMPLES: These examples use the following directory structure:
$ dir
Directory of /D1 14:29:46
junk myfile newfile number_five
old_test_program test_program
$ del newfile Deletes newfile.
$ del *_* Deletes all files in the current data directory with an
underscore character in their name.
After executing the preceding two examples, the directory has the following files:
$ dir
Directory of /D1 14:30:37
junk myfile
To delete all files in the current directory, type:
$ dir -u ! del -z
SEE ALSO: The attr and deldir utility descriptions
del Delete a File
deldir The OS-9 Utilities
28 Using Professional OS-9
SYNTAX: deldir [<opts>] {<path>}
FUNCTION: deldir deletes directories and the files they contain one file at a time. deldir is only used
to delete all files in the directory.
When deldir is run, it prints a prompt message:
$ deldir OLDFILES
Deleting directory: OLDFILES
Delete, List, or Quit (d, l, or q) ?
A d response initiates the process of deleting files. An l response causes dir -e to run
so you can have an opportunity to see the files in the directory before they are deleted.
A q response aborts the command before action is taken. After listing the files, deldir
prompts with:
delete ? (y,n)
The directory to be deleted may include directory files, which may themselves include
directory files, etc. In this case, deldir operates recursively (that is, lower-level directories
are also deleted). The lower-level directories are processed first.
You must have correct access permission to delete all files and directories encountered.
If not, deldir aborts upon encountering the first file for which you do not have write permission.
deldir automatically calls dir and attr, so they must reside in the current execution
directory. When deldir calls dir, it executes a dir -a command to show all files
contained in the directory.
NOTE: You should never delete the current data directory (.).
OPTIONS: -? Displays the options, function, and command syntax of deldir.
-f Deletes files regardless of whether write permission is set.
-q Quiet mode. No questions are asked. The directory and its subdirectories
are all deleted, if possible.
-z Reads the file names from standard input.
-z=<file> Reads the file names from <file>.
deldir Delete All Files in a Directory
The OS-9 Utilities devs
Using Professional OS-9 29
SYNTAX: devs
FUNCTION: devs displays a list of the system’s device table. The device table contains an entry for
each active device known to OS-9. devs does not display information for uninitialized
devices.
The devs display header lists the system name, the OS-9 version number, and the maximum
number of devices allowed in the device table.
Each line in the devs display contains five fields:
Name Description
Device Name of the device descriptor
Driver Name of the device driver
File Mgr Name of the file manager
Data Ptr Address of the device driver’s static storage
Links Device use count
NOTE: Each time a user executes a chd to an RBF device, the use count of that device
is incremented by one. Consequently, the Links field may be artificially high.
OPTION: -? Displays the function and command syntax of devs.
devs Display System’s Device Table
devs The OS-9 Utilities
30 Using Professional OS-9
EXAMPLE: The following example displays the device table for a system named Tazz:
$ devs
TAZZ_VME147 OS-9/68030 V2.4.x82 (128 devices max)
Device Driver File Mgr Data Ptr Links
---------- ---------- ---------- --------- ------
term sc8x30 scf $007fda40 7
h0 rbsccs rbf $007fcbe0 31175
d0 rb320 rbf $007e94a0 1
dd rbsccs rbf $007fcbe0 23
t10 sc335 scf $006d3a70 5
t11 sc335 scf $006d3850 5
t12 sc335 scf $006d3630 5
t13 sc335 scf $006d3410 5
t20 sc335 scf $006d31f0 5
t21 sc335 scf $006d2fd0 5
t22 sc335 scf $006d2db0 5
t23 sc335 scf $006d2b90 5
5803 rb320 rbf $007e94a0 20
3803 rb320 rbf $007e94a0 1
mt2 sbgiga sbf $006d9640 1
n0 n9026 nfm $006d63a0 372
nil null scf $006d6340 10
socket sockdvr sockman $006c0500 4
lo0 ifloop ifman $006c0380 4
le0 am7990 ifman $006bed60 1
pipe null pipeman $0068ecc0 3
pk pkdvr pkman $0048dc90 1
pkm00 pkdvr pkman $00427b50 1
3807 rb320 rbf $007e94a0 12
pcd0 rb320 pcf $007e94a0 3
pks00 pkdvr scf $004279b0 2
SEE ALSO: The iniz and deiniz utilities
The OS-9 Utilities dir
Using Professional OS-9 31
SYNTAX: dir [<opts>] {<path>}
FUNCTION: dir displays a formatted list of file names of the specified directory file on standard
output.
To use the dir utility, type dir and the directory pathlist, if desired. If no parameters are
specified, the current data directory is shown. If you use the -x option, the current
execution directory is shown. If a pathlist of a directory file is specified, the files of the
indicated directory are shown.
If the -e option is included, each file’s entire description is displayed: size, address,
owner, permissions, date, and time of last modification. Because the shell does not interpret
the -x option, wildcards do not work as expected when this option is used.
Unless the -a option is used, file names that begin with a period (.) are not displayed.
Unformatted Directory Listing
You can print an unformatted directory listing using the -u option. This allows only the
names of the entries of a directory to be displayed. No directory header is displayed.
Entries are printed as follows:
$ dir -u
file1
file2
file3
DIR1
The output of a dir -u can be sent through a pipe to another utility or program that can
use a pipe. For example:
$ dir -u ! attr -z
This displays the attributes of every entry in the current directory.
The -e option can be used to display an extended directory listing without the header
by adding the -u option.
dir Display Names of Files in a Directory
dir The OS-9 Utilities
32 Using Professional OS-9
OPTIONS: -? Displays the options, function, and command syntax of dir.
-a Displays all file names in the directory. This includes file names beginning
with a period.
-d Appends a slash (/) to all directory names listed. This does not affect the
actual name of the directory.
-e Displays an extended directory listing excluding file names beginning
with a period.
-n Displays directory names without displaying the file names they contain.
This option is especially useful with wildcards.
-r Recursively displays the directories. This does not include file names beginning
with a period.
-r=<num> Displays the directories recursively up to the <num> level below the current
directory. This does not include file names beginning with a period.
-s Displays an unsorted listing. This does not include file names beginning
with a period.
-u Displays an unformatted listing. This does not include file names beginning
with a period.
-x Displays the current execution directory. This does not include file names
beginning with a period.
-z Reads the directory names from standard input.
-z=<file> Reads the directory names from <file>.
EXAMPLES: The first example displays the current data directory:
$ dir
Directory of . 12:12:54
BK BKII RELS ed10.c ed11.c
ed2.c
In the second example, the parent of the working data directory is displayed:
$ dir ..
This example displays the NEWSTUFF directory:
$ dir NEWSTUFF
The OS-9 Utilities dir
Using Professional OS-9 33
The next example displays the entire description of the current data directory:
dir -e
Directory of . 13:54:44
Owner Last modified Attributes Sector Bytecount Name
------- ------------- ---------- ------ --------- ----
1.78 90/11/28 0357 d-ewrewr 383C8 160 NOTES
1.78 90/11/28 0357 d-ewrewr 383E8 608 PROGRAMS
1.78 90/11/28 0357 d-ewrewr 383D8 160 TEXT
1.78 90/11/14 0841 ------wr F4058 438 arrayex.c
1.78 90/11/12 0859 ------wr F4068 538 arrayex.r
1.78 90/11/09 0852 ------wr F2AB0 312 asciiinfo
0.0 90/04/27 1719 ----r-wr 71EC8 4626 atari.doc
1.78 90/11/14 0911 ------wr B4548 636 bobble.c
1.78 90/11/14 0910 ------wr B4AA8 815 bobble.r
1.78 90/10/18 1259 ------wr BD418 619 cd.order
1.78 90/06/06 1009 ---wr-wr 82B8 5420 cdichanges
1.78 90/11/28 1102 ------wr E0C68 1478 checks.c
1.78 90/11/28 1102 ------wr E1D08 1075 checks.r
1.78 90/09/07 0848 ------wr 708B8 274 datafile
0.78 90/04/12 1206 ---wr-wr 70EE8 1065 drvr.a
1.78 90/11/13 1544 ------wr B1650 112 exloop
To display the execution directory, type:
$ dir -x
To display the entire description of the execution directory, type:
$ dir -xe
To display the contents of the current directory and all directories one level below this
directory, type:
$ dir -r=1
The next example displays the entire description of all files within the current directory.
This includes files within all subdirectories of the current directory.
$ dir -er
This example displays all directory and file names that begin with B.
$ Dir -n B*
diskcache The OS-9 Utilities
34 Using Professional OS-9
SYNTAX: diskcache [<opts>] [<dev>]
FUNCTION: diskcache enables, disables, or displays the status of the cache. Caching may be
enabled for any type of RBF device, and more than one device may be cached at a time.
The total amount of system memory used for caching all enabled drives can be set by
the utility’s -t option. If not explicitly defined, the diskcache utility automatically
selects a reasonable value based upon the amount of free system memory.
Caching may be dynamically enabled or disabled on a per drive basis while the system
is running using the -e and -d options.
Statistical information regarding the hit/miss ratios, amount of memory allocated, etc.
can be inspected on a drive by drive basis using the -l option. An example output of this
information follows:
Current size = 1047552
Size limit = 1048576
Device: /h0:1:1
Requests Sectors Hits Zaps >2 Xfr Hit Rate
Reads: 47592 55436 21874 143 662 39.5%
Writes: 7723 8065 7342 68
Dir Reads: 54048 54048 34526 18387<-Sctr Zero 63.9%
Dir Writes: 0 0
Hit compares = 63399 ( 1/hit)
Miss compares = 92685 ( 3/miss)
CAVEATS: Caching should only be invoked on devices that are known to the I/O system (that is,
the devices should have been initialized with the iniz utility).
If caching is to be enabled on drives with different sector sizes, the device with the largest
sector size should be included in the initial cache enabling. Attempting to add a
drive (with a sector size larger than any currently cached drive) to the cache system after
initial cache startup results in continuous “misses” for that drive, as the sector size
is too large.
diskcache Enable, Disable, or Display Status of Cache
The OS-9 Utilities diskcache
Using Professional OS-9 35
OPTIONS: -? Displays the options, function, and command syntax of diskcache.
-d Disables cache for <dev>.
-e Enables cache for <dev>.
-l Displays the cache status for <dev>.
-t=<size>[k] Specifies the size limit of the total cache.
dsave The OS-9 Utilities
36 Using Professional OS-9
SYNTAX: dsave [<opts>] [<path>]
FUNCTION: dsave is used to backup or copy all files in one or more directories. It generates a
procedure file, which is either executed later to actually do the work or is executed
immediately using the -e option.
To use dsave, type dsave and the path of the new directory. When dsave is executed,
it writes commands on standard output to copy files from the current data directory to
the directory specified by <path>. If no <path> is specified, the copies are directed to
the current data directory when the procedure file is executed.
dsave’s standard output should be redirected to a procedure file that can be executed
at a later time or the -e option should be used to execute dsave’s output immediately.
If dsave encounters a directory file, it automatically includes makdir and chd
commands in the output before generating copy commands for files in the subdirectory.
The procedure file duplicates all levels of the file system connected downward from the
current data directory.
If the current working directory happens to be the root directory of the disk, dsave creates
a procedure file to backup the entire disk, file by file. This is useful when you need
to copy many files from different format disks, or from a floppy disk or a hard disk.
If an error occurs, the following prompt is displayed:
continue (y,n,a,q)?
A y indicates you want to continue. An n indicates you do not want to continue. An a
indicates you want to copy all possible files and you do not want dsave to display the
prompt on error. A q indicates you want to quit the dsave procedure. If for any reason
you do not wish to be bothered by this prompt, the -s option is available. This skips
any file which cannot be copied and continues the dsave routine with no prompt.
dsave helps keep up-to-date directory backups. When the -d or -d=<date> options are
used, dsave compares the date of the file to copy with a file of the same name in the
directory it is to be copied to. The -d option copies any file with a more recent date.
To copy a file with a date more recent than that specified, use the -d=<date> option.
A common error occurs when using dsave if the destination directory has files with the
same name as the source directory. Because a file name must be unique within a
directory, this produces an error. Use the -r option to prevent this error.
OPTIONS: -? Displays the options, function, and command syntax of dsave.
dsave Generate Procedure File to Copy Files
The OS-9 Utilities dsave
Using Professional OS-9 37
-a Does not copy any file that has a name beginning with a period.
-b[=]<n>k Allocates <n>k bytes of memory for copy and cmp if needed.
-d Compares dates with files of the same name and copies files with more
recent dates.
-d=<date> Compares the specified date with the date of files with the same name
and copies any file with a more recent date than that specified.
-e Executes the output immediately.
-f Uses copy’s -f option to force the writing of files.
-i Indents for directory levels.
-l Does not save directories below the current level.
-m Does not include makdir commands in the procedure file.
-n Does not load copy or cmp if -v is specified.
-o Uses os9gen to create a bootfile on the specified destination device if a
bootfile exists on the source device. The default name used for the
bootfile is OS9Boot. This option is used to create a bootable disk.
Merely copying OS9Boot to a new disk does not make it bootable.
-o=<name> Uses os9gen to create a bootfile on a new device, using the specified
name. This option is used to create a bootable disk. Merely copying
OS9Boot to a new disk does not make it bootable.
-r Writes any source file over a file with the same name in the destination
directory. Effectively, this uses the copy utility with the -r option.
-s Skips files on error. This effectively turns off the prompt to continue the
dsave routine when an error occurs.
-v Verifies files with the cmp utility.
42 Using Professional OS-9
SYNTAX: edt [<opts>] <path>
FUNCTION: edt is a line-oriented text editor that allows you to create and edit source files.
To use the line-oriented text editor, type edt and the pathlist desired. If the file is new
or cannot be found, edt creates and opens it. edt then displays a question mark prompt
(?) and waits for a command. If the file is found, edt opens it, displays the last line,
and then displays the ? prompt.
The first character of a line must be a space if text is to be inserted. If any other character
is typed in the first character position, edt tries to process the character as an edt
command. edt command format is very similar to BASIC’s editor.
edt determines the size of the file to edit and uses the returned size plus 2K as the edit
buffer. If the file does not already exist, the edit buffer is initialized to 2K. When the
end of the edit buffer is reached, a message is displayed.
OPTIONS: -? Displays the options, function, and command syntax for edt.
-b=<num>k Allocates a buffer area equal to the size of the file plus <num>k bytes.
If the file does not exist, a buffer of the indicated size is assigned for the
new file.
edt Line-Oriented Text Editor
The OS-9 Utilities edt
EDT
COMMANDS: All edt commands begin in the first character position of a line.
<num> Moves the cursor to line number <num>.
<esc> Closes the file and exits. q also does this.
<cr> Moves the cursor down one line (carriage return).
+<num> Moves the cursor down <num> lines. Default is one.
-<num> Moves the cursor up <num> lines. Default is one.
<space> Inserts lines.
d[<num>] Deletes <num> lines. If <num> is not specified, the default value of
<num> is one.
l<num> Lists <num> lines. <num> may be positive or negative. The default
value of <num> is one.
l* Lists all lines in the entire file.
q Quits the editing session. Command returns to the program that called
the editor or the OS-9 shell.
NOTE: For the following search and replace commands, <delim> may be any
character. The asterisk (*) option indicates that all occurrences of the pattern are
searched for and replaced if specified.
s[*]<delim><search string><delim>
Search command: searches for the occurrences of a pattern. For example:
s/and/ Finds the first occurrence of and.
s*,Bob, Finds all occurrences of Bob.
c[*]<delim><search string><delim><replace string><delim>
Replace command: finds and replaces a given string. For example:
c/Tuesday/Wednesday/ Replaces the first occurrence of Tuesday
with Wednesday.
c*"employee"employees" Replaces all occurrences of employee
with employees.[/COLOR]