Amstrad DDI-1 manual Technical information for the user Firmware, Headers

Page 83

CHAPTER 5

Technical information for the user – Firmware

This chapter assumes prior knowledge of the CPC464 firmware.

Some knowledge of the fundamentals of CP/M is also assumed. This chapter does not however attempt to discuss the facilities available in the CP/M environment. Complete information concerning CP/M, the CPC464 CP/M environment and the technical specification of the BIOS is contained in SOFT159 A Guide to CP/M. The Complete Firmware Specification of the Amstrad DDI-1 is contained in SOFT 158A, available as an Appendix to the Concise Firmware Specification SOFT158.

5.0 Introduction

AMSDOS is a disc operating system for the AMSTRAD CPC464 fitted with the DDI- 1 floppy disc interface. AMSDOS enables BASIC programs to access disc files in a similar manner to cassette files, indeed existing programs which currently use the cassette should be able to use disc files with little, or no, modification. The main source of incompatability will be file names in that, for AMSDOS, files names must conform to CP/M standards whereas cassette file names are far less restricted.

AMSDOS has been designed to complement CP/M, not to compete with it. They share the same file structure and can read and write each other's files. AMSDOS resides in the same ROM as the CP/M BIOS.

AMSDOS switches the cassette input and output streams (#9) to and from disc. Thus all the facilities available on cassette become available on disc. In addition displaying the disc directory, erasing disc files, renaming disc files, and selecting the default drive and user are also facilitated.

These facilities are implemented either by intercepting the cassette firmware calls or by external commands.

5.1 Headers

Cassette files are subdivided into 2k blocks, each of which is preceded by a header. CP/M files do not have headers. AMSDOS files may, or may not, have a header depending on the contents of the file. This will not cause problems for programs written in BASIC but is an important difference between cassette and disc files. This could perhaps be exploited for a protection scheme.

Chapter 5.

AMSTRAD Disc Drive & Interface DDI-1 Manual

Image 83
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 LampROLCAVE. not found Drive a disc missing Retry, Ignore or Cancel?Foundations Loading Software/Games Run rolcaveType mismatch Bad commandSyntax error Drive a read fail Retry, Ignore or Cancel?Foundations Introducing Amsdos and CP/M Tape.in Drive B disc missing Retry, Ignore or CancelLoad filename DiscCpm First Steps Using The CP/M DiscStoring Data Onto Disc CLS? Saving a Program in Memory onto Disc Back to AmsdosBeware EXAMPLE.BAS CatalogLoading From Disc Copying Programs From Disc to Cassette Copying Programs From Disc to DiscCopying Programs From Cassette to Disc Copying Using Disccopy Copying Using the CP/M System DiscDo you want to copy another disc Y/N Copying Using CopydiscCopying started Reading track 0 to Writing track 0 toChkdisc Checking DiscsAborting DiscchkInstallation Amstrad Disc Drive & Interface DDI-1 Manual Making Working Discs Backup Master DiscDISCCOPY.COM Working SYSTEM/UTILITY discBasic only disc Turnkey Amstrad Basic discsCreating a Turnkey CP/M System disc Turnkey Basic using disc suppliedTurnkey CP/M Discs Turnkey Basic onto your Working discAmbiguous filename Confirm individual files Y/N ? Configuring a CP/M ProgramConfiguring the Output from the package Payroll Configuring the Input to the packageStarting a Turnkey CP/M Package Autostarting a Turnkey CP/M Package Introduction Amsdos PrimerConstruction of Filenames Disc DirectoryAmsdos filenames and filetypes Save PROG.BAS a Save Bprog .BAS Amsdos headersFilenames on two drives BERT.BAS FRED1.BAS FRED2.BAS FRED3.BAK FRED3.BAS FINISH.BAS Examples of Using Amsdos Commands in a programWild cards Saving variables and performing a Screen DumpCloseout NeatWend Closein Reference guide to Amsdos commandsPre-empting a Garbage Collection While not EOFCAT Summary of Basic commandsSummary of Amsdos external commands Save OPENOUT, Print #9, Write #9, List #9, CloseoutDISC.IN CPMDIR DiscTAPE.IN ERAREN TapeAscii files File Copying proceduresCopying Files Amsdos files with headersFile has a header Amstrad Reference guide to Amsdos Error Messages Drive Drive write fail Drive Drive disc missingDrive Drive disc is write protected Drive Drive read failCP/M system tracks CP/M PrimerOperating with CP/M Logging in a disc Configuration SectorConsole control codes ERA command Direct Console CommandsSwitching default drives DIR commandPeripheral Management Transient commandsREN command Type commandCassette files File and disc copyingSingle file copying Whole disc copiers and checkersStat System ManagementIs this correct Y/N SetupDo you want to update your system disc Y/N Stat SECRET.BAS $DIRFormat D Format I Format Disc GenerationAmsdos FormatSysgen BootgenAdvanced programming MovcpmAmstrad Disc Drive & Interface DDI-1 Manual Introduction to Logo What is LogoGetting Started Dr. LogoTo squareanysize side repeat 4 fd side rt 90 end Procedures with parametersRepeat 4 fd 60 rt To square Repeat 4 fd 60 rt 90 endTo triangle Repeat 3 fd edge rt 120 end Using Variables to remember valuesEditing programs and procedures Cs squareanysize 100 rt 45 squareanysizeSummary of Dr. Logo primitives Operating hintsCount Word and List ProcessingAscii CharList EmptypFirst FputArithmetic Operations Logical Operations ?= Logo Logo NotVariables ProceduresShow EditingText Screen SetsplitDot CleanGraphic Screen TypeWindow PalSetpal Wrap Turtle GraphicsSetpc SethNodes Workspace ManagementSetpos ErnPlist RecycleGlist GpropKEYBOARD, Joystick buttonp Disc Files DirLoad Save?key Paddle?paddle 0 ?make key rcRelease SoundEnv EntStop LabelRepeat RunThrow ErrorCatch PauseSystem Properties Headers Technical information for the user FirmwareStore requirements Changing DiscsAmsdos messages Error MessagesBios messages Failed to load boot sector Common to ALL Formats Disc OrganisationReturn Parameters Jump Block Interception by AmsdosJump Block Re-Interception by the User 137 #BC9B Intercepted Firmware Calls132 #BC8C 133 #BC8F 134 #BC92 135 #BC95 #BC98 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