Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:docs:dos:api:int21:38:01 [2021/03/23 03:20] – created prokushev | en:docs:dos:api:int21:38:01 [2024/05/02 06:54] (current) – prokushev | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | --DOS 3.0+-- | + | {{page> |
- | | + | |
+ | ====== 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 = 01h thru 0FEh for specific country with code <255 (see #01400) | ||
AL = 0FFh for specific country with code >= 255 | AL = 0FFh for specific country with code >= 255 | ||
BX = 16-bit country code (see #01400) | BX = 16-bit country code (see #01400) | ||
DS:DX -> buffer for returned info (see #01399) | DS:DX -> buffer for returned info (see #01399) | ||
- | Return: CF set on error | + | 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: | ||
+ | |||
+ | | ||
AX = error code (02h) | AX = error code (02h) | ||
CF clear if successful | CF clear if successful | ||
Line 11: | Line 40: | ||
BX = country code | BX = country code | ||
DS:DX buffer filled | DS:DX buffer filled | ||
- | Note: this function is not supported by the Borland DPMI host, but no error | + | |
- | | + | Set: |
- | | + | |
- | | + | CF set on error |
- | SeeAlso: AH=65h,INT 10/ | + | AX = error code (see #01680 at AH=59h/ |
+ | 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/ | ||
Format of DOS 2.00-2.10 country info: | Format of DOS 2.00-2.10 country info: | ||
- | Offset | + | |
- | | + | ^ Offset |
- | 1 = Europe dd mm yy | + | | 00h | WORD | date format |
- | 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 |
- | 08h 24 BYTEs | + | |
Format of DOS 2.11+ country info: | Format of DOS 2.11+ country info: | ||
- | Offset | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | 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 | ||
- | | ||
- | | ||
- | bit 0 = 0 if 12-hour clock | ||
- | 1 if 24-hour clock | ||
- | | ||
- | (FAR CALL, AL = character to map to upper case [>= 80h]) | ||
- | | ||
- | 18h 10 BYTEs | ||
- | (Table 01400) | + | ^ Offset ^ Size ^ Description ^ |
+ | | 00h | WORD | date format | ||
+ | | 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: | Values for country code: | ||
- | 001h (1) | + | |
- | 002h (2) | + | | 001h (1) |
- | 003h (3) | + | | 002h (2) |
- | 004h (4) | + | | 003h (3) |
- | 007h (7) | + | | 004h (4) |
- | 014h (20) Egypt | + | | 007h (7) |
- | 01Bh (27) South Africa | + | | 014h (20) | Egypt | |
- | 01Eh (30) Greece | + | | 01Bh (27) | South Africa |
- | 01Fh (31) Netherlands | + | | 01Eh (30) | Greece |
- | 020h (32) Belgium | + | | 01Fh (31) | Netherlands |
- | 021h (33) France | + | | 020h (32) | Belgium |
- | 022h (34) Spain | + | | 021h (33) | France |
- | 023h (35) Bulgaria??? | + | | 022h (34) | Spain | |
- | 024h (36) Hungary (not supported by DR DOS 5.0) | + | | 023h (35) | Bulgaria??? |
- | 026h (38) Yugoslavia (not supported by DR DOS 5.0) -- obsolete | + | | 024h (36) | Hungary (not supported by DR DOS 5.0) | |
- | 027h (39) Italy / San Marino / Vatican City | + | | 026h (38) | Yugoslavia (not supported by DR DOS 5.0) -- obsolete |
- | 028h (40) Romania | + | | 027h (39) | Italy / San Marino / Vatican City | |
- | 029h (41) Switzerland / Liechtenstein | + | | 028h (40) | Romania |
- | 02Ah (42) Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0) | + | | 029h (41) | Switzerland / Liechtenstein |
- | 02Bh (43) Austria (DR DOS 5.0) | + | | 02Ah (42) | Czechoslovakia / Tjekia / Slovakia (not supported by DR DOS 5.0) | |
- | 02Ch (44) United Kingdom | + | | 02Bh (43) | Austria (DR DOS 5.0) | |
- | 02Dh (45) Denmark | + | | 02Ch (44) | United Kingdom |
- | 02Eh (46) Sweden | + | | 02Dh (45) | Denmark |
- | 02Fh (47) Norway | + | | 02Eh (46) | Sweden |
- | 030h (48) Poland (not supported by DR DOS 5.0) | + | | 02Fh (47) | Norway |
- | 031h (49) Germany | + | | 030h (48) | Poland (not supported by DR DOS 5.0) | |
- | 033h (51) Peru | + | | 031h (49) | Germany |
- | 034h (52) Mexico | + | | 033h (51) | Peru | |
- | 035h (53) Cuba | + | | 034h (52) | Mexico |
- | 036h (54) Argentina | + | | 035h (53) | Cuba | |
- | 037h (55) Brazil (not supported by DR DOS 5.0) | + | | 036h (54) | Argentina |
- | 038h (56) Chile | + | | 037h (55) | Brazil (not supported by DR DOS 5.0) | |
- | 039h (57) Columbia | + | | 038h (56) | Chile | |
- | 03Ah (58) Venezuela | + | | 039h (57) | Columbia |
- | 03Ch (60) Malaysia | + | | 03Ah (58) | Venezuela |
- | 03Dh (61) International English / Australia | + | | 03Ch (60) | Malaysia |
- | 03Eh (62) Indonesia / East Timor | + | | 03Dh (61) | International English / Australia |
- | 03Fh (63) Philippines | + | | 03Eh (62) | Indonesia / East Timor | |
- | 040h (64) New Zealand | + | | 03Fh (63) | Philippines |
- | 041h (65) Singapore | + | | 040h (64) | New Zealand |
- | 042h (66) Thailand (or Taiwan??? | + | | 041h (65) | Singapore |
- | 051h (81) Japan (DR DOS 5.0, MS-DOS 5.0+) | + | | 042h (66) | Thailand (or Taiwan??? |
- | 052h (82) South Korea (DR DOS 5.0) | + | | 051h (81) | Japan (DR DOS 5.0, MS-DOS 5.0+) | |
- | 054h (84) Vietnam | + | | 052h (82) | South Korea (DR DOS 5.0) | |
- | 056h (86) China (MS-DOS 5.0+) | + | | 054h (84) | Vietnam |
- | 058h (88) Taiwan (MS-DOS 5.0+) | + | | 056h (86) | China (MS-DOS 5.0+) | |
- | 05Ah (90) Turkey (MS-DOS 5.0+) | + | | 058h (88) | Taiwan (MS-DOS 5.0+) | |
- | 05Bh (91) India | + | | 05Ah (90) | Turkey (MS-DOS 5.0+) | |
- | 05Ch (92) Pakistan | + | | 05Bh (91) | India | |
- | 05Dh (93) Afghanistan | + | | 05Ch (92) | Pakistan |
- | 05Eh (94) Sri Lanka | + | | 05Dh (93) | Afghanistan |
- | 062h (98) Iran | + | | 05Eh (94) | Sri Lanka | |
- | 063h (99) Asia (English) | + | | 062h (98) | Iran | |
- | 066h (102) | + | | 063h (99) | Asia (English) |
- | 070h (112) | + | | 066h (102) |
- | 0C8h (200) | + | | 070h (112) |
- | | + | | 0C8h (200) |
- | 0D4h (212) | + | | 0D4h (212) |
- | 0D5h (213) | + | | 0D5h (213) |
- | 0D8h (216) | + | | 0D8h (216) |
- | 0DAh (218) | + | | 0DAh (218) |
- | 0DCh (220) | + | | 0DCh (220) |
- | 0DDh (221) | + | | 0DDh (221) |
- | 0DEh (222) | + | | 0DEh (222) |
- | 0DFh (223) | + | | 0DFh (223) |
- | 0E0h (224) | + | | 0E0h (224) |
- | 0E1h (225) | + | | 0E1h (225) |
- | 0E2h (226) | + | | 0E2h (226) |
- | 0E3h (227) | + | | 0E3h (227) |
- | 0E4h (228) | + | | 0E4h (228) |
- | 0E5h (229) | + | | 0E5h (229) |
- | 0E6h (230) | + | | 0E6h (230) |
- | 0E7h (231) | + | | 0E7h (231) |
- | 0E8h (232) | + | | 0E8h (232) |
- | 0E9h (233) | + | | 0E9h (233) |
- | 0EAh (234) | + | | 0EAh (234) |
- | 0EBh (235) | + | | 0EBh (235) |
- | 0ECh (236) | + | | 0ECh (236) |
- | 0EDh (237) | + | | 0EDh (237) |
- | 0EEh (238) | + | | 0EEh (238) |
- | 0EFh (239) | + | | 0EFh (239) |
- | 0F0h (240) | + | | 0F0h (240) |
- | 0F1h (241) | + | | 0F1h (241) |
- | 0F2h (242) | + | | 0F2h (242) |
- | 0F3h (243) | + | | 0F3h (243) |
- | 0F4h (244) | + | | 0F4h (244) |
- | 0F5h (245) | + | | 0F5h (245) |
- | 0F6h (246) | + | | 0F6h (246) |
- | 0F7h (247) | + | | 0F7h (247) |
- | 0F8h (248) | + | | 0F8h (248) |
- | 0F9h (249) | + | | 0F9h (249) |
- | 0FAh (250) | + | | 0FAh (250) |
- | 0FBh (251) | + | | 0FBh (251) |
- | 0FCh (252) | + | | 0FCh (252) |
- | 0FDh (253) | + | | 0FDh (253) |
- | 0FEh (254) | + | | 0FEh (254) |
- | 0FFh (255) | + | | 0FFh (255) |
- | 100h (256) | + | | 100h (256) |
- | 101h (257) | + | | 101h (257) |
- | 103h (259) | + | | 103h (259) |
- | 104h (260) | + | | 104h (260) |
- | 105h (261) | + | | 105h (261) |
- | 106h (262) | + | | 106h (262) |
- | 107h (263) | + | | 107h (263) |
- | 108h (264) | + | | 108h (264) |
- | 109h (265) | + | | 109h (265) |
- | 10Ah (266) | + | | 10Ah (266) |
- | 10Bh (267) | + | | 10Bh (267) |
- | 10Ch (268) | + | | 10Ch (268) |
- | 10Dh (269) | + | | 10Dh (269) |
- | 10Eh (270) | + | | 10Eh (270) |
- | 122h (290) | + | | 122h (290) |
- | 129h (297) | + | | 129h (297) |
- | 12Ah (298) | + | | 12Ah (298) |
- | 12Bh (299) | + | | 12Bh (299) |
- | 15Eh (350) | + | | 15Eh (350) |
- | 15Fh (351) | + | | 15Fh (351) |
- | 160h (352) | + | | 160h (352) |
- | 161h (353) | + | | 161h (353) |
- | 162h (354) | + | | 162h (354) |
- | 163h (355) | + | | 163h (355) |
- | 164h (356) | + | | 164h (356) |
- | 165h (357) | + | | 165h (357) |
- | 166h (358) | + | | 166h (358) |
- | 167h (359) | + | | 167h (359) |
- | 172h (370) | + | | 172h (370) |
- | 173h (371) | + | | 173h (371) |
- | 174h (372) | + | | 174h (372) |
- | 175h (373) | + | | 175h (373) |
- | 177h (375) | + | | 177h (375) |
- | 17Ch (380) | + | | 17Ch (380) |
- | 17Dh (381) | + | | 17Dh (381) |
- | 180h (384) | + | | 180h (384) |
- | 181h (385) | + | | 181h (385) |
- | 182h (386) | + | | 182h (386) |
- | 183h (387) | + | | 183h (387) |
- | 184h (388) | + | | 184h (388) |
- | | + | | 185h (389) |
- | 185h (389) | + | | 1A5h (421) |
- | 1A5h (421) | + | | 1A6h (422) |
- | 1A6h (422) | + | | 1F4h (500) |
- | | + | | 1F5h (501) |
- | 1F4h (500) | + | | 1F6h (502) |
- | 1F5h (501) | + | | 1F7h (503) |
- | 1F6h (502) | + | | 1F8h (504) |
- | 1F7h (503) | + | | 1F9h (505) |
- | 1F8h (504) | + | | 1FAh (506) |
- | 1F9h (505) | + | | 1FBh (507) |
- | 1FAh (506) | + | | 1FCh (508) |
- | 1FBh (507) | + | | 1FDh (509) |
- | 1FCh (508) | + | | 24Eh (590) |
- | 1FDh (509) | + | | 24Fh (591) |
- | 24Eh (590) | + | | 250h (592) |
- | 24Fh (591) | + | | 251h (593) |
- | 250h (592) | + | | 252h (594) | French |
- | 251h (593) | + | | 253h (595) |
- | 252h (594) rench Guiana | + | | 254h (596) |
- | 253h (595) | + | | 255h (597) |
- | 254h (596) | + | | 256h (598) |
- | 255h (597) | + | | 257h (599) |
- | 256h (598) | + | | 29Ah (666) |
- | 257h (599) | + | | 29Bh (667) |
- | 29Ah (666) | + | | 29Ch (668) |
- | 29Bh (667) | + | | 29Eh (670) |
- | 29Ch (668) | + | | 29Fh (671) |
- | 29Eh (670) | + | | 2A0h (672) |
- | 29Fh (671) | + | | 2A1h (673) |
- | 2A0h (672) | + | | 2A2h (674) |
- | 2A1h (673) | + | | 2A3h (675) |
- | 2A2h (674) | + | | 2A4h (676) |
- | 2A3h (675) | + | | 2A5h (677) |
- | 2A4h (676) | + | | 2A6h (678) |
- | 2A5h (677) | + | | 2A7h (679) |
- | 2A6h (678) | + | | 2A8h (680) |
- | 2A7h (679) | + | | 2A9h (681) |
- | 2A8h (680) | + | | 2AAh (682) |
- | 2A9h (681) | + | | 2ABh (683) |
- | 2AAh (682) | + | | 2ACh (684) |
- | 2ABh (683) | + | | 2ADh (685) |
- | 2ACh (684) | + | | 2AEh (686) |
- | 2ADh (685) | + | | 2AFh (687) |
- | 2AEh (686) | + | | 2B0h (688) |
- | 2AFh (687) | + | | 2B1h (689) |
- | 2B0h (688) | + | | 2B2h (690) |
- | 2B1h (689) | + | | 2B3h (691) |
- | 2B2h (690) | + | | 2B4h (692) |
- | 2B3h (691) | + | | 2C7h (711) |
- | 2B4h (692) | + | | 311h (785) |
- | 2C7h (711) | + | | 324h (804) |
- | 311h (785) | + | | 329h (809) |
- | 324h (804) | + | | 352h (850) |
- | 329h (809) | + | | 354h (852) |
- | | + | | 355h (853) |
- | | + | | 357h (855) |
- | | + | | 358h (856) |
- | | + | | 370h (880) |
- | 352h (850) | + | | 376h (886) |
- | 354h (852) | + | | 3C0h (960) |
- | 355h (853) | + | | 3C1h (961) |
- | 357h (855) | + | | 3C2h (962) |
- | 358h (856) | + | | 3C3h (963) |
- | 370h (880) | + | | 3C4h (964) |
- | 376h (886) | + | | 3C5h (965) |
- | 3C0h (960) | + | | 3C6h (966) |
- | 3C1h (961) | + | | 3C7h (967) |
- | 3C2h (962) | + | | 3C8h (968) |
- | 3C3h (963) | + | | 3C9h (969) |
- | 3C4h (964) | + | | 3CBh (971) |
- | 3C5h (965) | + | | 3CCh (972) |
- | 3C6h (966) | + | | 3CDh (973) |
- | 3C7h (967) | + | | 3CEh (974) |
- | 3C8h (968) | + | | 3CFh (975) |
- | 3C9h (969) | + | | 3D0h (976) |
- | 3CBh (971) | + | | 3D1h (977) |
- | 3CCh (972) | + | | 3E3h (995) |
- | 3CDh (973) | + | | |
- | 3CEh (974) | + | | |
- | 3CFh (975) | + | | |
- | 3D0h (976) | + | | |
- | 3D1h (977) | + | | |
- | 3E3h (995) | + | | |
- | (10xxx) | + | | |
- | (11xxx) | + | | |
- | (12xxx) | + | | |
- | (1xxxx) | + | | |
- | (20xxx) | + | | |
- | (21xxx) | + | |
- | (22xxx) | + | |
- | (2xxxx) | + | |
- | (30xxx) | + | |
- | (31xxx) | + | |
- | (32000+) | + | |
Note: not all country codes are supported by all versions of DOS | Note: not all country codes are supported by all versions of DOS | ||
- | --------D-2138--DXFFFF----------------------- | + | |
- | INT 21 - DOS 3.0+ - SET COUNTRY CODE | + | ===== See also ===== |
- | AH = 38h | + | |
- | DX = FFFFh | + | AH=[[en: |
- | AL = 01h thru FEh for specific country with code <255 | + | |
- | AL = FFh for specific country with code >= 255 | + | ===== Note ===== |
- | | + | |
- | Return: CF set on error | + | Text based on [[http:// |
- | AX = error code (see #01680 at AH=59h/BX=0000h) | + | |
- | CF clear if successful | + | {{page> |
- | Note: not supported by OS/2 | + | |
- | SeeAlso: INT 2F/AX=1403h | + | {{page> |
+ |