★ APPLICATIONS ★ DISQUE ★ Amstrad CPC/PCW Disk Reader ★ |
Amstrad CPC/PCW Disk Reader | Applications Disque |
PCWDPB allows an Amstrad CPC6128, or a souped-up CPC464 or 664, running under CP/M Plus, to read disks formatted on the PCW8256 (or 8512, as long as they are single-sided disks produced in the top drive). The routine sets up the logical B: drive to understand the PCW format, and then files can be PIPped from and to that disk. DISCKIT, however, will not work. How it works CP/M Plus stores a list of 'parameters' for each (logical) disk drive that it has; this is called the 'disk parameter block'. These parameters control information such as how many sectors the disk has per track, how many directory entries there may be, and so on. The program has a copy of the PCW disk parameter block, and all it does is ask the operating system where that block is stored in memory. It then copies its block to that location, setting a flag which instructs the computer to use the new block rather than trying to match that block with one it already knows. When this has been done, that B: drive will only read PCW disks until the 'PCWOFF' command is executed. This returns the disk parameter block to its previous state. Writing the program The program has been written in 8080 assembly language. This was done because there is an 8080 assembler supplied with the computer: indeed, your CP/M Plus system disks contain all the software necessary to create this program. Here's how you do it: Find a floppy disk which has at least 100k free — preferably one which is entirely blank. Enter CP/M and, using PIP, copy the following files onto it: MAC.COM HEXCOM.COM(these files are both on side 2 of the system disks). Now, using a text editor or word processor, type the program PCWDPB. Save this text file onto the same disk, with the name PCWDPB.ASM. You should now have three files: A:MAC COM : HEXCOM COM : PCWDPB ASMType: A>MAC PCWDPBThe disk drives should whirr a little, and you will see: CP/M MACRO ASSEM 2.0 01AA000H USE FACTOR END OF ASSEMBLY If you see anything other than this, such as a line from the program, something has gone wrong. Edit the text file and compare the file carefully with the printed program; they should be exactly the same. When you have done this, you will find a number of other files with filename PCWDPB on your disk. These contain files, and one of them, PCWDPB.HEX, can now be converted into machine code. Simply type: A>HEXCOM PCWDPB Once again, the disk drive will whirr and the following message should be displayed: HEXCOM VERS: 3.00FIRST ADDRESS 0100 LAST ADDRESS 01A9 BYTES READ 00AA RECORDS WRITTEN 02 And now, when you take a directory, you should see a file PCWDPB.COM; this is the program which makes the B: drive read disks produced by the Amstrad PCW8256. This can be executed simply by typing 'PCWDPB', but it is probably best to create the other program in the set which allows you to turn off this facility. This is done very much as before, only the program file should be called PCWOFF.ASM. The relevant commands to turn the text file into a program file are: A>MAC PCWOFFA>HEXCOM PCWOFF Now you have two programs, PCWDPB and PCWOFF. These turn the PCW disk-reading on and off, respectively. They can be PIPped onto other disks, just like any other CP/M transient command.
|