johnf@runx.ips.oz (John F. Baird) (05/13/88)
Does anybody know if DOSREAD, DOSWRITE and DOSDIR on Minix 1.2 can read and write 3 1/2" MSDOS disks?. DOSREAD etc on 1.1 works out the disk's "dimensions" via the "Media Descriptor" byte in the first entry of the FAT table. It will thus confuse 720k disks with 1.2M. I've just re-written it to use the info in the boot sector - so it now copes with virtually ANY format. I'll post it to the group (or wherever) if Minix 1.2's hasn't been "updated". It's also got a lot of other mods to allow it to run on my Applix (don't worry, you wont have heard of it) under it's OS (which can't open /dev/fd? files), but these are all #ifdef'd, so that's ok. Oh yeah; another thing:- can anyone explain why DOSREAD doesnt just do calls to "printf" etc etc. Why does it have all that "print_string" stuff?. why not use printf directly? (my modified version does - will it still work on Minix?). Thankx, Greyham * Greyham Stoney: * Incoming Mail: greyham@utscsd.oz (I cant send out from here) * University of Technology, Sydney: (Amdahl) /ele/student/greyham * Outgoing Mail: johnf@runx.oz (please dont send to here) ACSnet: greyham@utscsd CSNET: greyham@utscsd.oz ARPA: greyham%utscsd.oz@seismo.css.gov JANET: utscsd.oz!greyham@ukc UUCP: {enea,hplabs,mcvax,prlb2,seismo,ubc-vision,ukc}!munnari!utscsd.oz!greyham
huisjes@cs.vu.nl (Michiel Huisjes) (05/18/88)
In article <1516@runx.ips.oz> johnf@runx.ips.oz (John F. Baird) writes: > Does anybody know if DOSREAD, DOSWRITE and DOSDIR on Minix 1.2 > can read and write 3 1/2" MSDOS disks?. DOSREAD etc on 1.1 > ... > ... Oh yeah; > another thing:- can anyone explain why DOSREAD doesnt just > do calls to "printf" etc etc. Why does it have all that > "print_string" stuff?. why not use printf directly? (my > modified version does - will it still work on Minix?). > Thankx, > Greyham The original version of dosread/write/dir as written by me, could only handle 360K and 1.2M diskettes. Watch out for patches that include diskettes (hard-disks) of which the FAT entries are not 1.5 but 2 bytes. Also you will have to check the amount of bytes used for the Root directory and both FAT tables. I left out the "stdio" library and inserted this limited version of print_string, because by the time I wrote dosr/w/d, there were serious troubles concerning the amount of disk space left. Using print_string kept the binary about 3 or 4K smaller. -- Michiel Huisjes. (huisjes@cs.vu.nl) {seismo|decvax|philabs}!mcvax!vu44!huisjes