Announcement

Collapse
No announcement yet.

PB35 : codepage and keyboard

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • PB35 : codepage and keyboard

    Hello All,

    Is there a way to interrogate the DOS, adding code in a PB 3.5 program, to acquire the codepage and the keyboard nationality in use by DOS ?

    I thought to launch the external command "Keyb" (from my program, opening a shell), but it's not elegant.. ..moreover the DosBox's keyb gives me the code page but does not give me back the nationality of the keyboard.

    thanks

  • #2
    Hello Marcello,

    Codepage can be retrieved using this code:

    Code:
    Reg 1,&H6601
    Call Interrupt &H21
    ErrorCode&=REG(1)
    ActiveCP&=REG(2)
    SystemCP&=REG(4)
    (untested code, my PB 3.5 disks are buried somewhere at home...

    Source: https://stanislavs.org/helppc/int_21-66.html

    Not sure if it is possible to get the keyboard layout (IT, DE, FR...) by calling an interrupt: I have not found such feature in the interrupts list. Maybe you could simply read the autoexec.bat file, searching for the KEYB command as an alternative solution?
    Julien Tosoni - Goodyear France

    Comment


    • #3
      Thanks a lot for your answer, Julien


      Comment

      Working...
      X