joe_pool_is Posted March 9, 2005 Posted March 9, 2005 This is old DOS and Borland C 3.1 stuff, but there are no decent boards for things like this. Maybe some of you more experienced programmers (aka Old Timers?) can lend a hand for me. Basically, I need to create a routine that allows me to write and update values on a flash-disk that is being used as our hard drive that runs on ROM-DOS v6.22 (ROM-DOS is almost identical to MS-DOS, but most of the extra features have been reduced to allow it to easily fit into Flash media such as we use). We are programming in Borland C 3.1, and the included fopen() and fprintf() do not work for our purposes because they call on DOS functions. Our programs run in DOS Protected Mode (DPMI) to allow us to create interrupts, but the DOS functions disable DPMI for an undetermined amount of time until they have completed. DOS has no "I'm done now" flag to check, so we do not know how long our interrupts are being disabled. Our programs are written for deap sea drilling rigs and mining equipment, so disabled interrupts present hazards to workers and equipment. Can anyone think of a solution that would allow us to write to our sectors to save data? I have looked up information on FATs, because I will probably have to write my own, but I have not found out how to determine where a given file resides (sector, offset) on my hard drive or how much room it has that I can write to prevent me from clobbering other files on my drive. Does any of this make sense? Where should I go for answers? Regards, Joe Quote Avoid Sears Home Improvement
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.