Atlas - BIOS.H

Home / ext / JunkDrawer / DOS / BuildTools / v4.0 / BLD / INC Lines: 1 | Size: 4685 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1/*** 2*bios.h - declarations for bios interface functions and supporting definitions 3* 4* Copyright (c) 1987-1988, Microsoft Corporation. All rights reserved. 5* 6*Purpose: 7* This file declares the constants, structures, and functions 8* used for accessing and using various BIOS interfaces. 9* 10*******************************************************************************/ 11 12 13#ifndef NO_EXT_KEYS /* extensions enabled */ 14 #define _CDECL cdecl 15#else /* extensions not enabled */ 16 #define _CDECL 17#endif /* NO_EXT_KEYS */ 18 19/* manifest constants for BIOS serial communications (RS-232) support */ 20 21/* serial port services */ 22 23#define _COM_INIT 0 /* init serial port */ 24#define _COM_SEND 1 /* send character */ 25#define _COM_RECEIVE 2 /* receive character */ 26#define _COM_STATUS 3 /* get serial port status */ 27 28/* serial port initializers. One and only one constant from each of the 29 * following four groups - character size, stop bit, parity, and baud rate - 30 * must be specified in the initialization byte. 31 */ 32 33/* character size initializers */ 34 35#define _COM_CHR7 2 /* 7 bits characters */ 36#define _COM_CHR8 3 /* 8 bits characters */ 37 38/* stop bit values - on or off */ 39 40#define _COM_STOP1 0 /* 1 stop bit */ 41#define _COM_STOP2 4 /* 2 stop bits */ 42 43/* parity initializers */ 44 45#define _COM_NOPARITY 0 /* no parity */ 46#define _COM_ODDPARITY 8 /* odd parity */ 47#define _COM_EVENPARITY 24 /* even parity */ 48 49/* baud rate initializers */ 50 51#define _COM_110 0 /* 110 baud */ 52#define _COM_150 32 /* 150 baud */ 53#define _COM_300 64 /* 300 baud */ 54#define _COM_600 96 /* 600 baud */ 55#define _COM_1200 128 /* 1200 baud */ 56#define _COM_2400 160 /* 2400 baud */ 57#define _COM_4800 192 /* 4800 baud */ 58#define _COM_9600 224 /* 9600 baud */ 59 60 61/* manifest constants for BIOS disk support */ 62 63/* disk services */ 64 65#define _DISK_RESET 0 /* reset disk controller */ 66#define _DISK_STATUS 1 /* get disk status */ 67#define _DISK_READ 2 /* read disk sectors */ 68#define _DISK_WRITE 3 /* write disk sectors */ 69#define _DISK_VERIFY 4 /* verify disk sectors */ 70#define _DISK_FORMAT 5 /* format disk track */ 71 72/* struct used to send/receive information to/from the BIOS disk services */ 73 74#ifndef NO_EXT_KEYS /* extensions must be enabled */ 75 76#ifndef _DISKINFO_T_DEFINED 77 78struct diskinfo_t { 79 unsigned drive; 80 unsigned head; 81 unsigned track; 82 unsigned sector; 83 unsigned nsectors; 84 void far *buffer; 85 }; 86 87#define _DISKINFO_T_DEFINED 88 89#endif 90 91#endif /* NO_EXT_KEYS */ 92 93 94/* manifest constants for BIOS keyboard support */ 95 96/* keyboard services */ 97 98#define _KEYBRD_READ 0 /* read next character from keyboard */ 99#define _KEYBRD_READY 1 /* check for keystroke */ 100#define _KEYBRD_SHIFTSTATUS 2 /* get current shift key status */ 101 102 103/* manifest constants for BIOS printer support */ 104 105/* printer services */ 106 107#define _PRINTER_WRITE 0 /* write character to printer */ 108#define _PRINTER_INIT 1 /* intialize printer */ 109#define _PRINTER_STATUS 2 /* get printer status */ 110 111 112/* manifest constants for BIOS time of day support */ 113 114/* time of day services */ 115 116#define _TIME_GETCLOCK 0 /* get current clock count */ 117#define _TIME_SETCLOCK 1 /* set current clock count */ 118 119 120#ifndef _REGS_DEFINED 121 122/* word registers */ 123 124struct WORDREGS { 125 unsigned int ax; 126 unsigned int bx; 127 unsigned int cx; 128 unsigned int dx; 129 unsigned int si; 130 unsigned int di; 131 unsigned int cflag; 132 }; 133 134/* byte registers */ 135 136struct BYTEREGS { 137 unsigned char al, ah; 138 unsigned char bl, bh; 139 unsigned char cl, ch; 140 unsigned char dl, dh; 141 }; 142 143/* general purpose registers union - 144 * overlays the corresponding word and byte registers. 145 */ 146 147union REGS { 148 struct WORDREGS x; 149 struct BYTEREGS h; 150 }; 151 152/* segment registers */ 153 154struct SREGS { 155 unsigned int es; 156 unsigned int cs; 157 unsigned int ss; 158 unsigned int ds; 159 }; 160 161#define _REGS_DEFINED 162 163#endif /* _REGS_DEFINED */ 164 165 166/* function prototypes */ 167 168unsigned _CDECL _bios_equiplist(void); 169unsigned _CDECL _bios_keybrd(unsigned); 170unsigned _CDECL _bios_memsize(void); 171unsigned _CDECL _bios_printer(unsigned, unsigned, unsigned); 172unsigned _CDECL _bios_serialcom(unsigned, unsigned, unsigned); 173unsigned _CDECL _bios_timeofday(unsigned, long *); 174int _CDECL int86(int, union REGS *, union REGS *); 175int _CDECL int86x(int, union REGS *, union REGS *, struct SREGS *); 176 177#ifndef NO_EXT_KEYS /* extensions must be enabled */ 178 179unsigned _CDECL _bios_disk(unsigned, struct diskinfo_t *); 180 181#endif /* NO_EXT_KEYS */ 182
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.