OS-9© Level Two Operating System
©1983, 1986 Microware Systems Corporation.
Licensed to Tandy Corporation.
All Rights Reserved.
OS-9 Commands:
©1986 Tandy Corporation
and Microware Systems Corporation.
All Rights Reserved.
Reproduction or use, without express written permission
from Tandy Corporation or Microware Systems
Corporation, of any portion of this manual is prohibited.
While reasonable efforts have been taken in preparation of
this manual to assure its accuracy, neither Tandy
Corporation nor Microware Systems Corporation assumes
any liability resulting from any errors in or omissions
from this manual, or from the use of the information
contained herein.
Contents
Chapter 1 Introduction
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1
The Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-1
The Input/Output Manager . . . . . . . . . . . . . . . . . . . . . . . . . .1-2
Device Drivers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2
Device Descriptors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1-2
Chapter 2 The OS-9 File System
. . . . . . . . . . . . . . . . . . . . . . 2-1
Input/Output Paths . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
Disk Directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Subdirectories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
Random-Access Data Files . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Procedure Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
Executable Program Module Files . . . . . . . . . . . . . . . . . 2-7
Miscellaneous File Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
The File Security System . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Examining and Changing File Attributes . . . . . . . . . . 2-9
Device Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2-12
Chapter 3 Advanced Features of the Shell
. . . . . . . . . . . . 3-1
More About Command Line Processing . . . . . . . . . . . . . . . 3-1
Command Modifiers . . . . . . . . . . . . . . : . . . . . . . . . . . . . . . . . . 3-3
Execution Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
Alternate Memory Size Modifier . . . . . . . . . . . . . . . . . 3-3
I/O Redirection Modifiers . . . . . . . . . . . . . . . . . . . . . . . 3-4
Command Separators . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
Sequential Execution Using the
Concurrent Execution Using the
Ampersand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-6
Combining Sequential and Concurrent
Using Pipes: the Exclamation Mark . . . . . . . . . . . . . 3-7
Raw Disk Input/Output . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Command Grouping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-9
Shell Procedure Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3-10
Built-in Shell Commands and Options . . . . . . . . . . . . . . .3-11
Running Compiled Intermediate Code Programs . . . . . .3-12
Chapter 4 Multiprogramming and Memory
Management
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Processor Time Allocation and Timeslicing . . . . . . . . . . . . 4-1
Process States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Creation of Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Basic Memory Management Functions . . . . . . . . . . . . . . . . 4
5 Loading Program Modules Into Memory . . . . . . . . . . . . 4-6
Deleting Modules From Memory . . . . . . . . . . . . . . . . . . . 4-7
Loading Multiple Programs . . . . . . . . . . . . . . . . . . . . . . . 4-8
Chapter 5 Useful System Information
and Functions
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
File Managers, Device Drivers, and Descriptors . . . . . . . 5-1
The Sys Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
The Startup File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
The CMDS Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Making New System Diskettes . . . . . . . . . . . . . . . . . . . . . . . 5-3
Technical Information for the RS-232 Port . . . . . . . . . . . . 5-4
Chapter 6 System Command Descriptions
. . . . . . . . . . . . 6-1
Organization of Entries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Command Syntax Notation . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Command Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Chapter 7 Macro Text Editor
. . . . . . . . . . . . . . . . . . . . . . . . . 7-1
Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1
Text Buffers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1
Edit Pointers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1
Entering Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
Control Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2
Command Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
Numeric Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
String Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Syntax Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Edit Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Displaying Text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
Manipulating the Edit Pointer . . . . . . . . . . . . . . . . . . . . . 7-7
Inserting and Deleting Lines . . . . . . . . . . . . . . . . . . . . .7-10
Searching and Substituting . . . . . . . . . . . . . . . . . . . . . .7-13
Miscellaneous Commands . . . . . . . . . . . . . . . . . . . . . . . .7-14
Manipulating Multiple Buffers . . . . . . . . . . . . . . . . . . . .7-17
Text File Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-18
Conditionals and Command Series Repetition . . . . . .7-21
Edit Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
Macro Headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-25
Using Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-26
Macro Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-28
Sample Session 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-32
Sample Session 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7-38
Sample Session 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-40
Sample Session 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-45
Sample Session 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . : . . . . . 7-49
Edit (quick Reference Summary . . . . . . . . . . . . . . . . . . . . .7-55
Edit Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-55
Pseudo Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-57
Editor Error Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-59
Appendices
A OS-9 Error Codes A-1
Device Driver Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . A-5
B Color Computer 2 Compatibility . . . . . . . . . . . . . . . . . . . B-1
Alpha Mode Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-2
Using Alpha Mode Controls with Windows . . . . . . . . . B-2
Alpha Mode Command Codes . . . . . . . . . . . . . . . . . . . . . B-3
Graphics Mode Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B-5
Graphics Mode Selection Codes . . . . . . . . . . . . . . . . . . . B-5
Graphics Mode Control Commands . . . . . . . . . . . . . . . . B-6
Display Control Codes Summary . . . . . . . . . . . . . . . . . . . . B-8
C OS-9 Keyboard Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C-1
D Keyboard Control Functions . . . . . . . . . . . . . . . . . . . . . . D-1