login
Header Space

 
 

to ccurtis about text user interaface

May 22, 2008 - 11:25pm
Submitted by olecom on May 22, 2008 - 11:25pm.

> Would this make for a better links than elinks?

Run Borland Pascal 7.0 in dosbox to see what Turbo Vision was. Help system there is a nice browser, nither of today's lynx, links or elinks or whole www has. Pictures and flash are mostly spam, many don't know how to turn off.

dialog -> ncurses -> |stdout(ESC) -> tty -> vga_console |-> video RAM/frame buffer
(1)       (2)        (3)            (4)    (5)             (6)

Requesting ordinary dialog with standard placement of info and control elements. Whole chain of calls:

userspace

1. manual writing of windows, boxes, buttons specifying attributes, dimentions, open coded event loops, etc. linux-2.6/scripts/kconfig/lxdialog/*

2. translation of primitive calls of attribute change, cursor move, etc to ESC codes of a terminal. TERM=linux is one of many options

kernel

3. syscall write(tty, ESC, etc.)

4. looking on every byte (every single byte on 32bit or 64bit GHz CPU with all locks held!), doing switch() jumps based on every control character, reading further chars, generating parameters, calling console backend

5. making final representation, doing HW I/O

hardware

6. actual view

Now think of 6 as X server but for text user interface.

tui(ESC) -> /dev/console(ESC) -> video RAM/frame buffer+user input
(1)         (2)                  (3)

userspace

1. ask to show dialog box with $message and y/n choice in standard locations; dlg="\033\1\1message" ESC,DLG,FLAG,message

+----------------+
|    $message    |
|    $message    |
|                |
| [Yes]     [No] |
+----------------+

kernel

2. write(/dev/console, $dlg) syscall blocks until dialog has input

hardware

3. 8 or 16 bit processor creates from standard template (or uploaded skin/schema) dialog, writes message, waits for input, reports back by IRQ/MSI/poll whatever. (2) returns with code as result.

Maybe this can be built in the way comatible with IBM PC. (3) has keyboard and other input connected to it and acts as keyboard controller in "compatible mode". Didn't you know, that it is more important, than hich-tech CPU, e.g. CPU reset or legacy A20 pin ?-) If somebody thinks, that this is GPU, no it's not. This is a character-processing device side-by-side with rendering backends like GPU, RAMDAC, DVI, etc.

For all non-in-kernel emulators, like `xterm`, `putty` any such functionality is stupidly simple -- they are pure userspace appications. BUT, ncurses or any other "tui" library has no clue about such things and UNIX/POSIX "controlling tty" concept with all that useless signal-generating legacy are showstoppers. Here's fundamental design problem. But hey, i can live with task list and manual `kill` on other virtual consoles to send signals! See, no need of tty at all.

Turbo Vision was OOP! library writen for DOS and i8086!. Thus, porting it on UNIX sounds wired and is actually wired. Porting it on (3) -- yes!

System programming is plain text most of the time, unless in game consoles.
____

Reply

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <quote> <pre> <hr> <br> <p> <img> <blockquote> <font> <tt> <table> <tr> <i>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

speck-geostationary