123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home
Source Codes
Engineering Colleges

Training  Reports
Seminar Reports
Placement Papers

Forums

   Computer Science / IT
   Electronics
   Electrical
   Mechanical
   Chemical
   Civil

   CAT / MBA

   GMAT / Foreign MBA
Latest Jobs

Engineering Jobs / Technical Jobs
Management Jobs

Sitemap
Terms of use

Displaying  Source Code(s)  
 

 
Program to implement Specify command.

--------------------------------------------------------------------------------



#include<conio.h>
#include<stdio.h>
#include<dos.h>

void main()
{
int x;
int result;
clrscr();

// Step 1Put on the motor
outp(0x3f2,28);//Address of digital control port 0x3f2
//Step 2 Check whether the FDC is ready

result=inp(0x3f4); //Read the status of MSR
result=(result&128);

if(result==128)//Check whether FDC is ready
{
//Beginning of command phase
//Step 3 Input the command parameters
outp(0x3f5,3);//Enter command parameters
delay(200);
outp(0x3f5,204); //Enter SRT(2-32 step of 2) HUT(4-512 in step of4)
delay(300);
outp(0x3f5,25);//Enter the HUT and NDM
delay(300);
}
delay(1000);
result=inp(0x3f5);
printf("The value od data register is %d",result);

getch();
//Put off the motor
outp(0x3f2,0);


}

 

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG