Latin_o2i

Post here questions, problems and suggestions in English language
  • Interesting approach. And your font + routine is quite small, kudos!
    Tried to use the routine in IRCC (IRC client) and noted that your procedure destroys registers, unlike mcall 4
    Placing a pusha/popa around 'call prl' fixed the problems offcourse.

    I'm not really waiting for 'a new language' but you seem to know your stuff. I'm curious.

    PS: The actual printing of western text in IRCC failed because the built in UTF8 routine recodes to CP866 instead of 1252 :(
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • hidnplayr wrote:your procedure destroys registers, unlike mcall 4
    Sorry ..I fixed it. I added a surrounding pusha/popa to the routine and updated the file.
    hidnplayr wrote: printing of western text in IRCC fails because the built in UTF8 routine recodes to CP866 instead of 1252 :(
    I can improve Latin_o2i to accept and print utf8 for both CP866 (Russian) and CP1252 (Latin).
    Utf8, deadkeys, KB layouts, ... What shall i do first? :?:
    Greetings from Seppe
  • It's alive!
    Attachments
    kolibrios.png
    kolibrios.png (3.33 KiB)
    Viewed 4510 times
    "Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius -- and a lot of courage -- to move in the opposite direction." Albert Einstein
  • Bravo! Well done. :wink:
    Now I will add a function to Latin_o2i to handle dead codes.
    Soon to come . . .
    Greetings from Seppe
  • I present a second version of the "latin_o2i" routine in which I added deadkey handling.
    To get a key, call the "latin" routine with eax=2 instead of the syscall 2 function.
    An additional parameter (ebx) must point to a 12 byte structure (three 32-bit variables).
    On return, eax contains the same result as the syscall 2 function, and the variables contain:
    var 1 returns the ascii code, or 0 for deadkey, 1 if the controlkey is down, 2 for hotkey
    var 2 contains the control key flags (see syscall 66,3).
    var 3 is used by the latin routine to store the ascii code of the pending dead-key.
    Please look at the "PrintLatin.asm" example application to understand the simplicity of it all.
    PrintLatin version 2
    PrintLatin.jpg (8.35 KiB)
    PrintLatin version 2 Viewed 4467 times
    Notes:

    - the routine works for all countries that use the Western Latin font for keyboard symbols. :D
    - keyboard mode should be set to normal (the default)
    - I did not (yet) test hotkeys

    The latin routine applies simple "Typewriter" rules:
    A dead-key that does not match a valid combination is lost.
    To print a deadkey by itself, it must be pressed twice.

    Use the AltNumkey method to enter any ascii code :D (see http://symbolcodes.tlt.psu.edu/accents/codealt.html for details)

    I intent to make an application similar to Zkey for Latin keyboards.
    I intent to make a map for Spanish keyboard, . . .
    I will post a new topic on "printable keycodes".
    On positive feedback, I'll publish a Fasm version of the latin_o2i routine.
    Attachments
    PrintLatin.asm (5.59 KiB)
    Example application to demonstrate Latin°o2i (Fasm source)
    Downloaded 220 times
    PrintLatin (4.43 KiB)
    example application to demonstrate Latin_o2i (executable)
    Downloaded 237 times
    Latin_o2i (3.99 KiB)
    File with object to include
    Downloaded 234 times
    Greetings from Seppe
  • Who is online

    Users browsing this forum: No registered users and 6 guests