DOS diskette filesystem logical structure program

Otto J. Makela otto at tukki.jyu.fi
Fri Nov 23 00:33:08 AEST 1990


Here is some C code for reading and writing files on a MS-DOS diskette.
Only root directory is supported etc., but that's why I'm releasing it...
Enjoy.  Sample binaries for MS-DOS machines included.

#!/bin/sh
# This is a shell archive (shar 3.32)
# made 08/17/1990 08:23 UTC by otto at tukki
#
# existing files WILL be overwritten
#
# This shar contains:
# length  mode       name
# ------ ---------- ------------------------------------------
#    803 -rw-rw-rw- clear.c
#   6810 -rw-rw-rw- clear.com
#   1033 -rw-rw-rw- io.asm
#    286 -rw-rw-rw- io.h
#    449 -rw-rw-rw- makefile
#  13494 -rw-rw-rw- msdos.c
#   2050 -rw-rw-rw- msdos.doc
#   1403 -rw-rw-rw- msdos.h
#   1079 -rw-rw-rw- read.c
#   7178 -rw-rw-rw- read.com
#   1030 -rw-rw-rw- write.c
#   7284 -rw-rw-rw- write.com
#
if touch 2>&1 | fgrep 'amc' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
# ============= clear.c ==============
echo "x - extracting clear.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > clear.c &&
X/*
X**	Test main program for MS-DOS diskette routines: format diskette
X*/
X
X#include	"io.h"  
X#include	"msdos.h"
X
Xchar *names[]={"360k","1.2M","720k","1.44M"};
X
Xmain(argc,argv)
Xint argc;
Xchar *argv[];	{
X	register int i;
X
X	if(argc!=2)	{
Xusage:		printf(	"usage: clear [drive_letter]format\n"
X			"formats:\n");
X		for(i=0; i<sizeof(names)/sizeof(char *); i++)
X			printf("%d\t%s\n",i,names[i]);
X		exit(2);
X	}
X
X	if((i=*argv[1])>'9')	{
X		if(i>'Z') i-=32;
X		drive_number = i-'A';
X		argv[1]++;
X	}
X
X	if( (i=*argv[1]-'0')>3 || i<0) goto usage;
X
X	printf(	"WARNING! Clearing drive %d to %s diskette (type %d)\n"
X		"All files on the disk will be ERASED !\n"
X		"Press ENTER to continue, or CTRL/C to abort\n",
X		drive_number,names[i],i);
X	getchar();
X
X	disk_clear(i);
X	exit(0);
X}
X
SHAR_EOF
$TOUCH -am 0807030090 clear.c &&
chmod 0666 clear.c ||
echo "restore of clear.c failed"
set `wc -c clear.c`;Wc_c=$1
if test "$Wc_c" != "803"; then
	echo original size 803, current size $Wc_c
fi
# ============= clear.com ==============
echo "x - extracting clear.com (Binary)"
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
Xbegin 600 clear.com
XMZ;,258OL5H-^!`)T-+C3&%#H+PN#Q`*^``#K%HO&T>"+V/^WMAA6N/\84. at 5
XM"X/$!D:#_ at 1RY;@"`%#HL12#Q`*+7@:+7P**!YB+\(O&/3D`?A:#_EI^`X/&
XMX(O&!;__HK<!BUX&_T<"BUX&BU\"B@>8B_`%T/^+\(O&/0,`?XV#_@!\B%#1
XMX(O8_[>V&*"W`2KD4+@&&5#HJ`J#Q`CHVPE6Z%L%@\0"N```4.A`%(/$`EZ+
XMY5W#``D``@!5B^RT`NL%58OLM`-0+J&Z`2[W)K@!B\B+1 at 3W\8KH,]*+1 at 0N
XM]S:X`8/"`8K*,](N]S:Z`8KR+HH6MP%8L`&+7@;-$XK$,N1=PU=6N+(<4+@`
XM`%#HJ?^#Q`2+\(7V=`]6N```4+B2&5#H,`F#Q`:@OAPJY(O(AN`JP(O(H+T<
XM*N0+P:..&:"_'"KDH[(@H,$<*N2+R(;@*L"+R*#`'"KD"\&CM""@PAPJY*.V
XM(*#$'"KDB\B&X"K`B\B at PQPJY`O!H[@@H,D<*N2+R(;@*L"+R*#('"KD"\&C
XMNB"@RQPJY(O(AN`JP(O(H,H<*N0+P:.X`:#-'"KDB\B&X"K`B\B at S!PJY`O!
XMH[H!H,\<*N2+R(;@*L"+R*#.'"KD"\&CO""ANB#W)K8 at 4*&X(+D%`-/@*]+W
XM-HX9B\A8`\$#!K0 at B\BAO"`#R(D.OB"_``#K+(O']R:.&07`(%"AM"`#QU#H
XMGOZ#Q`2+\(7V=`]6_S:T(+B7&5#H)0B#Q`9'.SZZ('+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!HO&3H7`=<L[?@9T$HO'*T8&4/]V!O]V!.B5_H/$!HM&"%Y?
XMB^5=PU6+[)S\5E>,WX['BW8$BWX&BTX(C,",VCO"=1<[_G0?<A']`_D#\4].
XM]L$!=`&D3T[K!O;!`70!I-'I=`+SI?Q?7IU=PU6+[(M>!+@`1,TA<@_VPH!T
XM"O;"`W0%N`$`7<,KP%W#58OL5XM&!(L^.AN%P'T&*_AR%NL$`\=R$%#H%P!9
XMA<!U`HO'7X7`7</'!CP;^/^X___K\%6+[(M&!$`D_CL&0AMR<(,^?AL`=1B+
XMW"L>>AL[PW-?HSH;`P9Z&Z-$&RO`7<,[!D8;=PL[!CH;<@6C.AOKZU"+V+D$
XM`-/K@>/_#X/#08'CP/]3!HS9`]F.!DH;*QY*&[1*S2$'6UAR%J,Z&_?#`.!U
XM#;D$`-/CB1Y&&RO`7</'!CP;^/^X__^%P%W#58OLB\0K1 at 2C>AM=P[X8PQC(
XM&,T8,S8P:P`Q+C)-`#<R,&L`,2XT-$T`=7-A9V4Z(&-L96%R(%MD<FEV95]L
XM971T97)=9F]R;6%T"F9O<FUA=',Z"@`E9`DE<PH`5T%23DE.1R$@0VQE87)I
XM;F<@9')I=F4@)60@=&\@)7, at 9&ES:V5T=&4@*'1Y<&4@)60I"D%L;"!F:6QE
XM<R!O;B!T:&4 at 9&ES:R!W:6QL(&)E($5205-%1"`A"E!R97-S($5.5$52('1O
XM(&-O;G1I;G5E+"!O<B!#5%),+T,@=&\@86)O<G0*```"__]R96%D`')E860`
XM<F5A9`!W<FET90!W<FET90`H"0+]`@<"4`\"^0<.`5`)`OD#!P)0$@+P"0X!
XM37D at 1&ES:V5T=&5->6-R;V9T*@!W<FET90!W<FET90!W<FET90!R96%D`'=R
XM:71E`'=R:71E`'=R:71E`$-A;B=T("5S(&QO9VEC86P@<V5C=&]R("5D+"!S
XM=&%T=7,])3`R>`H``/\``````````0```0````````````$!``$`````````
XM```!`@`!`````````````0,``0````````````$$``$`````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````"F&Z8;PC0```````````````#__P``.#`X-R\X,#(X-R!I<R!R97%U
XM:7)E9"$-"B0?%0!4;V\@;6%N>2!A<F=S+@```0`(``$`````````````````
X/````````````O18B%PH-
X`
Xend
SHAR_EOF
$TOUCH -am 0815172890 clear.com &&
chmod 0666 clear.com ||
echo "restore of clear.com failed"
set `wc -c clear.com`;Wc_c=$1
if test "$Wc_c" != "6810"; then
	echo original size 6810, current size $Wc_c
fi
# ============= io.asm ==============
echo "x - extracting io.asm (Text)"
sed 's/^X//' << 'SHAR_EOF' > io.asm &&
X	include	lmacros.h
X	public	drive_number_,sectors_per_track_,number_of_heads_
Xdrive_number_		db	0
Xsectors_per_track_	dw	9
Xnumber_of_heads_	dw	2
X
X; sector	= logical_sector_ % sectors_per_track_ + 1
X; head		= (logical_sector_ / sectors_per_track_) % number_of_heads_
X; cylinder	= logical_sector / (sectors_per_track * number_of_heads_)
X
X	procdef	read_sector,<<logical_sector,word>,<buffer,ptr>>
X	mov	ah,2
X	jmp	short write1
X
X	entrdef	write_sector,<<dummy1,word>,<dummy2,ptr>>
X	mov	ah,3
Xwrite1:	push	ax
X
X	mov	ax,number_of_heads_
X	mul	sectors_per_track_
X	mov	cx,ax
X	mov	ax,logical_sector
X	div	cx
X	mov	ch,al		; Load cylinder
X
X	xor	dx,dx
X	mov	ax,logical_sector
X	div	sectors_per_track_
X	add	dx,1
X	mov	cl,dl		; Load sector
X
X	xor	dx,dx
X	div	number_of_heads_
X	mov	dh,dl		; Load head
X
X	mov	dl,drive_number_; Load drive number
X
X	pop	ax		; Get read/write function request
X	mov	al,1		; One sector
X	ldptr	bx,buffer,es	; Load buffer offset
X
X	int	13h
X	mov	al,ah
X	xor	ah,ah
X	pret
X	pend	read_sector
X	finish
SHAR_EOF
$TOUCH -am 0804213590 io.asm &&
chmod 0666 io.asm ||
echo "restore of io.asm failed"
set `wc -c io.asm`;Wc_c=$1
if test "$Wc_c" != "1033"; then
	echo original size 1033, current size $Wc_c
fi
# ============= io.h ==============
echo "x - extracting io.h (Text)"
sed 's/^X//' << 'SHAR_EOF' > io.h &&
X/*
X**	Sector read routines
X*/
X
Xunsigned int read_sector(unsigned int logical_sector,unsigned char *sector);
Xunsigned int write_sector(unsigned int logical_sector,unsigned char *sector);
X
Xextern unsigned char drive_number;
Xextern unsigned int sectors_per_track,number_of_heads;
SHAR_EOF
$TOUCH -am 0804213590 io.h &&
chmod 0666 io.h ||
echo "restore of io.h failed"
set `wc -c io.h`;Wc_c=$1
if test "$Wc_c" != "286"; then
	echo original size 286, current size $Wc_c
fi
# ============= makefile ==============
echo "x - extracting makefile (Text)"
sed 's/^X//' << 'SHAR_EOF' > makefile &&
X#
X#	M S - D O S   d i s k e t t e   f i l e   s y s t e m
X#
X
XCFLAGS=	+f0 -n
XLNFLAGS=
X
Xall:	read.com write.com clear.com
X	@echo -
X
Xread.com:	read.o io.o msdos.o
X	ln $(LNFLAGS) -o read.com read.o io.o msdos.o -lc
X
Xwrite.com:	write.o io.o msdos.o
X	ln $(LNFLAGS) -o write.com write.o io.o msdos.o -lc
X
Xclear.com:	clear.o io.o msdos.o
X	ln $(LNFLAGS) -o clear.com clear.o io.o msdos.o -lc
X
Xread.o write.o clear.o msdos.o:	io.h msdos.h
SHAR_EOF
$TOUCH -am 0815172890 makefile &&
chmod 0666 makefile ||
echo "restore of makefile failed"
set `wc -c makefile`;Wc_c=$1
if test "$Wc_c" != "449"; then
	echo original size 449, current size $Wc_c
fi
# ============= msdos.c ==============
echo "x - extracting msdos.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > msdos.c &&
X/*
X**	M S - D O S   d i s k e t t e   f i l e s y s t e m
X*/
X
X/*
X**	Current limitations:
X**	Only one file may be "open" at a time - either for read or write
X**	There is no provision if the diskette becomes full when writing
X*/
X
X#include	"io.h"
X#include	"msdos.h"
X
X	/* Macros for converting two bytes to word and vice versa */
X#define	GET_WORD(i,a)		((unsigned int)(a[i] | (a[(i)+1]<<8)))
X#define	SET_WORD(i,a,v)		(a[i]=(v), a[(i)+1]=(v)>>8)
X
X	/* Same for converting four bytes to long and vice versa */
X#define	C(a)			((char *)&(a))
X#define	L(i,a)			((unsigned long)(C(a)[i]))
X
X#define	GET_LONG(l)		(L(0,l) |		(L(1,l)<<8) |\
X				(L(2,l)<<16) |		(L(3,l)<<24))
X#define	SET_LONG(l,v)		((C(l)[0]=(v)),		(C(l)[1]=(v)>>8),\
X				(C(l)[2]=(v)>>16),	(C(l)[3]=(v)>>24))
X
X	/* Error marking routines */
X#define	READ_ERROR(sector,status)	general_error("read",sector,status)
X#define	WRITE_ERROR(sector,status)	general_error("write",sector,status)
X
X	/* Some markers */
Xunsigned int sector_size=SECTORSIZE,sectors_per_fat,reserved_sectors,file_area;
Xunsigned int fats_per_disk,file_slots,sectors_per_cluster,hidden_sectors;
X
X	/* Single directory sector entry */
Xunsigned int dirsector_number=-1;
Xunsigned char dir_sector[SECTORSIZE];
X
X	/* FAT buffer (largest floppy FAT is 9 sectors, on a 1.44M) */
Xunsigned char fat[9*SECTORSIZE];
X
X	/* Cluster buffer (largest floppy cluster is 2 sectors) */
Xunsigned char cluster[2*SECTORSIZE];
X
X	/* Some function prototypes */
Xvoid read_cluster(unsigned int number);
Xvoid write_cluster(unsigned int number);
X
Xvoid write_fat();
Xunsigned int get_fat_entry(unsigned int cluster);
Xvoid set_fat_entry(unsigned int cluster,unsigned int value);
X
Xvoid general_error(char *dowhat, unsigned int sector,unsigned int status);
X
X/*
X**	Read sector zero, set values appropriately; read FAT into the buffer
X*/
Xvoid disk_open()	{
X	register int i,j;
X
X	if(i=read_sector(0,cluster)) READ_ERROR(0,i);
X
X	sector_size = GET_WORD(0x0B,cluster);
X	sectors_per_cluster = cluster[0x0D];
X	reserved_sectors = GET_WORD(0x0E,cluster);
X	fats_per_disk = cluster[0x10];
X	file_slots = GET_WORD(0x11,cluster);
X	sectors_per_fat = GET_WORD(0x16,cluster);
X	sectors_per_track = GET_WORD(0x18,cluster);
X	number_of_heads = GET_WORD(0x1A,cluster);
X	hidden_sectors = GET_WORD(0x1C,cluster);
X	file_area = reserved_sectors + hidden_sectors +
X		sectors_per_fat*fats_per_disk +
X		(file_slots*sizeof(directory))/sector_size;
X
X	Db( printf(
X		"\ndrive %d\n"
X		"media OEM signature  \"%.8s\"\n"
X		"bytes/sector=%u\n"
X		"sectors/cluster=%u\n"
X		"reserved=%u\n"
X		"FATs=%u\n"
X		"root directory file slots=%u\n"
X		"total sectors=%u\n"
X		"media descriptor=%xh\n"
X		"sectors/FAT=%u\n"
X		"sectors/track=%u\n"
X		"heads=%u\n"
X		"hidden sectors=%u\n"
X		"boot signature=%02X%02X\n"
X		"file area begins at sector %d\n\n",
X		drive_number,
X		cluster+3,
X		sector_size,
X		sectors_per_cluster,
X		reserved_sectors,
X		fats_per_disk,
X		file_slots,
X		GET_WORD(0x13,cluster),
X		cluster[0x15],
X		sectors_per_fat,
X		sectors_per_track,
X		number_of_heads,
X		hidden_sectors,
X		cluster[sector_size-2],cluster[sector_size-1],
X		file_area);
X	)
X
X		/* Can't read FAT as multiple sectors; FAT can span tracks */
X	for(j=0; j<sectors_per_fat; j++)
X		if(i=read_sector(reserved_sectors+j,fat+j*sector_size))
X			READ_ERROR(reserved_sectors,i);
X}
X
X
X/*
X**	Search root directory for given filename (or free entry if NULL given),
X**	return pointer to it's entry or NULL if no find
X*/
Xdirectory *find_dir(filename)
Xchar *filename;	{
X	register int i,j;
X	directory *dp = (directory *)dir_sector+sector_size;
X
X	dirsector_number =	reserved_sectors + hidden_sectors +
X				sectors_per_fat * fats_per_disk - 1;
X
X	for(j=0; j<file_slots; j++, dp++)	{
X		if(dp >= (directory *)dir_sector+sector_size)	{
X			if(i=read_sector(++dirsector_number,dir_sector))
X				READ_ERROR(dirsector_number,i);
X			dp = (directory *)dir_sector;
X		}
X		if(filename)	{
X			/* Name must match and must not be volabel, dir etc. */
X			if(!(strncmp(dp->filename,filename,8+3) ||
X				(dp->attribute & ATTR_SPECIAL)) )
X				return(dp);
X		} else	{
X			/* Must be either unused or deleted entry */
X			if(!(i=dp->filename[0]) || i==0xE5)
X				return(dp);
X		}
X	}
X
X	return(NULL);
X}
X
X
X/*
X**	"Open" a file for read, return true if file cannot be read (zero length)
X*/
Xstatic unsigned int current_cluster;
Xstatic unsigned long int bytes_in_file;
Xstatic unsigned char *next_char;
X
Xint file_open(dir_item)
Xregister directory *dir_item;	{
X	current_cluster = dir_item->cluster;
X	bytes_in_file = GET_LONG(dir_item->filesize);
X	next_char = cluster+sector_size*sectors_per_cluster;
X
X	Db( printf("Opened file, size %ld bytes\n",bytes_in_file); )
X
X	return(!current_cluster);
X}
X
X
X/*
X**	Get next character from file previously opened with file_open
X*/
Xint file_getc()	{
X	if(!bytes_in_file) return(EOF);
X	if(next_char >= cluster+sector_size*sectors_per_cluster)	{
X		next_char = cluster;
X		read_cluster(current_cluster);
X		current_cluster = get_fat_entry(current_cluster);
X	}
X	bytes_in_file--;
X	return(*next_char++);
X}
X
X
X/*
X**	"Open" filename for writing, return pointer to directory item if
X**	successful; return NULL if old file can't be overwritten or there
X**	is no room in the root directory for a new file
X*/
Xdirectory *file_create(filename)
Xchar *filename;	{
X	register int i;
X	directory *dp;
X
X		/* If file already exists, truncate it to zero length */
X	if(dp=find_dir(filename))	{
X			/* Can't truncate if file is readonly */
X		if(dp->attribute & ATTR_READONLY) return(NULL);
X
X			/* Remove FAT chain */
X		if(current_cluster = dp->cluster)
X			do	{
X				current_cluster =
X					get_fat_entry(i=current_cluster);
X				set_fat_entry(i,0);
X				Db( printf("Freeing cluster %03x\n",i); )
X			} while(current_cluster < 0xFF8);
X			/* Then rewrite FAT */
X		write_fat();
X	} else
X		/* Allocate a unused or deleted directory entry, copy name */
X		if(dp=find_dir(NULL))
X			for(i=0; i<8+3; i++) dp->filename[i]=filename[i];
X		else
X			return(NULL);
X
X		/* Then clear directory entry, filesize and cluster ptr */
X	dp->filesize = 0L;
X	dp->cluster = 0;
X	dp->attribute = ATTR_ARCHIVE;	/* File archive bit set (modified) */
X	dp->date = 0x0000;	/* You may insert anything appropriate here */
X	dp->time = 0x0000;	/* These values mean "no date" for MS-DOS */
X	if(i=write_sector(dirsector_number,dir_sector))
X		WRITE_ERROR(dirsector_number,i);
X
X		/* Clear indicators for file_putc() */
X	current_cluster = 0;
X	bytes_in_file = 0L;
X	next_char = cluster+sector_size*sectors_per_cluster;
X
X	return(dp);
X}
X
X
X/*
X**	Put next character to the file previously opened with file_create
X*/
Xint file_putc(dp,c)
Xdirectory *dp;
Xint c;	{
X	register int i;
X
X		/* Note that there is no provision for running out of FAT */
X	if(next_char >= cluster+sector_size*sectors_per_cluster)	{
X		if(current_cluster)
X			write_cluster(current_cluster);
X		for(i=current_cluster+1; get_fat_entry(i); i++);
X
X		if(current_cluster)
X			set_fat_entry(current_cluster,i);
X		else
X			dp->cluster = i;
X
X		Db( printf("Allocated cluster %03x\n",i); )
X		current_cluster = i;
X		next_char = cluster;
X	}
X	*next_char++ = c;
X	bytes_in_file++;
X	return(0);
X}
X
X
X/*
X**	Close the file written to by file_putc
X**	Rewrite directory item and FAT, write disk buffer
X*/
Xvoid file_close(dp)
Xdirectory *dp;	{
X	register int i;
X
X	Db( printf("Closing file, size %ld bytes\n",bytes_in_file); )
X
X		/* Do nothing if file hasn't actually been written to */
X	if(!current_cluster) return;
X
X		/* Update file size */
X	SET_LONG(dp->filesize,bytes_in_file);
X
X	Db( printf("Closing file, size %ld bytes\n",dp->filesize); )
X
X	if(i=write_sector(dirsector_number,dir_sector))
X		WRITE_ERROR(dirsector_number,i);
X
X		/* Write cluster buffer to disk */
X	write_cluster(current_cluster);
X		/* Mark as end-of-file to FAT */
X	set_fat_entry(current_cluster,0xFFF);
X		/* Rewrite FAT to disk */
X	write_fat();
X}
X
X
X/*
X**	Erase disk's logical structure, create standard MS-DOS disk;
X**	this basically does a logical format to the target disk -- nothing
X**	is done physically.  THIS WILL TOTALLY ERASE THE WHOLE DISKETTE !
X**	Idea is that one does not have to do disk_open once this is done
X**
X**	Note: if Atari ST 720k diskette support is wanted, the media
X**	descriptor byte for type 2 should be set to 0xF7.
X*/
X
Xstatic struct	{
X	unsigned char tracks,sectors,heads,media,fat,files,cluster;
X} disk_data[4] = {
X/*	tracks	sectors	heads	media	FAT	files	cluster	*/
X	{ 40,	9,	2,	0xFD,	2,	7,	2 },	/* 360k */
X	{ 80,	15,	2,	0xF9,	7,	14,	1 },	/* 1.2M */
X	{ 80,	9,	2,	0xF9,	3,	7,	2 },	/* 720k */
X	{ 80,	18,	2,	0xF0,	9,	14,	1 },	/* 1.44M */
X};
Xstatic unsigned char volume_label[8+3]="My Diskette";
X
Xvoid disk_clear(disktype)
Xint disktype;	{
X	register int i;
X	directory *dp;
X
X		/* First, make logical sector 0 */
X	for(i=0; i<SECTORSIZE; i++) cluster[i]='\0';
X
X	sectors_per_track = disk_data[disktype].sectors;
X	number_of_heads = disk_data[disktype].heads;
X
X	sector_size = SECTORSIZE;
X	sectors_per_fat = disk_data[disktype].fat;
X	reserved_sectors = 1;
X	fats_per_disk = 2;
X	file_slots = sector_size*disk_data[disktype].files/sizeof(directory);
X	sectors_per_cluster = disk_data[disktype].cluster;
X	hidden_sectors = 0;
X
X	file_area = reserved_sectors + hidden_sectors +
X		sectors_per_fat*fats_per_disk +
X		disk_data[disktype].files;
X
X		/*
X		** Seems Messy-Dos can't read a 3.5" diskette unless these
X		** are here (it has no problems reading 5.25" diskettes !)
X		** they actually are the instructions JMP 003E and NOP for
X		** the iAPX86 family microprocessors - talk about a kludge!
X		*/
X	cluster[0]=0xEB; cluster[1]=0x3C; cluster[2]=0x90;
X
X		/* Diskette creator (OEM) signature - that's me, folks! */
X	for(i=0; i<8; i++) cluster[i+3]="Mycroft*"[i];
X
X	SET_WORD(0x0B,cluster,sector_size);
X	cluster[0x0D] = sectors_per_cluster;
X	SET_WORD(0x0E,cluster,reserved_sectors);
X	cluster[0x10] = fats_per_disk;
X	SET_WORD(0x11,cluster,file_slots);
X	SET_WORD(0x13,cluster,
X		disk_data[disktype].tracks*sectors_per_track*number_of_heads);
X	cluster[0x15] = disk_data[disktype].media;
X	SET_WORD(0x16,cluster,sectors_per_fat);
X	SET_WORD(0x18,cluster,sectors_per_track);
X	SET_WORD(0x1A,cluster,number_of_heads);
X	SET_WORD(0x1C,cluster,hidden_sectors);
X
X		/*
X		** This volume label is actually extraneous, since we haven't
X		** inserted the MS-DOS 4.0 signature byte 0x29 at offset 0x26
X		** (as we'd have to figure a volume serial number for the disk)
X		*/		
X	for(i=0; i<8+3; i++) cluster[i+0x2B]=volume_label[i];
X
X	if(i=write_sector(0,cluster))
X		WRITE_ERROR(0,i);
X
X		/* Then create empty FAT */
X	fat[0] = disk_data[disktype].media;
X	fat[1] = 0xFF;
X	fat[2] = 0xFF;
X	for(i=3; i<sector_size*sectors_per_fat; i++) fat[i]=0;
X	write_fat();
X
X		/* Lastly, clear directory area (except for volume label) */
X	for(i<0; i<SECTORSIZE; i++) dir_sector[i]='\0';
X	dp = (directory *)dir_sector;
X	for(i=0; i<8+3; i++) dp->filename[i]=volume_label[i];
X	dp->attribute = ATTR_VOLABEL;
X
X	dirsector_number =	reserved_sectors + hidden_sectors +
X				sectors_per_fat * fats_per_disk;
X
X	if(i=write_sector(dirsector_number,dir_sector))
X		WRITE_ERROR(dirsector_number,i);
X
X	for(i=0; i<11; i++) dp->filename[i]='\0';
X	dp->attribute = 0;
X
X	while(++dirsector_number < disk_data[disktype].files)
X		if(i=write_sector(dirsector_number,dir_sector))
X			WRITE_ERROR(dirsector_number,i);
X
X}
X
X
X/*
X**	Get the requested cluster to the cluster buffer
X*/
Xstatic void read_cluster(number)
Xregister unsigned int number;	{
X	register int i,j;
X	unsigned char *cp=cluster;
X
X	Db( printf("Read cluster %03x\n",number); )
X
X	number=CLUSTER_TO_SECTOR(number);
X	for(j=0; j<sectors_per_cluster; j++, number++, cp+=sector_size)
X		if(i=read_sector(number,cp))
X			READ_ERROR(number,i);
X}
X
X
X/*
X**	Put the requested cluster from the cluster buffer
X*/
Xstatic void write_cluster(number)
Xregister unsigned int number;	{
X	register int i,j;
X	unsigned char *cp=cluster;
X
X	Db( printf("Wrote cluster %03x\n",number); )
X
X	number=CLUSTER_TO_SECTOR(number);
X	for(j=0; j<sectors_per_cluster; j++, number++, cp+=sector_size)
X		if(i=write_sector(number,cp))
X			WRITE_ERROR(number,i);
X}
X
X
X/*
X**	Write modified FAT back to disk (both copies)
X*/
Xstatic void write_fat()	{
X	register int i,j;
X
X	for(j=0; j<sectors_per_fat; j++)	{
X		if(i=write_sector(reserved_sectors+j,fat+j*sector_size))
X			WRITE_ERROR(reserved_sectors+j,i);
X		if(i=write_sector(reserved_sectors+sectors_per_fat+j,
X			fat+j*sector_size))
X			WRITE_ERROR(reserved_sectors+sectors_per_fat+j,i);
X	}
X}
X
X
X/*
X**	Get FAT entry for specified cluster
X*/
Xstatic unsigned int get_fat_entry(cluster)
Xunsigned int cluster;	{
X	register unsigned int i=GET_WORD(3*cluster/2,fat);
X
X	return (cluster&1)? (i>>4): (i&0x0FFF);
X}
X
X
X/*
X**	Set FAT entry for specified cluster
X*/
Xstatic void set_fat_entry(cluster,value)
Xunsigned int cluster,value;	{
X	register unsigned int i=GET_WORD(3*cluster/2,fat);
X
X	i = (cluster&1)?
X		((value<<4)	  |	(i & 0x000F)):
X		((value & 0x0FFF) |	(i & 0xF000));
X
X	SET_WORD(3*cluster/2,fat,i);
X}
X
X
X/*
X**	Report error and terminate
X*/
Xstatic void general_error(dowhat,sector,status)
Xchar *dowhat;
Xunsigned int sector,status;	{
X	printf("Can't %s logical sector %d, status=%02x\n",
X		dowhat,sector,status);
X	exit(1);
X}
SHAR_EOF
$TOUCH -am 0807074190 msdos.c &&
chmod 0666 msdos.c ||
echo "restore of msdos.c failed"
set `wc -c msdos.c`;Wc_c=$1
if test "$Wc_c" != "13494"; then
	echo original size 13494, current size $Wc_c
fi
# ============= msdos.doc ==============
echo "x - extracting msdos.doc (Text)"
sed 's/^X//' << 'SHAR_EOF' > msdos.doc &&
XThis package reads and writes files in the root directory of a MS-DOS
Xformat diskette.  Reads from and to files in directorys are not supported,
Xdirectorys are ignored.
X
XThe format is the one used on MS-DOS since version 2.01, ie. media
Xdescriptor bytes are not tested or supported.  Diskettes formatted with
XMS-DOS versions 2.01 through 4.01 should all work.  It should also be
Xpossible to use Atari ST -formatted diskettes, if the controller chip
Xtiming supports the different gap lengths of the format.  However, the
XTOS on the Atari expects to see the media descriptor byte set to 0xF7
Xfor 720k diskettes; thus, the formatting routine will have to be changed
Xin this respect.  Diskettes with this media descriptor will unfortunately
Xget the warning "Probable non-DOS diskette" from the MS-DOS chkdsk program.
X
XThe following sample programs are supplied: read (read a diskette file
Xusing the routines), write (write a diskette file) and clear (logically
Xformat a MS-DOS diskette).
X
XSome guidelines for producing generally MS-DOS compatible diskettes/files
Xwith this package:
X
X* filenames are 8 characters, with 3 character file extensions; both parts
X  consist of uppercase characters padded from the right with spaces but
X  they should NOT contain imbedded spaces; the filename cannot be all blank
X  but the extension can be, and a period is assumed between the two parts;
X  for example, the on-disk filename "MYFILE  EXT" maps logically to the name
X  "MYFILE.EXT" and the logical filename "2ND-FILE" maps to "2ND-FILE   "
X
X* do not use lowercase characters or any of the DOS reserved characters
X  which are ?*,;.:+"/<=>[\]| in the filenames you create
X
X* do not use either of the characters 0x00 (NUL) or 0xE5 as the first character
X  of a filename; the first means a never used directory entry, the second a
X  deleted one
X
X* use only "whole" diskettes, ie. if a diskette is physically or logically
X  damaged and you try to write onto it with this package, the results will
X  probably be bad (if not worse)
SHAR_EOF
$TOUCH -am 0814105390 msdos.doc &&
chmod 0666 msdos.doc ||
echo "restore of msdos.doc failed"
set `wc -c msdos.doc`;Wc_c=$1
if test "$Wc_c" != "2050"; then
	echo original size 2050, current size $Wc_c
fi
# ============= msdos.h ==============
echo "x - extracting msdos.h (Text)"
sed 's/^X//' << 'SHAR_EOF' > msdos.h &&
X/*
X**	M S - D O S   d i s k e t t e   f i l e s y s t e m
X*/
X
X	/* Default (implicitly assumed) sector size */
X#define	SECTORSIZE	512
X
X	/*
X	** FAT entries are based at 2, since the first two entries in
X	** the FAT table are reserved for the ancient media descriptor byte
X	*/
X#define	CLUSTER_TO_SECTOR(cluster)	(((cluster)-2)*sectors_per_cluster + \
X						file_area)
X
X	/* Some basically stdio.h constants that we define just in case */
X#ifndef	NULL
X#define	NULL	((void *)0)
X#endif
X#ifndef	EOF
X#define	EOF	(-1)
X#endif
X
X	/* Debugger's aid macro */
X#ifdef	DEBUG
X#define	Db(x)	x
X#else
X#define	Db(x)
X#endif
X
X	/* Directory data entry format */
Xtypedef struct	{
X	unsigned char filename[11],attribute;
X	char reserved[10];
X	unsigned int time,date;
X	unsigned int cluster;
X	unsigned long int filesize;
X} directory;
X
X#define	ATTR_READONLY	0x01
X#define	ATTR_HIDDEN	0x02
X#define	ATTR_SYSTEM	0x04
X#define	ATTR_VOLABEL	0x08
X#define	ATTR_DIRECTORY	0x10
X#define	ATTR_ARCHIVE	0x20
X#define	ATTR_UNUSED1	0x40
X#define	ATTR_UNUSED2	0x80
X
X#define	ATTR_SPECIAL	0x1E
X
X	/* Function call prototypes */
Xvoid disk_open();
Xdirectory *find_dir(char *filename);
X
Xint file_open(directory *dir_item);
Xint file_getc();
X
Xdirectory *file_create(char *filename);
Xint file_putc(directory *dir_item,int character);
Xvoid file_close(directory *dir_item);
X
Xvoid disk_clear(int disktype);
SHAR_EOF
$TOUCH -am 0807035590 msdos.h &&
chmod 0666 msdos.h ||
echo "restore of msdos.h failed"
set `wc -c msdos.h`;Wc_c=$1
if test "$Wc_c" != "1403"; then
	echo original size 1403, current size $Wc_c
fi
# ============= read.c ==============
echo "x - extracting read.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > read.c &&
X/*
X**	Test main program for MS-DOS diskette routines: read file
X*/
X
X#include	<stdio.h>
X#include	"io.h"
X#include	"msdos.h"
X
Xmain(argc,argv)
Xint argc;
Xchar *argv[];	{
X	register int i,j;
X	directory *dp;
X	FILE *f=stdout;
X
X	if(argc!=3)	{
X		printf(	"usage: read diskette_file [other_file|-]\n"
X			"Filenames may have leading A: B: or\n"
X			"imbedded periods, indicating spaces\n");
X		exit(2);
X	}
X
X	for(i=0; j=argv[1][i]; i++)
X		if(j=='.')
X			argv[1][i]=' ';
X		else if(j>='a' && j<='z')
X			argv[1][i]-=32;
X
X	if(argv[1][1]==':')	{
X		drive_number=*argv[1]-'A';
X		argv[1]+=2;
X	}
X
X	disk_open();
X
X	if(!(dp=find_dir(argv[1])))	{
X		printf("No match for \"%11.11s\"\n",argv[1]);
X		exit(1);
X	}
X
X	printf("Reading file \"%11.11s\" %02x %ld %04x/%04x\n",
X		dp->filename,dp->attribute,dp->filesize,dp->date,dp->time);
X
X	if((*argv[2]!='-' || argv[2][1]) && (!(f=fopen(argv[2],"w"))))	{
X		printf("Cannot open file \"%s\" for writing\n",argv[2]);
X		exit(1);
X	}
X
X	file_open(dp);
X
X	while((i=file_getc())!=EOF)
X		putc(i,f);
X
X	fclose(f);
X	exit(0);
X}
SHAR_EOF
$TOUCH -am 0807043490 read.c &&
chmod 0666 read.c ||
echo "restore of read.c failed"
set `wc -c read.c`;Wc_c=$1
if test "$Wc_c" != "1079"; then
	echo original size 1079, current size $Wc_c
fi
# ============= read.com ==============
echo "x - extracting read.com (Binary)"
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
Xbegin 600 read.com
XMZ?0358OL@\3\5U;'1ORO&X-^!`-T%+CX&5#H>`N#Q`*X`@!0Z`D6@\0"O@``
XMZR2#_RYU"XM>!HM?`L8`(.L3 at _]A?`Z#_WI_"8M>!HM?`H``X$:+7@:+7P**
XM`)B+^(7_=<V+7@:+7P*`?P$Z=0Z*!P2_HD@"BUX&@T<"`N at 8`8M>!O]W`NA)
XM`H/$`HE&_H7`=1J+7@;_=P*X:AI0Z/8*@\0$N`$`4.B'%8/$`HM>_O]W%O]W
XM&/]W'O]W'(I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'*T8&4/]V!O]V!.B5_H/$
XM!HM&"%Y?B^5=PU6+[)S\5E>,WX['BW8$BWX&BTX(C,",VCO"=1<[_G0?<A']
XM`_D#\4].]L$!=`&D3T[K!O;!`70!I-'I=`+SI?Q?7IU=PU6+[(M>!+@`1,TA
XM<@_VPH!T"O;"`W0%N`$`7<,KP%W#58OL5XM&!(L^JAR%P'T&*_AR%NL$`\=R
XM$%#H%P!9A<!U`HO'7X7`7</'!JP<^/^X___K\%6+[(M&!$`D_CL&LAQR<(,^
XM[AP`=1B+W"L>ZAP[PW-?HZH<`P;J'*.T'"O`7<,[!K8<=PL[!JH<<@6CJASK
XMZU"+V+D$`-/K@>/_#X/#08'CP/]3!HS9`]F.!KH<*QZZ'+1*S2$'6UAR%J.J
XM'/?#`.!U#;D$`-/CB1ZV'"O`7</'!JP<^/^X__^%P%W#58OLB\0K1 at 2CZAQ=
XMPP!U<V%G93H@<F5A9"!D:7-K971T95]F:6QE(%MO=&AE<E]F:6QE?"U="D9I
XM;&5N86UE<R!M87D@:&%V92!L96%D:6YG($$Z($(Z(&]R"FEM8F5D9&5D('!E
XM<FEO9',L(&EN9&EC871I;F<@<W!A8V5S"@!.;R!M871C:"!F;W(@(B4Q,2XQ
XM,7,B"@!296%D:6YG(&9I;&4@(B4Q,2XQ,7,B("4P,G@@)6QD("4P-'@O)3`T
XM>`H`=P!#86YN;W0@;W!E;B!F:6QE("(E<R(@9F]R('=R:71I;F<*```"__]R
XM96%D`')E860`<F5A9`!W<FET90!W<FET90`H"0+]`@<"4`\"^0<.`5`)`OD#
XM!P)0$@+P"0X!37D at 1&ES:V5T=&5->6-R;V9T*@!W<FET90!W<FET90!W<FET
XM90!R96%D`'=R:71E`'=R:71E`'=R:71E`$-A;B=T("5S(&QO9VEC86P@<V5C
XM=&]R("5D+"!S=&%T=7,])3`R>`H``'(`````<BL``@!W```!`W<K``(#80``
XM`0EA*P`""7@```$%>"L``@4````````````````!```!`````````````0$`
XM`0````````````$"``$````````````!`P`!`````````````00``0``````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM`````````````````!8=%ATR-@```````````````/__```X,#@W+S at P,C at W
XM(&ES(')E<75I<F5D(0T*)&`6`%1O;R!M86YY(&%R9W,N```!``@``0``````
X7``````````````````````#^%V,8"@UM
X`
Xend
SHAR_EOF
$TOUCH -am 0815172890 read.com &&
chmod 0666 read.com ||
echo "restore of read.com failed"
set `wc -c read.com`;Wc_c=$1
if test "$Wc_c" != "7178"; then
	echo original size 7178, current size $Wc_c
fi
# ============= write.c ==============
echo "x - extracting write.c (Text)"
sed 's/^X//' << 'SHAR_EOF' > write.c &&
X/*
X**	Test main program for MS-DOS diskette routines: delete file
X*/
X
X#include	<stdio.h>
X
X#include	"io.h"
X#include	"msdos.h"
X
Xmain(argc,argv)
Xint argc;
Xchar *argv[];	{
X	register int i,j;
X	directory *dp;
X	FILE *f=stdin;
X
X	if(argc!=3)	{
X		printf(	"usage: write diskette_file [other_file|-]\n"
X			"Diskette filename may have leading A: B: or\n"
X			"imbedded periods, indicating spaces\n");
X		exit(2);
X	}
X
X	if((*argv[2]!='-' || argv[2][1]) && (!(f=fopen(argv[2],"r"))))	{
X		printf("Cannot open file \"%s\" for reading\n",argv[2]);
X		exit(1);
X	}
X
X	for(i=0; j=argv[1][i]; i++)
X		if(j=='.')
X			argv[1][i] = ' ';
X		else if(j>='a' && j<='z')
X			argv[1][i] -= 32;
X	if(argv[1][1]==':')	{
X		drive_number = *argv[1]-'A';
X		argv[1] += 2;
X	}
X
X	disk_open();
X
X	if(dp=file_create(argv[1]))
X		printf("Created file \"%s\"\n",argv[1]);
X	else	{
X		printf("Could not create file \"%s\"\n",argv[1]);
X		exit(1);
X	}
X
X	while((i=getc(f))!=EOF)
X		file_putc(dp,i);
X
X	file_close(dp);
X	fclose(f);
X	exit(0);
X}
SHAR_EOF
$TOUCH -am 0807043590 write.c &&
chmod 0666 write.c ||
echo "restore of write.c failed"
set `wc -c write.c`;Wc_c=$1
if test "$Wc_c" != "1030"; then
	echo original size 1030, current size $Wc_c
fi
# ============= write.com ==============
echo "x - extracting write.com (Binary)"
sed 's/^X//' << 'SHAR_EOF' | uudecode &&
Xbegin 600 write.com
XMZ6 at 458OL@\3\5U;'1OP,'(-^!`-T%+AL&E#H[`N#Q`*X`@!0Z'T6@\0"BUX&
XMBU\$@#\M=0:`?P$`=#&XYQI0BUX&_W<$Z#D+@\0$B4;\A<!U&HM>!O]W!+CI
XM&E#HJ at N#Q`2X`0!0Z#L6@\0"O@``ZR2#_RYU"XM>!HM?`L8`(.L3 at _]A?`Z#
XM_WI_"8M>!HM?`H``X$:+7@:+7P**`)B+^(7_=<V+7@:+7P*`?P$Z=0Z*!P2_
XMHD`"BUX&@T<"`NC.`(M>!O]W`NBF`X/$`HE&_H7`=!*+7@;_=P*X#!M0Z"@+
XM@\0$ZQJ+7@;_=P*X'QM0Z!8+@\0$N`$`4.BG%8/$`O]V_.C_"8/$`HOPB\8]
XM__]T#%#_=O[H6`2#Q`3KXO]V_NC(!(/$`O]V_.B%"X/$`K@``%#H;16#Q`)>
XM7XOE7<,`"0`"`%6+[+0"ZP55B^RT`U`NH4,"+O<F00*+R(M&!/?QBN at STHM&
XM!"[W-D$"@\(!BLHSTB[W-D,"BO(NBA9``EBP`8M>!LT3BL0RY%W#5U:XC!Y0
XMN```4.BI_X/$!(OPA?9T#U:X``!0N$`;4. at P"8/$!J"8'BKDB\B&X"K`B\B@
XMEQXJY`O!HSP;H)D>*N2CC"*@FQXJY(O(AN`JP(O(H)H>*N0+P:..(J"<'BKD
XMHY`BH)X>*N2+R(;@*L"+R*"='BKD"\&CDB*@HQXJY(O(AN`JP(O(H*(>*N0+
XMP:.4(J"E'BKDB\B&X"K`B\B at I!XJY`O!HT$"H*<>*N2+R(;@*L"+R*"F'BKD
XM"\&C0P*@J1XJY(O(AN`JP(O(H*@>*N0+P:.6(J&4(O<FD")0H9(BN04`T^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ET92!D:7-K
XM971T95]F:6QE(%MO=&AE<E]F:6QE?"U="D1I<VME='1E(&9I;&5N86UE(&UA
XM>2!H879E(&QE861I;F<@03H at 0CH@;W(*:6UB961D960@<&5R:6]D<RP@:6YD
XM:6-A=&EN9R!S<&%C97,*`'(`0V%N;F]T(&]P96X at 9FEL92`B)7,B(&9O<B!R
XM96%D:6YG"@!#<F5A=&5D(&9I;&4@(B5S(@H`0V]U;&0@;F]T(&-R96%T92!F
XM:6QE("(E<R(*`````O__<F5A9`!R96%D`')E860`=W)I=&4`=W)I=&4`*`D"
XM_0('`E`/`OD'#@%0"0+Y`P<"4!("\`D.`4UY($1I<VME='1E37EC<F]F="H`
XM=W)I=&4`=W)I=&4`=W)I=&4`<F5A9`!W<FET90!W<FET90!W<FET90!#86XG
XM="`E<R!L;V=I8V%L('-E8W1O<B`E9"P@<W1A='5S/24P,G@*``!R`````'(K
XM``(`=P```0-W*P`"`V$```$)82L``@EX```!!7 at K``(%````````````````
XM`0```0````````````$!``$````````````!`@`!`````````````0,``0``
XM``````````$$``$`````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM````````````````````````````````````````````````````````````
XM``````````````````````````````````````"`'8`=G#8`````````````
XM``#__P``.#`X-R\X,#(X-R!I<R!R97%U:7)E9"$-"B34%@!4;V\@;6%N>2!A
XG<F=S+@```0`(``$`````````````````````````````<AC7&`H-
X`
Xend
SHAR_EOF
$TOUCH -am 0815172890 write.com &&
chmod 0666 write.com ||
echo "restore of write.com failed"
set `wc -c write.com`;Wc_c=$1
if test "$Wc_c" != "7284"; then
	echo original size 7284, current size $Wc_c
fi
exit 0
--
   /* * * Otto J. Makela <otto at jyu.fi> * * * * * * * * * * * * * * * * * * */
  /* Phone: +358 41 613 847, BBS: +358 41 211 562 (CCITT, Bell 24/12/300) */
 /* Mail: Kauppakatu 1 B 18, SF-40100 Jyvaskyla, Finland, EUROPE         */
/* * * Computers Rule 01001111 01001011 * * * * * * * * * * * * * * * * */



More information about the Alt.sources mailing list