3 * Copyright (C) 2004 A.J. van Os; Released under GNU GPL
10 #define _NAIVE_DOS_REGS 1
11 #endif /* __DJGPP__ */
18 * iGetVersion - get the version of DOS
20 * Return the DOS version * 100 or -1 incase of error
27 memset(&uRegs
, 0, sizeof(uRegs
));
31 intdos(&uRegs
, &uRegs
);
32 if (uRegs
.x
.cflag
!= 0) {
33 DBG_DEC(uRegs
.x
.cflag
);
39 return uRegs
.h
.al
* 100 + uRegs
.h
.ah
;
40 } /* end of iGetVersion */
43 * iGetCodepage - get the DOS codepage
45 * Returns the number of the active codepage (cp437 is DOS ASCII)
52 /* DOS function 0x66 first appeared in DOS 3.3 */
53 if (iGetVersion() < 330) {
56 memset(&uRegs
, 0, sizeof(uRegs
));
60 intdos(&uRegs
, &uRegs
);
61 if (uRegs
.x
.cflag
!= 0) {
62 DBG_DEC(uRegs
.x
.cflag
);
69 } /* end of iGetCodepage */