Hi Bernd, Briefly in DOS, both kernel and character device drivers are (or should be) codepage aware. - Kernel because of the collation tables, used for example to turn filenames into the uppercase, and so store them uppercased in the FAT - Character devices, because sending out a character to a character device should be codepage independent. Thus, each character device should know how to "write" certain byte of certain codepage. This all is controlled using character device's IOCTL call
This all is broadly not used in the US, thus it is mostly "loadable", in the sense that it isn't loaded by default kernel and character devices, and should be loaded as extensions. Finally, a kernel interrupt controls the codepage change (21h/6602h) in the system as a whole: changes the collation table and the character devices (issuing IOCTL's) globally. 2011/6/29 Bernd Blaauw <bbla...@home.nl>: > This involves the following: > * COUNTRY= (config.sys, COUNTRY.SYS / COUNTRY2.SYS / COUNTRY3.SYS) Set the initial collation table (data is retrieved from the specified file) > * DISPLAY (a TSR by Aitor, versus device driver in MSDOS) CON extension: should control both keyboard and screen. To change screen's codepage, uses int9h. To change keyboard's codepage, calls KEYB (int 2Fh / AD81h) DISPLAY itself has a int 2Fh / AD00h backdoor, that can do all the IOCTL stuff: - MS-DISPLAY is a regular DOS device driver that overrides system CON (provides IOCTL to DOS' CON device) - FD-DISPLAY is a TSR, implements only the 2Fh / AD00h backdoor > * NLSFUNC (with optional COUNTRY support, but only if not listed in > config.sys yet?) Implements the logic behind 21h/6602h to change the codepage globally. > * MODE versus MODECON versus different configurations whether or not > COUNTRY= is set? MODE CON CP or MODE xxx CP is the DOS standard way to call IOCTL on the device xxx. Thus, could be used to change the codepage of the device xxx, but also for some other codepage aware functionality, such as loading codepage tables, etc. As FreeDOS DISPLAY is not a true device driver, for CON it must issue the 2Fh / AD00h backdoor, and thus MODECON was created. This functionality was included into FD MODE, thus MODECON is deprecated and must no longer be used. MODE xxx CP PREPARE is the way to load a codepage from certain CPI/CPX file (using IOCTL write from device xxx, or int 2Fh / AD00h for FD-DISPLAY) MODE xxx CP SELECT is the not recommended way to change the codepage for device xxx (using generic IOCTL from device xxx, or int 2Fh / AD00h for FD-DISPLAY). It leaves the system inconsistent: codepage should be changed for kernel and ALL the devices at the same time (21h/6602h), in other words, CHCP. > * CHCP (internal command to FreeCOM) A simple call to 21h/6602h. > * KEYB (and CPI/CPX files) The keyboard part of the CON extension. It really makes BIOS be codepage aware on keyboards. You miss PRINTER.SYS (if we had any), which would be the PRN extension. I haven't ever seen extensions to COMx devices, but I guess they should be (if they exist) device-dependent. > * EDIT 0.9a prints its version and DFLAT banner at every invocation. in the background. If it causes problems, I have annotated to create a switch to turn it off. Aitor ------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2 _______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel