larry@lunar.UUCP (01/25/89)
I need to exchange data with a CP/M computer by floppy. Assuming I can physically read/write the CP/M disc, I still need to read/write CP/M format. Can anybody tell me what the logical format of CP/M discs is? Larry Fenske lunar!larry
fifi@cosmo.UUCP (A.F.Zinser) (02/04/89)
In article <1003@cosmo.UUCP> larry@lunar.UUCP writes: > ... > format. Can anybody tell me what the logical format of CP/M discs is? Uh. There are a different physical and logical formats possible. Assuming, you know the physical format (number of tracks, sectorsize and so on..), you still have to know, how many systemtracks are used (up to 5 tracks starting at 0). behind them starts the directory-area - the size of it also depends on the format which is used. each dir- entry has a length of 32 byte: byte 0 : user-number (owner), mostly 00 - you can ignore it user-number = 0xe5 => deleted file(entry) = 0xff => unused direntry byte 1-8 : filename, left-centered, filled-up with 0x20 (spaces) byte 9-11: extension, same format as filename if any of these three bytes has bit 7 set, it is marked either for read/only or as a system-file byte 12 : each dir-entry describes a part of the file up to 16-kbyte. byte 12 is the "partnumber". byte 13-14 : unused, both 0x00 byte 15 : this bytes describes, how many records belong to this direntry (each record is 128 byte long - this is the logical sectorsize of cp/m). byte 16-31 : blocknumbers (of course the blocksize depends on the used format : 1, 2, 4 or 8 kByte) byte 32 : internally used byte 33-35 : internally used the blocks are countet from the beginning of the directory-area. for example the data for the "standart"-format "osborne-dd": single-sided, double-density, 5 sectors with each 1024 byte per track, 40 tracks, 3 system-tracks, blocksize 1k, dir-size 2 blocks (2 k), no skew. Oh, a logical skew also is possible... if you could tell me, which format you have to read, or from which machine the disks are, perhaps i can tell you the correct parameters. +-------------------------------------------------------------------------+ | _ _ ! ! Axel F. Zinser (_!_) (_!_) ...uunet!mcvax!unido!cosmo!fifi | | Hannover, BRD ! ! fifi@cosmo.UUCP ! ! don't worry - be happy ! ! ! +-------------------------------------------------------------------------+