Subversion Repositories SvarDOS

Rev

Rev 1360 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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