QUICK REFERENCE CARD an Error Message Is Given If a DOS Command INIT X [,Vv] [,Ss] [,Dd] Quantity Is Too Large Or Too Small
Total Page:16
File Type:pdf, Size:1020Kb
DOS COMMAND PARAMmRS HOUSEKEEPING COMMANDS QUICK REFERENCE CARD An error message is given if a DOS command INIT X [,Vv] [,Ss] [,Dd] quantity is too large or too small. Initializes a blank diskette to form a slave On this card, DOS commands are grouped into diskette. Assigns greeting program name X these 5 categories: and volume number v (if specified). SAVEs ALL FILES the BASIC program currently in memory, under Housekeeping commands: file name X. INIT LOAD DELETE VERIFY MAXFILES Parameter As shown Min Max CATALOG RUN LOCK MON Slot SAVE RENAME UNLOCK NOMON ,Ss S1 S7 Drive ,Dd D1 D2 CATALOG [, Ss] [,Dd] Displays volume number and all files on a Volume ,Vv V0 V254 Access Commands: * diskette, with each file's type and sector FP INT PRil INil CHAIN * Using v0 is like omitting the Vv parameter. length. * indicates a LOCKed file. the diskette's volume number is ignored. • Sequential Text File Commands: Type Description (How created) OPEN READ APPEND EXEC Smallest volume number INIT will actually assign to a diskette is 1. I Integer BASIC program file (SAVE) CLOSE WRITE POSITION A Applesoft BASIC program file (SAVE) T Text File (OPEN, then WRITE) Random-Access Text File Commands: SEQUENTIAL TEXT FILES B Binary memory-image file (BSAVE) OPEN CLOSE READ WRITE Parameter Machine-Language File Commands: As shown Min Max Byte SAVE X [,Ss] [,Dd] [,Vv] BLOAD BRUN BSAVE ,Bb Bill B32767 Relative Field * ,Rp Rill R32767 Stores current BASIC program onto diskette, under file name X. Overwrites any previous NOTATION AND SYNTAX * With EXEC, always relative to field Ill. file of same type and name, without warning. A "parameter" is a capital letter, usually RANDOM-ACCESS TEXT FILES LOAD X [,Ss] [,Dd] [,Vv] followed by a number (shown here by a Loads BASIC program file X into memory, lower-case letter), which gives additional Parameter after clearing memory and (if necessary) information for executing a command. As shown Min Max Record Length changing to the correct BASIC. Multiple parameters may, appear in any ,Lj Ll L32767 Record Number ,Rr order, but must be separated from each Rill R32767 other by a comma. A parameter shown in RUN X [,Ss] [,Dd] [,Vv] square brackets [like this] is optional. BINARY FILES LOADs BASIC program file X, then RUNs the program. A file name (shown here by X) must immedi Parameter ately follow its command word. File names As shown Min Max Starting Address ,Aa must begin with a letter; only the first AIlI A65535 Number of Bytes ,Lj L1 A32767 RENAME X, Y [,Ss] [,Dd] [,Vv] 30 characters are used. A comma separates Changes a diskette file's name from X to Y a file name from a following parameter. DOS COMMANDS CTRL-D (type D while holding down CTRL key) DELETE X [,Ss] [,Dd] [,Vv] is used in PRINT statements to indicate the Command Quantity As shown Min Erases file X from the diskette. start of a deferred-execution DOS command. Max PRil slot PR# s PR#7 Integer BASIC example: PRil1ll INil slot INil s 10 D$ = "": REM "CTRL-D" IN#1lI INil7 MAXFILES file buffers MAXFILES. n n=1 n=16 LOCK X [,Ss] [,Dd] [,Vv] 20 PRINT D$; "CATALOG" Locks file X against accidental change or Applesoft BASIC example: Commands use Slot or Drive parameters only deletion. LOCKed file shown in CATALOG by * 10 D$ = CHR$(4) : REM CTRL-D when changing to a different Slot or Drive. 20 PRINT D$; "CATALOG" UNLOCK X [,Ss] [,Dd] [,Vv] The term "BASIC" alone is used to mean either If a command omits the Volume parameter or uses VIlI, the diskette's volume number is Unlocks previously LOCKed file X Integer BASIC or Applesoft BASIC. The term to allow change or deletion. "file" alone means .!!!!I. type of diskette file. ignored. A command that uses the Volume parameter Vv will not be executed unless the diskette's volume number is v. VERIFY x [,Ss] [,Dd] [,Vv] Checks file X for internal consistency. SEQUENTIAL TEXT FILE COMMANDS RANDOM-ACCESS TEXT FILE If X was saved without "error, no message COMMANDS is given. OPEN X [,Ss] [,Dd] [,Vv] Opens or creates sequential text file X, OPEN X, Lj [,Ss] [,Dd] [,Vv] Opens or creates random-access text file X, allocates one file buffer and prepares to MON [,C] [,I] [,0] WRITE or READ from beginning of file. allocates one file buffer, and defines record Causes display of disk £ommands ( C ), length as j bytes. Prepares to WRITE or READ Input from the disk ( I ), and Output from beginning of Record 0. Same Length param to the disk ( 0). With no parameters, CLOSE [X] eter must be used each time file X is OPENed. MON is ignored. Completes WRITE X, if necessary, and de allocates file buffer assigned to text file CLOSE [X] [,Ss] [,Dd] [,Vv] X. Without file name, CLOSEs" all OPEN files Completes WRITE X, if necessary, and de NOMON [,C] [, I] [,0] (except an EXEC file). allocates file buffer assigned to text file Cancels display of disk £ommands ( C ), X. Without file name, CLOSEs all OPEN files. Input from the disk ( I ), and Output to the disk ( 0). With no parameters, WRITE X [,Bb] NOMON is ignored. Subsequent PRINTs send characters to sequential text file X. WRITEing begins WRITE X [,Rr] [,Bb] at current file position or (if specified) Subsequent PRINTs send characters to random access text file X. With no parameters, MAXFILES n at byte b Cancelled by any DOS command. Reserves n file buffers for disk input and WRITEing begins at current file position. output (booting reserves 3 file buffers). With Rr parameter alone, WRITEing starts at byte 0 of Record r. With Bb parameter, Use before LOADing or RUNning a program. "READ X [,Bb] WRITE s"tarts at byte b of current or spec Subsequent INPUTs and GETs take response ified Record. Cancelled by any DOS command. characters from sequential text file X. READing begins at current file position or ACCESS COMMANDS (if specified) at byte b. INPUT response READ X [,Rr] [,Bb] is one field (all characters to next Subsequent INPUTs and GETs take response RETURN). Cancelled by any DOS command. FP [,Ss] [,Dd] [,Vv] characters from random-access text file X Puts system into Applesoft BASIC, With no parameters, READing starts at cur erasing any program in memory. APPEND X [,Ss] [,Dd] [,Vv] rent file position. With Rr parameter Opens existing sequential text file X alone, READing starts at byte 0 of Record r. similar to OPEN, but prepares to WRITE With Bb parameter, READing starts at byte b of current or specified Record. INPUT INT at the end of the file. Puts system into Integer BASIC, response is one field (all characters to erasing any program in memory. next RETURN). Cancelled by any DOS command. POSITION X, Rp MACHINE-LANGUAGE FILE In OPEN sequential text file X, subsequent PRIf s READ or WRITE will proceed from p-th field COMMANDS Sends subsequent output to slot s. Boots following current file position. BSAVE x, Aa, Lj [,Ss] [,Dd] [,Vv] disk if slot s contains disk controller Stores on diskette, under file name X, card. PRlf0 sends output to TV screen again. the contents of j memory bytes starting EXEC X [,Rp] [,Ss] [,Dd] [,Vv] at address a. Executes successive fields in sequential INti s text file X as if typed at-keyboard. Takes subsequent input from slot s. Boots With Rp parameter, execution begins with BLOAD X [,Aa] [,Ss] [,Dd] [,Vv] p-th field. Fields may include numbered disk if sl~t s contains disk controller Loads binary file X into same memory card. INlf0 takes input from keyboard again. BASIC program lines and direct-execution locations from which file was BSAVEd or BASIC or DOS commands to control the Apple. (if specified) starting at address a. CHAIN Y [,Ss] [,Dd] [,Vv] RUNs Integer BASIC program file Y, but does BRUN X [,Aa] [,Ss] [,Dd] [,Vv] not clear variables developed by previous BLOADs binary file X, then jumps (JMP) Integer BASIC program. to loaded file's first memory address. .