Note: This API call is for DOS and Win16 personality only. Use Family API for portability.

Int 21H, AH=38H, AL=01H

Version

3 and higher

Brief

SET COUNTRY CODE/GET COUNTRY-SPECIFIC INFORMATION

Family API

Input

Get:
AL = 01h thru 0FEh for specific country with code <255 (see #01400)
AL = 0FFh for specific country with code >= 255
BX = 16-bit country code (see #01400)
DS:DX -> buffer for returned info (see #01399)
Set:
AH = 38h
DX = FFFFh
AL = 01h thru FEh for specific country with code <255
AL = FFh for specific country with code >= 255
BX = 16-bit country code (see #01400)

Return

Get:
CF set on error
AX = error code (02h)
CF clear if successful
AX = country code (Novell NWDOS v7.0)
BX = country code
DS:DX buffer filled
Set:
CF set on error
AX = error code (see #01680 at AH=59h/BX=0000h)
CF clear if successful

Macro

Notes

this function is not supported by the Borland DPMI host, but no error is returned; as a workaround, one should allocate a buffer in conventional memory with INT 31/AX=0100h and simulate an INT 21 with INT 31/AX=0300h

Format of DOS 2.00-2.10 country info:

Offset	Size	Description
00h	WORD	date format 0 = USA mm dd yy 1 = Europe dd mm yy 2 = Japan yy mm dd
02h	BYTE	currency symbol
03h	BYTE	00h
04h	BYTE	thousands separator char
05h	BYTE	00h
06h	BYTE	decimal separator char
07h	BYTE	00h
08h	24 BYTEs	reserved

Format of DOS 2.11+ country info:

Offset	Size	Description
00h	WORD	date format (see #01398)
02h	5 BYTEs	ASCIZ currency symbol string
07h	2 BYTEs	ASCIZ thousands separator
09h	2 BYTEs	ASCIZ decimal separator
0Bh	2 BYTEs	ASCIZ date separator
0Dh	2 BYTEs	ASCIZ time separator
0Fh	BYTE	currency format
bit 2 = set if currency symbol replaces decimal point
bit 1 = number of spaces between value and currency symbol
bit 0 = 0 if currency symbol precedes value
1 if currency symbol follows value
10h	BYTE	number of digits after decimal in currency
11h	BYTE	time format
bit 0 = 0 if 12-hour clock
1 if 24-hour clock
12h	DWORD	address of case map routine (FAR CALL, AL = character to map to upper case [>= 80h])
16h	2 BYTEs	ASCIZ data-list separator
18h	10 BYTEs	reserved

Values for country code:

001h (1)	United States
002h (2)	Canadian-French
003h (3)	Latin America
004h (4)	Canada (English)
007h (7)	Russia
014h (20)	Egypt
01Bh (27)	South Africa
01Eh (30)	Greece
01Fh (31)	Netherlands
020h (32)	Belgium
021h (33)	France
022h (34)	Spain
023h (35)	Bulgaria???
024h (36)	Hungary (not supported by DR DOS 5.0)
026h (38)	Yugoslavia (not supported by DR DOS 5.0) – obsolete
027h (39)	Italy / San Marino / Vatican City
028h (40)	Romania
029h (41)	Switzerland / Liechtenstein
02Ah (42)	Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0)
02Bh (43)	Austria (DR DOS 5.0)
02Ch (44)	United Kingdom
02Dh (45)	Denmark
02Eh (46)	Sweden
02Fh (47)	Norway
030h (48)	Poland (not supported by DR DOS 5.0)
031h (49)	Germany
033h (51)	Peru
034h (52)	Mexico
035h (53)	Cuba
036h (54)	Argentina
037h (55)	Brazil (not supported by DR DOS 5.0)
038h (56)	Chile
039h (57)	Columbia
03Ah (58)	Venezuela
03Ch (60)	Malaysia
03Dh (61)	International English / Australia
03Eh (62)	Indonesia / East Timor
03Fh (63)	Philippines
040h (64)	New Zealand
041h (65)	Singapore
042h (66)	Thailand (or Taiwan???)
051h (81)	Japan (DR DOS 5.0, MS-DOS 5.0+)
052h (82)	South Korea (DR DOS 5.0)
054h (84)	Vietnam
056h (86)	China (MS-DOS 5.0+)
058h (88)	Taiwan (MS-DOS 5.0+)
05Ah (90)	Turkey (MS-DOS 5.0+)
05Bh (91)	India
05Ch (92)	Pakistan
05Dh (93)	Afghanistan
05Eh (94)	Sri Lanka
062h (98)	Iran
063h (99)	Asia (English)
066h (102)	??? (Hebrew MS-DOS 5.0)
070h (112)	Belarus
0C8h (200)	Thailand (PC DOS 6.1+) (reported as 01h due to a bug in PC DOS COUNTRY.SYS)
0D4h (212)	Morocco
0D5h (213)	Algeria
0D8h (216)	Tunisia
0DAh (218)	Libya
0DCh (220)	Gambia
0DDh (221)	Senegal
0DEh (222)	Maruitania
0DFh (223)	Mali
0E0h (224)	African Guinea
0E1h (225)	Ivory Coast
0E2h (226)	Burkina Faso
0E3h (227)	Niger
0E4h (228)	Togo
0E5h (229)	Benin
0E6h (230)	Mauritius
0E7h (231)	Liberia
0E8h (232)	Sierra Leone
0E9h (233)	Ghana
0EAh (234)	Nigeria
0EBh (235)	Chad
0ECh (236)	Centra African Republic
0EDh (237)	Cameroon
0EEh (238)	Cape Verde Islands
0EFh (239)	Sao Tome and Principe
0F0h (240)	Equatorial Guinea
0F1h (241)	Gabon
0F2h (242)	Congo
0F3h (243)	Zaire
0F4h (244)	Angola
0F5h (245)	Guinea-Bissau
0F6h (246)	Diego Garcia
0F7h (247)	Ascension Isle
0F8h (248)	Seychelles
0F9h (249)	Sudan
0FAh (250)	Rwhanda
0FBh (251)	Ethiopia
0FCh (252)	Somalia
0FDh (253)	Djibouti
0FEh (254)	Kenya
0FFh (255)	Tanzania
100h (256)	Uganda
101h (257)	Burundi
103h (259)	Mozambique
104h (260)	Zambia
105h (261)	Madagascar
106h (262)	Reunion Island
107h (263)	Zimbabwe
108h (264)	Namibia
109h (265)	Malawi
10Ah (266)	Lesotho
10Bh (267)	Botswana
10Ch (268)	Swaziland
10Dh (269)	Comoros
10Eh (270)	Mayotte
122h (290)	St. Helena
129h (297)	Aruba
12Ah (298)	Faroe Islands
12Bh (299)	Greenland
15Eh (350)	Gibraltar
15Fh (351)	Portugal
160h (352)	Luxembourg
161h (353)	Ireland
162h (354)	Iceland
163h (355)	Albania
164h (356)	Malta
165h (357)	Cyprus
166h (358)	Finland
167h (359)	Bulgaria
172h (370)	Lithuania (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
173h (371)	Latvia (reported as 372 due to a bug in MS-DOS COUNTRY.SYS)
174h (372)	Estonia
175h (373)	Moldova
177h (375)	??? (MS-DOS 7.10 / Windows98)
17Ch (380)	Ukraine
17Dh (381)	Serbia / Montenegro
180h (384)	Croatia
181h (385)	Croatia (PC DOS 7+)
182h (386)	Slovenia
183h (387)	Bosnia-Herzegovina (Latin)
184h (388)	Bosnia-Herzegovina (Cyrillic) (PC DOS 7+) (reported as 381 due to a bug in PC DOS COUNTRY.SYS)
185h (389)	FYR Macedonia
1A5h (421)	Czech Republic / Tjekia (PC DOS 7+)
1A6h (422)	Slovakia (reported as 421 due to a bug in COUNTRY.SYS)
1F4h (500)	Falkland Islands
1F5h (501)	Belize
1F6h (502)	Guatemala
1F7h (503)	El Salvador
1F8h (504)	Honduras
1F9h (505)	Nicraragua
1FAh (506)	Costa Rica
1FBh (507)	Panama
1FCh (508)	St. Pierre and Miquelon
1FDh (509)	Haiti
24Eh (590)	Guadeloupe
24Fh (591)	Bolivia
250h (592)	Guyana
251h (593)	Ecuador
252h (594)	French Guiana
253h (595)	Paraguay
254h (596)	Martinique / French Antilles
255h (597)	Suriname
256h (598)	Uruguay
257h (599)	Netherland Antilles
29Ah (666)	Russia??? (PTS-DOS 6.51 KEYB)
29Bh (667)	Poland??? (PTS-DOS 6.51 KEYB)
29Ch (668)	Poland??? (Slavic???) (PTS-DOS 6.51 KEYB)
29Eh (670)	Saipan / N. Mariana Island
29Fh (671)	Guam
2A0h (672)	Norfolk Island (Australia) / Christmas Island/Cocos Islands / Antartica
2A1h (673)	Brunei Darussalam
2A2h (674)	Nauru
2A3h (675)	Papua New Guinea
2A4h (676)	Tonga Islands
2A5h (677)	Solomon Islands
2A6h (678)	Vanuatu
2A7h (679)	Fiji
2A8h (680)	Palau
2A9h (681)	Wallis & Futuna
2AAh (682)	Cook Islands
2ABh (683)	Niue
2ACh (684)	American Samoa
2ADh (685)	Western Samoa
2AEh (686)	Kiribati
2AFh (687)	New Caledonia
2B0h (688)	Tuvalu
2B1h (689)	French Polynesia
2B2h (690)	Tokealu
2B3h (691)	Micronesia
2B4h (692)	Marshall Islands
2C7h (711)	??? (currency = EA$, code pages 437,737,850,852,855,857)
311h (785)	Arabic (Middle East/Saudi Arabia/etc.)
324h (804)	Ukraine
329h (809)	Antigua and Barbuda / Anguilla / Bahamas / Barbados / Bermuda / British Virgin Islands / Cayman Islands / Dominica / Dominican Republic / Grenada / Jamaica / Montserra / St. Kitts and Nevis / St. Lucia / St. Vincent and Grenadines / Trinidad and Tobago / Turks and Caicos
352h (850)	North Korea
354h (852)	Hong Kong
355h (853)	Macao
357h (855)	Cambodia
358h (856)	Laos
370h (880)	Bangladesh
376h (886)	Taiwan (MS-DOS 6.22+)
3C0h (960)	Maldives
3C1h (961)	Lebanon
3C2h (962)	Jordan
3C3h (963)	Syria / Syrian Arab Republic
3C4h (964)	Iraq
3C5h (965)	Kuwait
3C6h (966)	Saudi Arabia
3C7h (967)	Yemen
3C8h (968)	Oman
3C9h (969)	Yemen??? (Arabic MS-DOS 5.0)
3CBh (971)	United Arab Emirates
3CCh (972)	Israel (Hebrew) (DR DOS 5.0,MS-DOS 5.0+)
3CDh (973)	Bahrain
3CEh (974)	Qatar
3CFh (975)	Bhutan
3D0h (976)	Mongolia
3D1h (977)	Nepal
3E3h (995)	Myanmar (Burma)
(10xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
(11xxx)	reserved for Euro currency support
(12xxx)	reserved for ISO 28601 + Euro currency
(1xxxx)	not yet defined
(20xxx)	reserved for ISO 28601/ISO 8601 or derivative national stds
(21xxx)	reserved for Euro currency support
(22xxx)	reserved for ISO 28601 + Euro currency
(2xxxx)	not yet defined
(30xxx)	reserved for user-definable country codes
(31xxx)	reserved for OEM-defined country codes
(32000+)	reserved for future expansion

Note: not all country codes are supported by all versions of DOS

See also

AH=65h,INT 10/AX=5001h,INT 2F/AX=1404h, INT 2F/AX=1403h

Note

Text based on Ralf Brown Interrupt List Release 61

DOS API
Process manager	INT 20H, INT 21H: 00H, 25H, 26H, 31H, 34H, 35H, 4BH, 4CH, 4DH, 50H, 51H, 52H, 55H, 62H, INT 22H, INT 27H, INT 28H
File manager	INT 25H, INT 26H, INT 21H: 0DH, 0EH, 0FH, 10H, 11H, 12H, 13H, 14H, 15H, 16H, 17H, 19H, 1AH, 1BH, 1CH, 21H, 22H, 23H, 24H, 27H, 28H, 29H, 2EH, 2FH, 32H, 3305H, 36H, 39H, 3AH, 3BH, 3CH, 3DH, 3EH, 3FH, 40H, 41H, 42H, 4300H, 4301H, 45H, 45H, 46H, 4EH, 4FH, 54H, 56H, 5700H, 5701H, 5AH, 5BH, 5c00H, 5c01H, 60H, 67H, 68H, 6900H, 6901H, 6AH, 6CH
Character Device I/O	INT 29H, INT 21H: 01H, 02H, 03H, 04H, 05H, 06H, 07H, 08H, 09H, 0AH, 0BH, 0AH, 0CH, 5D07H, 5D08H, 5D09H, 5D0AH
Signals	INT 23H, INT 24H, INT 21H: 3300H, 3301H, 3302H
Memory manager	INT 21H: 48H, 49H, 4AH, 5800H, 5801H, 5802H, 5803H
Date and Time	INT 21H: 2AH, 2BH, 2CH, 2DH
Misc	INT 21H: 30H, 3306H, 3700H, 3701H, 3702H, 3703H, 59H
NLS	INT 21H: 3303H, 3304H, 3800H, 3801H, 6300H, 6301H, 6301H, 6500H, 6501H, 6502H, 6503H, 6504H, 6505H, 6506H, 6507H, 6520H, 6521H, 6522H, 6523H, 65A0H, 65A1H, 65A2H, 6601H, 6602H
Devices	INT 21H: 4400H, 4401H, 4402H, 4403H, 4404H, 4405H, 4406H, 4407H, 4408H, 4409H, 440AH, 440BH, 440CH, 440DH, 440EH, 440FH, 4410H, 4411H, 53H
Network	INT 21H: 5E00H, 5E01H, 5E02H, 5E03H, 5E04H, 5E05H, 5F00H, 5F01H, 5F02H, 5F03H, 5F04H, 5F05H, 5F07H, 5F08H
osFree Macro Library
Video I/O	@SetMode @SetCurSz @SetCurPos @GetCur @SetPage @ScrollUp @ScrollDn @Scroll @GetChAtr @PutChAtr @PutCh @SetPalet @SetColor @SetDot @GetDot @WrtTTY @VideoState @GetMode @GetDisplay @GetVideoState @GetEGAInfo @Cls
Hardware info	@Equipment @MemSize
Serial I/O	@AuxInit @AuxSendChar @AuxRecieveChar @AuxStatus
Tape I/O	@TapeOn @TapeOff @TapeRead @TapeWrite
Keyboard I/O	@KbdStatus @CharIn @CharPeek
Printer I/O	@PrnPrint @PrnInit @PrnStatus
Disk I/O	@DskReset @DskStatus @DskRead @DskWrite @DskVerify @DskFormat
Date and Time	@SetTime @GetTime
Mouse	@MouInit @MouShowPointer @MouStatus @MouSetPos @MouSetMickey @MouRegion
Memory manager	@ModBlok SET_BLOCK
Family API
DOS	Process Manager	DosBeep DosExit DosSleep DosExecPgm
File Manager	DosChDir DosChgFilePtr DosClose DosDelete DosDupHandle DosMkDir DosMove DosQCurDir DosQCurDisk DosSetFileMode DosOpen DosQFileInfo DosRead DosQFileMode DosQFSInfo DosQVerify DosRmDir DosSelectDisk DosFindClose DosFindFirst DosFindNext DosSetFileInfo DosSetVerify DosWrite DosFileLocks DosSetFHandState DosNewSize DosBufReset DosQFHandState DosSetFSinfo DosShutdown
Memory Manager	DosFreeSeg DosSubAlloc DosSubFree DosSubSet DosAllocHuge DosAllocSeg DosReallocHuge DosReallocSeg DosGetHugeShift DosCreateCSAlias
NLS	DosCaseMap DosGetCtryInfo DosGetDBCSEv DosSetCtryCode DosGetCollate DosGetMessage DosInsMessage DosPutMessage
Date and Time	DosSetDateTime DosGetDateTime
Devices	DosDevConfig DosDevIOCtl DosDevIOCtl2
Signals	DosHoldSignal DosSetSigHandler
Misc	BadDynLink DosGetEnv DosGetMachineMode DosGetVersion DosError DosErrClass DosSetVec
KBD	KbdCharIn KbdFlushBuffer KbdGetStatus KbdSetStatus KbdStringIn KbdPeek
VIO	VioGetBuf VioGetConfig VioGetCurPos VioGetCurType VioGetPhysBuf VioReadCellStr VioReadCharStr VioScrollUp VioScrollDn VioScrollLf VioScrollRt VioScrUnLock VioSetCurPos VioSetCurType VioSetMode VioGetMode VioShowBuf VioWrtCellStr VioWrtCharStr VioWrtCharStrAtt VioWrtNAttr VioWrtNCell VioWrtNChar VioWrtTTY VioScrLock VioPopUp
Tools	BIND
Modules	DOSCALLS.DLL VIOCALLS.DLL KBDCALLS.DLL MSG.DLL
Libraries	API.LIB OS2386.LIB FAPI.LIB DOSCALLS.LIB SUBCALLS.LIB