Subversion Repositories SvarDOS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1661 mateusz.vi 1
 
2
                             Mateusz' DOS Routines
3
                          http://mdrlib.sourceforge.io
4
 
5
 
6
Mateusz' DOS Routines (MDR) is a C library that contains a variety of routines
7
to ease the development of real mode DOS applications.
8
 
9
These routines are mostly targeted at the Open Watcom compiler, but might work
10
with other C compilers as well.
11
 
12
All the routines have been created by Mateusz Viste and are published under the
13
terms of the MIT license.
14
 
15
List of available modules:
16
 
17
BIOS     BIOS-based functions
18
COUT     console output (writing to text-mode display)
19
DOS      functions interacting with DOS
20
KEYB     basic functions to interact with the keyboard
21
MOUSE    mouse routines
22
OPL      OPL2 (Adlib style) audio
23
PCX      parsing, loading and uncompressing PCX images
24
RS232    writing to and reading from an RS-232 ("COM") port
25
SBDIGI   playing digitized sounds with a SoundBlaster-compatible card
26
TIMER    high-resolution (1 kHz) timer, relies on PIT reprogramming
27
TRIGINT  sin and cos functions using integers only (8086-compatible)
28
UNZIP    iteration over ZIP archives (no decompression code)
29
VID12    driver for mode 12h VGA graphic (640x480, 16 colors)
30
VIDEO    drivers for 320x200 video modes (256 colors on VGA, 16 colors on CGA)
31
WAVE     parsing and loading WAVE sound files
32
XMS      detecting and using XMS memory to store data
33
 
34
Documentation is contained in header (*.H) files in the INC\MDR\ directory.
35
 
36
 
37
+============================================================================+
38
| USAGE                                                                      |
39
+============================================================================+
40
 
41
Using MDR is no different than using any other library: you need to include
42
the header file(s) you wish to rely on and pass the lib file that matches your
43
memory model (small/compact/medium/large) to your linker.
44
 
45
Example program, KBTEST.C:
46
 
47
  #include <mdr\dos.h>
48
 
49
  int main(void) {
50
    mdr_dos_getkey();
51
    return(0);
52
  }
53
 
54
How to compile with the Watcom C Compile and Link Utility:
55
 
56
  wcl -ms kbtest.c mdrs2024.lib
57
 
58
 
59
+============================================================================+
60
| COMPILATION FROM SOURCES                                                   |
61
+============================================================================+
62
 
63
Should you wish to compile MDR from sources instead of relying on precompiled
64
LIB binaries, you will need the Watcom (or Open Watcom) C compiler and use its
65
wmake utility as follows:
66
 
67
  wmake clean
68
  wmake model=<MEMORY MODEL>
69
 
70
valid memory model options are:
71
 
72
  wmake model=s
73
  wmake model=c
74
  wmake model=m
75
  wmake model=l
76
 
77
 
78
==============================================================================