Hello Bret (and the rest): On Fri, 11 Dec 2020 at 17:00, Bret Johnson <[email protected]> wrote:
> The interaction between the screen (Code Page) and Keyboard is pretty > critical so that everything is displayed correctly. In addition to > DISPLAY, DOS has other "utilities" like "CHCP", "MODE CON CODEPAGE > PREPARE", and "MODE CON CODEPAGE SELECT" to manipulate the screen and it > all must interact correctly with KEYB. In addition, many (if not all) of > the KEYB languages will work with two different screen Code Pages (a > primary and an alternate) and must know what the current Code Page is to > work correctly. There are even ways to manipulate the screen so you can > get 512 different characters instead of just 256. It can be VERY confusing > to set things up correctly, especially if you're using an "unusual" > language. > It is indeed very complex. Actually, you should avoid "MODE CON CODEPAGE SELECT", even if MS-DOS boot disk used this command. Using MODE CON CP SELECT leaves kernel and CON device (i.e. screen+keyboard) misaligned. I suppose Microsoft did so as they didn't want to get NLSFUNC to the bootdisk (NLSFUNC adds this codepage aware functionality to kernel). And because if you use COUNTRY=... in CONFIG.SYS, then you don't need NLSFUNC (it is very unlikely that you'll want to change the codepage) and thus the COUNTRY= and MODE CON CP SELECT works. They wouldn't care about printer's codepage :) The correct sequence would be: load the nls functionality: DISPLAY.SYS/.COM (in CONFIG.SYS for MS-DOS, in AUTOEXEC for FreeDOS) PRINTER.SYS (in CONFIG.SYS, MS-DOS only) NLSFUNC prepare all the devices for the codepages you want to use: COUNTRY= ... (in CONFIG.SYS) MODE <device> CP PREPARE=... MODE <device> CP PREPARE=... MODE <device> CP PREPARE=... ... And then, change the codepage everywhere at once with CHCP: CHCP 850 > And none of this even addresses what happens if you try to print something > to a printer since a printer "Code Page" doesn't necessarily match what's > on the screen. As long as you limit yourself to the first 128 ASCII codes > you usually don't have problems. > This would be PRINTER.SYS' job. I was tempted to write a PRINTER.SYS myself years ago, but I lack the information of which printer commands are needed to load/prepare a codepage (MODE CON CP) and how to select it. I guess this information is printer-specific, and I don't know if it is compiled somewhere (links are welcome :)). I think MS-DOS PRINTER.SYS will not work in FreeDOS (unless I missed something), as MODE xxx CP SELECT is only implemented to interact with FreeDOS' DISPLAY (and I am not sure of how FreeDOS NLSFUNC is implemented, whether it would do the GENIOCTL call for every character mode device. Best wishes, Aitor
_______________________________________________ Freedos-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/freedos-devel
