TIP: Click on subject to list as thread! ANSI
echo: aust_c_here
to: All
from: Frank Adam
date: 1996-10-19 12:19:04
subject: [6/6] Fat

>>> Part 6 of 6...

** this function unless you're sure you know what it does !!!
*/
int AbsWrite(int AbsWdrive,DWORD sector,WORD numsecs,UCHAR *buf)
{
 union REGS inregs,outregs;
 struct SREGS sregs;
 drp.sector = sector;
 drp.numsectors = numsecs;
 drp.transferto = (DWORD)buf;
 inregs.h.al = AbsWdrive;
 inregs.x.cx = 0xffff;
 inregs.x.bx = FP_OFF(&drp);
 sregs.ds = FP_SEG(&drp);
 int86x(0x26,&inregs,&outregs,&sregs);
 if(outregs.x.cflag) return 0;
 return 1;
}
/*!!!!!!!!!!!!!!!!!!!!*/


void ShowSector(int sector,UCHAR *fatstr)
{
  int i,j;
  UCHAR *p = fatstr;
  if(PrintFlag == 2) printf("\rPrinting Sector %03d",sector);

  fprintf(stream,"\nSector: %d\tDrive: %c\n",sector,dpb.Driveno + 'A');
  for (i = 0; i < dpb.Bpersec; i += 16)
   {
     if (linecount == 22 && !PrintFlag)
     {
      printf("Press any key... or ESC to leave");
      if(GetKey() == 27) exit(0);
      fprintf(stream,"\rSector: %d continued.            \n", sector);
      linecount = 0;
      }

    fprintf(stream,"%05lX: ", (long)(i + ((long)sector *
(long)dpb.Bpersec)));
    for (j = 0; j < 16; j++) fprintf(stream,"%02X ", p[i+j]);
      fprintf(stream,"\t");
     for (j = 0; j < 16; j++)
      if (isprint(p[i+j]))
       fprintf(stream,"%c", p[i+j]);
       else fprintf(stream,".");
      fprintf(stream,"\n");
     linecount++;
   }

}


int GetKey()
{
 union REGS regs;
 regs.h.ah = 0x10;
 int86(0x16,®s,®s);
 return regs.h.al;
}

               
___ Blue Wave/DOS v2.21

---
* Origin: Melbourne PC User Group BBS (3:632/309)
SEEN-BY: 633/267 270
@PATH: 632/309 107 635/503 50/99 635/728 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.