1 |
/*
|
1 |
/*
|
2 |
* BIOS functions
|
2 |
* BIOS functions
|
3 |
*
|
3 |
*
|
4 |
* This file is part of the Mateusz' DOS Routines (MDR): http://mdr.osdn.io
|
4 |
* This file is part of the Mateusz' DOS Routines (MDR): http://mdr.osdn.io
|
5 |
* Published under the terms of the MIT License, as stated below.
|
5 |
* Published under the terms of the MIT License, as stated below.
|
6 |
*
|
6 |
*
|
7 |
* Copyright (C) 2014-2023 Mateusz Viste
|
7 |
* Copyright (C) 2014-2023 Mateusz Viste
|
8 |
*
|
8 |
*
|
9 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
9 |
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
10 |
* of this software and associated documentation files (the "Software"), to
|
10 |
* of this software and associated documentation files (the "Software"), to
|
11 |
* deal in the Software without restriction, including without limitation the
|
11 |
* deal in the Software without restriction, including without limitation the
|
12 |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
12 |
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
13 |
* sell copies of the Software, and to permit persons to whom the Software is
|
13 |
* sell copies of the Software, and to permit persons to whom the Software is
|
14 |
* furnished to do so, subject to the following conditions:
|
14 |
* furnished to do so, subject to the following conditions:
|
15 |
*
|
15 |
*
|
16 |
* The above copyright notice and this permission notice shall be included in
|
16 |
* The above copyright notice and this permission notice shall be included in
|
17 |
* all copies or substantial portions of the Software.
|
17 |
* all copies or substantial portions of the Software.
|
18 |
*
|
18 |
*
|
19 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
19 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
20 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
20 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
21 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
21 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
22 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
22 |
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
23 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
23 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
24 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
24 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
25 |
* IN THE SOFTWARE.
|
25 |
* IN THE SOFTWARE.
|
26 |
*/
|
26 |
*/
|
27 |
|
27 |
|
28 |
#ifndef MDR_BIOS_H
|
28 |
#ifndef MDR_BIOS_H
|
29 |
#define MDR_BIOS_H
|
29 |
#define MDR_BIOS_H
|
30 |
|
30 |
|
31 |
/* waits for ticks time (1 tick is roughly 55ms, an hour has 65543 ticks)
|
31 |
/* waits for ticks time (1 tick is roughly 55ms, an hour has 65543 ticks)
|
32 |
* works on IBM PC, XT, AT - ie. it's always safe */
|
32 |
* works on IBM PC, XT, AT - ie. it's always safe */
|
33 |
void mdr_bios_tickswait(unsigned short ticks);
|
33 |
void mdr_bios_tickswait(unsigned short ticks);
|
34 |
|
34 |
|
- |
|
35 |
/* returns the current BIOS tick counter (18.2 Hz, 1 tick is roughly 55ms, an
|
- |
|
36 |
* hour has 65543 ticks). works on IBM PC, XT, AT - ie. it's always safe */
|
- |
|
37 |
unsigned short mdr_bios_ticks(void);
|
- |
|
38 |
|
35 |
#endif
|
39 |
#endif
|
36 |
|
40 |
|