Amstrad DDI-1 manual Amsdos headers, Filenames on two drives, Save PROG.BAS a Save Bprog .BAS

Page 37

2.3.2 AMSDOS headers

AMSDOS automatically SAVEs files with a suitable type identifier so it is not normally necessary to specify one, unless you wish to override the defaults described previously. AMSDOS BASIC program files, protected BASIC program files and binary files are saved to the disc with a header record (similar to that recorded to cassette) so that the AMSDOS LOAD command can recognise them and take the appropriate action. (As on Tape, the LOAD command does not need to be told by the programmer whether the file to be LOADed is BASIC, Protected BASIC, Binary or an ASCII program - it works this out from the header). If the AMSDOS LOADer cannot find a header it assumes that the file is a program in ASCII, ie plain text.

Notwithstanding the contents of the header, when the AMSDOS loader is asked to LOAD a file where no filetype is specified, it first looks for a file of type .<space>, then if that does not exist on the disc, one of type .BAS then one of type .BIN.

This allows the user to abbreviate the filename, ie not needing to specify the file type, in most instances.

A disc data file started with the command OPENOUT and subsequently written to will have no header and the contents will be in ASCII, ie plain text, from the BASIC WRITE, PRINT or LIST commands. The disc command OPENIN will search for files in the same order as LOAD if no file type is specified.

2.3.3 Filenames on two drives

On a two drive system, files can exist on either drive. The computer will not automatically look for a file on both drives so the user must specify which drive to use. You can either employ the A or B or DRIVE commands (full description section 2.5.2) to select one or other drive, and then use a normal file name, or alternatively you can override the default drive assignment by specifying the drive as a A: or B: prefix to the filename. Thus, for example

B

SAVE "PROG.BAS" A

and

A

SAVE "B:PROG .BAS”

both save the program on the second drive, Drive B

Chapter 2.3

AMSTRAD Disc Drive & Interface DDI-1 Manual

Image 37
Contents Page Amstrad Disc Drive & Interface DDI-1 Amstrad Contents Contents Page Connecting the Mains Lead Foundations 1 Setting UpConnecting the DDI-1 to the Computer Computer Interface Unit Main Disc Drive Drive a Computer Write Protection Foundations 2 About DiscsOpen Closed When Your Disc Is Eject Button Indicator LampFoundations Loading Software/Games Drive a disc missing Retry, Ignore or Cancel?Run rolcave ROLCAVE. not foundSyntax error Bad commandDrive a read fail Retry, Ignore or Cancel? Type mismatchFoundations Introducing Amsdos and CP/M Load filename Drive B disc missing Retry, Ignore or CancelDisc Tape.inStoring Data Onto Disc First Steps Using The CP/M DiscCpm CLS? Beware Back to AmsdosSaving a Program in Memory onto Disc Loading From Disc CatalogEXAMPLE.BAS Copying Programs From Cassette to Disc Copying Programs From Disc to DiscCopying Programs From Disc to Cassette Copying Using Disccopy Copying Using the CP/M System DiscCopying started Reading track 0 to Copying Using CopydiscWriting track 0 to Do you want to copy another disc Y/NAborting Checking DiscsDiscchk ChkdiscInstallation Amstrad Disc Drive & Interface DDI-1 Manual Making Working Discs Backup Master DiscBasic only disc Working SYSTEM/UTILITY discTurnkey Amstrad Basic discs DISCCOPY.COMTurnkey CP/M Discs Turnkey Basic using disc suppliedTurnkey Basic onto your Working disc Creating a Turnkey CP/M System discConfiguring the Output from the package Configuring a CP/M ProgramAmbiguous filename Confirm individual files Y/N ? Starting a Turnkey CP/M Package Configuring the Input to the packagePayroll Autostarting a Turnkey CP/M Package Introduction Amsdos PrimerAmsdos filenames and filetypes Disc DirectoryConstruction of Filenames Filenames on two drives Amsdos headersSave PROG.BAS a Save Bprog .BAS Wild cards Examples of Using Amsdos Commands in a programSaving variables and performing a Screen Dump BERT.BAS FRED1.BAS FRED2.BAS FRED3.BAK FRED3.BAS FINISH.BASCloseout NeatPre-empting a Garbage Collection Reference guide to Amsdos commandsWhile not EOF Wend CloseinSummary of Amsdos external commands Summary of Basic commandsSave OPENOUT, Print #9, Write #9, List #9, Closeout CATDIR CPMDisc DISC.INREN ERATape TAPE.INCopying Files File Copying proceduresAmsdos files with headers Ascii filesFile has a header Amstrad Reference guide to Amsdos Error Messages Drive Drive disc is write protected Drive Drive disc missingDrive Drive read fail Drive Drive write failOperating with CP/M CP/M PrimerCP/M system tracks Console control codes Configuration SectorLogging in a disc Switching default drives Direct Console CommandsDIR command ERA commandREN command Transient commandsType command Peripheral ManagementSingle file copying File and disc copyingWhole disc copiers and checkers Cassette filesStat System ManagementDo you want to update your system disc Y/N SetupStat SECRET.BAS $DIR Is this correct Y/NAmsdos Disc GenerationFormat Format D Format I FormatAdvanced programming BootgenMovcpm SysgenAmstrad Disc Drive & Interface DDI-1 Manual Introduction to Logo What is LogoGetting Started Dr. LogoRepeat 4 fd 60 rt Procedures with parametersTo square Repeat 4 fd 60 rt 90 end To squareanysize side repeat 4 fd side rt 90 endEditing programs and procedures Using Variables to remember valuesCs squareanysize 100 rt 45 squareanysize To triangle Repeat 3 fd edge rt 120 endSummary of Dr. Logo primitives Operating hintsAscii Word and List ProcessingChar CountFirst EmptypFput ListArithmetic Operations Logical Operations ?= Logo Logo NotVariables ProceduresText Screen EditingSetsplit ShowGraphic Screen CleanType DotSetpal PalWindow Wrap Turtle GraphicsSetpc SethSetpos Workspace ManagementErn NodesGlist RecycleGprop PlistLoad Disc Files DirSave KEYBOARD, Joystick buttonp?paddle 0 Paddle?make key rc ?keyEnv SoundEnt ReleaseRepeat LabelRun StopCatch ErrorPause ThrowSystem Properties Headers Technical information for the user FirmwareStore requirements Changing DiscsBios messages Error MessagesAmsdos messages Failed to load boot sector Common to ALL Formats Disc OrganisationJump Block Re-Interception by the User Jump Block Interception by AmsdosReturn Parameters 132 #BC8C 133 #BC8F 134 #BC92 135 #BC95 #BC98 Intercepted Firmware Calls137 #BC9B Page Appendix Glossary of Terms CP/M Dr.Logo Primitives TPA Amstrad Disc Drive & Interface DDI-1 Manual Appendix Term Limitations of Remedies Amstrad Disc Drive & Interface DDI-1 Manual Appendix Index ERA Setpos