Operating System User's Mannal ~Zilog 03-0072-01 Revision a September 1978
Total Page:16
File Type:pdf, Size:1020Kb
t_ .' Operating System User's Mannal ~Zilog 03-0072-01 Revision A September 1978 Copyright © 1978 by Zilog, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Zilog. Zilog assumes no responsibility for the use of any circuitry other than circuitry embodied in a Zilog product. No other circuit patent licenses are implied. zaO-RIO Operating System User's Manual September 1978 TABLE OF CONTENTS CHAPTER 1 - INTRODUCTION AND OVERVIEW • 1 1.1 INTRODUCTION •• 1 1.2 SYSTEM OVERVIEW 3 1.2.1 Hardware Configuration • • • • • • 3 1.2.2 File Systems • • • • • • • . • • 3 1.2.3 System Initialization •••.••• 6 1.2.4 Commands • • .• .•..••• 7 1.2.5 I/O • • • . • • • • • . • • • • • . 7 CHAPTER 2 - RIO EXECUTIVE 9 2.1 SYSTEM INITIALIZATION 9 2.2 FILE NAME CONVENTIONS · 10 2.3 MEMORY MANAGEMENT . • • . 12 2.3.1 MEMMGR • . 13 2.4 COMMAND STRING INTERPRETATION · 13 2.5 ERROR HANDLING • • . 15 2.6 PROGRAM EXECUTION OF COMMANDS · 15 CHAPTER 3 - 1/0 STRUCTURE • · 16 3.1 OVERVIEW . • · 16 3.2 I/O REQUESTS - SYSTEM CALLS · 17 3.3 THE 'ASSIGN' I/O REQUEST ••• • 19 - i - 3.4 STANDARD RIO I/O DEVICES • • • 21 3.4.1 ZDOS . • • • . 21 3.4.2 DFS . 21 3.4.3 NULL . • • • . 21 3.4.4 CON . • • • . • • • • • 22 3.4.5 PCON • 27 3.4.6 FLOPPY • • • • • • • • • • 27 3.4.7 DISK • • • • • • 27 CHAPTER 4 - PROGRAM INTERFACE • • 28 4.1 PROGRAM LOCATION • • • • • 28 4.2 PARAMETER STRING ADDRESS · 29 4.3 PROGRAM STACK SPACE • • • 29 4.4 PROGRAM TERMINATION - ERROR HANDLING ••. 29 4.5 SYSTEM CALLS - SYSTEM ENTRY POINT •. 30 4.6 INTERRUPT STATUS • • • • 31 4.7 I/O UNIT UTILIZATION • • . • • • 31 4.8 PROGRAM EXAMPLES . ... .. • 32 CHAPTER 5 - RIO COMMANDS • • 33 5.1 ACTIVATE · • 35 5.2 ALLOCATE · • 37 5.3 BRIEF . • • 39 5.4 CAT • • • 40 5.5 CLOSE • • 44 5.6 COMPARE • • 45 5.7 COpy • • 47 5.8 COPY.DISK • • • • 49 - i i - 5.9 COPYSD 51 5.10 DATE 53 5.11 DEACTIVATE 54 5.12 DEALLOCATE 55 5.13 DEBUG 56 5.14 DEFINE 60 5.15 DELETE 63 5.16 DISK. FORMAT 67 5.17 DISK. REPAIR 70 5.18 DISK. STATUS 72 5.19 DISPLAY 74 5.20 DO 75 5.21 DUMP 79 5.22 ECHO 80 5.23 ERROR 81 5.24 ERRORS 82 5.25 EXTRACT 83 5.26 FORCE 84 5.27 FORMAT 85 5.28 HELP 88 5.29 IMAGE 89 5.30 INITIALIZE 90 5.31 LADT 91 - iii 5.32 MASTER • 92 5.33 r·10VE • 93 5.34 PAUSE. • . • 98 5.35 RELEASE . • • • 99 5.36 RENAME 100 5.37 RESTORE TABS 102 5.38 SAVE TABS . 103 5.39 SET • • • 104 5.40 STATUS 109 5.41 VERBOSE III 5.42 XEQ • . 112 5.43 EXPRESSION EVALUATION . 113 CHAPTER 6 - ZDOS •• • . 114 6.0 ZDOS OPERATION 114 6.1 INITIALIZE 122 6.2 ASSIGN .•• • 123 6.3 OPEN 125 6.4 CLOSE • . 132 6.5 REWIND 134 6.6 READ BINARY • • 135 6.7 WRITE BINARY 137 6.8 WRITE CURRENT • 139 6.9 DELETE •• • . 140 - iv - 6.10 DELETE REMAINING RECORDS · · · · · 142 6.11 ERASE . · · · · · · · · · · · 143 6.12 READ AND DELETE · · · · · · 145 6.13 READ CURRENT · · · · · · · · · 147 6.14 READ PREVIOUS · · · · · · · 149 6.15 READ DIRECT · · · · · · · · · · · · 151 6.16 SKIP FORWARD · · · · · · · · · · · · · 153 6.17 SKIP BACKWARD · · · · · · · · · 155 6.18 SKIP TO END · · · · · · · · · · · · 157 6.19 RENAME · · · · · · · · 158 6.20 UPDATE . · · · · · · · · · · · 160 6.21 SET ATTRIBUTES · · · · 162 6.22 QUERY ATTRIBUTES · · · · · · · · · 164 CHAPTER 7 - DFS · · · · · · · · · · · · · 166 7.1 ZILOG DISK CONTROLLER · · · · · · · · · 166 7.2 DFS OPERATION · · · · · · · · · · · 168 7.3 SOFTWARE ORGANIZATION · · · · · · · 171 7.4 DFS ALLOCATION · · · · · · · · · · · 172 7.4.1 Sector 0 Format 172 7.4.2 DFS Allocation Algorithm· · · · · 173 7.5 THE BARE DISK CONTROLLER • • • • · ,174 7.6 CONTROLLER BOOTSTRAP OPERATION. • . 177 7.7 SYSTEM BOOTSTRAPPING on the MCZ-1/35 179 - v - APPENDICES APPENDIX A - RIO/ZDOS/DFS Error Codes APPENDIX B - RIO Command Syntax Summary APPENDIX C - RIO System Constants APPENDIX D - Converting Files to RIO Format APPENDIX E - Altering Default RIO APPENDIX F - I/O Request Vector Format and I/O Request Codes APPENDIX G - Program Examples APPENDIX H - Internal Command Table Contents APPENDIX I - RIO Memory Manager APPENDIX J - Descriptor Record of Procedure Type File APPENDIX K - ZDOS/DFS Command Summary - vi - PREFACE This manual provides an introduction and user's manual for the RIO operating system used with Zilog's Micro (ZDS). Detailed description is provided for system features, including the bootstrap process, the RIO Executive, default console drivers, I/O structure, program interface, and the Zilog Floppy Disk File System, ZDOS, and the Zilog Hard Disk File System, DFS. Other pertinent documentation with which the reader may want to become familiar includes: zaO-MCZ PROM User's Manual zaO-ZDS PROM User's Manual zaO-RIO Relocating Assembler and Linker User's Manual zaO-RIO Text Editor User's Manual This manual makes use of the following conventions of notation: Optional portions of a modifier are enclosed in brackets, []. The symbol for logical or, 'I " is used if either option can be issued. STATUS [0 I 1 ••• 7] means the command can be issued as STATUS 0, STATUS 1, .•• STATUS 7, or simply as STATUS. Parameters which can be repeated zero or more times are enclosed in parentheses and followed by an asterisk - e.g., (filename)*. Parameters which can be repeated as necessary but must appear at least once are enclosed in parentheses and followed by a plus sign - e.g., (filename)+. - vii - All memory addresses and constants referring to memory allocation are given in hexadecimal. Unless so specified, other constants are given in decimal. Hexadecimal constants are also indicated by an 'H' immediately following the hex digits, e.g., 4FH. - viii - CHAPTER 1 INTRODUCTION AND OVERVIEW 1.1 INTRODUCTION The zao Operating System with Relocatable Modules and I/O Management, or RIO, is a general-purpose computing system designed to facilitate the development and integration of user's programs into a production environment. RIO is available on various Zilog hardware configurations including the zao Micro Computer System (MCZ-l) series and the zao Development System (ZDS). The zao Development System provides extensive hardware debugging aids to assist the engineer/programmer in ZaO-based hardware/software system design. The user has a choic~ between a modest environment with a minimum of system support or an enhanced environment which provides access to an assortment of system support utilities including the Zilog Floppy Disk File System, ZDOS, and the Zilog Hard Disk File System, DFS. In the modest environment, the user has access to 3K (lK=1024) bytes of dedicated read-only memory which contains a program debugger with file manipulation capability, a floppy disk driver which supports up to eight disk drives, and a basic console driver with provision for paper tape operation. In the enhanced environment, the user also has access to the RIO Executive, ZDOS, DFS, and a collection of disk-resident software including a text editor, macro assembler, and linker. The RIO Executive provides standardized I/O management permitting device independent program development and utilization of alternate or multiple file systems. ZDOS provides a versatile floppy disk based file system with variable record length files; up to 16 concurrently active files; management of user-defined scratch files which are automatically deallocated after use; and support of up to eight disk drives for over 2.5 megabytes of on-line storage. The hard disk file system, - 1 - DFS, supplies similar features on 10 megabyte high speed disks. The text editor, macro assembler and linker give the user full support in program development, minimizing assembly time with relocatable modules while allowing com plex memory overlay structures. In addition, a console driver is provided which allows user definition of character delete and line delete symbols, automatic insertion of any number of line feeds, and automatic echo mode to accommodate a wide r~nge of console devices. - 2 - 1.2 SYSTEM OVERVIEW 1.2.1 HARDWARE CONFIGURATION The RIO Operating System is designed to operate with the 4K PROM in either the Zilog Micro Computer System (MCZ) or Development System (ZDS). A minimum configuration of 32K (lK=1024) of random access memory, one disk drive, and a console device is required. The MCZ 1/20 Zilog Micro Computer System is equipped with two floppy disk drives. The left drive is designated drive '2' and the right drive is designated drive '0'. The Zilog Development System (ZDS) also has two drives, but the designations are 'I' and '0' for left and right, respectively. The MCZ 1/35 uses hard disk cartridge and fixed platter drives. The usual configuration consists of one fixed platter and one c?rtridge drive, designated '0' and 'I', respectively. The system will support up to 8 drives. 1.2.2 FILE SYSTEMS For systems using floppy disks, ZDOS controls the organization and allocation of the sectors on a diskette. While the basic unit of disk allocation is the sector, the fundamental structure within ZDOS is the 'file'. A file consists of zero or more sectors of data which contain logically-related information. Each file has a set of attributes including a name of from one to thirty-two characters, a set of (possibly null) properties, a type, a subtype, and a record length. The smallest amount of information that can be read from or written to the disk is the contents of one sector, but more efficient operation can often be achieved by grouping from one to thirty-two contiguous sectors (a complete track) into one unit which is then read or written together.