Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - dos_package http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   DOS_Package

   The DOS_Package is a collection of useful functions which are designed
   specifically  for IBM PC compatible machines operating under MS or  PC
   DOS.  DOS  Package functions have the prefix dos_, and should  not  be
   used  if  you  plan to port your code to  other  hardware  or  another
   operating system.

   The DOS_Package functions can be split conveniently into four  groups.
   Those  concerned  with disk or file access, those concerned  with  the
   system  time  and  date, those concerned with  memory  allocation  and
   various miscellaneous functions.
   Disk and File Functions

   There  a variety of functions involved with disk and  file  operations
   which go directly through the MSDOS software interrupts. The first  of
   these  are dos_abs_disk_read and dos_abs_disk_write.  These  functions
   provide  a way of directly reading and writing logical disk sectors to
   and  from the disk. One possible use for these routines would be in  a
   diskcopy type utility. dos_getdrive and dos_setdrive provide a way for
   the  programmer to ascertain the  current drive number, and to  change
   the  current  drive. dos_getdiskfreespacecan be used to find  out  the
   amount  of  free space that is available on a disk.  dos_getftime  and
   dos_setftime  allow  the  file date and time stamps  to  be  read  and
   modified.  Finally dos_getfileattr and dos_setfileattr can be used  to
   read or modify a file's attribute bits.

   System Date/Time Functions
   There are four functions associated with the DOS system time and  date.
   These  are dos_gettime and dos_settime which allow the system time  to
   be read and set, and dos_getdate and dos_setdate which do the same for
   the system date.

   Memory Allocation Functions
   Four  memory  allocation  functions are provided as part  of  the  DOS
   package.  dos_alloc and dos_calloc request memory from the heap  in  a
   similar way to malloc and calloc. These functions are direct calls  to
   MSDOS  and do not go through the normal allocation management  system.
   dos_free  is  provided  to  free memory  allocated  by  dos_alloc  and
   dos_calloc.  The final function, dos_setblock, carries out  a  similar
   function to realloc, allowing the size of an allocated memory block to
   be changed.

   Miscellaneous Functions
   The   rest   of  the  functions  provide  an  interface   to   various
   miscellaneous  facilities  provided  by DOS.  dos_exterr  obtains  the
   extended  error  information  provided by MSDOS 2.11  and  later.  The
   functions  dos_get_ctrl_break  and dos_set_ctrl_break  allow  the  DOS
   control  break  status  to be tested or  changed.  dos_get_verify  and
   dos_set verify do the same for the DOS verify status.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson