<<
Home , DOS

MS-DOS and PC-DOS A Practical Guide Macmillan Science Series

Consulting Editor Professor F.H. Sumner, University of Manchester

S.T. Allworth, Introduction to Real-Time Software Design Ian 0. Angell, A Practical Introduction to Computer Graphics W.D. Burnham and A.R. Hall, Prolog Programming and Applications G.M. Birtwistle, Discrete Event Modelling on Simula T.B. Boffey, Graph Theory in Operations Research Richard Bornat, Understanding and Writing Compilers J.K. Buckle, Software Configuration Management J.C. Cluley, Interfacing to Microprocessors Robert Cole, Computer Communications Derek Coleman, A Structured Programming Approach to Data Andrew J. T. Colin, Fundamentals of Computer Science Andrew J .T. Colin, Programming and Problem-solving in Algol 68 S.M. Deen, Fundamentals of Data Base Systems S.M. Deen, Principles and Practice of Systems P.M. Dew and K.R. James, Introduction to Numerical Computation in Pascal M.R.M. Dunsmuir and G.J. Davies, Programming the UNIX System K.C.E. Gee, Introduction to Local Area Computer Networks J.B. Gosling, Design of Arithmetic Units for Digital Roger Hutty, Fortran for Students Roger Hutty, Z80 Programming for Students Roland N. lbbett, The Architecture of High Performance Computers Patrick Jaulent, The 68000- Hardware and Software J .M. King and J.P. Pa•doe, Program Design Using JSP- A Practical Introduction H. Kopetz, Software Reliability E.V. Krishnamurthy, Introductory Theory of Computer Science V.P. Lane, Security of Computer Based Information Systems Graham Lee, From Hardware to Software, an introduction to computers A.M. Lister, Fundamentals of Operating Systems, third edition G.P. McKeown and V.J. Rayward-Smith, Mathematics for Computing Brian Meek, Fortran, PL/1 and the Algols Derrick Morris, Systems Programming Based on the PDPll Pim Oets, MS-DOS and PC-DOS -A Practical Guide Christian Queinnec, LISP John Race, Case Studies in Systems Analysis W.P. Salman, 0. Tisserand and B. Toulout, FORTH L.E. Scales, Introduction to Non-linear Optimization Peter S. Sell, Expert Systems -A Practical Introduction Colin J. Theaker and Graham R. Brookes, A Practical Course on Operating Systems M.J. Usher, Information Theory for Information Technologists B.S. Walker, Understanding Microprocessors Peter J .L. Wallis, Portable Programming I.R. Wilson and A.M. Addyman, A Practical Introduction to Pascal - with BS6192, second edition MS-DOS and PC-DOS A Practical Guide

Pim Oets

M MACMILLAN © Pim Oets 1985

All rights reserved. No reproduction, or transmission of this publication may be made without written permission.

No paragraph of this publication may be reproduced, copied or transmitted save with written permission or in accordance with the provisions of the Copyright Act 1956 (as amended).

Any person who does any unauthorised act in relation to this publication may be liable to criminal prosecution and civil claims for damages.

Authorised English Language translation and revision of Handleiding MS-Dos en PC-DOS by Pim Oets orignally published 1984

Published by MACMILLAN EDUCATION LTD Houndmills, Basingstoke, Hampshire RG21 2XS and London Companies and representatives throughout the world

British Library Cataloguing in Publication Data Oets, Pim MS-DOS and PC-DOS- A Practical Guide - (Macmillan computer Science Series) 1. IBM -Programming 2. PC DOS (Computer ) I. Title 001. 64 125 DA76.8.12594 ISBN 978-1-349-08136-3 ISBN 978-1-349-08134-9 (eBook) DOI 10.1007/978-1-349-08134-9

IBM, IBM-PC and XT are trademarks of International Business Machines Corporation. MS-DOS is a trademark of Co1poration, Bellevue, 98009 Washington. Contents

1. INTRODUCTION 9

2. OPERATING THE SYSTEM, VERSION 1 13

2.1 The keyboard 15 2.2 Correcting a mistake 16 2.3 Commands 17 2.4 Copying a disk - DISKCOPY 18 2.5 Comparing disks - 20 2.6 Control instructions 21 2.7 Checking the storage - CHKDSK 22 2.8 Formatting - FORMAT 23 2.9 Entering and changing DATE and TIME 26 2.10 Function keys 28

3. THE FUNDAMENTALS OF FILES 31

3.1 Displaying the directory - 32 3.2 File names 35 3.3 Utilities and system files 36 3.4 Copying system files 37 3.5 Creating a file - COPY CON: 38 3.6 Reproducing a file - TYPE 40 3.7 Dissecting a file - 41 3.8 Renaming a file - 42 3.9 Copying a file - COPY 43 3.10 Comparing files - 46 3.11 Removing files - or ERASE 47 3.12 Creating a batch program file 48 3.13 The confirmation - PAUSE 49 3.14 The comment - REM 49 3.15 Introducing variables 50 3.16 Creating a self-starting program 51 3.17 Input and output channels 52 3.18 Regulating input and output - MODE 53

4. THE BASIC FACTOR 57

4.1 Opening and closing 57 4.2 Contact with the screen 59 4.3 Calculating 60 4.4 Creating variables 62 4.5 Creating a loop 63 4.6 Clearing the screen 64 4.7 Contact with the 64 4.8 The ASCII table 65 4.9 Instructing the printer 68 4.10 Creating a program 70 4.11 Addressing a program 71 4.12 Adjusting the screen 72 5. OPERATING THE SYSTEM, VERSION 2 75

5.1 Formatting - FORMAT (2) 76 5.2 Labelling a disk 78 5.3 Copying a disk - DISKCOPY (2) 79 5.4 Selecting the keyboard system 80 5.5 Entering and changing DATE and TIME (2) 81 5.6 The prompt 82 5.7 The system version number - 84 5.8 The function - BREAK 84 5.9 Clearing the screen - 84 5.10 Creating a batch program file (2) 85 5.11 The condition - IF 86 5.12 The jump - GOTO 87 5.13 Redirecting input and output 88 5.14 Dosing - 89 5.15 Verifying - VERIFY 89 5.16 Sorting - SORT 90 5.17 Finding - 92 5.18 Creating a pipeline 93 5.19 Checking the storage - CHKDSK (2) 94 5.20 Reconstructing files - RECOVER 96 5.21 The CONFIG.SYS file 97 5.22 Adjusting the keyboard and screen 99 5.23 Regulating input and output - MODE (2) 103 5.24 Processing graphics 104 5.25 Simultaneous printing - PRINT 106 5.26 Remote control - CTTY 108 6. HANDLING A HARD DISK 111 6.1 Installing 112 6.2 Creating and using sub-directories 114 6.3 Checking the arrangement - 120 6.4 Copying - BACKUP, RESTORE 122

7. WORKING WITH EDLIN 125

7.1 Creating 125 7.2 Closing 127 7.3 Re-opening 128 7.4 The . BAK file 129 7.5 Inserting 130 7.6 Reproducing 132 7.7 Editing keys 134 7.8 The active line 136 7.9 Editing 137 7.10 Searching and replacing 142 7.11 Erasing 144 7.12 Writing away 146 7.13 Reading back 146 7.14 Copying lines 147 7.15 Moving lines 147 7.16 Copying a file 147 8. OPERATING THE SYSTEM, VERSION 3 149 8.1 Entering and changing DATE and TIME (3) 150 8.2 Selecting the keyboard system (2) 152 8.3 Formatting - FORMAT (3) 153 8.4 Labelling a disk (2) 154 8.5 Addressing a program in a sub-directory 155 8.6 Reloading the COMMAND.COM file 155 8.7 Installing a virtual disk 156 8.8 Protecting a file - ATTRIB 158 8.9 Processing graphics (2) 159

9. ERROR MESSAGES 161 INDEX OF NAMES, CONCEPTS AND SYMBOLS 169 INDEX OF COMMANDS 173