home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / os2 / programm / 6288 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.9 KB  |  50 lines

  1. Newsgroups: comp.os.os2.programmer
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uunet.ca!geac!censor!perle!bob
  3. From: bob@perle.UUCP (Bob Pickles)
  4. Subject: DOS BIOS calls in OS/2
  5. Message-ID: <1992Nov6.195407.2593@perle.UUCP>
  6. Organization: Perle Systems Ltd.
  7. Distribution: na
  8. Date: Fri, 6 Nov 1992 19:54:07 GMT
  9. Lines: 39
  10.  
  11.  
  12. We have a program that runs under DOS that uses the BIOS interrupts.
  13. This program is reading and writing a configuration to a Proprietary
  14. Formatted Diskette. We change some of the settings in the BIOS floppy
  15. diskette parametter block (INT 0x1E). The code in DOS is as follows:
  16.  
  17.     ptr_1e = _dos_getvect(0x1e);
  18.         // modify diskette parameters in our table
  19.         // setup our diskette parametter table
  20.         _dos_setvect(0x1e, our_table);
  21.  
  22.          regs.h.ah = 0;
  23.          regs.h.dl = 0;   // drive number
  24.          int86x(0x13, ®s, ®s, &sregs); // reset disk
  25.          regs.h.ah = 0x17;
  26.          regs.h.dl = 0;   // drive number
  27.          regs.al = 4;
  28.          int86x(0x13, ®s, ®s, &sregs); // set DASD
  29.  
  30.          // We use the Interrupt 0x13 to read and write to disk.
  31.  
  32. We are porting this code to OS/2. It is possible in OS/2 without
  33. writing a device driver to access the floppy diskette drivers
  34. parameters and read and write to them without the OS giving a
  35. error that the program is writing outside it's own memory? The
  36. DosDevIOCtl() functions allow catergory 8 for floppies and
  37. catergory 9 for hard disks, but do not allow changing the base
  38. BIOS interrupt 0x1E parameters. 
  39.  
  40. Can the above program code be done in OS/2 within the application
  41. program? Inquiring OS/2 programmers would like to know.
  42.  
  43. Bob Pickles
  44.  
  45. -- 
  46. *********************************************************************
  47. *  >>>>>>>>>  Bob Pickles : Pyramid System Administrator <<<<<<<<<  *
  48. *  >>>>>>>>>  UUCP : ...!uunet!censor!perle!bob          <<<<<<<<<  *
  49. *********************************************************************
  50.