Really i'm not sur my problem is problem or not
Now i tring to write hard disk driver when i try to read sector 1 ,bochs give this messag(will show after)
with out reading
in microsoft virtual pc my system print all buffer all buffer equal zero also when i try to read from my real hard disk
is there is any error with my code thanks
Code: Select all
rw(1,true,0,0,0,1,0x2000);
void hardd::rw(uint n,bool read,uint C,uint c,uint h,uint s, void *buf)
{
ushort*b = (ushort*)buf;video v;
while((inb(0x1F7)&0x80) == 0x80){};
outb(0x1F2,n);
outb(0x1F3,s);
outb(0x1F4,c);
outb(0x1F5,C);
outb(0x1F6,0xa0|(h&0xF));
if(read==true )outb(0x1F7,0x20);
if(read==false)outb(0x1F7,0x30);
if(read==true )for(int i=0;i<n*512;i++)b[i] = inw(0x1F0);
if(read==false)for(int i=0;i<n*512;i++)outw(0x1F0,b[i]);
}
Code: Select all
write to port 0x01F0 with len 1 ignored