Mail Archives: djgpp/1997/07/26/13:24:07
Shawn Hargreaves <Shawn AT talula DOT demon DOT co DOT uk> said:
>> As a more elegant solution, if you can send me suitable tables for a
>> Swedish keyboard and tell me how to detect when they should be used
>> (some DOS call, I suspect),
Here is a function to return the country-code. Sweden is 46...you'll
find them in your telephone directory:
char country_info[35];
int GetCountryCode (void)
{
if (_osmajor >= 3)
{
__dpmi_regs reg;
reg.d.edx = 0;
reg.x.ds = __tb / 16;
reg.d.eax = 0x3800;
__dpmi_int (0x21,®);
if (reg.x.flags & 1)
return 0;
dosmemget (__tb,sizeof(country_info),&country_info);
return reg.x.bx;
}
return -1;
}
>> Or even better, if anyone knows how to access the scancode->ascii
>> mapping being used by DOS itself, I'd really like to know about it!
Check out INT 15/4F which translates scancodes.
Gisle V.
- Raw text -