1 /* ----------------------------------------------------------------------- *
3 * Copyright 2001-2009 H. Peter Anvin - All Rights Reserved
4 * Copyright 2009 Intel Corporation; author: H. Peter Anvin
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, Inc., 53 Temple Place Ste 330,
9 * Boston MA 02111-1307, USA; either version 2 of the License, or
10 * (at your option) any later version; incorporated herein by reference.
12 * ----------------------------------------------------------------------- */
16 /* Addresses in the zero page */
17 #define BIOS_INT13 (0x13*4) /* INT 13h vector */
18 #define BIOS_INT15 (0x15*4) /* INT 15h vector */
19 #define BIOS_INT1E (0x1E*4) /* INT 1Eh vector */
20 #define BIOS_INT40 (0x40*4) /* INT 13h vector */
21 #define BIOS_INT41 (0x41*4) /* INT 41h vector */
22 #define BIOS_INT46 (0x46*4) /* INT 46h vector */
23 #define BIOS_BASEMEM 0x413 /* Amount of DOS memory */
24 #define BIOS_EQUIP 0x410 /* BIOS equipment list */
25 #define BIOS_HD_COUNT 0x475 /* Number of hard drives present */
27 /* Access to objects in the zero page */
28 static inline void wrz_8(uint32_t addr
, uint8_t data
)
30 *((uint8_t *) addr
) = data
;
33 static inline void wrz_16(uint32_t addr
, uint16_t data
)
35 *((uint16_t *) addr
) = data
;
38 static inline void wrz_32(uint32_t addr
, uint32_t data
)
40 *((uint32_t *) addr
) = data
;
43 static inline uint8_t rdz_8(uint32_t addr
)
45 return *((uint8_t *) addr
);
48 static inline uint16_t rdz_16(uint32_t addr
)
50 return *((uint16_t *) addr
);
53 static inline uint32_t rdz_32(uint32_t addr
)
55 return *((uint32_t *) addr
);