[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] Help: C code ...
On Mon, Nov 15, 1999 at 08:39:15PM +0530, Mahamood Hussain wrote:
> I'm building a Full Screen text editor for LINUX (More as a prog
> exercise than anything else) and need to know the following :
Since Linux has a lot of good text editors, you may want to consider
writing something that might be useful to others.
>
> [1] How do I colorise the screen, with DOS it was easy: all I had
> to do was directly access video mem and set the bits.
Look for ncurses.
>
> [2] How do I move the cursor to any position on the screen?
>
Same as [1]
> [3] How do I get input from the kbd; getchar() echoes the char
> to the terminal (Something I don't want) and with extended keys, it looks
> ugly (^[[[A for F1 for example).
>
http://www.eskimo.com/~scs/C-faq/q19.1.html
> [4] Can I directly access vid mem. I tried using the same code
> I had used for DOS (declare ptr to vid mem), but core dumped during
> execution.
No, you can't. Linux is a multiuser OS and all access to physical memory
is protected. You can do it, if you can read/mmap /dev/mem, like the
X server does it. But you'll have to run as root.
-Arun
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.