Hi Bernd,
>Any idea for a compressed COUNTRY.SYS file? Kernel decompression
>code
>overhead should be minimal.
>28KB uncompressed versus 5KB compressed is quite a difference, for
>bootdisks.
>I have no idea how all the NLS/country/codepage stuff works, except
>COUNTRY=031,858,C:\FDOS\BIN\COUNTRY.SYS
>and then we have
>NLSFUNC
>CHCP
>DISPLAY.SYS
>PRINTER.SYS
>ANSI.SYS
>KEYB
>MODE
>and maybe even more tools which modify settings. Very confusing (for
>me).Bernd
A codepage is a character set ("font") for your machine.
Divide tools in three types:
(a) Those that implement the national settings (that is the character you use for
thousand separators, etc) and codepages for the kernel (filename tables and such)
DISPLAY.SYS
Kernel's COUNTRY=
(b) Tools that implement the codepage support for the character devices:
DISPLAY.SYS
KEYB
PRINTER.SYS (not existing)
(c) Tools to configure the other stuff:
MODE
NLSFUNC (not existing)
CHCP
NOW:
- CHCP is an internal FreeCOM call to NLSFUNC.
- NLSFUNC is the toy that should play the master role to change the national setting
and codepages for the whole system. When everything is implemented, NLSFUNC is almost
the only configuration tool
(1) In order to save bytes to American users, codepage support and such is NOT
implemented by default in kernel and/or devices. That is why you need to load them:
COUNTRY=.... (to load kernel support)
DEVICE=DISPLAY (to load CON device codepage support)
KEYB (to load CON device codepage support)
DEVICE=PRINTER (to load PRN device codepage support)
(2) Once they support codepage awareness, you need to load the actual character table
data.
With COUNTRY=... you are loading some startup data for the kernel.
KEYB loads the data it needs by itself
You use MODE CON CP PREPARE= to load DATA for all the other devices (CON=DISPLAY.SYS,
PRN=PRINTER.SYS)
(3) Once data is prepared, you load NLSFUNC, the "master caller":
NLSFUNC
(4) Once loaded, then there is somebody listening to CHCP calls, and you can issue
FreeCOM's CHCP:
CHCP n
Calls NLSFUNC to replace codepage. What NLSFUNC does:
- changes kernel's codepage (it reads some data from COUNTRY.SYS)
- commands other devices (DISPLAY->KEYB, PRINTER, etc) to change their codepages
(5) What to do if there is no NLSFUNC: what we do, and MS have been doing by default
in Win9X: you *partly* change codepages for devices, instead of changing the codepages
for everybody:
MODE CON CP SEL=
This leaves the system in an inconsistent state, which is dangerous (specially if you
are using non-ASCII chars into your filenames), but it's the only thing we can do.
I hope this piece of message can be kept. Or better, refer to Matthias Paul's famous
141.txt:
http://www.freedos.org/freedos/news/technote/141.txt
which explains that longer and better.
Aitor
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel