Files
RomWBW/Apps/Source/trackio.c
2013-05-11 03:36:41 +00:00

74 lines
1.3 KiB
C
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*************************************************************/
/* track.c 6/6/2012 dwg - read and write physical sectors */
/*************************************************************/
#include "cpmbios.h"
#include "bioscall.h"
int rdtrack(drive,track,sector,buffer,mcnt)
int drive;
int track;
int sector;
unsigned int buffer;
int mcnt;
{
/* ireghl = pSELDSK;
iregbc = drive;
iregde = 0;
bioscall(); */
/* ireghl = pSETTRK;
iregbc = track;
bioscall(); */
ireghl = pSETSEC;
iregbc = sector;
bioscall();
ireghl = pSETDMA;
iregbc = buffer;
bioscall();
ireghl = pREAD;
bioscall();
return irega;
}
int wrtrack(drive,track,sector,buffer,mcnt)
int drive;
int track;
int sector;
unsigned int buffer;
int mcnt;
{
ireghl = pSELDSK;
iregbc = drive;
iregde = 0;
bioscall();
ireghl = pSETTRK;
iregbc = track;
bioscall();
ireghl = pSETSEC;
iregbc = sector;
bioscall();
ireghl = pSETDMA;
iregbc = buffer;
bioscall();
ireghl = pWRITE;
bioscall();
return irega;
}
/********************/
/* eof - sectorio.c */
/********************/