This document is a PDF version of the AMSTRAD DDI-1 USER INSTRUCTIONS manual. This version has been scanned and OCRed from the original and as a result may contain spelling mistakes and errors which were not part of the original document. This manual is © Copyright Amstrad plc. All rights reserved. Amstrad plc have given their permission for this document to be distributed on the Unofficial Amstrad WWW Resource. Amstrad plc website: http://www.amstrad.
AMSTRAD DISC DRIVE & INTERFACE DDI-1 Congratulations on becoming the proud owner of the Amstrad DDI-1. You will soon discover the wisdom of your choice, and what a worthwhile investment your unit is. Its speed will allow you to load and save files in seconds which would take several minutes using cassette. Furthermore, each disc allows you to store up to 180k Bytes of program on a single disc surface (360k on both sides).
Two operating systems are supplied: AMSDOS is an extension of the cassette filing system in CPC464 BASIC, and allows access to the BASIC interpreter. CP/M 2.2 is the standard 'random access' Z80 disc operating system for over 5000 commercial programs - ranging from business and accounts software to second languages and scientific and engineering analysis.
Contents Foundation Course F1 Setting Up F2 About Discs F3 Loading Software/Games F4 Introducing AMSDOS and CP/M Chapter 1 Making Working Discs Backup master disc A working SYSTEM/UTILITY disc A BASIC only disc Turnkey AMSTRAD BASIC discs Turnkey CP1M discs and packages Configuring discs Starting and autostarting a Turnkey CP/M package Chapter 2 AMSDOS Primer Disc directory AMSDOS filenames and filetypes Filename construction, headers and wild cards.
Chapter 4 Introduction to LOGO What is LOGO Dr LOGO procedures Editing programs and procedures Operating hints Summary of Dr.
AMSTRAD DDI-1 FOUNDATION COURSE Foundations 1: Setting Up Connecting the Mains Lead The Amstrad disc drive operates from a 220-240V ~50Hz Mains Supply. The Mains Lead is fitted at the rear of the unit. Fit a proper Mains Plug to the Mains Lead. If a 13 Amp (BS1363) Plug is used, a 3 Amp fuse must be fitted. The 13 Amp Fuse supplied in a new Plug must NOT be used. If any other type of Plug is used, a 5 Amp Fuse must be fitted either in the Plug or Adaptor or at the Distribution Board.
Connecting the DDI-1 to the Computer 1. Check that the computer and disc drive(s) are switched off. 2. Plug the Interface Unit firmly into the edge-connector marked FLOPPY DISC at the rear of the computer (See Figure 1) Rear of Computer Interface Unit Figure 1 3. At the end of the ribbon cable from the Interface Unit, you will find a plug which is to be used for connecting to the main disc drive (Drive A), see Figure 2.
4. If you are operating with one disc drive only, connect the computer and disc drive as shown in Figure 3. Computer Interface Unit Main Disc Drive (Drive A) Figure 3 5. If you are operating with 2 disc drives, connect the computer and disc drives as shown in Figure 4. Computer Interface Unit Main Disc Drive (Drive A) Second Disc Drive (Drive B) Figure 4 Switch on the disc drive(s) then the computer. Your system is now ready for disc operation. Foundation 1.
IMPORTANT 1) For maximum data reliability, do not position your disc drive(s) closer than 20cm (8 inches) to the monitor, see Figure 5. It is recommended that you locate your disc drive(s) to the right of the computer (or MP-1 modulator/power supply if used).
Foundations 2: About Discs The Amstrad disc drive uses 3 inch compact floppy discs. We strongly recommend that for reliable data-to-disc transfer, you use only Amsoft CF-2 compact floppy discs. Discs made by leading manufacturers however, may also be used. Each side of a disc may be used separately. A disc should be inserted with its label facing outward from the drive, and with the side that you wish to use face up (See Figure 6).
When the hole is closed, data can be 'written' onto the disc by the computer. When the hole is open however, the disc will not allow data to be written onto it, thus enabling you to avoid accidental erasure of valuable programs. Various compact floppy disc manufacturers employ different mechanisms for opening and closing the Write Protect hole.
To open the Write Protect hole on this type of disc, slide the lever towards the middle of the disc, using the tip of a ball-point pen or similar object, see Figure 10. Slide Lever towards middle of disc Write protect hole (OPEN) Figure 10 Note that regardless of the method employed to open and close the Write Protect hole, opening the hole in all cases facilitates protection against overwriting.
Indicator Lamp The red indicator lamp has two functions: If only one disc drive is connected (Drive A), the lamp indicates that data is being read from, or written to the disc. If two disc drives are connected, the red indicator on Drive B will illuminate constantly, giving you a quick indication of which unit is Drive B. When reading or writing to disc takes place however, the indicator reverts to its primary function of indicating that reading/writing is being performed.
Foundations 3: Loading Software/Games Software/Games available on disc for the Amstrad system are loaded many times more quickly than their cassette counterparts. It is necessary however, to remember a few important rules concerning the names of programs to be loaded or run. A command such as RUN" normally used when loading cassette software, is invalid during disc operation as the naming of the program to be run is obligatory on disc.
Bad command means that you have incorrectly named the program, either by exceeding the number of permitted characters in a field, or by introducing an unwanted space or punctuation mark. Type mismatch means that you have omitted the quotation marks Syntax error means that you mistyped the word run Drive A: read fail Retry, Ignore or Cancel? means that the computer has failed to read data from your disc. Check that you have inserted the correct disc and press R to Retry.
Foundations 4: Introducing AMSDOS and CP/M When you switch your system on, the computer automatically runs internal checks to see which peripherals are connected to the rear sockets. If the computer senses that a disc drive(s) is connected, it will take any commands that would have been sent to the cassette datacorder, and direct them to the disc drive.
The commands |a and |b tell the computer which drive to direct any subsequent disc command. Typing in for example: |a load "filename" will tell the computer to load the specified program from a disc placed in drive A. If neither |a nor |b is initially entered or the computer is reset, the system will default to drive A. If you are using only one disc drive, this can be regarded as drive A, and |a or |b commands need not be issued.
Storing Data Onto Disc Before writing any data onto a new blank disc, the disc itself must first be formatted. Formatting can be likened to building a series of shelves and dividers onto a disc prior to the storage of information on those shelves; in other words, laying down an organised framework around which data can be put in or taken out. Formatting divides one side of the disc into 360 distinctly separate areas, see figure 12.
After a few seconds you will see the following message on the screen: CP/M 2.2 - Amstrad Consumer Electronics plc. A> This is a 'Sign on' message indicating that the operating system is under the control of CP/M. The displayed A> on the screen is a prompt, (similar to Ready during normal BASIC operation) indicating that the computer is awaiting your instructions. CP/M uses several prompts, all of which will be explained later in this manual under the section concerning CP/M.
Please insert a CP/M system disc into drive A then press any key: After doing so, the computer will return you to direct mode CP/M (console mode), and will await your next command. Other CP/M commands will be dealt with later in this manual but for now, having learnt to format with CP/M, we will return to AMSDOS by typing in: amsdos Always keep a master copy of your CP/M disc in a safe place, as it is literally the key to your system.
under the sections concerning AMSDOS and CP/M. As an example of saving to disc, write a short program into the memory, insert a formatted disc, then type in: save "example" After a few seconds, the prompt Ready will appear on the screen, and the program will have been saved onto disc.
Copying Programs From Disc to Disc Using the commands already learnt in this section, it can be seen that disc to disc program copying is performed simply by loading the program into the memory from the source disc, removing the source disc, and saving the program onto the destination disc. To save a program from disc to disc using 2 disc drives, you may prefer to insert your source disc into, for example, Drive B, and your destination disc into Drive A.
then type in: load "filename" After the program has loaded and the Ready prompt appears, save the program onto cassette by typing in: |tape.out save "program name" or save"" The computer will respond with: Press REC and PLAY then any key: After the cassette has stopped, the program from disc will have been saved onto cassette. Note that the command |tape directs both input and output data to tape (equivalent to issuing |tape.in and |tape.out commands).
When the source disc is inserted and you have pressed a key, the computer will display the message: Copying started Reading track 0 to 7 After which, you will be asked to: Please insert destination disc into drive A then press any key Whereupon you should remove your source disc and insert a disc for copying onto. Bear in mind that any previous data on your destination disc will be overwritten during copying.
Follow the instructions on the screen, and the contents of your source disc will be copied onto your destination disc 8 tracks at a time, until the last track (39) is completed. Like DISCCOPY, COPYDISC incorporates automatic formatting if required. COPYDISC can be used to produce a 'working copy' of the CP/M system disc itself. Checking Discs The CP/M system disc provides facilities for comparing one disc against another to check for error free data copying.
To conclude this 4-part Foundation course, here is a brief summary of the Important points covered so far: INSTALLATION 1. Always connect the Mains Lead to a 3 pin plug following the instructions contained in the first section entitled, 'Setting Up'. 2. Never connect the disc drive(s) to any Mains Supply other than 220-240V ~ 50Hz. 3. There are no user serviceable parts inside the unit(s). Do not attempt to gain access into the equipment. Refer all servicing to qualified service personnel. 4.
AMSTRAD Disc Drive & Interface DDI-1 Manual Foundation 4.
CHAPTER 1 Making Working Discs. This chapter discusses how to make discs to use from day to day, and introduces some facilities of CP/M and its Utility programs. Subjects covered are: • Making a backup Master System/Utilites disc • Constructing a Working Systems/Utility disc. • Operating with a BASIC only disc. • Installing a Turnkey AMSTRAD BASIC application. • Installing a Turnkey CP/M application.
1.2 A working SYSTEM/UTILITY disc. You will find that, as well as making a day-to-day copy of your Master System/Utility disc and Dr LOGO disc, it is most convenient if you make a 'working utility disc' containing a few of the programs from the Master System/Utility disc that you use the most. This will still leave plenty of room for your programs. Should you require to run any other utility programs then you can always obtain them from your copy of the Master System/Utility disc.
1.4.1 Turnkey BASIC using disc supplied. Simply copy the master disc, with COPYDISC or DISCCOPY, preserve the master disc and use the copy. Follow the instructions provided to run the program. If you require any additional programs from your Master System/Utility disc, use FILECOPY to transfer them. 1.4.2 Turnkey BASIC onto your Working disc. In this case, copy the supplied programs onto your existing disc. Type FILECOPY and follow the instructions.
Although the instructions below are for a single drive disc system, it is in general, simplest to follow them also if you have a twin disc system (by ignoring the second drive). Firstly format a new system disc. Then copy all the programs from your master package disc using FILECOPY from your System/Utility disc. Type FILECOPY *.* and follow the instructions on the screen.
Value Hex Value Decimal Operation &14 &18 &1E &lF 20 24 30 31 Clear from and including the current cursor position to end of window. Toggle into/out of Inverse video. Home cursor. Move cursor to given position in current window. is column, normally 1..80, is row, normally 1-25. 1.5.2.2 Configuring the Input to the package. The programs in the package will expect to be able to interrogate the keyboard.
1.5.4 Autostarting a Turnkey CP/M Package. It is possible to arrange for the CP/M operating system to automatically run a particular program every time CP/M is entered using a particular diskette. This is performed by one of the options in the SETUP program. (See CP/M primer for details). AMSTRAD Disc Drive & Interface DDI-1 Manual Chapter 1.
CHAPTER 2 AMSDOS Primer This chapter describes AMSDOS, covering all the available commands and their uses. It details the format of filenames and provides a reference guide to the commands. Each step is illustrated by the use of examples.
2.2 Disc Directory Every disc has two sections, the directory and the data area. The directory contains a list of all the filenames and a 'map' of whereabouts on the disc each file is to be found. AMSDOS or CP/M can calculate the size of a particular file by inspecting its directory entry. Calculation of the amount of space left on a disc is made by adding up all the files in the directory and seeing how much remains unused. Whenever a file is read its directory entry is examined, giving the disc location.
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.
2.3.3 Wild cards It is often required to perform some disc operation (Cataloguing, copying, erasing etc) on a number of disc files. When a filename is specified for a particular operation, the software scans the disc directory looking for a name which exactly matches. It is possible, where the command allows, to perform the operation on a set of files where some of the characters can be 'don't care'. This is shown by using the character ? in the don't care position.
10 DIM colour(2) 20 MODE 1:ORIGIN 0,0,0,640,0,400 : REM reset screen 30 dumpfile$="flagdump.srn" 40 FOR i=0 TO 2 50 READ colour(i): REM Get colours from DATA statement 60 INK i,colour(i) 70 NEAT 80 OPENOUT "Param.
The second example (EX2.BAS) is a general purpose screen dump displaying program, using a parameter file to control its action. Note how variables are INPUT from the data file, with the EOF function allowing automatic variation in the size of the file. It is important that the screen dump displayed by this program was saved with the screen in a known position in memory, otherwise the result will be 'skewed'.
2.5.1 Summary of BASIC commands The following AMSTRAD BASIC commands are intercepted to operate on the disc system rather than the datacorder.
|CPM |CPM COMMAND: Switch to alternative disc environment by loading operating system from a system disc. The operating system supplied with the DDI-1 is CP/M 2.2 This will fail if drive A does not contain a system disc with CP/M |DIR |DIR [,] f$="*.BAS" |DIR,@f$ COMMAND: Display the disc directory (In CP/M style) and free space. If the is omitted, the wild-card is assumed. |DISC |DISC COMMAND: Equivalent to the two commands |DISC.IN and |DISC.OUT. |DISC.IN |DISC.
|ERA |ERA, a$="FRED.BAK" |ERA,@a$ COMMAND: All files which match the filename and are not read-only are erased. Wild cards are permitted. |REN |REN,, O$="OLDNAME.BAS" N$="NEWNAME.BAS" |REN,@N$,@O$ COMMAND: Give a file a new name. A file with the new name must not already exist. |TAPE |TAPE COMMAND: Equivalent to the two commands |TAPE.IN and |TAPE.OUT. |TAPE.IN |TAPE.IN COMMAND: Use cassette as file input medium. |TAPE.OUT |TAPE.
2.6 Copying Files We have already described the use of the CP/M program FILECOPY to make working utility discs and package discs. This section describes how to copy all types of file, from disc to disc, and between disc and tape. 2.6.1 AMSDOS files with headers It is possible to copy these files in the CP/M environment using PIP or FILECOPY (See CP/M primer). Any file created by AMSDOS which has a header record (see 2.3.
Copying files from one disc to another in a two drive system is normally easier with the CP/M utility PIP, see CP/M primer.
COPY FROM: COPY TO: AMSTRAD BASIC on disc * AMSTRAD BASIC on tape * LOAD”FILE” |TAPE SAVE “FILE” |DISC ASCII data on disc * on tape * All other disc H = HIMEM MEMORY -1 LOAD”FILE” |TAPE SAVE“FILE” ,B,,[,] |DISC MEMORY H Binary on tape * ASCII AMSOS Binary on disc * LOAD”FILE” |TAPE SAVE “FILE”,A |DISC |CPM CSAVE FILE AMSDOS AMSTRAD BASIC on disc * LOAD”FILE” SAVE”FILE” - or |CPM FILECOPY FILE AMSDOS ASCII on disc LOAD”FILE” LOAD”FILE”,
2.7 Reference guide to AMSDOS Error Messages. When AMSDOS cannot carry out a command for some reason, it will display an error message. If there is a problem with the hardware, an error message is followed by the question Retry, Ignore or Cancel? R causes the operation be be repeated, possibly after the user has taken some preventive action. I causes the computer to continue as if the problem had not occurred, which will often lead to unexpected and possibly inconvenient results.
Drive : disc missing No disc in drive, or disc is not seated and spinning properly. Recommended action is to eject and re-insert the disc and type R Drive : disc is write protected Attempt has been made to write on a disc with the Write Protect hole open. To use the disc, eject, close the Write Protect hole, re-insert the disc and type R Drive : read fail Hardware error reading disc.
Chapter 3 CP/M Primer Operating with CP/M Subjects covered in this chapter: • Booting CP/M • Configuration sector • Direct console mode • Transient programs • Managing peripherals CP/M is a disc operating system. It is a special program which gives you access to the full power of your CPC464 disc system.
Firstly the AMSDOS command |CPM loads the first sector of track 0 into the CPC464. On a system disc this sector has been arranged to be a program which then loads the rest of the system tracks into memory. Various checks are performed to determine that the system tracks contain valid CP/M software and to calculate where in memory to load them. Part of CP/M is permanently in ROM inside the DDI-1 disc interface, the rest is loaded into RAM. In the standard configuration 39.
3.6 Direct Console Commands There are five direct console commands which can be typed at the A> or B> prompt. The first of these; SAVE, is for specialist use only. CP/M Error messages tend to be economical and normally consist of repeating the offending command or filename followed by a ?. Repeat the command with the mistake corrected. 3.6.1 Filenames Many of the commands take filenames as parameters, and where specified the filename may contain wild-cards. (See sections 2.3.1 and 2.3.
ERA PIP.COM will erase the file PIP.COM ERA B:PIP.COM will erase the file PIP.COM on drive B ERA *.BAS will erase all .BAS files 3.6.5 REN command REN allows you to REName an existing file. The new filename is specified first followed by = then the existing filename. If the new filename already exists, an error message will be displayed. Wild cards are not permitted in the filenames. REN HELLO.BAS=HALLO.BAS REN B:HELLO.BAS=HALLO.BAS Change the name of a file from HALLO.BAS to HELLO. BAS 3.6.
examples: PIP B:=A:*.COM PIP SAV.BAS=EX1.BAS PIP CON:=EX1.BAS PIP LST:=EX1.BAS PIP TYPEIN.TXT=CON: copy all .COM files from drive A: to drive B: make a copy of EX1.BAS, calling it SAV.BAS send file EX1.BAS to screen. (Similar effect to TYPE EX1.BAS) send file EX1.BAS to printer accept keyboard input and put into a file called TYPEIN.TXT. Note that this operation is terminated by the [CTRL]Z control code, and that in order to get a newline you must type [CTRL]J after [ENTER] every time.
CLOAD can take two parameters, the first is the source (Cassette) filename, enclosed in double quotes, and the second the destination (disc) filename. If the destination filename is omitted, the disc file will have the same name as the cassette file. If the source filename is omitted then CLOAD reads the first file encountered on the tape. If the first character of the cassette filename is ! then the normal cassette messages will be suppressed. Example command: CLOAD "MYLETTER" MYLETTER.
Set a file to 'Directory' status, reversing the 'System' assignment: STAT *.COM $DIR STAT SECRET.BAS $DIR 3.7.3.2 SETUP This utility allows you to re-define the characteristics of the CPC464 keyboard, disc drive and serial interface, and to invoke various actions when CP/M is first loaded. When finished it updates the configuration sector.
3.7.3.3 AMSDOS This program relinquishes control from CP/M and returns to the built-in AMSTRAD BASIC, from which the AMSDOS disc commands will be available. 3.7.4 Disc Generation 3.7.4.1 FORMAT The AMSTRAD DDI-1 disc system supports three disc formats, one of which has two variants. The usual format is System format, obtained by using the standard FORMAT command. The system tracks are read from the disc containing the FORMAT.COM program and are automatically written to the destination disc.
3.7.4.2 MOVCPM Sometimes it is required to construct a version of CP/M which does not load into memory in the standard position. This may be because you wish to reserve some memory for other purposes, so CP/M itself must be moved to a lower portion of memory. It is possible to locate CP/M at any position in memory on a 256-byte boundary. The position is specified by a size parameter in the range 64 to 179. This parameter indicates the number of 256-byte areas available for CP/M and transient programs.
AMSTRAD Disc Drive & Interface DDI-1 Manual Chapter 3.
CHAPTER 4 Introduction to LOGO This Section is intended to introduce the subject of LOGO, with examples, and provide a guide to the commands available. It is not intended to be an exhaustive tutorial or reference guide. That will be provided by A GUIDE to LOGO (SOFT 160) Subjects covered are: • Concept of LOGO • Loading and Running Dr LOGO • Turtle Graphics • Writing your own procedures • Editing your own procedures 4.
4.2 Dr. LOGO Dr LOGO is a thoughtful implementation of Logo which has been specially customised for the AMSTRAD CPC464, to make it even easier to program. Extensions have been included to make available the powerful sound facilities of the CPC464 and program editing is made easy by the inclusion of the cursor key cluster. 4.3 Getting Started To operate Dr. Logo, insert a copy of SIDE 2 of your master disc into the disc drive. (The Foundation Course contains instructions on how to copy the master disc.
4.5 DR. LOGO PROCEDURES A procedure is a list of instructions that tells Dr. Logo how to do a task. You will probably write your first procedures by adding to those already built into Dr. Logo, these are called 'primitives'. fd, bk, rt and lt are all built-in primitives which you may use at any time as building blocks to write your own procedures. Another very useful built-in primitive is cs which clears the screen and sends the turtle to its starting position. 4.5.
When we use procedure squareanysize :side must have a value. Hence an instruction squareanysize 150 would produce a square with sides of 150 units. Try adding two procedures together and see what happens. For example, from an instruction. cs squareanysize 100 rt 45 squareanysize 150 the turtle will draw two squares of differing size sides and one will be at a 45 degrees angle to the other. Notice how Dr. Logo reminds you that a line of commands has split across more than one line of screen. 4.
[CLR] deletes the character under the cursor, [DEL] deletes the character to the left of the cursor. [ENTER] tells Dr.Logo that you have finished editing a line of commands or makes a new line if you are editing a procedure. [ESC] means abandon and [COPY] tells Dr.Logo that you have finished editing a procedure. When typing in commands or new procedures simply edit the text in front of you on the screen. Any characters other than those mentioned above will be inserted into the text at the cursor position.
4.10.1 WORD AND LIST PROCESSING: (Note that prompts ? and > are shown in the following examples) ascii Outputs the ASCII value of the first character in the input word. ?ascii "G 71 ?ascii "g 103 bf (but first) Outputs all but the first element in the input object. ?bf "smiles miles ?bf [l 2 3] [2 3] bl (but last) Outputs all but the last element in the input object. ?bl "smiles smile ?bl [l 2 3 4] [l 2 3] char Outputs the character whose ASCII value is the input number.
emptyp Outputs TRUE if the input object is an empty word or an empty list; otherwise outputs FALSE. ?emptyp " TRUE ?emptyp [] TRUE ?emptyp [x] FALSE ?make "x [] ?emptyp :x TRUE first Outputs the first element of the input object. ?first "zebra z ?first [1 2 3] 1 fput (firstput) Outputs a new object formed by making the first input object the first element in the second object. ?fput "s "milessmiles smilessmiles ?fput 1 [2 3] [1 2 3] item Outputs the specified element of the input object.
se (sentence) Outputs a list made up of the input objects, removes list's outer brackets (compare with list). ?make "instr_list rl repeat 4 [fd 50 rt 90] ?run (se "cs : instr_list “ht Note that the underline character between instr and list is obtained by pressing [SHIFT]0 word Outputs a word made up of the input words. ?word "sun "shine sunshine wordp Outputs TRUE if the input object is a word or a number. ?wordp "hello TRUE ?wordp [] FALSE 4.10.
+ Outputs the sum of the input numbers. ?+ 2 2 4 ?2+2 4 Outputs the difference of the two input numbers. ?- 10 5 5 ?10-5 5 * Outputs the product of input numbers. ?* 4 6 24 ?4*6 24 / Outputs the decimal quotient of the two input numbers. ?/ 25 5 5 ? 25/5 5 4.10.3 LOGICAL OPERATIONS: and Outputs TRUE if the result of all input expressions are true. ?and(3<4)(7>4) TRUE Chapter 4.
not Outputs TRUE if the input expression is FALSE; FALSE if the input expression is TRUE. ?not (3=4) TRUE ?not (3=3) FALSE or Outputs FALSE if all input expressions are FALSE. ?or "TRUE "FALSE TRUE ?or (3=4)(1=1) TRUE = Outputs TRUE if the two input objects are equal; otherwise outputs FALSE. ?= "LOGO "LOGO TRUE ?1=2 FALSE > Outputs TRUE if the first input word is greater than the second; otherwise outputs FALSE.
4.10.4 VARIABLES: local Makes the input-named variable(s) accessible only to the current procedure and the procedures it calls. >(local "x "y "z) make Makes the input-named variable the value of the input object. ?make "side 50 ?:side 50 4.10.5 PROCEDURES: end Indicates the end of a procedure definition; must stand alone at the beginning of the last line. ?to square >repeat 4[fd 50 rt 90] >end square defined ?square po (print out) Displays the definition(s) of the specified procedure(s) or variable(s).
to Indicates the beginning of a procedure definition. ?to square >repeat 4[fd 50 rt 90] >end square defined 4.10.6 EDITING: ed (edit) Loads the specified procedure(s) and/or variable(s) into the screen editor's buffer. ?ed "square 4.10.7 TEXT SCREEN: ct (clear text) Erases all text in the window that currently contains the cursor then positions the cursor in the upper-left corner of the window.
ts (text screen) Selects a full text screen. ?ts type Displays the input object(s) on the text screen, removes list's outer brackets, does not follow last input with a carriage return (compare with pr and show). ?type [a b c] a b c 4.10.8 GRAPHIC SCREEN: Note that the screen is in Mode 1, giving four colours, and that the same co-ordinate system is used as in AMSTRAD BASIC. In other words all screen positions will be rounded to the nearest even-numbered screen dot.
fs (full screen) Selects a full graphic screen. ?fs pal (palette) Outputs numbers representing the amount of red, green, and blue colour assigned to a pen. ?pal 2 [0 2 2] setpal (set palette) Sets the pen colour palette. Assign an amount of red, green, and blue to a pen. ?setpal 3 [1 1 2] ?pal 3 [1 1 2] sf (screen facts) Outputs information about the graphic screen. The is [ ] where is the background pen number, always 0.
wrap Makes the turtle reappear on the opposite side of the graphic screen when it exceeds the boundary. ?cs ?rt ?cs ?rt wrap 5 fd 1000 window 5 fd 1000 4.10.9 TURTLE GRAPHICS: bk (back) Moves the turtle the input number of steps in the opposite direction of its heading. ?cs fd 150 ?bk 50 fd (forward) Moves the turtle the input number of steps in the direction of its current heading. ?fd 80 ht (hide turtle) Makes the turtle invisible; speeds and clarifies drawing.
pe (pen erase) Changes the turtle's pen colour to 0, the background colour; the turtle erases drawn lines. ?fd ?pe ?bk ?fd ?pd 50 25 50 fd 25 pu (pen up) Picks the turtle's pen up; the turtle stops drawing. ?fd 30 ?pu ?fd 30 ?pd fd 30 px (pen reverse) Makes the turtle change the colour of any previously coloured pixel in its trail to the reverse or logical colour compliment. ?fd ?pd ?px ?bk ?fd ?pd 20 pu fd 20 setpc 3 fd 20 80 80 bk 100 rt Rotates the turtle the input number of degrees to the right.
setpos (set position) Moves the turtle to the position specified in the input coordinate list. ?setpos [30 20] st (show turtle) Makes the turtle visible if hidden. ?ht ?fd 50 ?st tf (turtle facts) Outputs information about the turtle. The format is: [ ] where is the turtle's x coordinate. is the turtle's y coordinate. indicates the compass direction the turtle is facing. is TRUE if the turtle is visible.
recycle Frees as many nodes as possible and reorganizes the workspace. ?recycle ?nodes 4.9.11 PROPERTY LISTS: glist (get list) Outputs a list of all the objects in the workspace that have the input property name in their property lists. ?glist ".DEF gprop (get property) Outputs the property value of the input property name of the inputnamed object. ?make "height "72" ?gprop "height ".APV 72" plist (property list) Outputs the property list of the input-named object. ?plist "height [.
4.10.12 DISC FILES: dir (directory) Outputs a list of Dr. Logo file names on the default or specified disc; accepts wild-cards. ?dir [STARTUP STARS PATTERNS] ?dir "b: [AVERAGE TOOLS ADDRESSES] ?dir "??AR???? [STARTUP STARS] load Reads the input-named file from the disc into the workspace. ?Load "myfile ?Load "b:shapes save Writes the contents of the workspace to the input-named disc file. ?save "shapes 4.10.
paddle Returns the state of either joystick 0 or 1. The positions of the joystick are indicated as follows: Value returned 255 0 1 2 3 4 5 6 7 Meaning Nothing pressed Up Up and right Right Down and right Down Down and left Left Up and left ?paddle 0 255 The fire buttons are tested by buttonp. rc (read character) Outputs the first character typed at the keyboard.
4.10.14 SOUND: The sound commands are unique to the AMSTRAD implementation of Dr. LOGO and are similar to their AMSTRAD BASIC counterparts. Refer to Chapter 6 of the CPC464 User Instructions for further information. sound puts a sound into the sound queue. The format is : [ ] The parameters after duration are optional. ?sound [1 20 50] env Set up a volume envelope.
go Executes the line within the current procedure following a label expression with the same input word. >go "Loop if Executes one of two instruction lists depending on the value of the input expression; input instructions must be literal lists enclosed in brackets. >if (a>b)[pr [a is bigger]] >[pr [b is bigger]] label Identifies the line to be executed after a go expression with the input word.
4.10.16 EXCEPTION HANDLING: catch Traps errors and special conditions that occur during the execution of the input instruction list. >catch "error[+[][]] >pr [I am here] I am here error Outputs a list whose elements describe the most recent error. >catch "error[do.until.error] >show error pause Suspends the execution of the current procedure to allow interaction with the interpreter or editor. >if :size>5 [pause] throw Executes the line identified by the input name in a previous catch expression.
TOPLEVEL throw "TOPLEVEL will exit all pending procedures. TRUE System value 4.10.19 SYSTEM PROPERTIES .APV Associated property value; the value of a global variable. .DEF Definition of a procedure. .PRM Identifies a primitive. AMSTRAD Disc Drive & Interface DDI-1 Manual Chapter 4.
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.
Unprotected ASCII files do not have headers. All other AMSDOS files have a single header in the first 128 bytes of the file, the header record. These headers are detected by checksumming the first 67 bytes of the record. If the checksum is as expected then a header is present, if not, there is no header. Thus it is unlikely, but possible, that a file without a header could be mistaken for one with a header. 5.
5.4 Error Messages AMSDOS uses the CP/M BIOS in order to access the disc. Thus BIOS messages will be displayed in the event of a disc hardware error. In the following means A or B. means an AMSDOS filename. 5.4.1 AMSDOS messages. Bad command The command has failed in some way. There is a syntax error in a command or filename, or a BIOS error has been exited with a C cancel option. already exists The user is trying to rename a file with a name that is already in use.
Typing R for retry causes the BIOS to repeat the operation. Typing I for ignore causes the BIOS to continue as if the problem had not occured. Typing C for cancel causes the BIOS to abandon the operation. This will often result in a BDOS error message. After the user has typed R, I or C the cursor is turned off. The AMSTRAD BIOS messages are as follows: Drive : disc missing This message is produced when the BIOS attempts to access a drive that does not, or does not appear to, have a disc inserted.
5.5 Disc Organisation The BIOS supports three different disc formats: SYSTEM format, DATA ONLY format and IBM format. Under AMSDOS the format of a disc is automatically detected each time a disc with no open files is accessed. To permit this automatic detection each format has unique sector numbers. 3 inch discs are double sided, but only one side may be accessed at a time depending on which way round the user inserts the disc. There may be different formats on the two sides.
5.6 Jump Block Interception - by AMSDOS When AMSDOS is initialised it copies the relevant cassette jumpblock entries into its own data area. When DISC is selected the cassette jumpblock entries are overwritten by AMSDOS entries, when TAPE is selected the original cassette entries are restored. Initially the disc routines are selected. 5.
Errors detected by the floppy disc controller are reported as a bit significant value between #40..#7F, i.e. bit 6 is always set. The other bits are returned as follows: bit 5 bit 4 bit 3 bit 2 bit 1 bit 0 data error - CRC error on data or ID field. overrun error. drive not ready - there is no disc in the drive. no data - can't find the sector. not writable - disc is write protected. address mark missing. 5.
APPENDIX 1 GLOSSARY OF TERMS Ambiguous File Name: A file name containing one or more wildcard characters. Ambiguous filenames refer to more than one specific file name and are used to refer to one or more files at a time. AMSDOS: AMStrad Disc Operating System. The program that allows Locomotive BASIC to access disc files. Backup: A duplicate copy of information used as a safeguard in case the original is lost or accidentally damaged.
Cold start: The process of booting and initialising an operating system. A cold start of CP/M is performed when the |CPM command is used. Console mode: CP/M direct mode; the A> appears on the screen, and the system awaits input of a CP/M or utility command. Corruption: The destruction or alteration of the contents of a disc file or memory, in an undesirable and potentially unrecoverable manner. CP/M: Control Program for Microcomputers.
Dr.Logo: Digital Research's version of Logo, a programming language with a graphics turtle. Edit: To correct or make changes to data, a program or text. Expression: In Dr. Logo an expression consists of a procedure name followed by any necessary inputs to the procedure. File: A collection of data, generally stored on cassette or disc. Filename: The name of a file. In Dr. Logo a file name can consist of up to 8 alphabetic or numeric characters.
Page zero: This refers to the region of memory in a CP/M environment between 0000Hex and 0100Hex that is used to hold vital system parameters. Physical device: An actual device, consisting of hardware, that exists. Physical devices may be represented by logical devices. Primitives: Procedures, operations or commands that make up Dr. Logo; the built-in procedures. Procedure: A series of expressions or program statements that dictate how to perform a particular task.
System tracks: Tracks reserved on the disc for the CP/M system. TPA: Transient Program Area. An area in memory commencing at 0100Hex where CP/M user programs run and store data. Track: Tracks are concentric rings on a disc. Each track holds a fixed number of sectors. The tracks and sectors are written to a specific area of a disc during formatting. Transient program: A CP/M utility program such as FILECOPY which can be loaded into the TPA and run by typing its name at the keyboard.
AMSTRAD Disc Drive & Interface DDI-1 Manual Appendix 1.
APPENDIX 2 DIGITAL RESEARCH & AMSTRAD END USER PROGRAM LICENCE AGREEMENT NOTICE TO USER - PLEASE READ THIS NOTICE CAREFULLY. DO NOT OPEN THE DISKETTE PACKAGE UNTIL YOU HAVE READ THIS LICENCE AGREEMENT. OPENING THE DISKETTE PACKAGE INDICATES YOUR AGREEMENT TO BE BOUND BY THESE TERMS AND CONDITIONS. 1. DEFINITIONS - In this Licence Agreement, the terms: 1. DRI means DIGITAL RESEARCH (CALIFORNIA) INC., P.O.
4. Transfer the program and licence to another party if you notify DRI of name and address of the other party and the other party agrees to a) accept the terms and conditions of this Agreement, b) sign and forward to DRI a copy of the registration card and c) pay the then current transfer fee.
5. LIMITATIONS OF REMEDIES AMSTRAD's entire liability and your exclusive remedy shall be the replacement of any diskette not meeting this "Limited Warranty" and which is returned to AMSOFT with a copy of your receipt. IN NO EVENT SHALL DRI OR AMSTRAD BE LIABLE FOR ANY DAMAGES, INCLUDING ANY LOST PROFITS, LOST SAVINGS, OR OTHER SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, EVEN IF DRI OR AMSTRAD HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM BY ANY OTHER PARTY. 6.
AMSTRAD Disc Drive & Interface DDI-1 Manual Appendix 2.
APPENDIX 3 INDEX |A Aborting CP/M functions AMSDOS AMSDOS command summary AMSDOS error messages AMSDOS filenames AMSDOS headers AMSDOS wildcards AND .APV Arithmetic operations Arithmetic operators (+ - * /) ASCII ASM |B BASIC disc BF BIOS messages BK BL BOOTGEN BUTTONP BYE CAT CATCH Changing discs CHAR CLEAN CLOAD CO Configuration sector Configuring a CP/M program Connections .CONTENTS Control codes COPYDISC Copying discs INDEX F4.1 Ch2.7 F4.10 F4.1 Ch2.1 Ch2.6 Ch2.13 Ch5.3 Ch2.2 Ch2.3 Ch5.1 Ch2.4 Ch4.
ER ERA |ERA ERN ERRACT ERROR Error messages (AMSDOS) Error messages (CP/M BIOS) .
SETPOS SETSPLIT Setting Up SETUP SF SHOW SIN Software F3.1 SOUND Sound commands (LOGO) SS ST STAT STOP Store requirements SYSGEN SUBMIT System disc System format System management System primitives (LOGO) System properties (LOGO) System variables (LOGO) |TAPE |TAPE.IN |TAPE.