M68MDOS3_EXORdisk_II_III_Operating_System_Users_Guide_Dec78 M68MDOS3 EXORdisk II III Operating System Users Guide Dec78
User Manual: M68MDOS3_EXORdisk_II_III_Operating_System_Users_Guide_Dec78
Open the PDF directly: View PDF .
Page Count: 507
Download | |
Open PDF In Browser | View PDF |
M68M 0083(0) M68MDOS3 EXORdisk II/III OPERATING SYSTEM User's Guide MICROSYSTEMS .\{68MDOS3 DECEMBER 1918 EXOHdisk 11/111 Operating System User"'s Guide MOOS 3.0 The information in this document has been carefully checked and is believed to be entirely reliable. No responsibility, however, is assumed for inaccuracies. Furthermore, such information does not convey to the purchaser of the product described any license under the patent rights of Motorola, Inc. or others. Motorola reserves the without notice. right EXORciser, EXbug, EXORdisk, trademarks of Motorola, Inc. to change EXORterm First Edition Copyright 1918 by Motorola, Inc. specifications and MQOS are MANUAL ORGANIZATION The purpose of this guide is to provide the user with the necessary information required to generate an MOOS system, to use the MOOS command programs, and to produce user-written programs that are compatible with MuOS. In addition, a brief summary is presented of the MOOS-supported software products which are currently available. The User's Guide has been divided into two parts. PART I is intended for the new user of MOOS who is just receiving his system. It is essentially a manual within a manual that can be read as an entity by itself. It provides the basic concepts that are necessary for the installation of the EXORdisk and for the simplified operation of MDOS. PART I contains descriptions and examples of the basic forms of the most frequently used MOOS commands in the order in which they would most likely be used in a software development environment. The infrequently used comm-ands are also summarized in order to direct the user to those chapters (command descriptions) as the need for their use arises. PAHT II is intended as a detailed reference manual for those who need to know specific or extended information about the MOOS commands, the system structure, and the resident system functions. MOOS 3.0 User-'s Guide Paq e 1i Page fABLE OF CONTENTS ~ANUAL ORGAN.IZATION • • • • • • • • • • • • • • • • ii TABLE OF CONTENTS • • • • • • • • • • • • • • • • • iIi PART I -- SIMPLIFIED MDOS USEH·'S GUIDE J~ I NTH oDuer I ON e • • • • ·· • • • • • • • • • • • • 01-01 i • i Hardware Support Required • • • • 1.2 Additional Supported Hardware • • 1.3 Software Support Required • • • 1.4 Program Compatibility • • • • • I .5 Hardware Installation • • • • • • COmmon MOOS 3.0 user-'s Guide - - -- - lYtesst:lye!j ~ · nt n'") • • • • • VI-V"::> • • 01-03 • • • • • 01-04 · • • • · • 01-04 • • • • • 01-05 I .5. 1 Four-drive system installation • • • • 01-05 1.5.2 Fioppy disk controller installation· • · 01-06 · I .6 Software Installation • • • • • • • • • • · · · 01-07 GENERAL SYSTEM OPERAfION • • • • • • • • • • • · • 02-01 2.1 System Initialization • • • • • · • • • 02-01 · · 2.2 Sign-on Message • • • • • · · • · • · • • · 02-02 • • • · Messages 2.3 Initialization Error • • • • • • • • • 02-02 2.4 operator Command Format • • • • • • • • • • · 02-06 · 02-07 2.5 System Console • • • • • · key • •• ·• •• •• ·• ·• ·· •• •• ·• 02-07 2.5.1 Carriage return 2.5.2 Break key • • • • • • • • • • · • • • • 02-08 · 2.5.3 Control-W • • • • • • • • • · • • • · • 02-08 · 2.5.4 Control-X • • • • • • • • • • • · • • • 02-08 · 2.5.5 DEL or RUBOUf • • • • • • • • • 02-09 • · · · · 2.5.6 Control-D • • • • • • • • • · • • ·• • • • • • •• •• •• ·• • 02-09 E(ror ,. 2.6 · 2.7 Diskette File Concepts • • • • • · • • • • • 02-12 · 2.7. 1 File name specifications • • · · • • 02-12 · · 02-13 2.7.1.1 Family names · • • • •• ·• •· ·• •• •· ·• 02-14 2.7.1.2 Device spe,c if ications 2.7.2 File creation • • • • • • • · • • • • • 02-14 02-15 2.7.3 File deletion • • •· • • • • • • • 2.7.4 File protection • • • • · • • • • • · · ·• 02-15 · 2.8 Typical Command Usage Examples · • • • • • · • · • 02-15 2.8. 1 OIR -- Directory display • • • • · · • 02-16 02-17 2.8.2 EDIT -- Program editinq • •· · · · ·• •• •· ·• 02-18 2.8.3 ASM or RASM -- Program assembling 2.8.4- DEL -- File dele ti on • • • • • • • • • 02-19 2.8.5 EXBIN -- Creating program load ·module • 02-20 2.8.6 LOAD Program loadinq/execution • • · • 02-21 ·• • 02-22 2.8.7 NAME -- File name chanqing • • • · 2.8.8 NAME -- File protection changing · • · · 02-22 2.8.9 COiJY -- File copying • • • • • • · 02-23 · 2.8.)0 BACKUP -- MOOS diskette creation · 02-25 ·• • • ·• 02-25 2.9 Other Available Commands • • • • • • · 2.9. I BACKUP -- Diskette copying • • • • • • 02-26 · 2.9.2 EMCOPY -- EOnS file conversion ·• ·• ·• 02-26 02-26 2.9.3 BLOKED IT -- File rearrangement • · ·· 2. • • • • • • • • • A'>_AO vc.. Paqe V7 iii fABLE OF CONTENTS Page 2.9.4 LIST -- File disolay • • • • • • • • • • 2.9.5 MERGE -- File concatenation • • • • • • • 2.9.6 BINEX -- EXbug-loadable file creation •• 2.9.7 FREE -- Available file space display •• 2.9.8 ECHO -- Echo console 1/0 on printer • • • 2.9.9 PATCH -- Executable proqram file patchin~ 2.9.10 CHAIN -- MOOS com:nand chaining • • • • • 2.9.11 REPAIR -- System table checking • • • • 2.9.12 DUMP -- Diskette sector display • • • • 2.9.13 FORMAT -- Diskette reformatting • • • • 2.9.14 DOSGEN -- MOOS diskette generation • • • 2.9.15 ROLLOUT -- Memory rollout to diskette • 02-26 02-26 02-27 02-27 02-27 02-27 02-27 02-28 02-28 02-28 02-28 02-29 2.) 0 MOOS-Supported Software Products • • • • • 02-29 2.11 Paper Alignment • • • • • • • • • • • • • • • 02-29 MOOS 3.0 User"s Guide Page Iv Page fABLE OF CONTENTS PART II -- ADVANCED MOOS USER'S GUIDE 3. BACKUP COMMAND ·.. ·......• • • • • • 3. IUs e • • •• ••••••••••••• .... 3.2 Diskette Copying. ••••••••• • •• 3.3 File Reorganization _ _ ____ e e e • • • • 3.4 File Appending • • • • • • • • • • • • • • • • 3.5 Diskette Verification • • • • • • • • • • • • • 3.6 Other Options • • • • • • • • • • • • • • • • • 3.7 Messages • • • __ e e ......... 3.8 Precautions with BACKUP. • • • • •• • ••• 3.8.1 BACKUP and the CHAIN process • • • • • • 3.8.2 Single/double-sided diskettes • • • • • • 3. 8. 3 F 0 U r - d r i v e s y 5 t ems ••• •••••• 3.9 Examples • • • • • • • • • • •• • •• 0 4. BINEX COMMAND • • • ..·. • __ • • • • • • • • • 03-01 03 -0 I 03-02 03-03 03-08 03-10 03-11 03-13 03-17 03-17 03-18 03 - 18 03-18 • • • 04-01 4.1 Use • • • • • • • • • • • • • • • • • • • • • • 04-0 I 4.2 Error Messages • • • • • • • • • • • • • • 04-02 4.3 Examples • e • • • • • • • • • • • • • • • • 04-02 ·. 5. BLOKEDIT COMMAND • e e _ • • • • • 5.1 Use • • • • • • • • • • • • • • 5.2 BL(~EDIT Command File • • • • • 5.2.1 Comment lines • • • • • • 5.2.2 Command lines • • • • • • 5.2.3 Quoted lines • • • • • • 5.3 Messages • • • • • • • • • • • 5.4 Examples • • • • • • • • • • • 6. CHA I N COMMAND • • • • • • • • • • • • • • • • 05-01 • • • • • • • • 05-0 I • • • • • • • • 05-01 ·• .• • • •• • 05-02 • • • • • • 05-02 • • • • • • • • 05-03 • • • • • • • • 05-03 • • • • • • • • 05-05 ·.• • • • • • • • 06-01 6.1 Use • • • • • • • • • • • • • • • • • • • • • • 6.2 Tag Definition, Assignment, and Substitution • 6.3 Compilat ion Operators • • • • • • • • • • • • • 6.3.1 Compilation Comments • • • • • • • • • • 6.3.2 IF operator • • • • • • • • • • • • • • • 6.3.3 XIF and ELSE operators • • • • • • • • • 6.3.4 ABORT operator • • • • • • • • • • • • • 6.4 Execution operators • • • • • • • • • • • • • • 6.4.1 Execution Comments • • • • • • • • • • • 6.4.2 Operator Breakpoints • • • • • • • • • • 6.4.3 Error status word • • • • • • • • • • • • 6.4.4 SET operator • • • • • • • • • • • • • • 6 • 4. 5 TS T op era t or • • • • • • • • • • • • • • 6.4.6 JMP operator • • • • • • • • • • • • • • 6.4.7 LBL operator • • • • • • • • • • • • • • 6. 4. 8 CMD op er a t or • • • • • • • • • • • • • • 6.5 Messages • • • • • • • • • • • • • • • •• • 6.6 Resuming an Aborted CHAIN Process • • • • • • • MOOS 3.0 User's Guide 06-01 06-02 06-04 06-05 06-05 06-07 06-08 06-08 06-09 06-09 06-10 06-11 06 -1 1 06-12 06-13 06-1 3 06-13 06-16 Page v Paqe fABLE OF CONTENTS 6.7 Examples 7. ·.. • • • • • ·.• ·.. ·.. ·...... • • • • COpy COMrt\AND • 1. 1 Use • • • • • • •• 7.2 1.3 '1.4 7.5 1.6 d. ••• •• 7.1.1 Diskette-to-diskette copyinq 7.1.2 Diskette-to-device copying • 7.1.3 Device-to-diskette copying 7.1.4 Verification • • • • • • • • 7.1.5 Automatic verification • • • User-Defined Devices. • •••• COpy Mode Summary. • •• •• Messages • •• ••••••••• Examples •••••• • •••• 7.5.1 Diskette-to-diskette example 7.5.2 Diskette-to-device example • 7.5.3 Device-to-diskette example • COpy with EXOHtape Header • • • • • DEL COMMAND • • • • • • ·..• DIH COMMAND • • • • Use • • • • •• ••••• • • 9.1.1 Families • • • • • • • • 9.1.2 System files • • • • • • 9.1.3 Entire directory entry • 9.1.4 Segment descriptors. • • 9. I • 5 Ot her 0 p t ion s • • • • • • 9.2 Messages • • • • • • • • • • • 9.3 Examples •••••••• • • 10. DOSGE N COMMAND • • • • • • ·.• • • • • • • • • • • • • 08-01 • • • 08-01 • • • 08-02 • • • • • 08-02 08-02 08-03 08-03 08-04 ·... • 09-01 ·. • • • • • • • • • • • • • • • • 09-01 • • • • • • 09-02 • 09-02 • • • • • • • • 09-02 • 09-04 • • • • • • 09-04 • • • • • • • • 09-05 • • • • • • • • 09-06 • • • • • • •• • • ·. ·....·. • • • • • • • • • • • • • • • • • 10-01 10. I Use • • • • • • • • • • • 10.2 Diskette Surface fest •• J 0.3 Minimum System Generation ••••• 10.4 Messages • •• 10.5 Examples • • • • • • • • • MOOS 3. a User"s Guide 07-01 07-02 07-03 07-04 07-05 07-06 07-07 07-08 07-09 07-10 07-10 07-11 • • • • • • 07-12 • • • • • • • • • • 9. I 07-01 • • • • • • 07-13 • • • • • 8.1 Use • • • • • • • • • • • • • • • • B.I.I Single file name deletion •• 8.1.2 Multiple file name deletion. 8.1.3 Family deletion • • • • • • 8.2 (~tions • • • •• •••••••• d.3 Messages • • • • • • • • • • • • • 8.4 Examples • • • • •• •• • 9. •• ••• • • • • • • • • • • • • • • • • • • • • •• • • • • • • • • • • • • • • • • • • • • • • • • • • •• • • ••••• • ••••• 06-17 • • • • • • • • • • • • • • • • • • • • • • • • • • • · . •• • • • • • • • • • • • • ·.. 10-01 10-04 • 10-04 • 10-05 • 10-07 Page vi TABLE OF CONTENTS 1t • 12. DUMP Page COMMAND • • • • • • • • • • • • • • • • • • 11-01 11.1 Use • • • • • • • • • • • • • • • • • • • • • 11.1.1 Physical Mode of operation •• • • • • • ii.l.2 Logical Mods of operation •••••• 11.1.3 Sector change buffer • • • • • • • • • • 11.2 DUMP Command Set • • • • • • • • • • • • • • • 11.2.1 Quit -- Q • • • • • • • • • • • • • = = 11.2.2 Select loqical unit -- u • • • • • • • • 11.2.3 Open diskette file 0 •••••••• 11.2.4 Close diskette file -- C • • • • • • • • 11.2.5 Show sector -- S • • • • • • • • = = = = 11.2.6 Print sector -- L • • • • • • • • • • • 11.2.7 Read sector into change buffer - H •• 11.2. 8 Write change buffer into sector- f4 • • 1 J .2.9 Fill change buffer - F • • • • • • • • 11.2.10 Examine/change sector buffer • • • • • 11.3 Messages. • •••• = • = = = = e e •••• 11.4 Examples • • • • • • • • • • • • • • • • • • 11-01 11-01 11-02 11-02 11-03 11-04 i i -04 11-04 11-05 11-05 11-06 11-07 11-07 11-08 11-08 11-09 11-12 ECHO COMMAND • • ...• • • • • • • • ·..• • • 12-01 12. 1 Use • • • • = • • • • • • • • • • • • • • • 12-01 12.2 Messages. •• 12-01 •••••••••••••••• 13. EMCOPY COMMAND • • • • • • • • ·.• • • • • • • • 13-01 13.1 Use • • • • • • • = • • • • • • • • • • 13. 1 • 1 Sin 9 I e f i 1 e cop Y • • • • • • • • • 13.1.2 Entire diskette copy • • • • • • • 1~ ) ~ -1 5el ec t ed f i I e copy • • • • • • • • 13.2 File Differences Betwe'en EOOS and MDOS • 13.3 Messages • • • • • • • • • • • • • • • • 13.4 Examples • • • • • • • • • • • • • • • • 14. EXBIN COMMAND • • • • • • • • • • • • • • • • • • 14-01 I 4. 1 Use ••••••••••••• • 14.2 Execution Address Specification 14.3 Error Messages • • • • • • • • • 14.4 Examples • • • • • • • • • • • • 15. 13-01 13-02 13-02 13-03 • • • i3-04 • • • 13-04 • • • 13-05 • • • • • • • • • • • • FORMAT COMMAND • • ...• • • • • • • • • • • • • • • • • • • • 14-01 • • • 14-02 • • • 14-02 • • • 14-03 15-01 • • • • • • • • • • • • ·..·....... 15. 1 Use • • • • • • • • • • 15-01 • • • • • • • 15.2 Messages. • • • • • • • • • • 15-02 15.3 Example • • • • • • • • • • • • • • • • • • • 15-02 16. FHEE COMMAND • • • • • • • • • • • • • • • • • • • 16-01 16.1 Use. • • • • • • • • • • • • • • • • • • • 16-01 16.2 Example • • • • • • • • • • • 16-02 • • • • • • • MDOS 3.0 User's Guide Page vii Page TABLE OF CONTENTS I 7. 18. LIST COMMAND • • • • • • • • • • • • • • • • • • • J 7-01 17.1 Use • • • • • • • • • • • • • • • • • • • • • 17.1.1 Start/end specifications • • • • • • • • 17.1.2 Physical line numbers • • • • • • • • • 17. 1 • 3 User-supplied heading • • • • • • • • • 17.1.4 Non-standard page formats • • • • • • • 17.2 Messages • • • • • • • • • • • • • • • • • • • 17.3 Examples • • • • • • • • • • • • • • • • • • • 17-01 17-02 17-02 17-03 17-03 17-04 11-05 LOAD COMMAND • • • • • • • • • • • • • • • • • • • 18-01 18. 1 Use 18-01 18-03 programsl8-04 • • • • 18-06 • • • 18-07 )8-01 • • J8-08 • • • • • 18-10 • • • • • • • • • • • • • • • • • • • • • • • 18. I • 1 Command-interpreter-Ioadable programs • J8.1.2 Non-command-interpreter-Ioadable 18.1.3 Programs in the User Memory Map 18.1.4 MDOS command line initialization 18. 1.5 Entering the debug moni tor • • 18.2 Error Messages • • • • • • • • • • 18.3 Examples • • • • • • • • • • • • • • • · 19. MEtlGE COMMAND • • · · ··· · • • • • • • • • • • • • • • 19-01 19.1 Use • • • • • • • • • • • • • • • • • •• 19.1.1 Merging non-memory-image files • • • • • 19.1.2 Merging memory-image files • • • • • • • 19.1.3 Other options • • • • • • • • • • • • • 19.2 Messages • • • • • • • • • • • • • • • • • • • 19.3 Examples • • • • • • • • • • • • • • • • • • • 20. 19-01 19-02 19-03 19-04 19-05 19-05 NAME COMMAND • • • • • • • • • • • • • • • • • • • 20-01 20.1 Use • • • • • • • • • • • • • • • 20.1.1 Changing file names • • • • 20.1.2 Changing file attributes •• 20.2 Error Messages • • • • • • • • • • 20.3 Examples • • • • • • • • • • • • • MDOS 3.0 User's Guide · . . . . •• • • • • • • • • • • • • • • • • 20-01 20-01 • • 20-02 • • 20-03 • • 20-04 • ~aqe vIii Page f.ABLE OF CONTENTS 2 1, . PATCH COMMAND • • • • • • • • • • • • • • • • • • 21-01 21.1 Use • • • • • • • • • • • • • • • • • • • • • 21-01 21.2 PATCH Command Set • • • • • • • • • • • • • • 21-02 21 • 2. 1 Qu i t ....= Q • • • • • • • • • • • • • • • 21.2.2 Set/display offset -- 0 • • • • • • • • 21.2.3 Display single location • • • • • • • • 21.2.4 Display lowest address -- L • • • • • • 21.2.5 Display highest address -- H • • • • • • 21.2.6 Calculate relative address -- R • • • • 21.2.7 Dis-assemble operation code -- I . . . . 21.2iiS Set search mask and pattern .- Mao 21.2.9 Search for byte -- S • • • • • • • • • • 2) .2.10 Search for word -- W • • • • • • • • • 21.2.11 Search for non-matchinq byte -- N • • • 21.2.12 Search for non-matchinq word -- X • • • 2.1.2.13 Display range of locations -- P • • • • 21.2.14 Set/display execution address -- G •• 21.2.15 Examine/display/change locations • • • 21.2.16 Instruction mnemonic decode mode • • • 21.3 Special Considerations • • • • • • • • • • • • 21.4 Error Messages • • • • • • • • • • • • • • • • 21-02 21-03 2!-04 21-04 21-04 21-05 21-06 21-07 21-08 21-08 21-08 21-08 21-09 21-10 21-11 21-14 21-15 ·..• 22-01 0 22. HEPAI H 22. 1 22.2 22.3 22.4 22.5 22.6 22. 7 22.8 23. COMMAND • • • • • • ·. • • • • 0 • · · • 22-01 · · · • • • • 22-03 22-08 · · ·• •• ·• •• 22-) 1 22-15 • • · • ·· • • • • 22-18 • • • • 22-19 • • • · 22-19 · • • • • • • • • • • · • 23-01 Use • • • • • • • • • • • • • • IU, LCAT, CAT, Bootblock Sector Check Directory Sector Check • • • • • • • Hetrieval Information Block Check • CAT Reqeneration Phase • • • • • • CAT Replacement Phase • • • • • • • • Me ssages • • • • • • • • • • • • • Examples • • • • • • • • • • • • • ROLLOUT COMMAND · ·· • • • • • 23.1 Use • • • • • • • • • • • • • • • • • • • • • 23. I • 1 User Memory Map •• • • • • • • • • • • 23. 1.2 Non-overlayed memory • • • • • • • • • • 23. 1 .3 Overlayed memory • • • • • • • • • • • • 23.1.4 Scratch diskette conversion • • • • • • 23.2 Messaqes • • • • • • • • • • • • • • • • • • • 23.3 Examples • • • • • • • • • • • • • • • • • • • MOOS 3.0 User's Guide 23-01 23-02 23-03 23-03 23-05 23-06 23-08 Page i x r ABLE 24. Page OF CONTENTS SYSTEM DESCRIPTION • • • • • • • • • • • ..• • • 24-01 24.1 Diskette Structure • • • • • • • • • • • • • • 24.1.1 Diskette Identification Block • • • • • 24.1.2 Cluster Allocation Table • • • • • • • • 24.1.3 Lockout Cluster Allocation Table • • • • 24.1.4 Directory • • • • • • • • • • • • • • • 24. 1.5 Bootblock • • • • • • • • • • • • • • • 24.2 File structure • • • • • • • • • • • • • • • • 24.2.1 Retrieval Information Block • • • • • • 24.2.2 File formats • • • • • • • • • • • • • • 24.3 Record Structure • • • • • • • • • • • • • • • 24.3. 1 Binary records • • • • • • • • • • • • • 24.3.2 ASCII records • • • • • • • • • • • • • 24.3.3 ASCII-converted-binary records • • • • • 24.3.4 File descriptor records • • • • • • • • 24.4 System Files • • • • • • • • • • • • • • • • • 24.4.1 System overlays • • • • • • • • • • • • 24.4.2 System error message file • • • • • • • 24.5 Memory Map • • • • • • • • • • • • • • • • • • 24.6 MOOS Command Interpreter • • • • • • • • • • • 24.7 Interrupt Handling • • • • • • • • • • • • • • 24.8 System Function Calls • • • • • • • • • • • • 24.9 MOOS Equate File • • • • • • • • • • • • • • • 25. INpUT/OUTPUT FUNCTIONS FOR SUPPORTED DEVICES • • • 25-01 25. I Supported Devices • • • • • • • • • • • • • • 25.2 DeVice Dependent I/O Functions • • • • • • • • 25.2.1 Console input -- .KEYIN • • • • • • • • 25.2.2 Check for BHEAK key -- .CKBRK • • • • • 25.2.3 Console 'output -- .DSPLY, .DSPLX, .DSPLZ 25.2.3.1 Example of console 1./0 • • • • • • 25.2.4 Printer output -- .PRINT, .PRINX • • • • 25.2.4.1 Example of printer output • • • • 25.2.5 Physical sector input -- .DREAD, .EREAD 25.2.6 Physical sector output -- .DWRIT, .EWRIT 25.2.1 Multiple sector input -- .MREAD, .MERED 25.2.8 Multiple sector output -- .MWRIT, .MEr4RT 25.2.9 Diskette controller entry points • • • • 25.3 Device Independent I/O Functions • • • • • • • 25.3.1 I/O Control Block - IOCB • • • • • • • 25.3 •• 1 IOCSTA Error status • • • • • • 25.3 •• 2 IOCOTr Data transfer type • • • 25.3 •• 3 IOCOBP Data buffer pointer •• 25.3 •• 4 IOCDBS Data buffer start • • • 25.3 •• 5 IOCDSE Data buffer end • • • • 25.3 •• 6 IOCGDW Generic device word •• 25.3 •• 7 I(~LUN -- Logical unit number •• 25.3 •• 8 IOCNAM - File name • • • • • • • 25.3 •• 9 IOCSUF - Suffix • • • • • • • • • 25.3 •• 10 IOCMLS Maximum LSN referenced 25.3. • 1 I IOCSDW Cu rr ent SDW • • • • • • 25.3 •• 12 I(~SLS -- Starting LSN of SDW •• MOOS 3.0 24-01 24-02 24-03 24-03 24-04 24-06 24-01 24-07 24-JO 24-11 24-11 24-12 24-13 24-14 24-15 24-16 24-17 24-17 24-20 24-21 24-23 24-25 User"'s Guide 25-01 25-01 25-02 25-04 25-05 25-06 25-07 25-08 25-09 25-11 25-12 25-13 25-13 25-13 25-14 25-18 25-19 25-22 25-22 25-23 25-23 25-23 25-24 25-24 25-25 25-25 25-25 Page x TABLE OF CONTENTS Page 25.3.1.13 IOCLSN Next LSN • • • • • • • 25.3.1.14 IOCEOF LSN of end-of-file •• 25.3.1. 15 IOCRIB PSN of RIB • • • • • • 25.3.1.16 I(~FDF File descriptor flags. 25.3.1.17 IOCDEN Directory entry number 25.3.1.1810CSSP Sector buffer pointer. 25. 3. 1• I 9 I OCSB S -- Sec tor bu f fer s tar t • • 25.3.1.20 I(~SBE -- Sector buffer end ~ ~ 25.3.1.21 IOeSBI -- Internal buffer pointer 25.3.2 Reserve a device -- .RESRV • • • • • • • 25.3.3 Open a file -- .OPEN • • • • • • • • • • 25.3.4 Input a record -- .GETRC • • • • • a 25.3.5 Output a record -- .PUTRC • • • • • • • 25.3.6 Close a file -- .CLOSE • • • • • • • • • 25.3.7 Release a device -- .RELES • • • • • • • 25.3.8 Example of d~vice independent I/O • • • 25.3.9 Specialized diskette 1/0 functions • • • 25.3.9.1 Input logical sectors -- .GETLS • 25.3.9.2 Output logical sectors -- .PUTLS • 25.3.9.3 Rewind file -- .RE~ND • • • • • • 25.3.9.4 Example of logical sector 1/0 • • 25.3. 10 Error handl i ng • • • • • • • • • • • • Q 0 26. • 25-26 25-26 25-26 25-26 25-30 25-31 25 - 3 I 25-3J 25-32 25-32 25-34 25-39 25-42 25-45 25-48 25-49 25-51 25-51 25-54 25-56 25-58 25-62 INpUT/OUTPUT PROVISIONS FOR NON-SUPPORTED DEVICES 26-01 26. 1 Device Dependent I/O • • • • • • • • • • • • • 26.2 Device Independent 1/0 • • • • • • • • • • • • 26.2.1 Controller Descriptor Block -- COB • • • 26.2.1.1 CDBInc Current IOCB address •• 26.2.1.2 CDBSDA Software driver address 26.2.1.3 CDBHAD Hardware address • • • • 26.2.1.4 CDBDDF Device descriptor flags 26.2.1.5 COBVOr Valid data types • • • • 26.2.1.6 CDBDOA Device dependent area • 26.2.1.7 CDB~ST Working storage • • • • 26.2 .• 2 Devic e dr i ver 5 • • • • • • • • • • • • • 26.2.3 Example of device driver • • • • • • • • 26.2.4 Adding a non-standard device • • • • • • 26-01 26-01 26-01 26-04 26-04 26-04 MDOS 3.0 User-'s Guide 26-04 26-07 26-08 26-08 26-08 26-10 26-13 Page xi f ABLE OF CONTENfS 27. Of HER SYSTEM FUNCTIONS • • • • • • • • • • • • • • 27-01 27. I Register Functions • • • • • • • • • • • • • • 27.1.1 Transfer X to B,A -- .TXBA • • • • • • • 27.1.2 Transfer B,A to X -- .TBAX • • • • • • • 27.1.3 Exchange B,A with X -- .XBAX • • • • • • 27.1.4 Add B to X -- • ADBX • • • • • • • • • • 2 7 • 1 • 5 Add A to X -- • AD AX • • • • • • • • • • 27 • 1 • 6 Add B, A to X -- • AD BAX • • • • • • • • • 27 • 1 • 7 Add X to B. A -- • AD XB A • • • • • • • • • 27.1.8 Subtract 8 from X -- .SUBX • • • • • • • 27.1.9 Subtract A from X -- .SUAX • • • • • 27.1.10 Subtract B,A from X -- .SUBAX • • • • • 27.1.11 Subtract X from B,A -- .SUXBA • • • • • 27.1.12 Compare B,A with X - .CPBAX • • • • • 27.1.13 Shift X right -- .ASRX • • • • • • • • 27.1.14 Shift X left -- .A5LX • • • • • • • • • 27.1.15 Push X on stack -- .PSHX • • • • • • • 27.1.16 Pull X from stack -- .~ULX • • • • • • 27.2 Double-byte Arithmetic Functions • • • • • • • 27.2.1 Add A to memory -- .ADDAM • • • • • • • 27.2.2 Subtract A from memory -- .SUBAM • • • • 27.2.3 Shift memory right -- .OMA • • • • • • • 27.2.4 Shift memory left -- .MMA • • • • • • • 27.3 Character String FUnctions • • • • • • • • • • 27.3.1 String move -- .MOVE • • • • • • • • • • 27.3.2 String comparison -- .CMPAR • • • • • • 27.3.3 Character-fill a strin~ -- .STCHR • • • 27.3.4 Blank-fill a string -- .SICHS • • • • • 27.3.5 Test for alphabetic character -- .ALPH~ 27.3.6 Test for decimal digit -- .NUMD • • • • 27.4 Diskette File Functions : • • • • • • • • • • 27.4.1 Directory search -- .OIRSM • • • • • • • 27.4.2 Change file name/attributes -- .CHANG • 27.4.3 Load program into memory -- .LOAD • • • 27.4.4 Allocate diskette space -- .ALLOC • • • 27.4.5 Deallocate diskette space -- .DEALC •• 27.4.6 Display system error message -- .MDERR • 27.5 Other Functions • • • • • • • • • • • • • • • 27.5.1 Process file name -- .PFNAM • • • • • • 27.5.2 Re-enter resident MOOS -- .MDENT • • • • 27.5.3 Reload MOOS from diskette -- .Boor • • • 27.5.4 Set system error status word .EWORD 27.5.5 Allocate user program memory -- .ALUSM • 28. Page 27-01 27-02 27-02 27-02 27-02 27 - 0 3 27-03 27 -03 27-04 27-04 27-04 27-04 27-05 27-05 27-05 27-06 27-06 27-06 27-06 27-07 27-07 27-07 27-08 27-08 27-09 27-10 27-10 27-10 27-11 27-11 27-13 27-16 27-19 27-24 27-27 27-29 27-33 27-33 27-36 27-37 27-38 27-38 ERROR MESSAGES • • • • • • • • • • • • • • • • • • 28-01 28.1 Diskette Controller Errors • • • • • • • • • • 28.1.1 Errors during initialization • • • • • • 28.1.2 Errors after initialization • • • • • • 28.2 Standard Command Errors • • • • • • • • • • • 28.3 Input/(~put Function Errors • • • • • • • • • 28.4 System Error Status Word • • • • • • • • • • • 28.5 Commands Affecting Error Status Word • • • • • MOOS 3.0 User"'s Guide 28-01 28-01 28-05 28-06 28-18 28-19 28-20 Page xii TABLE OF CONTENTS Page APPEt'-lDICES A. Cylinder-Sector/Physical Sector Conversion Table B. ASCII Character Set c. D. MDOS Command Syntax Summary • • • • • • Diskette Controller Entry Points • • • E. Mini-Diagnostic Facility F. Diskette Description, Handling, and Format G. Directory Hashing Function H. MDOS-Supported Software Products ....• • • • • • ~ · . . • • • 8-01 • • ·.. • • · . • 0-01 C-OI • • • • • • • • • • • • • •• E-O t • • • • • • • • • • • F-Ol · . . · . • G-Ol • • • • • ·.• H. I ASM -- M6800 Ass embl er •••• • • • • • • 1--1.2 ASMIOOO-- M141000 Cross Assembler • • • • • • rl.3 ASM3870 -- M3870 Cross Assembler • • • • • • • H.4 BASIC -- BASIC Interpreter • • • • • • • • • • H.5 EDIT -- Text Edi tor • • • • • • • • • • • • • • rl.6 EM3870 -- M3870 Emulator • • • • • • • • • • • H.1 FORMIOOO -- M141000 Object File Conversion •• ti.8 FORT -- Helocatable FORTRA.N Compiler • • • • • H.9 MASM -- MACE Cross Assembler • • • • • • • • • H.IO MBUG -- MACE Loader and Debuq Module • • • • • rl. II MOTEST -- Componen t Tes ter Ex ecuti ve • • • • • H.12 MPL -- MPL Compil er • • • • • • • • • • • • • H.13 PPLO/PPHI -- PROM tJrogrammer I • • • • • • • • H.14 PROMPROG -- PROM Programmer 11/111 • • • • • • H. 15 RASM -- ReI ocatabl e M6800 Macro Assembl er •• H.16 RASM09 -- Relocatable M6809 Cross Assembler • H.17 RLOA.D-- M6BOO Linking Loader • • • • • • • • d.J8 SIMIOOO -- 141000 Simulator • • • • • • • • • H.19 USE with MOOS • • • • • • • • • • • • • • • • I • MOOS Equate File Listing J. MOOS 3.00 Oi fferences • • • • • • • • • • • • • • • J. J Impact of MOOS 3.00 on Previous MOOS Programs. J.2 Enhancements to MDOS 2.20/2.21 • • • • • • • • J.3 Enhancements to MDOS 3.00 • • • • • • • • • • • H-O t H-02 H-04 H-07 H-09 H-IO H-12 H-13 H-15 H-J7 H-19 H-20 H-2 i H-23 H-25 H-26 H-29 H-32 H-38 H-39 • • • • • • • • • • • • • 1-01 ...• K. IOCB Input Parameter Summary L. EXOHdisk 11/111 System Specifications. MOOS 3.0 User-' s Gui de A-OJ J-Ol J-OI J-04 J-06 • • • • • • • K-O 1 .....• L-OI Page xi i1 PAR T I SIMPL IF lED MDOS USER·'S GUIDE CHAPTER I i. INTRODUCTION The EXOHdisk II is a single-sided, single-density, dual diskette drive storaqe system designed for use with the EXORciser or EXoRterm. The EXORdisk III is a double-sided, sinqle-density. dual diskette drive storage system iesiqned for use wi th the EXOHci ser or EXoRterm. The EXORdi sk I I! can be expanded into a four-drive system. With either the EXOHdisk II or EXOHdisk III system, the following items are also included: a floppy disk controller module, a floppy disk interconnection cable assembly, and a software disk operating system. An illustration of a typical EXORdisk system is shown in Figure I-I. The M6dOO Oi skette Operating Syst em (MOOS) , in conjunction with the EXORciser and EXORdisk II or EXORdisk III, provides a powerful and easy-to-use tool for software development. MOOS is an interactive operating system that obtains commands from the system console. These commands are used to move data on the diskette, to process data, or to activate user-written processes from diskette. All this can be accomplished with a minimum of effort; and since MDOS is a facilities oriented system, rather than a supervisory oriented one, a minimum of overhead is imposed. In addi tion, an extensi ve set of resident system functions are provided for general development use. Such functions as dynamic space allocation, random access to data files, record 1/0 for supported and non-supported deVices, as well as many register, string, and other diskette-oriented routines make MOOS a 900d basis for a user's application system. MOOS 3.0 user-'s Guide Page 01-01 Figure I-I. MOOS 3.0 User"s GUide TYPcial EXORdisk system. Page OJ-02 NfHODUCTION J.I 1.1 -- Hardware Support Required Hardware Support Required The minimum MOOS con sl st s of I hardware configuration required to support an EXORciser or EXORterm with EXbug firmware 16K HAM EXORdisk II/II! dual diskette drive unit EXORdisk 11/111 floppy disk controller module Interconnect cable ASR33 (TTY) or RS-232C compatible terminal The EXOHdisk II can read and write diskettes recorded in an IBM-3740-similar format (single-sided, single-density). The EXORdisk III can read and write all diskettes that the EXORdisk II can handle. In addition, diskettes formatted in the Motorola single-density, double-sided format can also be read and written. The double-sided diskettes cannot be used in the EXORdisk II. The abOVe minimum configuration will allow the user to run any of the MOOS commands that reside on the MOOS system diskette at the time of purchase. Other additional hardware may be required to run the MOOS-Supported software products~ Such information is described in Appendix H. 1.2 Additional Supported Hardware MDOS also supports R line printer and the readerlpunch (record) devices of the system console. The line printer interfaces to the EXORciser through the printer interface module (MEX68PI) which consists of two PIA's plus the necessary buffering devices and address decoding. If the printer interface from an EDOS system is used instead, it must be modified for use with MDOS. The modifications consist of adding the following lines to the printer interface PIAl I. 2. Print select (high=selected) to PBO (pin 18 of PIA) Paper out (low=paper available) to PBl (pin 11 of PIA) The system consoleJs automatic reader/punch (record) devices must be similar to a Teletypewriter1s paper tape reader and punch. For a complete description of the system console requirements consul t the J'M6800 EXORciser User-'s Guide". MDOS 3.0 User1s Guide Page 01-03 I NTHODUCT I ON 1.3 -- Soft~are Supoort Required 1.3 Software Support Required No additional software is required to run the operating system as it comes shipped on the system diskette. 1.4 ~rogram Compatibility All of the MOOS commands and system files th-3t are shipped on the system diskette must be used with that particular version of MOOS. MOOS commands and system files from other versions should never be intermixed. MOOS-Supported software products (see Appendix H) with version numbers 3.00 or greater must be used with MOOS 3.00. They wi 11 not operate correctl y with pr ior versions of MOOS. In addition, prior versions of the M6800 Linkin1 Loader (HLOAO, through version 2.03) will not operate with MOOS 3.00. Prior versions of other MOOS..,.,Supported software products will work with MOOS 3.00. Most user-written assembly lanquage programs th3t were developed independently of MOOS can be executed on 3n MDOS system without reassembly; however. such programs will have to be converted into the memory-image file format before they can oe loaded from diskette into memory (see section 2.8.5). tJrograms need only be changed when transferred to MOOS if: about pointer I• They make assumptions initialization of the stack they are loaded into memory, the after 2. They are oriqined to load (initialize me~ory while loading) below hexadecimal location $20, 3. They make assu~ptions about the physical structure of diskette tables or files, 4. They utilize the diskette for input/output. 5. They make assumptions about the contents the S~I and IRQ interrupt vectors. of If a user has prior EX(fficiser support software products which he has purchased from Motorola (e.g., editors, assemblers, or compilers), that software must be upgraded to be compatible with MOOS. If a user has software that he has developed using previous versions of MOOS, then Appendix J sh')uld be consulted for a list of differences between MDOS 3.00 and prior versions that may affect programs running with MOOS 3.00. MOOS 3.0 User"s Guide Page 01-04 1.5 -- Hardware Installation I NTH oDueT I ON 1.5 Hardware Installation The floppy disk controller module and drive unit should be inspected upon receipt for broken, damaged, or missing parts as well as for damage to the printed circuit board. The packing materials should be saved 1n case reshioping is nece ssary. 1.5.1 Four-drive system installation The following procedure must be performed to install the four diskette drive version of the EXORdisk III. This section is not applicable to EXORdisk II systems or to dual-drive EXORdisk III systems. This procedure must be performed before the floppy disk controller module is installed (next section). It should be noted that in the four-drive configuration, all diskette controller oriqinated lines must be terminated in the last drive of the daisy chain. When facing the front of the disk drive"units, drive zero is on the left and drive one is on the right of one unit, while drive two is on the left and drive th~ee is on the right of the other unit. Before the following modifications are made, both dual-drive units are identical. I. The housings removed. from both dual-drive units must be 2. In the dual-drive unit that is to contain drives zero (Motorola and nnQ_ PIN - .. " thQ Terminator Np.twork 51 NW9626AOI ) should be removed from the socket XA22 on printed circuit board ( pcb) for drive zero. The drive one pcb socket XA22 should not have the Terminator ~etwork installed. ~ 3. JPR I) should be installed in the jumper area of pcb for drive zero. 4. JPR 9 should be installed in the jumper area of the pcb for drive one. 5. The housing should be replaced on this dual-drive unit and the drives marked as zero and one. 6. (h the other dual-drive unit the Terminator Network should be installed in socket XA22 of the ocb for drive three. There should be no Terminator ~etwork installed on socket XA22 of the pcb for drive two. 1. JPR 11 in the jumper area of the pcb for should be installed. JPR 8 should be MOOS 3.0 Jser's Guide removed (if installed). drive the two Page 01-05 1.5-- Hardware Installation I NTRODUCT ION 8. JPR 9 in the Jumper are of the pcb should be installed. 9. removed (If installed). for drive three JPR 10 should be The housing on this dUal-drive un.it should replaced and the drives marked as two and three. be 50-pin ribbon cable (Motorola PIN 30BW1824XOI) should be installed between drives zerolone and two/three. 10. The 1.5.2 Floppy disk controller installation To install the floppy disk controller module into the EXORciser, the following steps should be followed. I. The PWR keyswitch on the EXORciser should be turned OFF. CAUTION' Inserting the floppy disk controller module while power is applied to the EXORciser system may result in damage to components of the module. 2. Any other card in the EX(illciser that responds to addresses between hexadecimal $E800 through $EC07, inclusive, must be removed from the system or configured for a different address range. 3. The floppy disk controller module can then be inserted into any available card slot. It is desirable to keep all of the cards in the EXORciser close together; it is specifically recommended that dynamic memory boards be kept as close to the MPU board as possible. ~hen properly installed, the component sides of all cards should be facing the left-hand side of the EXORciser chassis (as viewed from the front). The EXOHciser motherboard connectors are offset and keyed to prevent backward installation of cards. 4. fhe interconnect cable should then be attached to both the drive unit and the diskette controller module. CAUTION' The pin index mark on the connector must match up with the index mark on the cable. Damage to the module will result if the cable is installed the wrong way. 5. power can now be applied to both the drive unit and to the EXORciser·-- the hardware is installed. The operator should get into the habit of turning on the power in the MOOS 3.0 llser"'s Guide Page 01-06 INTHODUCTION 1.5 -- Hardware Installation following sequence: system console, EXORciser, EXOHdisk, and line printer. The power off sequence should be the reversel line printer, EXORdisk, EXORciser, and system console. No diskettes should be in a drive while the driveJs or the EXORciserJs power is being turned on or off. 1.6 Software Installation There is no software installation that need be performed. All MOOS software is included on the diskette that is shipped with each EXORdisk. This diskette contains the operatinq system and a set of commands that comprise MOOS. It llay or may not contain any of the MDOS-supported software products such as editors or assemblerse These products are dependent on the mode of system purchase. MUOS 3.0 User's Guide Page 01-07 CHAPTEr? 2 2. GENERAL SYSTEM OPERATION This chapter provides the user with the basic concepts that are necessary for the simplified and typical ooeration of MOOS. It contains descriptions and examples of the initialization procedures and of the basic forms of the most frequently used commands. fhese examples clearly illustrate how MOOS is used to edit a program, to assemble it, to convert it into a loadable module, to load it and execute it, as well as some other useful operations. The commanis are presented in a sequence that is commonly follo~ed in a software development environ~ent. 2.1 System Initialization To initialize tne operating system, power must first be applied to the EXOHciser and to the diskette drive unit. No diskette should be in the drive while power is beinq turned on or off on either the drive or the EXORciser. Once the power is on, the following steps must be followed: 1. EXbug must be initialize~ and configured for the proper speed of the system console. If power has Just been turned on for the first time, EXbug initialization is automatically performed by the pOWG~-Up interrupt service routine in EXbug. If power is already on and MOOS is to be re-initialized, then either the .ABORT or RESTART pushbuttons on the EXORciser's front panel must be depressed to initialize EXbug. The prompt "EXBUG V.R" will be display,ed by EXbug indicating it is waitinq for operator input. IIV" indicates the version and uRn the revision number of the EXbug monitor in the system. 2. An MDOS diskette (one shipped from Motorola or one that has been properly prepared by the user (see section 2.8.10» must be placed in drive zero. The door on the drive unit must then be closed in order for the diskette to begin rotating. For the side-by-side drives, drive zero is on the left side, as seen from the front. For the EOOS-converted systems using the vertically stacked drives, drive zero is the top one. The diskette must be oriented properly before MDOS 3.0 User"s Guide Page 02-01 Ut:Nt:HAL !::iYSTEM OPERATION 2.1 -- System Initi8lization being inserted into the drive. When the diskette is inserted properly, the label is facing up, and the ed~e of the diskette with the lbng narrow slot in the protective covering is inserted first. The labelled edge will be the last edge to be covered up as the diskette is inserted into the drive. 3. (~erators with EXbug 2 in their systems will skip thi s step. The EXbug I command "MAID'" must be entered. An asterisk (*> prompt will be displayed once MAID has been activated. 4. The MAID command "E800;G" must be entered if the debug monitor is EXbug I. For EXbug 2 monitors, the EXbug command "MOOS" must be entered. Either command will give control to the diskette controller at the specified address. The controller will initialize the drive electronics and then proceed to read the Bootblock into memory. Once the 8ootblock has been loaded, control is transferred to it. The Bootblock will then attempt to load into memory the remainder of the resident operating system. 2.2 Sign-on Message If no errors occur during the initialization process, MOOS will display the message: MOOS VV.RR = meaning that MOOS has been successfully loaded from disk and initialized. The JIVV" and '''RR'' indicate the versi.on and revision numbers of the operating system, respectively. In addition, an equal sign (=) is displayed as a prompt indicating that MDOS is ready to accept commands from the operator. The equal sign prompt is subsequently displayed each time the MOOS command interpreter gets control. The sign-on message showing the version and revision nu~bers is only displayed when MOOS is reloaded from the diskette. 2.3 Initialization Error Messages If for some reason the drive electronics are not properly initialized, or if the diskette in drive zero cannot be read properly to load the Bootblock or the resident operating system, then a two-character error message will be displayed and control rsturned to the EXbug monitor. MOOS 3.0 User"s Guide Page 02-02 3E,~ERAL 2.3 -- Initialization Error Messages S{SfEM OPERAT ION The following initialization. All letter II Ell. Message errors can two-character be produced during messages begin with the [)_ ... r.... ..... r....l ..... \,.,oU.;;JC 0..,.,.~,.. r,vuou~c El A cyclical redundancy check (CKC) error was detected while reading the resident operating system into memory. E2 The diskette has the write protection tab punched out. During the initialization process. certain information is written onto the diskette. The diskette is not damaged and can sti 11 be used for a system diskette; however, the write protection tab must fi rst be covered with a piece of opaque tape to allow writinq on the di skette. E3 fhe drive is not ready. The door is open or the diskette is not yet turning at the proper speed. If the diskette hAS been inserted into the drive with the wronq orientation, the "not ready" error will be also generated. If a doubl e-sided diskette is used in the EX(~disk II drives, this error will also occur. Closing the door, waitinq a little bit lonqer before entering the JtE800;G" . or "MOOS'" command, or turning the diskette around 50 it is properly oriented should eliminate this error. E4 A deleted data mark was detected while reading the resident operating system into memory. E5 A timeout interrupt occurred. This indicates that a diskette controller function was not completed within the allotted time. This error can also occur if the ABORT pushbutton is depressed while a diskette transfer is in progress. MOOS 3.0 UserJs Guide Page 02-03 GENERAL Sf STEM OPERATION 2.3 -- Initialization Error Messages The diskette controller has been presented with a cylinder-sector address that is invalid. E6 This error indicates some type of a hardware problem. For example, the error can be caused by missin1 or overlapping memory, bad memory, or pending IRQs that cannot be serviced. A seek error occurred while trying to read the resident operating system into memory. E7 Like E6 errors, this one indic~tes some type of a hardware problem. E8 A data mark error was detected while trying to read the resident operating system into memory. E9 A CRC error was found while rea1ing the address mark that identifies sector locations on the diskette. The diskette controller errors EI, E4, ES, and E9 indicate that the diskette cannot be used to load the operating system; however, a new operating system can be generated on that diskette, making it useful again. Chapter 10, OOSGEN command, and chapter 15, FORMAT command, iescr ibe ways in which damaged diskettes can be regenerated. Depending on the extent of the errors, the diskette ~ay be used in drive one to recover any files that may Oe on it (section 2.8.9). The diskette controller error E5 can occur for a variety of reasons. The most common reason, and the most fatal, is the destruction of the addressing information on the diskette. If the addressing information has been d~stroyed (verified by using DUMP command to examine areas of diskette), the FORMAT command may be used to rewrite the addressing; however, information on the damaqediiskette cannot be recovered. Occasionally, after a system has just been unpacked, the read/write head may have been positioned past its normal restore point on cylinder zero. In this case, trying the event which caused the error three or more times may position the head to the proper place. If this fails, the head will have to be manually repOSitioned past cylinder zero; however, this problem rarely occurs. The E5 errors can also occur if a user-written program accesses drives 1-3 without usinq one of the system functions and without first restoring the read/write head on that drive. Even after MOOS 3.0 User's Guide the resident operatinq system has been Paqe 02-04 3ENERAL Sf STEM OPERATION 2.3 -- Initialization Error Messages successfully read into memory, certain errors can occur in the subsequent initialization procedure. During initialization the resident operating system cannot access the error message processor since it has not been initialized. Messages similar in format to those generated by the diskette controller are displayed to indicate such errors. They differ from the diskette controller errors in that the second character of the two-character message Is a non-numeric character. The ,following errors can occur durinq initialization, but only after the resident operating system has been read into memory. Message E? Probable cause This error indicates that the Retrieval Information Block (RIB) of the resident operating system file MDOS.S'f is in error. The operating system cannot be loaded. The diskette probably is not an MOOS system diskette, or the system files have been moved from their original places. The REPAIR command (Chapter 22) can be used to identify which files are missing or if their places have been chanqed. EM This error insufficient indicates that there was memory to accommo::iate the resident portion of the operating system. The memory requirements described in section 1.1 should be reviewed. If the mInImum requirements are satisfied, then the existing memory should be carefully examined for bad locations. EI The version and revision of MDOS already loaded into memory are not the same as those on diskette. fhis error usually occurs as the result of switching diskettes in drive zero without following the initialization procedure outlined in section 2.1. The error can also occur if the ID sector has been damaged. The error can be avoided if the initialization procedure is followed correctly every time a new system MDOS 3.0 UserJs Guide Page 02-05 GENERAL S'{STEM OPERATION 2.3-- Initialization Error Messages diskette is inserted into drive zero. 2.4 (~erator ER The addresses of the Retrieval Information Blocks of the MOOS overlays are not the same as those at the time of the last initialization. This error may occur for the same reasons as the nEIfl error. EU An input/output system function returned an error during the initialization. Errors of this sort indicate a possible memory proble~ or the opening of the door to drive zero while the initialization is taking place. EV (he of the system files is missinq or cannot be loaded into memory. If a system file is missing, the diskette has been improperly generated or the file was intentionally deleted. If a file cannot be loaded, then the diskette should be regenerated. The diskette may be used in drive one to save any files that may be on it (section 2.8.9). This error may also occur if the door to drive zero is opened while initialization is in progress. Command Format After the sign-on message is displayed, MOOS is ready to accept commahds from the operator. The equal ~ign prompt (=) indicates that the command interpreter is awaiting input via the console. Generally, the equal sign prompt will be redisplayed after each command has finished its function. The operator-entered command line must always indicate which command is to be executed. In addition, the file na~es that may be required by the command must be specified. Some commands also allow various options that can alter the way in whicn their functions are performed. These options are also entered on the command line. Each command line must be terminated with a carriage return. The command lIne has the following formata, , •••• , ; where each (1=1 to n) has the form of a complete section 2.7.1). The name of the command always . The remaining n~~es and be required, depending on the iniividual Page 02-06 ,ENERAL S(STEM OPERATION command. 2.4 - Operator Command Format The following lines: OIR EDII.CM:);E FREE MERGE FILE!!!.FILE2 t O FILE3:1;FILEJ:) i are valid examples of MD{~ command lines. Section 2.8 describes in a simplIfied form the basic format (i.e., the comma~1Js name, what file names must be specified, and what options are available) of the most frequently used commands. PART II gives a complete and detailed description of all MOOS commands. In addition, Appendix H contains a summary of the command line formats of all MOOS-Supported software products. Most fre uentl a "space" is used to se arate the command name, from the other names which a ,se@arated by .lIcom~asJl. The"semicolon·1I always separates the op ions from the rest of the command line. The uspace" and "'comma" are the recommended separators since they make the command line the most readable; however, any character that will not be mistaken for an MOOS file name character, a suffix delimiter, a logical unit number delimiter, or a device name delimiter (see section 2.7.1) can be used as a separator. The use of special characters, although permitted, is not recommended because the command line becomes very unreadable. 2.5 System Console The system console is used as the communications device between the operator and the operating systeffl. MD{}S fiisssagas are displayed on the console printer or display .mechanism. MOOS commands, as well as operator inputs prompted by the commands, are entered via the keyboard. All command line input and most input to the various commands requires upper case, alphabetic characters. Numeric and special characters, of course, are case independent. To allow corrections to be made to any typed line before the terminating carriage return is entered, several special keys on the keyboard can be used. In addition, two other spacial keys serVe to prematurely abort a command in progress or to "freeze" the display of messaqes on the console. 2.5.1 Carriage return key The CARRIAGE RETURN key Is used to terminate any 0herator re sponse to an...MO$!§.._i_r:u.t'-:l_t eromQ,t. Thi sis true for t e command line as well as all other input that may be required from the operator by the various commanis. The CARRIAGE RETURN will automatically perform both carriage return and line feed functions. MDOS 3.0 User"s Guide Page 02-07 GENERAL Sl'STEM OPERAT ION 2.5.2 Break key _ 2.5 --- COAl,R.IJLL£.D System Con sol e A8o~-r The BREAK key is used as a controlled-abort function key. Most MOOS commands that take a long time to complete their function periodically check to see if the BREAK key has been depressed. If it has, the command wi 11 come to a premature, but control18d, termination paint. The BHEAK key should be used, whenever possible, as an alternative to using the EXORciser~s ABORT or RESTART pushbuttons. The controlled abort that is achieved with the BREAK key ensures that all system tables are intact. Since termination is delayed until all critical diskette accesses have been completed, no file space is lost nor is any system table destroyed. Such precautions cannot be guaranteed if the ABORT or RESTART pushbuttons are used, since the operator has no way of knowing whether or not diskette data transfers are in progress. 2.5.3 Control-W - H~L"'" Control-W is actually a combination of two keys being depressed simul taneouslya the CONTHOL or CTL key and the W key. fhis combination is used to halt the display of information on the system console or printer. All commands that respond to the BREAK key abort function will also be '"hal tabl e" wi th the CTL-~ key. Most MDOS commands that display more than a few lines of information on the console will occasionally check to see if the CTL-W key has been depressed. If a CTL-W is detected, the command will suspend processing until any other key on the console keyboard is depressed (except, of course, another CTL-W). This feature is particularly useful to hold the display for viewing on systems that have a CRT. In addition, if output is being directed to the printer, the CTL-~ can be used to suspend printing until the paper is realigned. 2.5.4 Control-X Control-X is actually a combination of two keys being depressed simultaneously' the CONTROL or CIL key and the X key. This combination is used to cancel the input line that was Just entered by the operator (before a carriage return is depressed). All system input from the console supports CIL-X. Any characters entered on the current input line thus far will be deleted and input can be resumed from the beginning of the line. A carriage return and line feed will be sent to the console, so that the operator has a positive feedback that the line was cancelled. MDOS 3.0 User's Guide Page 02-08 ,ENERAL S{STEM OPERATION 2.5 -- System Console 2.5.5 UEL or RUB(lliT The DEL or RUBOUT key serves as a backspace key during console input. If the operator detects an error in the current input line (before a carriage return is depressed), the DEL key will cause the preceding character to be removed from the input line. The character that is removed will be echoed back to the console so that the operator has a positive feedback that a character was backed out of the line. Control-D is actually a combination of two keys being depressed simultaneously' the CONTROL or CIL key and the 0 key. This combination allows the operator to re-display the current input line (before a terminating carriage return is depressed). If the input line has had several characters backed out (see DEL key above), the line is very unreadable. The CTL-D key can. therefore. be used to show a ·"clean" copy of the line for operator inspection. The newly displayed line will be shown on the line following the current input line. Operator input is not terminated with the CTL-D key. Any remaining input must still be supplied, as well as the terminating carriage return. l 2.6 Common Error Messages Many error messages are COflllll0n to the MDnS commands. In order to be aware of the most common errors, their descriptions are included here. These common error messages will be recognizable to the operator since they are prefaced with a pair of asterisks (**) and a two-digit reference number. Each command may, in addition, have a set of specific error messages that will not be displayed by other commands. These specific error messages will not have the asterisks or tWo-digit reference number. Such messages are explained along with each command~s detailed description in PAHT II. A summary of the standard error messages can be found in Chapter 28. The messages are listed there in order of their two~digit reference numbers. ~HAT1 The first name entered on the command line was not the name of a file in the disketteJs directory. Most often this error occurs as the result of a mistyped command name. MOOS 3.0 User.ls Guide Page 02-09 GENERAL SYSTEM OPERATION ** 01 COMMAND SYNTAX 2.6 -- Common Error Messages ERROR The syntax of the command line parameters could not be interpreted. Most often this error refers to undefined characters appearing in the options field. ** 02 NAME REQUIHED The file name requir~d by the command as a parameter was omitted from the command line. ** 03 DOES Nor EXIST The displayed file name was not tound In the diskette1s directory. The file name must exist prior to using the command. The is displayed to show which name of the ~ultiple names specified as parameters caused the error. ** 04 FILE NAME NOT FOUND The file name entered on the command lioe as a parameter does not exist in the diskette1s directory. The file name must eXist prior to using the command. No file name is displayed. since only one parameter is required by the command. ** 05 DUPLICATE FILE NAME The displayed file name already exists in the directory. The file name must not exist prior to using the command. The is displayed to show which name ot the ~ultiple names specifLed as parameters caused the error. diskette~s ** 06 DUPLICATE FILENAME The file name entered on the command line as a parameter already exists in the diskette1s directory. The file name must not exist orior to using the command. No til e name 1 s di splayed. since only one parameter is required by the command. ** 07 OPTION CONFLICT The specified options were not valid for the type of function that was to be performed by the command. Several of the options are ~utually exclusive and cannot be specified at the same time. MOOS 3.0 User's Guide Page 02-10 3ENERAL Sf Sf EM OPERATION ** 2.6 -- Common E.rror Messages 1I DEV ICE NOT READY Most frequently this indicates that a com~and is trying to output to the printer while the printer is not ready: ** 12 INVALID TYPE OF OBJECT FILE Most frequently this indicates that an attempt was made to load a program ln~o memory whose file does not have the "loadable ft memory-image format, e.g., a source file. ** 13 INVALID LOAD ADDRESS An attempt was made to load a program into memory thatl ) loads outside of the range of contiguous memory established at initialization; 2) loads over the resident operating system; 3) loads below hexadecimal location $20; or 4) loads beyond hexadecimal location $FFFF. ** 25 INVALID FILE NAME A file name was specified that contained a family indicator <*), that began with a device name indicator is used as , family indicator. The family indicator represents all or part of a flle name or suffix. For example, FILE.* would be a file MDOS 3.0 User"s Guide name specification that includes all Page 02-13 GENERAL S{SfEM OPERATION 2.7 -- Diskette File Concepts directory entries with the file name "FILE suffix on the default drive. Similarly, II bu t wit han y is a file name specification that includes all directory entries with ,uPROG" as the first four characters of their file names, regardless of what the remaining characters are, and with suffix "SAJlon the default drive. The asterisk cannot have characters followinq it. Thus, the following file name specifications are invalid: *PHOG.SA PROGRAM. *8 Not all commands allow file contain the family indicator. descriptions should be consulted indicators are acceptable. name specifications to The individual command where family to see 2.7.1.2 Device specifications Some com~ands allow the operator to enter a device specification in the command line instead of a file name specification. Device specifications consist of two parts. a "device name'" and an optional uloqical unit number". Device names are two characters long, both of which must be alphabetic. A pound siqn (I) is used as a leadinq character to indicate that the subsequent two-character sequence is a device name. For example, HLP leN are valid device names used for the line printer and the console, respectively. A device specification may be entered with a loqical unit number. Logical unit numbers must follow the device name and must be separated from it by a colon (.). The individual command descriptions should be consulted to see where device specifications are allowed. 2.7.2 File creation MOOS files are never explicitly created by the operator. All commands that write to oytpyt tiles will creat~di_.them automatically if they do not exist. Files will be created -a cc oraI'ng"""to"""€ne--'nr'e""'Pnam'Et spe c i fIe at i on 9 i ve n on the c omm and line. That is, if explicit suffixes and logical unit numbers are specified, the file will be created on the indicated drive. Otherwise, the appropriate default values supplied by the command will be used to create the file. Existing files are unaffected by the creation of a new file. MDOS 3.0 User" s Guide Page 02-14 2.7 -- D.iskette File Concepts 3ENERAL S'{STEM OPERAT I ON 2.7.3 File deletion Unlike file creation, file deletion is controlled via the DEL command which is described later. No other command program will delete existinq files on the diskette. Exceptions to this are commands that automatically create an intermediate work file to perform the command's function: These intermediate files are deleted by the command as an automatic clean-up process: explicitly by the operator 2.7.4 File protection All MDOS files can be configured with gelate pt:Qt.~ti2.(l, with w~ i te .erotect ion or wi ~~_....no_ ..Qr;.Qtec.tJQ[l. Del ete protection will prevent the operator from inadvertently deletin~ the file (the protection can be changed by the operator so that the file can be deleted). Write protection will prevent any command from writing to that file as well as preventing deletion of the file. Normally, files are unprotected, allowing both writing to or deletion of the file. The NAME command. described later. can be t1Se:i to set or toe h an..gL?~11l~.;'~~.",gX.9rl...~t,J on • t 2.8 'fypical Command Usage Examples The following sections give simple, but meaningful, descriptions and examples of the most frequently used MOOS commands in a typical software develop~ent environment. No attempt is made in these sections to cover all capabilities and options of the described commands. The detailed command descriptions in PART II serve that purpose. After reading this section, the operator should be able to qo lion-line" with MOOS and be able to display the directory of a diskette, create a source program file, assemble it, and load it into ~emory for testinq. The commands to delete a file, to change its name or protection, to copy it between diskettes or to tape are also described. New MDOS diskette generation is discussed in the last part of this section. It is assumed in the subsequent discussion th~t the system has been properly installed and initialized. Thus, a system diskette with the MOOS commands resides in drive zero. Command program files have a suffix of '''CM·II which is supplied as a default to the first file name that is entered on the command line. The default loqical unit number that is supplied is"IO". In the command examples that follow, it will be seen that both suffix and logical unit number are not specified for the command name. of The following notation will be used in the description the command line formats as well as throughout the MOOS 3.0 User"'s Guide Page 02-15 GENERAL SYSTEM OPERATION 2.8 -- Typical Command USBge Examples remainder of the manuall Notation Meaning Snnnn Hexadecimal number ,unnnnll. <> Syntactic elements are printej in lower case and are containej in angle brackets, e.g., , • {] ~ptional elements are contained 1n square brackets. If one of a series of elements may be selected, the available list of elements will be separated by the word ·"or" , e.g., { or ]. {} A required element that must be selected from the set of ele~ents will be contained in curly brackets. The elements wll1 be separated by the word "or". All elements that appear outside of angle brackets «» must be entered as is. Such elements are printed in capital letters (if words) or printed as the actual characters (if special characters). For example, the syntactical element [; ] re~uires the semicolon (I) to be typed whenever the field is used. 2.8.1 DIH -- Directory display The DIH command is used to display the contents of a directory. Either the entire directory or selective parts of it can be displayed. The format of the command line for the DrR command iSI diskette~s DIR { ] {; ] The file name specification indicates what to display. The specification indicates how to display it. If DIR is entered by itself on the command line, it will display on the system console the file names of all user-generated files on drive zero. If no user-generated files exist on drive zero, a message will be displayed indicating that no directory entries were found. This is normally the case when DIR is used without any options on the system diskettes that are shipped with the new system • .Ig" display the system ..aod _:.t~j--y~,r.7.a.fuuu::ate.d......, file.:1, the ,!!~!I opt i oF'} b C ani2..~~12~.?c~t~"tQ:t,S;Lth~ MOOS 3.0 user"s Guide op1J()n~~~f.l~.1Q.,~. Page 02-16 GENERAL SYSTEM OPERATION 2.8 -- Typical Command Usage Examples OIR ;S If drive one"s directory is to be displayed, then a must be typed in place of the file name specification: ·11 a I,ll OIR :1;S To direct the output of the OIR command to the printer, only one other option letter need be specified-- "LI'. Thus, OIR sl;LS will produce a listing of drive onels complete directory on the printer. The us .. and ilL" can be in any order, as long as they follow the semicolon. The DIR command can also be used to see if a specific file name exists on a given drive. This is accomplished by entering a complete file name specification (i.e., name, suffix, and logical unit number). Thus, oI R ED IT. CM: J will perform a directory search for the indicated file name specification on drive one. If the directory entry exists, its file name and suffiX will be dispiayed. Otherwise, a message indicating that no entries were found will be displayed. Directory searches for specific file names do not require the usn option to distinguish between system files and user files. Chapter 9 contains a complete description of the DIH command1s use. 2.8.2 EDIT -- Program editing The EDIT command is used to create and/or to change user-written source program and data files on diskette. The EDIT command, although an MOOS-Supported product which may be purchased separately, is mentioned here since it is such an inte~ral part of the software development environment. The EDIT command, if not included on the MOOS system diskette, must be copied from the diskette on which it was shipped (see section 2.8.9). (~ce the EDIT command resides on the system diskette, it is invoked with the following MOOS command line: EDIT If the EDIT command is not copied to the system diskette, it can be invoked from the diskette in drive one with the following command line. EDIT:l The only MOOS 3.0 User"s Guide parameter supplied on the command line is the Page 02-)7 GENERAL S'{STEM OPERAT ION 2.8 -- Typical Command Usage Examples name of the file that is to be edited. If the file does not exist, the EDIT command will create the file; if the file alr.eady exists, then it will be used. The suffix ,liSA", which is typically used for ASCII source files, is autom~tically supplied as a default if no suffix is entered on the command line. Thus, the user need only specify the name of the file to be edited. Upon completion of an edit, the file name will be unchanged. That is, a user need not be concerned about renaming his files between edits. A complete description of the EDIT command~s format and usage is found in the manual accompanying the EDIT command diskette, uM6800 Co-Resident Editor Reference Manual Jl • 2.8.3 ASM or RASM -- Program assembling The ASM and RASM commands (hereafter called the assemblers) are used to assemble the source program files created with the EDIT command. The assemblers translate these source pro~rams into object programs. The assemblers, although both MOOS-Supported software products which may be purchased separately, are mentioned here since they are such an integral part of the software development environment. If not included .on the MOOS system diskette, the assemblers must be copied from the diskette on which they were shipped (see section 2.8.9). Once the assemblers reside on the system diskette, they are invoked with the following MOOS command line: {ASM or RASM} [; ] If the assemblers are not copied to the system diskette in drive zero, they can be invoked from the diskette in drive one by using the following command line: (ASM:I or HASM:I} [; ] The only required parameter is the name of the file that is to be assembled. Normally, this would be the name of the file specified in the previous description of the EDIT command. The assemblers will automatically supply the rlefault suffix for both the source file that is read (SA) and for the object file that is created (LX, assuming that the OPT l-lEL or OPT ASS assembler directiVe was not Used). Such an object file will be in the standard, EXbug-loadable format. Such files cannot, however, be loaded by MOOS (see section 2.8.5). The object file will have the same file name as , but a different suffix will be assigned to it to differentiate it from the source file. Normally, a listing of the assembled program is desired. The assemblers will not produce a source listing unless the option to do so is specified in the field. Thus, the command line to assemble a source program file named MOOS 3.0 User"s Guide Page 02-18 GENERAL SYSTEM OPERATION 2.8 -- Typical Command Usage Examples TESTtJROG with source listing output would appear aSI {ASM or RASM} TESTPHOG;L As with the OIR command, the "L" option directs the printed output to the printer. If a printer is not available, or if the program is short, the source listing can be produced on the system console by using the following option: {ASM or RASM} TESTPRCXJ;L=#CN If errors are detected during the assembly process, they will be included on the source listing. If no source listing is being produced, errors will automatically be displayed on the console. Typically, the software development process involves several iterations of the editing and assembly processes before an error-free object file is produced. The assemblers, however, require that the object file does not exist prior to the assembly process. Therefore. if a duplicate file name error message is displayed, the object file already exists. It must first be deleted before the assembly process can continue. The next section describes the process of file deletion. During the iterative process of editing/assembling to obtain an error-free program, the object file created by the assembler can be suppressed by specifying the option ·"-0" in the options field. The command line {ASM or RASM} TESTPRHG;L-O for example, will assemble the source program as in the above examples creating the listing on the line printer; however, the object file will not be created. Thus, the deletion of the object file between repetitive asssmblies is not required since it is never created. The "'M6800 Co-Resident Assembler Reference Manual" or the uM6800/M6801/M6809 Macro Assembler Reference Manual" should be consulted for a complete dsscription of the assemblers~ function, usage, and command format. 2.8.4 DEL -- File deletion The DEL command is used to delete file names from the directory. The removal of a filels name from the directory makes the file unaccessible to any other process. The file itself is effectively deleted. Thus, in the subsequent descriptions, the phrases Udelete a file name" and "delete a file" are equivalent. The format of the command line for the DEL command iSI MDOS 3.0 User"s Guide Page 02-19 GENERAL SYSTEM OPERATION 2.8 -- Typical Command Usage Examples DEL which will cause the specified file to be deleted. If the object file from the assembly process example above is to be deleted, for instance, the following command line would be ent ered: DEL TESTPHOG.LX It should be noted that the suffix is specified. Since the DEL command is a general purpose command, like the OIR command, no default value for the suffix is supplied. Only those commands that can validly make an assumption about the type of file they will be dealing with (e.g., EDIT, ASM, RASM) will supply default suffixes. The DEL command will display a message indicati~g that the file name was deleted or that the file name was not found. Chapter 8 contains a complete description of the DEL command's other capabilities. 2.8.5 EXBIN -- Creating program load module The EXBIN command is used to convert the object file from the assembly process (assumes no OPT REL or OPT ASS in source file) into a file whose contents can be loaded into memory for execution. MOOS can only load programs into memory that are in memory-image files. Thus, the EXBIN command must be invoked after an assembly process to create the loadable file. The format of the command line for the EXBI~ command is. EXBIN The specified on the command line is the name of the EXbug-loadable object file created by the assembler. Only the file name need be specified. The default suffix "LX" is automatically supplied by the EXBIN command. A file in the memory-image format will be created by the EXSIN process that has the same file name as , but has the suffix -"LO" to differentiate its file type. The following command line EXSI N TESTPROG will convert the file TESTPROG.LX:O to its memory-image equivalent TESTPHOG.LC):O. Thus, the processes of editing, assembling, and object file conversion can all be performed on a file by only referring to its file name. The suffix will be automatically supplied. Normally, EXBIN will not display any messages. The next section will describe how to load a program from a file into memory after it has been converted into the proper format. Chapter 14 contains the MOOS 3.0 User-'s Guide Page 02-20 :JENERAL SYSTEM OPERATION 2.8 -- Typical Command Us~ge Examples complete description of the EXBIN command. 2.8.6 LOAD -- Program loadinq/execution The LOAD command is used memory-image file on the diskette to load programs from a into memory. After the program has been loaded. the debug moni tor can be gi ven control (for testinq the program), or the proqram can be given control directly (for execution). The format of the command line for program loading is: LOAD (; ] The name of the file whose contents are to be loaded is given as . The default sllffix"LO" is autom1tlcally suppl ied by the LOAD command. Thus. in norma 1 software jevelopment, only a file"s original source program name is required to take a user through the four processes of editinq, assemblinq, object file conversion, and program 1 oadin·~. The field of the LOAD command line is used to specify whether the debug monitor or the loaded program is to be given control, and whether or not the program overl~ys the resident operating system. If the file TESTPRC)G from the previous examples was origined to the hexadecimal memory address $100, the followin1 command line: LOAD TESTPROG;V would be used to load the program. Ii-Ie !=V!~' optioii is used to specify that the program to be loaded will overlay the resident operating system. If the .. yu option were left off the command line, an error messaqe would be displayed. The absence of the IIGJI option letter means that the debu~ moni tor will be given control after the program is loaded. So, the above example would be used to load TESTPROG into memory for testing. If, on the other hand, the program TESTPROG has been tested and works, the command line l already LOAD TESTPHOG;YG would be used to load and execute the program. No operator intervention is required to specify the starting execution address. This is only true if the startinq execution address has been specified on the END statement of the source program during the assembly process. Typically, most user-written programs that have been developed prior to receiving the MOOS system would be loaded and tested in this fashion. Programs that are develooed with MOOS 3.0 User's GUide Page 02-21 GENERAL S,(SfEM OPERATION 2.8 -- Typical Command Usage Examples MDOS as a basis (i.e., programs that use the resident system functions) are loaded without the "V" option. Chapter 18 describes the details of the LOAD command and should be consulted if more information is required. CAUTIONa AFTER THE DEBUG MONITOR HAS BEEN ENfERED VIA THE LOAD COMMAND, MOOS MUST NOT BE INIfIALIZED VIA "E800;G" OR "MDOS" UNTI L EITHER [HE ABORT OR RESTART PUSHBUITON HAS BEEN DEPHESSED. 2.8.7 NAME -- File name changing The NAME command allows file names and/or suffixes to be chan:}ed from their originally assigned values. Often, as a program is developed, its author decides that a file name other than the original one would be more appropriate and descriptive. The format of the command line for chanqing a file's name is: NAME , This command line requires the operator to enter two names. The first name, , specifies the current or original name of the file. The default suffix "SA" is supplied automatically if none is given by the operator. The second name, , indicates the new name that is to be assi]ned to the file now known by . Thus, if the file from the above examples, TESTPR(~. were to be given a more descriptive name, such as BLAKJACK, the following command would be usedl NAME TESTPROG,BLAKJACK In this case, only the file name of the source file would be changed. Other files with the name TESTPHOG but with suffixes other than IISA" would remain unaffected. The contents of the file that has its name chanqed are also unaffected -- only the name in the directory is changed. 2.8.8 NAME -- File protection changing The NAME command is also used to chanqe the protection attributes of a file. The command line format for ch~nging a fileJs protection iSI NAME ; The entry is required to identify the file whose attributes are to be changed. Ine field contains the letters D. W, or X to indicate how the protection attributes are to be changed. The letters take on the following meanings l MOOS 3.0 User~s Guide iJage 02-22 3ENERAL SYSTEM .oPERATION D W X 2.8 -- Typical Command Usage Examples Set delete protection Set write protection Set no protection (remove existing protection) Thus, if the file TESTPR(~ (source file) Is to be protected against deletion, the following command line would be used I NAME TESTPHOG;O If the memory-image file that was produced from the source of TESTPHOG were to be write protected and delete protected, the following command line would be used: NAME TESTPR(X3.LO;DW The protection on this file could later be removed with the command linea NAME TESTPROG. LO; X Chapter 20 describes in more detail the of the NAME command. other features 2.• 8. 9 COP Y -- F i 1 e copy i ng The COpy command is used to make a duplicate copy of a file on a sinqle diskette, to move a file between two different diskettes, or to move a file between the console reader/punch (record) device and a diskette. To make a duplicate copy of a file on the same diskette, the following command line is useda COpy , where specifies the current name of an existing file, and specifies the name of the duplicate copy. The default suffix MSA" and the default logical unit number zero are supplied for if those parts of the file name specification are omitted. Normally, the destination file, , does not exist. The COpy command, however, will alert the operator if does exist, and ask him if that file should be overwritten. If has a different logical unit number than the original file, the file will be duplicated on the specified drive. If the TESTyHOG source file from the above examples is to be saved in a file called TEMp, the following command line would be used: . COpy TESTPROG,TEMP The file MOOS 3.0 User"'s Guide TEMP will be created on the same drive as Page 02-23 2.8 -- Typical. Command Usage Examples GENERAL S,{STEM OPERATION fESTPReX), namely, drive zero. To copy TESTPROG to drive one, one need only specify the logical unit number (a) after the second name. The COpy command should be used to move the EDIf, ASM, and RASM commands from their separate diskettes onto the system diskette in drive zero. Since the names of the EDIT, ASM, and RASM commands are to be kept the same, the second name can be omitted completely. All that needs to be specified is the logical unit number. Thus, COpy EJIT .CM: 1,:0 COpy ASM.CM:I,aO COpy RASM.CMa J ,aO would be the commands that are entered if the diskette in drive one contained these files. The suffixes "CM" are explicitly specified since neither the EDIT, ASM, or RASM comm~nds are source programs. A similar procedure would be followed to copy any files from a diskette in any drive to the system diskette in drive zero. If a diskette has been damaged or cannot be used to initialize MOOS, it may be placed in another drive in attempt to save any files that may be on it. The COjJY command should be used to save files in this manner. If diskette controller errors occur durinq such a save process, the file~ ca~not be recovered. If that are records sequence console transfer a user has existing files on paper tape or cassette written in one of t~e standard record formats (i.e., that end with 3 carringe return, line feed, null - see section 24.3) and which can be read via the reader, the following command line can be used to those files to diskette: COpy #C~, ;N where is the name of the diskette file into which the tape file is to be written. The first parameter, HCR, specifies the console reader device, and the liN" ootion indicates that there is no MOe~ header record on the tape file. The above process can be chanqed sliqhtly so that a file on diskette can be written to the console punch (record) deVice. For example, COpy ,#CtJ;N will transfer the file named by to the console punch device, #CP, without the MOOS header information ("N" option). Chapter 7 describes in more detail the other features of, the COpy command. MOOS 3.0 User" s Guide Page 02-24 :JENEHAL SySTEM OPERATION 2.8 -- Typical Command Usage Examples 2.8.10 BACKUP -- MOOS diskette creation New diskettes, or diskettes never before used on .,n MOOS system must first be prepared for use with MOOS. The quickest way to generate a ne~ MO(~ diskette is to use the BACKUP command. Usually, a copy is retained of the original system diskette that was shipped with the EXORdisk II or III. This diskette should be used to qenerate subsequent MOOS di skette s. It is recommended that the or iginal di skette not be used for development purposes. It should serve only as the master copy from which all other diskettes are generated. j A blank or scratch diskette should be placed into drive one. The master system diskette should be resident in drive zero. The following command line will then cause a complete copy of the master diskette to be createdl BACKUP ;U rhe uU" option specifies that the entire surface of the diskette in drive zero is to be read and copied to the diskette in drive one. This process ensures that all sectors on the neW diskette can be written to. Once the BACKUP command has been invoked in this way, it will display the followinq message: BACKUP FROM DRIVE 0 TO 1? to which the operator should respond with a nyu. Any other response will terminate the BACKUP process, leaving the diskette in arlve one intact. The ny .. respC:ise will cause the diskette copy to take place. As an added precaution, the two diskettes should be compared against each other after the BACKUP command has completed. This diskette verification is invoked with the following command linel BACKUP ;UY If any messages are displayed during the verification process, the diskette in drive one should not be used as a system diskette. Chapter 3 describes the BACKUP command in detail. Chapter 10 describes an alternative method of generating new system diskettes. 2.9 Other Available Commands MOOS Several other powerful commands are included with each diskette. These commands are not needed initially in MOOS 3.0 UserJs Guide Page 02-25 GENERAL Sf STEM OPERATION 2.9 -- Other Available Commands beco~ing familiar with the system; however, they do provide helpful and necessary tools for the advanced software developer. A brief description of these commands Is given here to shed some light on their utility. 2.9.1 BACKUP -- Diskette copying The BACKUP command allows making copies of entire MOOS diskettes. Options exist for makinq campI ete copies, for file reorqanization to consolidate fragmented files and available diskette space, for appending families of files from one diskette to another, and for diskette comp~risons. Chapter 3 contains the complete description of the BACKUP command. 2.9.2 EMCOPY -- EDOS file conversion The EMCOPY command allows files from a user"s EO OS 2 system diskette to be copied to and catalogued on an MOOS diskette. Options exist for copying the entire diskette, selected files, or single files. Chapter 13 contains the complete description of the EMCOPY command. 2.9.3 BL(~EDIT -- File rearrangement The BLOKEDIT command allows lines of text from one or more ASCII files to be selectively copied into a new file. This command can be useful in generating new program source files by copying routines from existing source files, or in rearranginq existing files by copying their lines int0 a new sequence. Chapter 5 contains the complete description of the BLOKEDIT command. 2.9.4 LIST -- File display The LIST command is used to print any ASCII file on either the system console or the printer. (~tions exist for numbering lines, specifying page formats, printing headings, and indicating starting and ending points. In addition, files can be accessed by their loglcal sector numbers for rapid access to any portion of a file. Chapter 17 contains the complete description of the LIST command. 2.9.5 MERGE -- File concatenation The MEHGE command allows one or more files to be concatenated into a new file. This command Is useful In combining several smaller program modules or In building relocatable libraries to be used in conjunction with the MDOS 3.0 User"s GuIde Page 02-26 ,ENERAL S'(STEM OPERATION 2.9 -- other Available Commands M6800 Linking Loader. Chapter 19 description of the MERGE command. contains the complete 2.9.6 BINEX -- EXbug-loadable file creation The BINEX command allows memory-image files to be converted into an EXbug-loadable format for copying to tape. [his command performs the inverse operatIon of the EXBIN command. BiN~X is useful in the development of non-diskette-resident software with MDOS, since the object code can be written to tape after it has been tested. Chapter 4 contains the complete description of the BINEX command. 2.9. I FREE Available file space display The FHEE command displays how many unallocated ~ectors and how many empty directory entries are on a diskette. Chapter 16 contains the complete description of the FREE command. 2.9.8 ECHO -- Echo console I/o on printer The ECHO command can be used on/ an EXORciser I I system to cause all input/output directed to the system console to also be printed on the line printer. Chapter 12 contains the complete description of the ECHO command. 2.9.9 PATCH -- Executable program file patching The PATCH command allows changes to be made to u memory-image files. An object file can be ufixed due to minor bugs or assembly errors without having to re-eiit and re-a ssemble its corresponding source fil e. The ,ltf ixes" can be entered using M6800 assembly language mnemonics or the equivalent hexadecimal operation codes. Chapter 21 contains the complete description of the PATCH command. 2.9.10 CHAIN -- MOOS command chaining The CHAIN command allows predefined procedures to be executed. A procedure consists of any sequence at MDOS command I ines that have been put into a di ske tte file. Instead of obtaining successive command lines from the console, CHAIN will fetch commands from a file. This feature allows complicated and len~thy operations to be defined once, and then invoked any number of times, requiring no operator intervention. The additional capabilities of conditional directives to the CHAIN command at both compilation and auto~atically MOOS 3.0 User"'s Guide Page 02-27 GENERAL S'fSTEM OPERAT ION 2.9 Other Available Commands execution time, and the capability of strinq substitution, permits an almost unlimited number of applications to be handled by a CHAIN file. Chapter 6 contains the complete description of the CHAIN command. 2.9. II REPAIR -- System table checking The REPAIR command allows the user to check and repair a malfunctioning or a non-functioning MDOS diskette. Errors in the system tables can be found, identified, and corrected with this command. Since MOOS performance is jirectly related to the correctness of these system tables, the REPAIR command is a useful diagnostic utility. Chapter 22 contains the complete description of the REPAIR command. 2.9.12 DUMP -- Diskette sector display The DUMp command allows the user to examine the entire contents of any physical sector on the diskette. The sector can be displayed on either the system console or the printer. The display contains both the hexadecimal and the ASCII equivalent of every byte in the sector. The DUMP com~and allows openinq of files so that they can be examinei using logical sector numbers. Sectors can also be moved into a temporary buffer where changes can be applied before they are written back to diskette. Chapter I' contains the complete description of the DUMP co~mand. 2.9.13 FORMAT -- Diskette reformatting The FORMAT command attempts to rewrite the sector addressing information on damaged diskettes. The cOll'TIand can be used to reformat either sinqle-sided or double-sided diskettes; however, double-sided diskettes must be formatted wi th thi s command before they can be used with MDOS. Single-sided diskettes usually come pre-formatted in a compatible format. The FORMAT command will only 'I/ork on systems that are operating at one of the standari clock frequencies of J MHZ, 1.5 MHZ, or 2 MHz. Chapter 15 contains the complete description of the FORMAT command. 2.9. 14 DOSGEN -- MOOS di sk ette generat ion The DOSGEN command allows specialized MOOS diskettes to be prepared. Diskettes that have bad sectors can have those sectors locked out so that the diskette can be used in an MDOS enVironment. DOSGEN will also create all system tables and files on the generated diskette. The DOSGEN command can be used to generate system diskettes on either single-sided or on appropriately formatted double-sided diskettes. MDOS 3.0 user's Guide Pa'Je 02-28 ,ENERAL Sf STEM OPERAT ION Chapter 10 command. contains 2.9 -- Other A.vailable Commands the complete description of the O(~GEN 2.9.15 ROLLOUT -- Memory rollout to diskette ~~~~~~~~~--~----~-------~----~------~------- The ROLLOUT command is used for writing the contents of memory to diskettee The ROLLOUT command supports the dual-memory maps of EXORciser II as well as the single memory map of EXORciser I. Options exist for w:riting memory directly into a diskette file or for writing to a scratch diskette. Chapter 23 contains the complete description of the 110LLOUT command. 2.10 MOOS-Supported Software Products Although the preceding list of commands provides the user with many powerful tools for software development, there are many other Motorola products which are capable of running in an MOOS environment, even though they were developed independently. These products are called MOOS-Supported software products. No attempt will be made in this UserJs GUide to comprehensively describe any MOOS-Supported software product. Appendix H contains a list (complete at time of publication) of all products that can be invoked from an MOOS diskette as a command. Each description will contain the additional hardware reqUirements, if any, the command line formats, and a brief discussion of the product's capabilities. MOOS-Supported software products will be received on separate diskettes. Section 2.8.9 describes how such products can be copied onto the system diskette. 2.11 Paper Alignment All MOOS commands that output to the line printer will return the paper to its original position upon termination. Thus, if the paper is correctly aligned at the time MDOS is initialized, then the paper will never have to be aligned again. The paper should be placed so that the print line is positioned three lines before a perforation (assuming fan-fold forms). MDOS commands use the standard format of 66 lines/page. MOOS 3.0 User"s Guide Page 02-29 PAt< r II ADVANCEU MDOS USER"S GUIDE CHAprE~ 3. 3 8ACKUP COMMAND The BACKUP command allowsmakinq copies of entire MOOS Opti ons exi st for making campl ete cop! e 5, for file reorganization to consolidate fragmented files and available space, for appending families of files from one diskette to another, and for diskette comparisons. The BACKUP command will only copy MOOS-generated diskettes. The BACKU~ command may also be used for copying single-sided diskettes onto double-sided diskettes. di skette s. 3. 1 Use The BACKUP command is invoked with the following command line: BACKUP [[I ,}I ] [; ] where is the source logical unit number, cd-unit> is the destination logical unit nu~ber, ~nd can be one or more of the option letters described below. If neither nor cd-unit> is specified on the command line, then zero will be used as the source unit and one will be used as the destination unit. SpecifyinQ only a single logical unit number on the command line ~i!! cause zero to be the source unit and the specified logical unit to be the destination unit. Both and cd-unit> must be valid logical unit numbers (0-3), cd-unit> cannot be zero, ~nd the two numbers cannot be the same. BACKUP will always copy from the source unit to the destination unit (unless diskette comparisons are spacified). If the command line is valid, the message l BACKUP FROM DRIVE To cd-unit>? or APPEND FROM DRIvE TO cd-unit>? will be displayed where is the source unit number and cd-unit> is the destination unit number. In either case, a response of uY" is required if BACKUP is to continue. Any other response will return control to MOOS. Further BACKUP action depends on the specified options. The options are divided into 'IMain Options" and "Other Options". Main MOOS 3.0 UserJs Guide Page 03-01 3. I -- Use BACKUP COMMAND o tions are mutuall exclus vee That is, only one Main on can be specified on the com~and line at a time. The Other Options can be included with the Main options as described in section 3.6. (~ Main Options Function none Copy all allocated space di sk ett e. R Reorganize diskette so that files are defragmented and free space is consolidated on destination diskette. A Append (copy) selective destination diskette. v Verify (compare) source diskettes. other Options to and destination files to destination Function c Continue if read/write errors occur. u Continue occur. I Change 10 sector during copy. L Use line printer printing. N Suppress copied. S Suppress printing of byte offsets compari sons. u Include unallocated space in copy/verify process. y If duplicate file old, copy new. z It duplicate copy. if deleted printing data mark errors message for bulk of of tile names being name exists, during delete file name exists, suppress 3.2 uiskette Copying If no Main BACKUP process MDOS 3.0 User's Guide Options are specified, then the default will produce a physical sector copy of the Paqe 03-02 3ACKUP COMMAND 3.2 -- Diskette Copying source diskette on the destination diskette. Only the allocated space from the source diskette will be copied. The allocated space includes all file space and all areas locked out in the Lockout Cluster Allocation Table (see Chapter 24). Thus,.oijly MJOS=generated diskettes can be copied using the BACKUP command. since other diskettes will not have an allocation table. u"'..... U!!• . Since only the allocated space is copied, the ~lnlmum amount of disk space is copied, and the BACKUP process is completed in the minimum amount of time. Sometimes, however, it is desirable to obtain a complete copy, and not just a copy of the a llocated space. In such cases, the "U" opt ion can be used to force the copying of unallocated space as well as the allocated space. A typical BACKUP process dialogue would following: look like the =BACt ,J ;R would invoke the BACKUP command to reorganize the files on the source diskette in drive during the copy to the destination diskette in drive cd-unit>. The source jiskette must be an MOOS diskette. It is unaffected by the reorganization. The message BACKUP FROM DRIVE TO cd-unit>? is jisplayed before any copyinq takes place. Unlike the complete copy process which will proceed immediately after the .. yn response is given by the operator. the reorganization process will perform the followinq initialization procedure: First the ID sector is copied (and optionally modifiej if the "I" option was specified). Second, the Lockout Cluster Allocation Table (LCAT) and the Cluster Allocati0n Table (CAT) are initialized (user locked out sectors are not copied during the reorganization proces.s). Third, the directory sectors on the destination disk are zeroed. Fourth, the Bootblock is copied. Fifth, all of the file names from the source disketteJs directory are re8d. They are then sorted into alphabetical order, first by suffix, then by file name. After the sorting has been completed the following message will be displayed: ENTEH FILE COpy SELECTION COMMANDS: 5 AV E (5), DEL ET E (D), PR I NT (P), QUI T (Q), NO MOH E .:), 0, P, Q t (CR): (CR) indicating that the operator must enter file selection commands to specify which files from the source diskette are to be copied to the destination diskette. The first line of the message indicates that BACKUP has reached the file selection stage. The second line contains the function of each file selection command as well as the letter that must be used to issue that command. The third line is used as a prompt for the current and subsequent file selection commands. MOOS 3.0 User's GUide Paqe 03-04 3ACKUP COMMAND 3.3 -- File Heorqanization Command Letter Function SAVE S Include a certain file name or family of file names from the sorted directory in the set of files to be copied to the destination diskette. DELETE 0 Exclude a certain file name or family of fils names from the sorted directory from the set of files to be copied to the destination diskette. PRINT P Display the set of file names from the sorted directory th3t are eligible to be copied to the destination diskette. QUIT Q Terminate the BACKUP command and return to MO(S. No copying will take place; however, the destination diskette has been affected due to the reorganization option as explained above. NO MORE (CH) Entered as a carriage return only. No more commands will be entered. The files to be copied h~ve been selected. If no file selection commands were issued, all files in the sorted directory will be copied. Begin the copy precess. Both the SAVE and DELETE commands require file names to be specified as parameters. The format of the SAVE and DELETE commands are the same, except, of course, for the command letterl {D or S} [, , ••• , ] The file names specified can contain the family indicator. fhe default suffix .11 SAil will be supplied if none is explicitly entered. For example, the SAVE commandl will cause the family of files having the suffix "eMil, the file EQU.SA. and the family of files having the name IOCB to be flagged as saved. The DELETE command: o A*.CM.NOL,TEST.L* will cause the family of files beginning with the letter nAu and havinq a suffix of"CMJI, the file NOL.SA, and the family MOOS 3.0 User's GUide 3.3 -- File Reorganization BACKUP COMMAND of files named TEST with suffixes beginning with to be flagged as deleted. the letter ~L" After a SAVE or DELEfE command has been entered, each file name of the sorted directory which has not already been marked as Jlsaved'" or "deleted" and which matches one of the (i=1 to n) will be marked as "saved J• or .I'deleted". After all the file names from the SAVE or DELETE command line have been processed, a new prompt. S, D, P, a, (CR)' will be displayed. The operator can then enter further SAVE or DELETE commands as well as any o.f the other valid commands of the BACKUP file selection process. (nce a com~and other than SAVE or DELETE is entered one of two things happens to the sorted directory. If at least one SAVE command has been processed without error, then all file names in the sorted directory not marked as "save1" will be marked as "deleted"'. On the other hand, if no prior SAVE commands were used, then all file names not marked as "deleted" will be eligible for copying (marked as "'saved ll ) . The QUIY command can be entered at any time in response to the file selection command prompt. QUIT will C9use the BACKUP process to be terminated and control returned to MOOS. The file selection commands entered thus far will have had no effect on the destination diskette; however, due to the reorganization option, the destination diskette will h9ve had its oasic system tables initialized as described above. The NO MORE command, entered as a carriage return only, indicates that no more file selection commands will be given by the operator. If no file selection commands have been entered prior to the NO MORE command, then all file names in the sorted directory will be eligible for copying to the destination diskette. The copy process will begin. The PRINT command will cause all names from the sorted directory which have not yet been flagged as ffdeleted" to be printed. The PRINT command also makes it impossible to enter further SAVE, DELETE. or QUIT commands. The PRINT command has its own sub-com~and structure that allows deletion of file na~es from the sorted directory. Along with each file name and suffix a two-digit, hexadecimal number that indicates the position of the file nal1e within the sorted directory is displayed. Thus, the output from the PHINT command could look like: MOOS 3.0 User's Guide Paqe 03-06 3.3 -- File Reorganization BACKUP COMMAND 00 BACKUP .CM 01 BINEX • CM 02 BLOKEDIT.CM 03 CHAIN .CM COpy "A uq. • 05 DEL 06 OIR ID HLOAD 1E 1"'11 ~IYI .CM .CM .eM FORLB IF EQU 20 IOCB .RO .SA .SA The range of numbers $07-1C, inclusive, iS1lissing, indicating that they have been excluded from the sorted directory via prior SAVE and/or DELETE commands. If PHINT were the first command to be entered, then all file names in the sorted directory would be seen, and the range of numbers would be without gaps. After the PRINT command has displayed all of the file names, a new prompt will be issued: DELETE FILE NOS.: to which the operator can respond with a number, a series of numbers or ranges of numbers separated by commas, a range of numbers, or a single carriage return. The .numbers must be from the set of thosB displayed in front of the file names. These numbers are used to indicate which files are to be excluded from the sorted directory before fil~s are copied to the destination diskette. For example, the following entry: 01-03,IE,06 would cause the file names with numbers 01, 02, 03, 06, and IE to be removed from the sorted directory before the file copy proce ss begins. Another "DELETE FILE NOS. ,I' prompt wi 11 be displayed it a number was entersd in response to a previous prompt. Thus, as many file names as desired can be excluded from the sorted directory. A carriage return response to the prompt has the same effect as the NO MORE command described above; i.e., it will end further command processing and cause the file copy process to begin. After message the files to be ~opied COPYING MOOS have been selected, the .5Y will be displayed. This message will in turn be followed by similar messages for each of the eight remaining system files MDOS 3.0 User.l's Guide Page 03-07 BACKUP COMMAND 3.3 -- File Henrqanlzatlon that must be copied to every diskette. The MOOS family of system files are not shown in the sorted directory since they must be copied. These system files are copied first so that they will be assured of residing in specific physical locations required by the MD(S initialization process. After the MOOS system files have been copied, the message l STARTING TO COpy FILES is displayed, followed by messages of the forml COpy I NG as each file from the selected files list is copiei to the destination diskette. Using the above example of the sorted directory and the file names deleted from it, the file copy messages would look likel COPYING MOOS COPYI NG MDOSOVO COpy I NG MOOSOV I COpy I NG MDOS()V2 COPYING MDOSOV3 COPYING MDOS()V4 COPYING MDOS()V5 COpy I NG MDOSOV6 COPYING MDOSER .SY .SY • SY .SY .SY .Sf .SY .SY .SY STARTING TO COpy FILES COPYING BACKUP .CM COpy ING COpy COPYING DEL COPYING RLOAD COPYING EQU COpy I NG I nCB = .CM .CM .CM .SA .SA After all eligible files from the sorted directory have been copied, BACKUP will return control to MDOS. The destination diskette will contain all of the selected files packed together as closely as possible, leaving as much free space as possible. 3.4 File Appending The file append process allows selected single files or families of files to be copied from the source diskette to the destination diskette. The file append feature of the BACKUP command is similar to the reorgAnization feature except that the destination diskette is not initialized with new system tables or system files. Only the file selection and the file copying from the source diskette are performed. MOOS 3.0 User's Guide Page 03-08 3.4 -- File Appendinq The diskette in the destination drive is assumed to be a valid MOOS diskette. The file append process is inv::>ked by using the Main Option "A" on the BACKUP command line: BACKUP :<5~unit>,a ;A Instead of the "BACKUP FROM DRIVE TO ?" message normally displayed by BACKUP, the message: APPEND FROM DHIVE TO ? is shown. The operator must respond with a Uyfl if the file append process is to continue. Like the file reorganization process, the file append process allows the operator to select which files are to be copied. The messaqes for file selection and the commands to the file selection process are explained in section 3.3, File Reorganization, and will not be discussed aqain here. After all files have been selected, they will be copied similar to the process described in section 3.3; however, the MOOS family of system files is not copl ed. Since the destination diskette already contains entries in its directory, a possibility of file name duplication exists. In the event that one of the selected file names from the sorted directory duplicates a file name in the destination directory, the followinq message will be displayed: - DUPLICATION: IS IT TO BE COPIED? The operator must respond with either an IINIt or uY". The i-Nii response will prevent the file from beinq copied to the destination diskette. The nyll response will cause the prompt: NE~~ NAME: to be shown, to which the operator can respond with the new name that is to be assigned. If a valid file name anj suffix are entered, they will be used as the name of the destination file. The default suffix "SAil will be supplied if none is explicitly entered. If only a carriage return is given as a response to the prompt, then the file on the destination diskette will be deleted (if it is unprotected) before the file from the source diskette is copied (which will retain its original name, in this case). If the destination diskette~s duplicate file cannot be deleted, the meSS3]e CANNOT Dt.LETE DUPLICATE NAME will be displayed and the BACKUP command will be terminated. The llyn and uz .. options can be used 1.n conjuncti')n MOOS 3.0 User's Guide with Paqe 03-09 3.4 -- File Appending the JlA" option- to indicate an automatic procedure in the event of file name duplication. fhe nyn option will automatically cause an attempt to be made to delete the file on the destination diskette before the copy takes place. If the uy.. option is in effect, the file name duplication message from above takes on the following form. - DUPLICATION' IS COPYING to indicate that a ny" was given as an automatfc response to the "IS IT TO BE COPIED?" portion of the messaqe. The "Z" option will cause the file name duplication message to take on the form. - DUPLICATION: IS NDT COPIED to indicate that an UN" was given as an automatic resoonse to the "IS IT TO BE COPIED?" portion of the message. The file append process causes space to be allocated on the destination diskette in contiguous blocks. If insufficient contiguous space should remain 0n the destination diskette for a given file, the file will not be copied. The error me5sage OBJECT FILE CREATIO,'J COpy ERROR will be displayed and the BACKUP command will be terminated. The destination diskette may have sufficient sp~ce to accommodate the file; however, if the space is not contiguous, the above error occurs. To copy the file, the destination diskette should be run through the file reorJanization process described in section 3.3, or the file must be copied via the COpy command (Chapter 7). After the last file has been copied to the destination diskette, control will be returned to MOOS. 3.5 Diskette Verification The Main Option I'V" invokes the verify process of the BACKUP command. The verify process allows R physical sector comparison to be made between the diskettes in the source and destination drives. The following command line, without the presence of other options, will cause the verify process to compare the diskettes~ physical sectors based on the source diskette's allocation table. BACKUP : ,I ;V If any bytes in any sectors fail to compare, a sector ~essage and a list of all offsets within the sector that did not compare is printed: MDOS 3.0 User"s Guide Page 03-10 ACKUP COMMAND 3.5 -- Diskette Verification SECTOR nnnn OFFSET ii DR -JJ DH -kk where Mii~ is the hexadecimal offset into physical sector Jlnnnn", IIjJII is the hexadecimal contents of the sector's byte on the source diskette, and flkk" is the hexadecimal contents of the respective sectorJs byte on the destination diskette. If all sectors compare, no messages are displayed. After the verification has completed, control is returned to MOOS. If an EXOHdisk III system is being used, the destination diskette cannot be a sinqle-sided diskette if the source diskette is a double-sided diskette. In such cases the me ssage INVALID TO COPY/VERIFY FROM DOUBLE TO SINGLE SIDED will be displayed and control returned to MOOS. The opposite, however, is allowed; that is, a single-sided diskette can be verified against a double-sided diskette. 3.6 Other Options The other Options descr ibed br iefly in section 3. 1 cannot be used indiscriminately with any of the Main(~tions. fhis section serves to fully explain the use of each (~her opt ion. other Option Valid with Main Option C any The HC" option will cause the copy or verify process to continue even if a retryable read/write error occurred which could not be corrected. The retryable errors include CHC, seek. data mark, and address llark eRC errors. The HClI option will not cause read/write errors on Retrieval Information Blocks to be ignored. o any The liD" option will cause the copy or verify process to continue even if a deleted data mark error is detected. This ootion allows the verification of diskettes that have had bad sectors locked out during the DOSGEN or REPAIR process (such sectors are flaggei with a deleted data mark). The "D" option permits a user to copy the maximu~ amount of data from a bad source diskette to a qood destination diskette. MOOS 3.0 User's Guide Function Page 03-11 3.6 -- Other Options BACKUP COMMAND other Option Valid with Main Option I none, R L any The 111" option indicates that the diskettels ID sector is to be modified by prompting the operator. The .III" option will cause the following prompt messages to be displayed. The operator can enter new information if that field of the ID sector is to be changed. If the field is to remain the same as on the source diskette, then only a carriage return need be entered. Prompt Operator Response DISK NAME' Maximum of eight characters for diskette 10. Format is similar to that of a file name. DATECMMDDYY) • Six-digit numeric date. No check is made for valid months or days of the month. 115EH NAME' Maximum of characters. twenty The ilL" option causes the output from the copy process or from the verification process to be directed to the line printer instead of the system console. The "NII option will suppre5s the printing of the file names as they are being copied to the destination diskette. This option will not suppress the printing of error 'llessaqes. N s Function v MOOS 3.0 User's Guide The "5" option will suppress the Dr int ing of the sector offset messages if sectors do not compar e. Paqe 03-12 3.6 -- Other opt ions )ACKUP COMMANU other option Valid with Main Option Function II v none. V The "U" option indicates that all physical sectors. both allocated and unallocated. are to be cooied or verified. If "U" is not specified. only the allocated sectors, as mapped in the source diskette's allocation table, will be used. y A The ny.. option will cause a "Y" to be automatically given as a response to the file name duplication error message. This will automatically force the attempted deletion of the duplic~te file on the destination diskette bef0re the file is copied. The nyu and DZ" options are mutually exclusive. z A The uzn option will cause an UN" to be automatically given as a response to the file name duplication error ~essage. fhis will automatically prevent the file on the source diskette from being copied to the destination diskette. The HZ" and llyn options are mutually exclusive. 3.7 Messages The following messages can be displayed by the BACKUP command. Not all messages are error messages, althou]h error messages are included in this list. The standard error messaqes that can be displayed by all commands are not listed here. BACKUP FHOM DRIVE TO cd-unit>? This indicates BACKUP will copy to the destination diskette in drive cd-unit> from the source diskette 1.n drive if a "y~1 response is given. Any other response will cause control to be returned to MOOS. APPE1~O FROM DRIVE TO ? This indicates that BACKUP will perform the file append process if a ny" response is given. Any other response will cause control to be returned to MDOS. MOOS 3.0 User"'s Guide Page 03-13 BACKUP COMMAND 3.7 -- Messages OISK NAME: The "I" option has been specified. The operator is expected to respond with a new disk 10 or a carriage return. DATE ( MMDU YY) & The "I" option has been specified. The ooerator is expected to respond with a new date or a carriaqe return. LJSER NAME: The uIJI option has been specified. The operator is expected to respond with a new user name or a carriage return. ENTEt-l FILE COpy SELECTION COMMANDS' SAVE (5), DELETE (D), PRINT (P), QUIT S, D, P, Q, (Q), NO MORE (CR) (CR): The fiR" or "Aft option has been specified. The file selection process is activated. The third line shows what the valid responses are. S, 0, P, a, (CR) I This is a subsequent prompt from the file selection process. SAVE and DELETE commands can be entered until a P (print), Q (quit>, or carriaqe return (NO MORE) is entered. SYNTAX EHHOH This indicates a mistake in a response to a question or prompt from the BACKUP command. The entire line entered by the operator is ignored and a new response must be made. STAHTING TO COpy FILES This indicates that files directory are starting to be option). MOOS 3.0 User's Guide from the sorted copied (R or A Page 03-14 ~ACKUP COMMAND l~O 3.7 -- Messages FILES TO COpy This indicates that there are no file names in the source directory (other than the MOOS system files) or that all of the file names from the sorted directory have been deleted. No files are cop i ed i f the 11 A" 0 pt ion i sus e d • On I y the MDOS family of system files will be copied if the uRn option is used. NOT FOUND This indicates that a file name or a family of file na~es specified by a SAVE or DELETE command could not be found in the sorted directory. COpy I NG This indicates that the file name specified by is being copied to the destination diskette. - DUPLICATION: IS IT TO BE COPIED? This indicates that the file name specified by already exists on the destination diskette during the append process. Only a "Y" or .tIN" is accepted as a valid response. NE ,'i i~AME: This messaqe is displayed if A ny.. is given in response to the preceding message. It allows the operator to assign a new file name to the file being copied from the source diskette. A carriage return response (no file name) will cause an automatic attempt to delete the duplicate destination file to be made, rather than assigning a new name to the source file. - DUt>LICATIONa IS COtlYING [his indicates that the file name specified by already exists on the destination diskette during the append process. The uY" option caused an auto~atic attempt to delete the duplicate destination file to be made before the copy continues. MDOS 3.0 User"s Guide Page 03-15 BACKUP 3. 7 -- Me ssage s C(h~MAND - DUpLICATION: IS NO[ COPIED [his indicates that the file name specified by already exists on the destination diskette during the append process. The "2" option caused the file to be skipped. The destination file is unaffected. OBJECT FILE CREATION COpy ERKOR [his usually indicates that insufficient contiguous space exists on the destination drive for the file being copied (A o~tion). Dccasi ona 11 y t however t i t may mean that 3n error was detected in the readinq or writing of the file's Retrieval Infor~ation Block on the destination diskette. CANNDT OELETE DUPLICATE NA~E This indicates that the duplicate file ~ame on the destination diskette could not be deleted due to its protection attributes. DELEfE FILE NOS.: The PRINT command displays this prompt to allow jeletion of file names by enterin1 their displayed numbers. The prompt wi 11 be redisplayed until a null response (carriaqe return) is given. nn After the PRINf command is chosen durinq the file selection process, a list of all file names eliqible for copyinq is displayed. The "nnll is a hexadecimal number that indicates the position of the name with respect to the total sorted directory. The , of course, is the file~s name and suffix. SYSTEM SECTO~ COt->Y EHROR This indicates that a system sector could not be read from or written to. BACKUP cannot continue and control is returned to MOOS. SECTOR nnnn This indicates that the physical sectors "nnnn" did not compare during the verify process. MDOS 3.0 User-'s Guide Page 03-16 3.7 -- Messages BACKUP COMMAND OFFSET ii DH -jj OR -kk This indicates which bytes did not compare during the verify process. The IIi!" is the hex~decimal offset into the sector. ,II jjU Is the hexadecimal contents of the byte on the source unit , .lIkk.n is the hexadecimal contents of the byte on the destination unit . DIHECTOHY HEAD/WHITE ERROR This indicates that an internal system error was encountered while trying to access the directory of the source diskette. Errors of this type indicate a possible hardware problem. SOURCE FILE COpy ERROR This indicates that an internal system error was encountered while reading a Retrieval Information Block from a file on the source diskette. Errors of this type indicate a possible hardware problem. INVALID TO COPY/VERIFY FROM DOUBLE TO SINGLE SIDED This indicates that on an EXOHdisk III system, the source diskette was double-sided while the ,destination diskette was single-sided. This is invalid. 3.8 Precautions with BACKUP ------------~~------------- The following sections describe some of the precautions that should be taken when using the BACKUP command in the vari0us environments that are supported by MOOS. 3.8.1 BACKUP and the CHAIN process Since the BACKUP command has so many different paths that can be taken, it is generally recommended that BACKUP not be invoked from within a CHAIN process (see Chapter 6). The BACKUP process is so important to the protection of diskette files that the entire process should be supervised by the operator. Diskette verification from within a CHAIN process using the BACKUP command is also infeasible. The CHAIN command writes intermediate information to the diskette in drive zero durinq its operation. Thus, if BACKUP with the "V" option is invoked from within a CHAIN process, and if drive zero is involved in the BACKUP process, then the two diskettes are MDOS 3.0 User"s Guide Page 03-17 3.8 -- Precautions with BACKUP BACKUP COMMAND guaranteed to be different. 3.8.2 Sinqle/double-sided diskettes On EXORdisk I II systems the BACKUP command can be used to copy or verify from a single-sided diskette (source diskette> to a double-sided diskette (destination diskette), however, the reverse is not allowed. ~hen a sinqle-sided diskette is copied to a double-sided diskette, the system tables (CAT and LCAT) are automatically adjusted so that they reflect the true amount of space available on the double-sided diskette. When a verify takes place, the CAT and LCAT will be different between the two diskettes; however, no verification error is displayed if the allocated parts of the tables are the same. 3.d.3 Four-drive systems The BACKUP command has the capability of c0pying to or verifying with any of the three drives (J-3) in a four-drive system. It is not p')ssible, however, for BACKUP to sense the difference between a two-drive and a four-drive system. Thus, due to the nature of the two-drive disk controllers with EXORdisk II. it is possible to destroy a diskette in drive one if BACKUP is invoked with the fiR" option and if non-zero numbers are specified on the command line for and . If the user has a two-drive system, it does not ~ake any sense for him to enter lo~ical unit numbers on the command line when invoking the BACKUP command, since the proper default is to copy from drive zero to drive one. If he were to specify to copy from drive two to drive three with the "R" option, then the diskette in drive one would be accessed and subsequently destroyed. 3.9 Examples Many times it is desirable to differentiate the two identical copies of diskettes from each other by use of the ID sector information. The ID sector~s contents can be chan]ed during a diskette copy by using the "III option. =BACKUP ;1 BACKUP FROM DRIVE 0 TO I? Y DISK NAMEINErlNAME DATE(MMDOYY):OJ0978 USER NAME' = MOOS 3.0 User's Guide Page 03-18 BACKUP COt~MAND 3.9 -- Examples All information to the riqht of the colons is supplied by the operator. The destination diskette will be given the disk name NEWNAME which will be printed on the heading lines of subsequent FREE and OIR command invocations (see Chapters 16 and 9, respectivelyi. The date of the disk copy that Is generated is January 9, 1978, and the same user name t~at was assigned to the source diskette during a previous BACKUP or during the initial DOSGEN process will be given to the destination diskette (indicated by carriage return response without any data). The verification process using the two diskettes )enerated above will cause an error when comparinq the ID sectors; however, the remainder of the diskettes are still compared. The offset ~essaqes of the discrepancies can be suppressed by also using the itS" option. Thus, the verification of the above example~s generated diskettes would show the following operator-system interactionss =BACKUP ;VS SECTOR 0000 = The following example assumes that no scratch or garbage files exist on the source diskette. Then, the reorqanization process requires a minimum amount of operator interaction: =BACKUP :l,:2;R BACKUP Fl10M DRIVE 1 TO 21 f ENTER SAVE FILE COpy SELECTION COMMANDS: (P), QUiT (S), DELETE (0), PRINf S, D, P t Q, ( CR (OJ, NO MORE )I COPYING MOOS .SY etc. STARTING TO COpy FILES COPYING BACKUP etc. .CM = It Should be noted that no file selection commands were used. The resulting destination diskette will contain all files from the source diskette, but they may be in different places on the surface of the diskette. Thus, a reorganization process cannot be followed with a verification process for the same diskette pair. The "Nfl option could have been used in the above example to suppress the printinq of the file names as they were being copied. The last example shows the file append process. The example assumes that there is an MOOS diskette in drive 1. Also, it assumes that the diskette in drive zero has a family of files which are to be copied to the destination diskette. The family has file names which start with the letters ·"FORn. MDOS 3.0 User"'s Guide Page 03-19 BACKUP C(L~MAND 3.9 Examples The following shows the operator-system interactions: =BACKUP ; A APPEND FROM DRIVE 0 TO 11 i ENTEti FILE SELECTION COMMANDS' SAvE (5), DELETE (D), PRINT (P), QUIT (Q), NO MOHE (CR) S, 0, P, 0, (CR): S FOR*. * 5, 0, P, Q, ( CR ) • }) 09 FORT .CM OA FORTLI B • HO OB FORTNE~S. SA OC FORTESTI.SA OU F OHTEST2. SA OE FORTEST3.SA OF FORTEST4. SA 10 FORTEST5.SA DELETE FILE NOS. I B-E, 10 DELETE FILE NOS.' STARTING TO COpy FILES COpy I NG FORT .CM COtlYING FORTLIB .RO COpy I NO FORTEST4. SA FOHTEST4.SA - DUPLICATION' IS IT TO BE COPIED? Y NEW NAME:FTEST = The file selection command SAVE was used to flag all file names beginning with FOR as eligible for copyin~. Then the PRINT co~mand was used to see the eligible list of file names. The P~INT command terminates the use of the DELETE and SAVE commands. Thus, the PRINT command~s delete file feature is used to remove any remaining file names from the eligible list. File names OB, OC, 00, DE, and 10 were deleted in this manner. A null response is required to terminate the PRINT command's input prompting. The last file to be copied turned out to have a duplicate file name eXisting on the destination drive. The operator responded with a "Y·II indicating that he wanted to copy the file anyway. Since duplicate file names cannot exist, the append process lets the operator rename the source file before it gets copied. The new name assigned to the file on the destination diskette will be FTEST.SA (default suffix assigned). MDOS 3.0 User"s Guide Page 03-20 CHAPTEH 4 4. BINEX COMMAND The BINEX command allows rnemory-imaqe files to be converted into an EXbug-loadable format for copyinq to tape. This command performs the inverse operation of the EXBiN command (see Chapter 14). BINEX is useful in the development of non-diskette-resident software with MDOS 9 since the object code can be written to tape after it has been tested. 4. t Use The B!NEX command is invoked with the following command linel BINEX [, ] where is the file specification of a memory-image file that is to be converted, and is the file specification of a file that is to receive the results of the conversion. Only is required to be entered on the c 0 mm a nd 1 i n e • Th e de f au 1 t s u f fix n L0" and the de fa u I t logical unit number zero will be supplied for if those quantities are not explicitly given. The output file specification, , is optional. If is entered, it may be a partial file specification consisting of only a file name, a suffiX, or a lo.gical unit number (or any combination thereof). The unspecified parts of will be supplied from the respective parts of , with the exception of the suffix. The default suffix for is ·"LX" to indicate its EXbug-loadable format. If no file specification is given for , the output file will be created with the same file name as but with the suffix "-LX"'. If only a suffix is given for , that suffix will be used instead of the default"LX". If no logical unit number is given for , the output file will be created on the same drive 8S given for . In any case, must be a file specification for which no entry already exists in the directory. Standard error messages will be displayed if already exists, if does not exist, or if is of the wrong file format. If no errors are found on the command line, BINEX will write into the output file a name record, or SO record, that contains the file na~e and suffix of . Then, BINEX will convert the content of into displayable ASCII characters and output them to In the form of the EXbug SI records (the nM6800 EXORciser User's Guide" contains a description of this record format). MOOS 3.0 User.J's Guide Pa~e 04-0 i b I NEX CCHrhAAt"D 4. J -- Use [he terminatinq S9 record will contain the startinq execution address that was extracted fro~ ~s load Infor~~tion. The memorY-ima1e file, , is unaffected by the entire HINEX process. The output file, , can then be copl '~d to tape (see Chapter 7. COpy Command) for use in a non-iiskette environment. 4.2 Error Messaqes No special error messaqes are displayed by the BINEX comlland. Only the standard error messages available to all commands are used. 4.3 [::xarnpl es Most frequently, the default suffixes and logical unit numbers suffice for dINEX operation. The followinq co~mand line BINEX TESTPI'?OG will produce the file TESTpHOG.LX on loqical unit z~ro from the rnemory- i rnaqe f i 1 e TESTPHo3. LO, a 150 on 1 oql ca 1 uni t ze ro. If the output file is to be than the input file, but the still to be ~pplied, then only a specified for as in the created on a different irive other default parameters are logical unit number need be followinq example: B I NEX [ESfPHOG,: I \"t'hi cn will create the f i 1e T~STPHOG. LX on 1 oqi cal uni tone. If the file to be converted happens to reside on a drive other than zero, then that unit number will also be the default value of the loqical unit number for the output file. [hus. BINEX TESTPHOG:2 ~ill create rESrpR(~.LX on drive two. The last example illustrates the explicit namin1 of an output file and input file. In any case involving default values of which the 0perator is uncertain, it is alwFI'fs sAfe to explicitly use the full file specifications. i-=or examole, dINEX TESfPHOG.LO:(),FILEX.LT:Q will create FILEX.LT on drive zero. MuOS 3.0 Jser's Guide Page ()4-02 CHAPTER 5 5. BLOKEDIT COMMANlJ The BL(OCEDIT command allows lines of text from one or more ASCII files to be selectively copied into a new filee This command can be useful in generating new program source files by copying routines from existing source files, or in rearranging existing files by copying their lines into a new sequence. 5. 1 Use The BLOKEDIT command line l command is invoked with the following BLOKEDIT , Both of the parameters are required by the BLOKEDIT command. is the file specification of a command file, and is the file specification of a new file which will be created. The new file will be written into as directed by commands in the command file. Both file specifications are qiven the default suffix liSA" and the default logical unit number zero. must be the name of a file that exists in the directory. ~ust not already exist. A standard error massage ~ill be displayed if either of these criteria is not met, or if is of the wrong file format. 5.2 BLOKEDIT Command File The command file specified by is the controlling factor in the execution of the BL(~EDIT command. The command file contains the names of the source files that are to be used for the extraction of data, the numbers of the lines within a particular source file that are to be copied into , comments, and original text supplie1 by the user that is also to be copied into . The command file must be created with the EDIT command, or a similar command, prior to using the BL(~EDIT command. There are three kinds of lines that can command filel appear in the 1. Comment lines 2. Command lines 3. Quoted lines MDOS 3.0 UserJ's Guide Pa~e 05-01 BLOKEDIT COMMAND 5.2 -- BLOKEDIT Command File fhe three types of lines that comprise the command file are discussed in the following sections. 5.2.1 Comment lines A comment line is a line whose asterisk (*>. For example. ** first character is an THESE THREE LINES ARE BLOKEDIT COMMENT LINES * The occurrence of comment lines in the command file is ignored by the BLOKEDIT command. Comment lines serve only to document the command file. 5.2.2 Command lines A command line is recognized by the fact that its first character is an upper-case alphabetic character, a decimal digit, or a double quote character. For example, FILENAME.) 5,75-80 n are three valid com~anrl lines. Command lines which begin with an upper-case alohabetic character indicate that a source file is being named. Such command lines are used to specify from which file the subsequent lines are to be copie~. A source file can only be named by putting its file soecification at the beginning of a command line. Optionally, the suffix and/or logical unit number can be specified in the standard format after the file's nalle. The default values of liSA" and zero are supplied automatically if no explicit references to s~Jffix or logical unit number are made. Command lines which begin with a decimal digit indicate that the command line will contain one or more numbers. These numbers represent the physical line numbers to be copied from a source file which has been named using the prior form of the command line. Physical line numbers can be up to five diqits in length and must be in the range 1-65535, inclusive. More than one physical line number can aooear on a com~and line if it is followed by a comma. A r~nge of physical line numbers can be specified by separating the start and end of the range with a hyphen (-). For exa~ple, MOOS 3.0 User's Guide Page 05-02 :)LOKEJ I r CChh\ANLJ ') • 2 - - BL () Kt: D I [ Com'll r1 n d ~i 1e >j 12345 100-364 12,15,1-5,17-200,5-15,2,2 are v-~l ia forms of physic(31 line number command lines. A source file's physical line numbers can he pri'lted usinq the LIST command described in Chapter 17~ ~.2.3 ~uotAd lines A c 0 mrn and I i net h n t be q ins wit had ou b I e quo tee h 1 r ACt e r in-Jicates the belinnin'J or the end of quoted lines. A_ny information that appears on the S8'TJe line as the ri()ublq quote is i Jnored. A quoted line is any line bounded by,q :J1ir of C0mm,qnj lines which beqin with a double quote chFlracter. A.II -1 U 0 t e ri 1 in e S wi 11 he cop i e ci ;i ire c t ! y f r om the c () rTlm -1 n:i f i 1 e into the new file, as is. rhus, it is possible to include original lines of text that will be co;)ied into the n~~ file in 1diition to the physical lines C()0ied fr()m t'1e n<3med source files. The followinq eXB'TJple illustrates the tlse of _-luoted lines: (II) " STAfiT or: QUOfEJ LINE SEUUENCE LABEL LOAA #SFO • SEf MASK LSRt:3 • STA~ lA13+4 TAB • ** COMMENfS IN * JMP EXlf • " Et~U O~ QUOf!:D LI NES OUOfEJ LI NE G~T vH?I TTEN OJ r SEOUEi~CE [he first and the last lines of the example will be discarded fhe eLJht lines in bet;Neen It'li 11 be written as is into the new file. by the ':3LOKEDIT command. The followinq llessaqes can be displayed by the1LOKI-:DIT command. Not all messages are error messages, al thou)!! error rness;lges are included in this list. The standarj error illeSSqqes that can be displayed by 111 coml1anris are not listed t1er e. MuOS 3.0 User's Guide Paqe 05-03 5.3 -- Messages BLOKEOIT COMMAND CURRENT SOURCE FILE IS A command line containing the name of a source file has been processed. The name of source file is shown as . This message is u seri to monitor the path of HLOKEDIT through the command f i 1 e. DONE. NEW FILE LINE COUNT IS nnnnn The command file has been exhausted (end of file encountered) when this message is displayed. It indicates that no more command lines will be proc essed. The number of phys ical 1 ines that were copied into the new file Is given by the decimal number Unnnnn U • After this message is displayed, control is returned to MOOS. ** 36 FILE EXHAUSTED BEFORE LINE FOUND This message is displayed when the source file being read was exhausted (end of file encountered> before a specified physical line number was found. This is not a fatal error. The next command line from the command file will be processed. ** 38 INVALID LINE NUMBER OR RANGE This error message can be displayed for several reasons. A line in the command file did not begin with an asterisk, a double quote, a decimal digit (O-9), or an alphabetic character (A-Z>, and the line was not a quoted line. If the command line started with a digit, then the physical line number had a value outside of the range J- 65535. or the starting number of a line number range was greater than the ending line number of the range. In any case, this is a fatal error. BL(~EDIT is terminated and control returned to ~DOS. The command line in error is displayed prior to this message. ** 39 LINE NUMBER ENTERED BEFORE SOUHCE FILE This message indicates that the command file contained a line with a decimal digit in the first position before a source file was named. Processing cannot continue, so the BLOKEDIT command is terminated. The command line in error is displayed prior to this message. MDOS 3.0 User's Guide Page 05-04 BLOKEDIT COMMAND 5.4-- Examples 5.4 Examples In the following example it is assumed that the three source files EDIT.SAli, ASM.SAiO, and LOAD.SA:O contain some special utility subroutines that are to be extracted and placed into a new file UTILITY.SAIO. The physical line numbers of the routines can be determined by listing the source files on the console or printer (Chapter 11, LIST Command). ~ith that infor~ation, the command file dL~CMD.SAIO is created using the EDIT command: ** Define * EDIT: 1 the first source file 176-205 224-230 ** Define *ASM.SA:Q the second source file .. Insert a PAGE directive to separate routines PAGE .. ~6-80,90-101,150-163 ** Define * LOAD H the last source file Insert another PAGE directive PAGE II 27,28,29,30,31,32,33,34,35,36 37 38 39 40 ** * End of Command File Then, the MOOS command line BLOKEDIT BLKCMD,UTILITY is used to invoke the BLOKEDI r command. Durinq the processing, BLOKEDIT will display the following messaJes: CURRENT SOURCE FILE IS EDIT • SA: I CURHENT SOURCE FILE IS ASM .SA:O CURRENT SOURCE FILE IS LOAD .SA:Q DONE. NEW FILE LINE COUNT IS 104 = MOOS 3.0 User~s Guide Page 05-05 BLOKEDIT COMMAND 5.4 -- Examples The new file will contain the indicated lines from the respective source files. Each set of lines copied from the source files has been separated from the next file's set of lines by a PAGE directive (causing paging when the UTILlfV file is assembled). The ~AGE directive was insertei using quoted lines. BLOKEDIT can also be used to rearranqe the lines of an eXisting file by copyin] them in a given sequence into the new file. [he following command file. PROGI 207-300, JO-206, 1-9 for example, could be used f i 1 e PH OG I • SA: 0 • Fir s t, the new file. These would would be followed by lines to shuffle the lines in th~ source 1 in e 5 207 - 3 00 wo u 1d be cop i ad i n to be followed by lines 10-206, which 1-9. Tne last example illustrates an error messaqe displayed by BLOKEDIT. The command line in error is displayed prior to the error message. The initial five-digit number in front of the displayed command line gives the line~s physic31 line number within the file (as displayed with the LIST c0mmand, Chapter 17). =BLOKEDIf BLKCMD,TEM~EQU CUHHENT SOUHCE FILE IS E(JU 00002 56-34 ** = .SA:Q 38 INVALID LINE NUMHEH OH HANGE The error was caused by an invalid line number range. [he starting number of a range must be less than or equal to the endinq number of the range. MUOS 3.0 User's Guide Page 05-06 CHAPTER 6 6. CHAI N COMMAND The CHAIN command allows predefined procedures to be automatically executed. A procedure consists of any sequence of MDOS command lines that has been put into a diskette file, known as a CHAIN file. Instead of obtaining successive command lines from the console, CHAIN will fetch commands from the CHAIN file. This feature allows complicated and lengthy operations to be defined once, and then invoked any number of times. requiring no operator intervention. The additional capabilities of conditional directives to the CHAIN command at both compilation and execution time, and the capaoility of string substitution, permit an almost unlimited number of applications to be handled by a CHAIN file. 6.1 Use The CHAIN command is initially invoked by the following command line: CHAIN [; •••••• , ] The only required parameter is , the file name specification of the diskette file that contains the procedure definition. The CHAIN file, , is given the default suffix iiCFii, permitting the file iiaffiC to be identified in the directory listing at a qlance as beinq a CHAIN file. The default logical unit number is zero. The optional arguments, (i = 1 to n), are CHAIN tag definitions which can be used to modify the compilation, content, or execution of a CHAIN file. Two special forms of the CHAIN command line can be used to restart an aborted CHAIN process. These command lines are shown here, but are described in detail in section 6.6. CHAI N N* CHAIN * CHAIN executes a compilation phase and an execution phase. In the compilation phase. is read from beginning to end. An intermediate file, CHAIN.St:O, is created durinq the compilation. The intermediate file consists of lines to be used in the execution phase of the CHAIA process. This file will be automatically deleted upon the subsequent successful completion of the CHAIN process. During the execution phase, CHAIN MOOS 3.0 User's Guide baSically intercepts Page 06-01 CHA I N COMMAND 6. I -- Use the system console input requests so that input can be supplied from the intermediate file. Each time a~ input request is made by a command that is invoked by the CHAIN process, the next line from the intermediate file will be read and passed to the command. As far as the co~~and is concerned, it is receiving its input information from the operator at the console. The CHAIN command only intercepts console input via the MDOS system function ".KEYIN" (see section 25.2). Therefore, only programs (commands or user-written programs) that use this system function will receive their input from the intermediate file. ~rograms which contain their own input routines, or which use the device independent I/O functions (see section 25.3) can be invoked by the CHAIN process, but the subsequent input to those programs must be supplied manually via the console. The CHAIN command ·cannot be invoked from within a CHAIN process unless it is invoked from the last line of the intermediate file. An error message will be displ~yed if other typ~s of CHAIN command recur~ion are attempted. The CHAIN command will continue to supply information from the intermediate file until the end of the file is encountered. If, at that pOint, the next input request from the console is by the MDOS command interpreter, the CHAIN process will be properly terminated, MOOS will be re-entered, and commands will again be accepted from the operator at the console. If. however, the end of the intermediate file is encountered while a program is requesting console input, then the CHAIN process is aborted, an error messaqe is disolayed, and the currently active program will be stopped. Control will then be given to the MDOS command interpreter. The diskette in drive zero must remain in drive zero throuqhout the execution of the CHAIN process, even if the "CF" file is compiled from drives other than zero. 6.2 fag Oefinition, Assignment, and Substitution The CHAIN command line can be parameterize:j arqu'nents that follow the CHAI N f i 1 e spec i f icat ion. argunent has the following formats wi th Each (% %] where is the name by which the argument is referenced within the CHAIN file, and is the value assigned to that arqu~ent. As many arquments as fit on the cornman; line can be specified. Multiple arguments must be separated by commas. Tags may be from one to thirty-two charact~rs in length and can contain any displayable character except the MOOS 3.0 User's Guide P~ge 06-02 :;HA IN COMiV\AND 6.2 -- Tag Definition, Assignment, and Substitution period (.), the comma (,), the space ( ), or the percent sign (%). A tag~s value can be any series of disolayable characters with the exception of the percent siqn. A tag is given a value by following the taq's name with the value enclosed in percent signs. If no percent sign follows a taq~s name, it is assiqned a null value. For examole, the command line CHAIN TFILE;LIST,DAY%11%,TIME%02:30% defines three tags: LIST, DAY and TIME. The tag LIST is assilned a null value; the taq DAY is given the value 17; the tag rIME is given the value 02:30. CHAIN allows two uses to be made of tags. First, tests can be performed within the CHAIN file to determine whether or not a specific tag has been specified on the CHAIN command line. Second, the value of a taq can be substituted for a tag~s occurrence within the CHAIN file. Thus. using the above example, the CHAIN file could contain a test for the presence of the tag LIST to determine if the CHAIN orocess will produce output to a printer. The values of the tags DAY and rIME could be substituted in one of the heading lines that may be produced by the CHAIN process. So far in the discussion, the value of a ta1 has not been used. fhe existence of a tag can be tested re1ardless of a tag's value. A tag~s value is substituted for each occurrence of the tag's name contained between two delimiting percent signs. The following example will illustrate tag SUbstitution. If a CHAIN file contains these statements: RA5M TESTPROG;H%OPTIoN% ~ROGHAM ASSEMBLED ON %OATE% EXBIN TESTPR(~%SrART% then the tags O~TI(}N, respective values put deli~itinq percent signs intermediate file. If CHAIN at its invocation, would be compiled: DATE, and START will have their in place of their tag names and the before each line is written into the no tags were specified for the above then the following intermediate file RASM TESTPROG; H PROGRAM ASSEMBLED ON EXB IN TESTPH(X3 If the tags were given initial values via the CHAIN command line as. OPTION%XLG%,OATE%JANUARY 8, 1978%,START%; 1000% then the following intermediate file would be compile;' MDOS 3.0 User's GUide Page 06-03 CHA I N COMMAl~O 6.2 -- Tag Definition, Assignment, and Substitution HASM TESTPHOG;HXLG ASSEMBLED ON JANUARY 8, 1978 EXBI N TESTPROO; 1000 PROGHAM fa] substitution is used here to specify the various options for the assembly process, a date for the heading line printed during the assembly, and the starting execution address for the converted object file. The use of taqs and tag values, therefore, is of great importance in the creation of complicated and general purpose CHAIN tiles. To pass tag values trom one CHAIN file to another, a torcin] character is used. [he bAckslash character (\) is used to indicate that the next character of a line is not to be tested as a special character (i.e., to see if an operator follows, or 3 valid tag). Thus, passing a tag from one CHAIN file to another can be done with a series of statements like the following: HAS.~ TESTPROG;H%OPTION% PHOGAM ASSEMBLED ON %DATE% CHAI N FILE2; STARr\ %%START%\% [he first and last percent signs of the last line are not tag replacement indicators. When the above lines are compiled, the resultant intermediate tile will not contain the backslash characters. If the value "XLGU is given to OPTION, nOI .8. -'8" to DATE, and n; IOOOJl to STAHT, then the compi led CHAIN tile would appear as TESTPROO;HXLG PROGRAM ASSEMBLED ON 01.8.78 CHAIN FILE2;STAHT%;1000% tlASM The value of STAHT would be passed from the first CHAI~ file to the second CHAIN file. The second CHAIN process can only be invoked from the last line of the intermediate file. 6.3 Compilation Operators Two types of CHAIN operators exist which can be used to modify the procedure that is performed through the CHAIN process: Compilation Operators and Execution Operators. Execution operators are descr ibed in section 6.4. Compilation Operators permit the operator to parameterize a CHAIN file to perform many different procedure~. For example, a CHAIN file may contain the MOOS command lines to assemble an entire system of programs. Based on the CHAIN arguments specified on the CHAIN command line, all or part of the system of programs may be assembled. The options for the assembly process can also be supplied via a CHAIN argument (see example in section 6.7). MOOS 3.0 User"s Guide Page 06-04 CHA I N 6.3 - COMMAi~iJ Compilation Operators All Compilation Operators are included in the CHAIN file alon'J wi th any other statements. Compilation Operators are denoted by a slash (I) appearing in the first column of a line. Any number of intervening spaces (including none) can be placed between the slash and the operator. If an operator is found which is not defined, the CHAIN process will be aborteci. The following Compilation Operators are defined' Operator *IFS IFC XIF ELSE ABORT Function Comment Conditional "if set" test Conditional "if clear" test End conditional Conditional ~lternative Unconditional CHAIN abort 6.3.1 Compilation Comments If the character following a slash is an asterisk (*), then a Compilation Comment is indicated. The remainder of the line following the asterisk contains the comment, which can include any displayable characters. Compilation Comments are not written into the intermediate file. They are, however, displayed on the console immediately after they are read from the CHAIN file. Compilation Comments are useful in communicating to the operator what intermediate file is being compiled for execution. The comment lines are only displayed if the part of the file containing the comments is being compiled into the intermediate file (see next section}. 6.3.2 IF operator If the characters following a slash are II IF", an IF operator is denoted. There may be any number of intervening spaces between the slash and the IF operator. This feature allows a structured type of CHAIN file to be constructed that will show by its physical a:::>pearance the range of the conditional operators. The IF operator allows a test to be made for the existence of one or more tags on the CHAIN command line. If the test proves positive, or true, then the lines from the CHAIN file followinq the IF operator will be included in the intermediate file (written to the CHAIN.5Y file). If, however, the test proves negative, or false, then the subsequent lines will not be included in the intermediate file. The lines from the CHAIN file will be included or excluded following the IF operator until an ELSE or XIF operator (explained below) is encountered. The IF operator has two formsl IFS and IFC, which stand for lIif set" and .lIif clear", respectively. The IFS operator MDOS 3.0 User-'s GUide Page 06-05 CHAl.N COMMAND 6.3 Compilation Operators proves positive if any of the taqs listed as its operand have been specified on the CHAIN command line. For example, /IFS LIST will prove positive if the tag LIST was mentioned on the CHAIN command line. The same test will prove neqative if LIST did not appear. Likewise, the IF operator /IFC DAY will prove positive if the tag CHAI~ command line. The test appear. Multiple IF operators if all tags of a certain group DAY was not specified on the will prove negative if DAY did can appear in sequence to see were specified. Thus, /IFS FLAGI /IFS FLAG2 /IFS FLAG3 will prove positive only if tags FLAGI, FLAG2, and specified on the CHAIN command line. FL~G3 were More than one tag can appear in the operand fleld of an IF operator. A comma separatinq tag names on an IF line will perform an Ilinciusive or" function. A period separatinq tag names, on the other hand, will perform an Hand" function. The "and" function has precedence over thellor" flJnction. That is, the commas (or) can be thought of as grouping the periods (and). For example, the IF operator line IIFS FL~GJ.FLAG2.FLAG3 is equivalent to the previous example of three successive operators. The following line, IF /IFS Ft .F2,FLAG3,TAGI.TAG2.LIST which can groupinq, be thought of as being evaluated by the following eFt and F2) or (FLAG3) or (TAGI and TAG2 and LIST) will prove positive if the tags FI and F2 are specified, or if FLAG3 is specified, or if tags TAGI and TAG2 and LISr are specified. I f one IF operator has proven negative, then the subsequent lines from the CHAIN file, including other IF operators, will be ignored until either a correspondin1 ELSE or XIF operator is found. In this way, the IF operator is used to modify the resultant intermediate file. MDOS 3.0 User's Guide Page 06-06 :;HAIN COMMAND 6.3 -- Compilation Operators 6.3.3 XIF and ELSE operators Two Compilation Operators can cause the range of an IF operator to be endede The XIF operator marks the end of a series of conditionally compiled statements. The ELSE operator reverses the sense of the IF's test condition. and is us-ed to indicate what is compiled if the test condition is not met. The conditional IF operators can be nested to a depth of sixteen ievels. The following example shows the use of XIF and ELSE. IIFS LIST LIST TESTFILE.LH rEST pROGRAM HEADING LINE IELSE LIST TESTFILE IXIF In this example, the file TESTFILE will be listed on the printer only if the tag LIST is specified on the CHAIN command line. A heading line is also provided within the CHAIN file if the LIST tag is used. If, however, LIST is not specified. then the ELSE portion of the conditional operator will be compiled, causing TESTFILE to be shown on the system console instead. If the above example were to be written without the ELSE operator, one additional IF and XIF operator pair would have to be used, as shown' IT r ("' '.Lr'..::;J T C".-r L.~J.1 T LIST TESTFILE;LH rEST PROGRAM HEADING LINE IXIF IIFC LIST LIST TESTFILE IXIF It can be seen that the use of the ELSE operator makes the CHAIN file easier to understand. Each IF operator must have a corresponding XIF operator. The ELSE operator is available at the option of the user. The following example shows how nested IF operators might appear in a CHAIN file: IIFS ASM FI TEST~ROG IFS F2 EXBIN TESTPROG / XIF /XIF I MOOS 3.0 Use r.l 5 Guide Pag e 06-07 CHAIN COMMAND In 6.3 -- Compilation (~erators this case, the tag Ft governs whether or not the file will be assembled. If FI is specified, then the assembly will be performed. Then, if in addition F2 is specified on the CHAIN command line, the object file conversion will also take place. The CHAIN file can be used, therefore, to perform only the assembly, or the assembly and the object file conversion, but not the object file conversion by itself. TESTIJROG If, through the use of the conditional operators, a null (empty> intermediate file is generated. then the Execution Phase of the CHAIN command will be skipped. Control will be given to the MOOS command interpreter. as if no CHAIN had ever been executed. 6.3.4 ABORT operator The ABORT operator provides a way of instantly returning to MDOS during a CHAIN file's compilation. No messa]es will be displayed as a result of encountering the ABORT operator. It is the user1s responsibility to include an explanation for the ABORT throuqh the use of Compilation Comments. The ABOHT operator is typically employed in terminating a CdAIN compilation if one or more critical tags h8ve been omitted from the CHAIN command line. For example, the following CHAIN file will be aborted during the compilation phase if both of the tags opr and FILE are missinq. The Compilation Comments will indicate the reason for the terminationl IIFS OPT.FILE 1* GOING TO ASSEMBLE %FILE% HASM %FILE%I%OPT% IELSE 1* 80TH "F ILEu A!'U II OPT" MUST BE SPECIF lEO 1* CHAIN TERMINAfED IABORT IXIF 6.4 Execution Operators Execution (~erators can be used for the dynamic adjustment of a CHAIN process while it is being executed. Through the use of these operators, the user can set values in an error status word maintained by MOOS. test the word, and, depending upon the results of the test, skip a aortion of the procedure. The error status word is accessed by all MOOS commands to indicate whether or not they completed their function without error. All CHAIN MDOS 3.0 User's Guide Execution Operators are denoted by the Page 06-08 CHA I N COMMAND 6.4 -- Executif)n Operators commercial at-sign (@) as the first character of a li~e. Any number of intervening spaces (including none) can be placed between the at-sign and the operator. If an operator is found which is not defined, the CHAIN process will be aborted. The following Execution operators are defined! Operator * SET rST JMP LBL CMD 6~4.! Function comment Operator breakpoint Set error status word Test error status word Continue sequential processing at label Define a label Change state of CHAIN input echo Execution Comments If the character following the at-sign is an ~sterisk then an Execution Comment is indicated. The remainder of the line following the asterisk contains the comment, which can include any displayable characters. EXecution Comments are comoiled into the intermediate file and 3re not displayed until' they are encountered during the execution phase. Execution Comments are used to relay information to the operator during the actual execution of the intermediate file. In conjunction wi th the Operator Breakpoint (next section), these comments also serve as a means of passing instructions to the operator for mounting paper into the printer, swapping diskettes in drives one, two, or three, loading a cassette, etc. (*), 6.4.2 Operator Breakpoints A variation of the Execution Comment is the Operator Breakpoint. If a period (.) is used instead of an asterisk for the Execution Comment, then the normal Execution Comment is displayed; however, instead of continuinq with the processing of the next line of the intermediate file, the BEL (S07) character is sent to the console to alert the operator. The CHAIN process then waits for any key on the keyb0ard to be depressed before continuing. For example, the following compiled CHAIN filel :g* GOI NG TO ASSEMBLE PROGRAM g. TURN .oN PRINTER RASM TESTPR(~'LXG would display the two comments during the execution of the CHAIN process. Prior to startinq the assembly, however, the CHAI~ process would pause allowing the operator time to ready MOOS 3.0 User"'s Guide Paqe 06-09 CHA I N COM~Aj~lJ 6.4 -- Execution Operators the printer. Execution would not resume until after the operator had depressed any key on the system console. 6.4.3 Error status word Among the operating system's resident variables is a two-byte error status word. Each MDOS command will set or clear a bit within this status word to indicate the status of the command's completion. The error status word has the following formata FED C B A 9 Error Status 8 7 6 543 2 0 Error Type Error Mask I a I I : I ••• I I I a : : a ••••••••••••••• Error Mask Flag Bit B (S-A unused) I ••••••••••••••••••••••••••• Error Status Flag Bit F (C-E unused) Bits 0-7 describe error I Normally, after the completion of each command, all bits of the Error Status and the Error Type are cleared (= 0). The Error Mask is not affected by MOOS commands. If an error occurred during the command, the Error Status Flag (bit F) will be set by the command. In addition, an Error Type will be set into the lower half of the status word (bits 0-7). [he Error Type is used to indicate which error was detected by the command. Usually, the CHAIN process will abort anytime the Error Status Flag is set by one of the commands invoked from the intermediate file. The Error Mask can be used to inhibit CHAIN process aborting due to command errors by setting the Error Mask Flag (bit B) to a I. The Execution Operators can affect certain parts of the status word. The following symbols are used to refer to the various parts of the status Word' MDOS 3.0 User-'s Guide Page 06-10 CHAIN 6.4 -- EXecution Operators COM~AND Word Designator Error Status Word Part ~~h 01 e Error Error Error (1 T M S word (bi ts O-F) Type (bits 0-7) Mask (bits 8-8) Status (bits C-F) 6.4.4 SET operator The SEf operator can be used to place a certain bit pattern into the system error status word. In particular, the SEf operator is the only way that the Error Mask Flag can be set to inhibit CHAIN process abortions. The MDOS commands will only set the Error Status and the Error Type. The SET operator has the following format: @SET(, ] «value>] where is the status word designator (explained above) and is a hexadecimal number that is to be placed into the desi~nated word part. The size of must not be greater than the size of the word part into which the it is to be placed. If the status word designator is not specified, then W, the whole word part, will be assumed. If is not specified, then zero will be assumed. As an example of the SET operator, the following will set the Error Mask Flag (bit B) to inhibit CHAIN process aborting due to command execution errors: .'-"C"r-T gJr:~ l.I ,1'1 ("') a @SET,W 800 @SEI 800 All three forms will set bit B of the error status word; however, the last two forms Will, in addition, set to zero all other parts of the error status word. 6.4.5 ISI operator The IST operator is used to examine the error status word for a particular condition. This operator has the following formata @ISI[, J [, ] where is the status word desiqnator, is the test condition to be performed, and is a hexa~ecimal number that is used as part of the test. Use of the IST operator results in a true or false condition based on the test performed. If the result of the MOOS 3.0 User"'s Guide Page 06-11 CHAIN COMMAND 6.4 -- Execution Operators test is true, then the next sequential line in the intermediate file will be skipped. If the result of the test is false, however, then the next sequential line in the intermediate file will be processed. In other words. a false condition has the same effect as if the TST operator was not processed at all. If the status word designator is not specified, then W, the whole word part, will be assumed. The following test conditions can be used in the field" of the TSr operator: Test performed on word part EQ NE GT LT GE LE BS Be Equal to Not equal to Greater than Less than Greater than or equal to Less than or equal to 8it set (=1) Bit clear (=0) The first six tests are the standard relation31 tests for equality, etc., that can be perfor~ed with the and the desiqnated word part. The last two tests (BS and Be) allow specific bits in the designated word part to be tested for being set (BS) or clear (BC). The bits to be tested are indicated by the one bits from . The part of the TST operator is a hex~decimal number in the range O-FFFF. [he size of must no~ be greater than the size of the word part that is being tested. No signed numbers can be used. That is, all comparisons and tests are made with positive integers. If is not specified, then the default of zero will be used. 6.4.6 JMP operator The JMP operator allows skipping lines in the intermediate file during its execution. Used in conjunction with the TSr operator, the JMP operator can be turned into a conditional jump around critical steps if certain conditions are detected during the execution of the CHAIN process. The JMP operator has the following format: @JMP