Main Menu

HOME

.Net
ASP
Assembly
C
C++
Delphi
HTML
Java
JavaScript
MySQL
PC interface
Powershell
Perl
PHP
VBScript
Visual Basic
XML

US Job listings




   Misc

   Amazon

   Links

    


Write to a disk sector
 

 

Description

This example writes to a specific disk sector.

Code

#include <stdio.h>
#include <dos.h>
#include <stdlib.h>
#include <bios.h>

int main(void)
{
unsigned char buffer[512];

clrscr();
printf("Insert a blank disk in the A: drive , then press any
key.\n");
/*wait for keypress*/
getch();
if(abswrite(0,1,1,&buffer) != 0)
printf("Cannot write to the A drive.\n");
else
printf("Drive A , Sector 1 written to\n");

return 0;

}

Information

tested using Turbo C on Windows 98

 

 

 

 

Download

abswrite.txt


 




   Sponsors
 

   Software
500 Java Tips E-book
PHP editor
PERL editor
Beginning Java
Beginning Visual Basic
Learn VB.net
Learn VB 6
VB and databases
ASP image library
C++ builder programming
C++ fundamentals

   Source Code
Find all links(PHP)
type of drive(VB)
select all text in a text box when it recieved focus(VB)
Javascript version(Javascript)
Todays date(VBScript)
Move a file(ASP)
Display x amount of links from a MySQL database(PHP)
File size function(PHP)

    




Copyright © 2003 by programmershelp.co.uk