I am trying to complete the console driver, but I do not have enough information about consle. for example what should the console have, so that it can run most of console program, also complex console programs.
another questions, could I make console display others langauge,which have others than latin character like arabic, chinese?
my current console driver only can display alphabet.
Common Console Question
Re:Common Console Question
You are talking two sets of features here.amirsadig wrote: for example what should the console have, so that it can run most of console program, also complex console programs.
One, what underlying features do those "complex console programs" (e.g. vim) rely upon. The answer is, most (not all) of them rely on a library called "ncurses" - as well as on various other features unrelated to your console. Even if your console would provide all the required features to support ncurses, you would still have to port ncurses to your console.
Two, what are those features that ncurses requires? For that you'd best refer to the ncurses homepage, http://www.gnu.org/software/ncurses/.
If you mean "console" as in bare-bones I-poke-0xb8000 functionality, then no. Your BIOS is not prepared to display arabic or chinese characters.another questions, could I make console display others langauge,which have others than latin character like arabic, chinese?
But it is certainly possible to implement support for such.
Every good solution is obvious once you've found it.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Common Console Question
http://www.gnu.org/directory/libs/ncurses.html
ncurses looks to have moved within gnu.org ...
However, i doubt the 'fixed-length' of characters will produce a nice output anyway, so i'd say 'leave exotic languages for the GUI-equipped version'.
ncurses looks to have moved within gnu.org ...
Your VGA card has the ability to reprogram characters, and may use two distinct character sets (toggled by the highest 'attr' bit), so you could decide to map chinese unicode strings to a collection of reprogrammed characters that will appear as a chinese glyph.arabic, chinese, etc
However, i doubt the 'fixed-length' of characters will produce a nice output anyway, so i'd say 'leave exotic languages for the GUI-equipped version'.
Re:Common Console Question
I know that most console program rely on ncurses. but ncurses should use resources from OS, which should provide it, so that complex console run.One, what underlying features do those "complex console programs" (e.g. vim) rely upon. The answer is, most (not all) of them rely on a library called "ncurses" - as well as on various other features unrelated to your console.
I want late to write a library which let program uses my console and keyboard. ncurses need a lot of time to port than write a library do what I want to programs, but still those program need complex console operations.
what console should provide to let such program or to write a library which uses it?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Common Console Question
most support for ANSI stuff ... They also have 'raw input mode' for delivering each keystroke to the reader without waiting for a 'end of line'. Get a look at <linux/tty.h> (posix) and you'll see how many ugly modes exists to echo characters, force uppercase and things alike ...
There are also 'special' characters like VREPRINT, VERASE, VKILL, etc which provide basic control. There's also set_termios, which appears to be used when terminal is 'resized', etc ...
There are also 'special' characters like VREPRINT, VERASE, VKILL, etc which provide basic control. There's also set_termios, which appears to be used when terminal is 'resized', etc ...
Re:Common Console Question
Still not sure I understand you correctly.
Sure you could claim that porting ncurses would be too much work, and write your own library. However, you basically have only four choices:
* take pains porting ncurses (as sole or additional console lib);
* take pains porting ncurses-using tools to your library, one at a time;
* hope that someone else ports ncurses to your library;
* forget about getting ncurses-using tools to your OS.
All four are valid design decisions. Just make sure you know what you're doing.
If you want to know what ncurses requires to run on your console, well, you should look it up in the ncurses sources / docs.
If you want to know what ncurses-using tools require to be ported to your console, still, the ncurses docs / sources are the starting point.
If you want to know what a good console library of your own should provide... well, I'd still have a look at the ncurses lib, and decide what's good and what's legacy.
Sure you could claim that porting ncurses would be too much work, and write your own library. However, you basically have only four choices:
* take pains porting ncurses (as sole or additional console lib);
* take pains porting ncurses-using tools to your library, one at a time;
* hope that someone else ports ncurses to your library;
* forget about getting ncurses-using tools to your OS.
All four are valid design decisions. Just make sure you know what you're doing.
If you want to know what ncurses requires to run on your console, well, you should look it up in the ncurses sources / docs.
If you want to know what ncurses-using tools require to be ported to your console, still, the ncurses docs / sources are the starting point.
If you want to know what a good console library of your own should provide... well, I'd still have a look at the ncurses lib, and decide what's good and what's legacy.
Every good solution is obvious once you've found it.