From: Paul D. <du...@ho...> - 2003-07-11 13:52:04
|
First, Luca said that on cvs vm86.c had changed. I did not seems to be the case, so I manually removed the "offending" lines. Replacing vm86_ to x_ calls, have made the floppy disk motor to spin. (At least first time I tried). But then hangs there, without ever writing reset finished, so it must be on the reset call. I have made some changes, to remove warnings, and also to comment out the reading of a sector, keeping only the call to reset disk, and read disk parameters. Don't apply this blindly, just to show you! : H:\oslib\oslib\examples>cvs -z3 diff diskdemo.c Index: diskdemo.c =================================================================== RCS file: /cvsroot/oslib/oslib/examples/diskdemo.c,v retrieving revision 1.1 diff -r1.1 diskdemo.c 39a40 >#include <ll/i386/x-dosmem.h> 40a42 >#include <ll/ll.h> 50c52 < ctx = context_save(); --- > ctx = ll_context_save(); 70c72 < ctx = context_save(); --- > ctx = ll_context_save(); 95,96c97 < message("Error: Trying to reflect 0x%lx (%d)!!!\n", < intnum, intnum); --- > message("Error: Trying to reflect (%ld)!!!\n",intnum); 124c125 < ir.h.dl = 0; --- > ir.h.dl = 0x00; 132c133 < ir.h.dl = 0; --- > ir.h.dl = 0x00; 147,148c148,149 < < #if 0 --- >/* >if 0 150c151 < ir.h.al = 8; /* Let's verify 8 sectors... */ --- > ir.h.al = 8; Let's verify 8 sectors... 152,155c153,156 < ir.h.ch = 0; /* Cylonder 0 */ < ir.h.cl = 1; /* Sector 0 */ < ir.h.dh = 0; /* Head 0 */ < #else --- > ir.h.ch = 0; Cylonder 0 > ir.h.cl = 1; Sector 0 > ir.h.dh = 0; Head 0 >else 160,163c161,164 < ir.h.ch = 0; /* C */ < ir.h.cl = 1; /* S */ < ir.h.dh = 0; /* H */ < ir.h.dl = 0; --- > ir.h.ch = 0; C > ir.h.cl = 1; S > ir.h.dh = 0; H > ir.h.dl = 0x00; 166c167 < #endif --- >endif 169c170 < vm86_callBIOS(0x13, &ir, &or, &sr); --- > X_callBIOS(0x13, &ir, &or, &sr); 180a182 >*/ H:\oslib\oslib\examples> Here what I got with this: Stuff scrolled up... Executing code: CD 48 reset finished. Stack: 209D0 ss:1F00 SP:13CA CS:70 IP:3EE Switching to F8 Real-Mode Address is CS=2000 IP=5D0 Linear=205D0 Stack Frame: 69 328A2F 5FF000FE ... ... ... I am back... TSS CS=38 IP=3219E0 PM reentry linear address= There was nothing there! Executing code: CD 48 Drives:0 Drive Type: 0x32 Cylinders: 518 Sectors: 41 ... End reached I tried to use X_calls with DL=0x80 (hard disk rather than floppy), but this didnt helped. Hanging before writing reset finished. _________________________________________________________________ MSN Messenger : discutez en direct avec vos amis ! http://messenger.fr.msn.ca/ |