home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name qyscoun -- Set DOS country code.
- *
- * Synopsis error = qyscoun(country);
- *
- * int error 0 if OK, nonzero if error (see below)
- * unsigned country
- * Country code to set. This is ignored on
- * DOS 2.x.
- *
- * Description This function sets the current country as known by DOS.
- * This affects later calls to DOS function 0x38 (see also
- * QYGCOUN).
- *
- * This function is for use with DOS 3.0 and greater. It
- * has no effect if used with older versions of DOS.
- *
- * Returns error 0 if OK
- * 1 if old version of DOS
- * 2 if unknown country
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1986
- *
- **/
-
- #include <bquery.h>
-
- int qyscoun(country)
- unsigned country;
- {
- DOSREG regs;
- int al,minor;
-
- if (qydosver(&minor) < 3)
- return 1;
-
- if (country < 255)
- al = country;
- else
- {
- al = 0xff;
- regs.bx = country;
- }
-
- regs.ax = utbyword(0x38,al);
- regs.dx = 0xffff;
-
- return dos(®s);
- }