Keyboard help
Keyboard help
i've tried to program my keyboard driver ... it works fine in US layout i presume, but i'm from Portugal so i modified the code i?ve found to be able to work with my keyboard .. all ok except for symbols like ( ? , ?, ?, ? ,?) and accents ?`? ... i send the right code ( i think ..) but for these i only get a dummy space with white background. if anyone knows hot to fix this, please help ....
The keyboard driver works fine without these key but i would like to make it work from the beginning (maybe a bios problem .. i really don't know). Thanks.
Ribas
The keyboard driver works fine without these key but i would like to make it work from the beginning (maybe a bios problem .. i really don't know). Thanks.
Ribas
Re:Keyboard help
You cant just type in those characters in your char-table from windows.. Add these chars from a DOS editor or write the ASCII values by hand, like "a", 148, "bcde" etc....
All ASCII supported values can be found at: http://www.lookuptables.com/
If you need support for other characters you would have to implement UTF-8 or similar.
All ASCII supported values can be found at: http://www.lookuptables.com/
If you need support for other characters you would have to implement UTF-8 or similar.
Re:Keyboard help
As bubach said, those characters don't exist. They're a figment of Microsoft's imagination.
Make a new character set other than ASCII (which you're now using and in which they don't exist) and use that for printing. You might need graphical modes.
Make a new character set other than ASCII (which you're now using and in which they don't exist) and use that for printing. You might need graphical modes.
Re:Keyboard help
ok. i'm going to keep it this way just for testing .. anyway i want to go to svga mode and use bitmap fonts (i think this is possible), anyone knows where to find some info on bmp fonts, and how to switch to vga mode im pm mode??
thanks guys
thanks guys
Re:Keyboard help
But most of them does exist.. I think that even ? is implemented in newer BIOS's (by the loss of some other not as used char.)
For example:
For example:
Code: Select all
` = ASCII value 96 dec.
? = ASCII value 144 dec.
? = ASCII value 175 dec.
Re:Keyboard help
VGA modes can be switched to by registers.
SVGA modes are interfaced though the VESA standard and can be set by BIOS interrupt 0x10.
For that you will need code that can jump between 16- and 32-bit mode, or a VM86 monitor.
/ Christoffer
SVGA modes are interfaced though the VESA standard and can be set by BIOS interrupt 0x10.
For that you will need code that can jump between 16- and 32-bit mode, or a VM86 monitor.
/ Christoffer
Re:Keyboard help
thanks bubach .. now it prints the chars but i think i've to change the text mode cause all these chars change my text colour and background attributes ... i think i'm messing with some video memory.
Re:Keyboard help
ASCII is 7-bit and anything beyond 128 dec is not ASCII. Most definitely it also won't be the same values between computers in different countries (most of western europe+USA being main exception with Latin1), unless one agrees to use Unicode instead.bubach wrote: But most of them does exist.. I think that even ? is implemented in newer BIOS's (by the loss of some other not as used char.)
For example:Code: Select all
` = ASCII value 96 dec. ? = ASCII value 144 dec. ? = ASCII value 175 dec.
Re:Keyboard help
Hi,
I assumed that (even though ASCII is 7 bit) the standard IBM screen display codes are 8 bit and are used as the default for all text video modes and BIOS character fonts. I also thought DOS used to be able to change the default character set to support different languages (for e.g. "MODE device CP SELECT=yyy").
I was hoping to convert Unicode into screen display codes for any character that has a "close enough" equivelent. If screen display codes aren't standard then I'll need to create my own "standard" character data .
Cheers,
Brendan
Can someone confirm this?mystran wrote: ASCII is 7-bit and anything beyond 128 dec is not ASCII. Most definitely it also won't be the same values between computers in different countries (most of western europe+USA being main exception with Latin1), unless one agrees to use Unicode instead.
I assumed that (even though ASCII is 7 bit) the standard IBM screen display codes are 8 bit and are used as the default for all text video modes and BIOS character fonts. I also thought DOS used to be able to change the default character set to support different languages (for e.g. "MODE device CP SELECT=yyy").
I was hoping to convert Unicode into screen display codes for any character that has a "close enough" equivelent. If screen display codes aren't standard then I'll need to create my own "standard" character data .
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Keyboard help
Confirmed hereby. However, the limit is strictly speaking 127, whereas char 128 is not existant.Brendan wrote:Can someone confirm this?mystran wrote: ASCII is 7-bit and anything beyond 128 dec is not ASCII. Most definitely it also won't be the same values between computers in different countries (most of western europe+USA being main exception with Latin1), unless one agrees to use Unicode instead.
They load a new "font" for the upper 128 blocks to do so. Mode does not function without the codepages on disk somewhere.I assumed that (even though ASCII is 7 bit) the standard IBM screen display codes are 8 bit and are used as the default for all text video modes and BIOS character fonts. I also thought DOS used to be able to change the default character set to support different languages (for e.g. "MODE device CP SELECT=yyy").
No. You cannot squeeze more than a million characters in 256 (or 512) character spaces. You very much need graphical displays.I was hoping to convert Unicode into screen display codes for any character that has a "close enough" equivelent. If screen display codes aren't standard then I'll need to create my own "standard" character data .
Re:Keyboard help
Hi,
Would it display the same results on every computer (assuming the BIOS starts the boot sector in text mode)?
I'm not talking ASCII here, but "standard IBM screen display codes"...
For example, the Unicode strings "f?vrier", "M?rz" and "vas?rnap" (French "February", German "March" and Hungarian "Sunday" respectively) can hopefully all be represented with standard IBM screen display codes (or text video modes), even though it can't be done with strict ASCII.
Something like "Կիրակի" (Armenian "Sunday") or "日曜日" (Japanese "Sunday") would end up being "??????" or "???" because these characters can't be displayed.
Cheers,
Brendan
My original question was poorly worded. Specifically, if I had this code in a boot sector:Candy wrote:Confirmed hereby. However, the limit is strictly speaking 127, whereas char 128 is not existant.
Code: Select all
mov cx,128
mov al,128
mov ah,0x0F
mov es,0xB800
mov di,0
cld
.l1:
stosw
inc al
loop .l1
I'm not talking ASCII here, but "standard IBM screen display codes"...
Sure you can - you just end up with a lot of '?' characters .Candy wrote:No. You cannot squeeze more than a million characters in 256 (or 512) character spaces. You very much need graphical displays.I was hoping to convert Unicode into screen display codes for any character that has a "close enough" equivelent. If screen display codes aren't standard then I'll need to create my own "standard" character data .
For example, the Unicode strings "f?vrier", "M?rz" and "vas?rnap" (French "February", German "March" and Hungarian "Sunday" respectively) can hopefully all be represented with standard IBM screen display codes (or text video modes), even though it can't be done with strict ASCII.
Something like "Կիրակի" (Armenian "Sunday") or "日曜日" (Japanese "Sunday") would end up being "??????" or "???" because these characters can't be displayed.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Keyboard help
Why do I have the feeling that ???? ?? ???? ? ?? ?????? ???? ?????? is not going to help japanese people use your OS?
Re:Keyboard help
Hi,
There's also cases where languages are mixed - "The vistor said '????? ???? ????' before riding his horse into the night.".
Anyway, it's better than displaying '?' for anything that's not strict ASCII...
Cheers,
Brendan
You're right - there's many languages that can't be displayed in text mode regardless of what I do. Then there's many languages that will benefit from this in varying degrees (French, German, Hungarian, Greek, etc).Candy wrote: Why do I have the feeling that ???? ?? ???? ? ?? ?????? ???? ?????? is not going to help japanese people use your OS?
There's also cases where languages are mixed - "The vistor said '????? ???? ????' before riding his horse into the night.".
Anyway, it's better than displaying '?' for anything that's not strict ASCII...
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re:Keyboard help
Hmm.. From 127-255 is "Extended ASCII" which is the same on all computers I ever seen at bootup. It can be changed, but that is mostly done by the OS after bootup by changing the font.I'm not talking ASCII here, but "standard IBM screen display codes"...
- http://www.webopedia.com/TERM/E/extended_ASCII.html
Re:Keyboard help
Hi,
There's actually 31 more of them (from 0x01 to 0x1F) - for e.g. "mov [0x000B8000],0x0A" will give you a reversed circle, where in ASCII it's a control code (linefeed).
I've never seen a computer that doesn't have these characters either (not that I'd expect to find one in South Australia). I guess/hope that no-one has created any variations on this..
Cheers,
Brendan
That's them!bubach wrote:Hmm.. From 127-255 is "Extended ASCII" which is the same on all computers I ever seen at bootup. It can be changed, but that is mostly done by the OS after bootup by changing the font.I'm not talking ASCII here, but "standard IBM screen display codes"...
- http://www.webopedia.com/TERM/E/extended_ASCII.html
There's actually 31 more of them (from 0x01 to 0x1F) - for e.g. "mov [0x000B8000],0x0A" will give you a reversed circle, where in ASCII it's a control code (linefeed).
I've never seen a computer that doesn't have these characters either (not that I'd expect to find one in South Australia). I guess/hope that no-one has created any variations on this..
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.