Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Terminal Memory access w/o ncurses

Status
Not open for further replies.

Netherwolf

Programmer
Nov 13, 2002
7
US
I need to do direct memory reads and writes to the text memory in a terminal. This is a hobby project and I've opted not to use ncurses. I remember doing direct memory writes back in the DOS days, getting and setting memory from the 0xB8000 block, and I figured there had to be something similar in the linux terminal. Of course, I could be wrong, but I'm very curious to see.
I am using C/C++.
 
Hi

As far as I know, there is no way. And I would say, there is no way neither in other multitasking operating systems.

However you can do simple things with ANSI escape sequences. See [tt]man 5 terminfo[/tt], [tt]man 5 termcap[/tt], [tt]man 1 tput[/tt] for details.

But better ask this in forum208.


Feherke.
 
I agree with Feherke that there isn't a direct way to do this in Linux like there was in DOS. The problem you face is that Linux runs in protected kernel space, of which the display is part of. Consequently, you won't have access to low level BIOS stuff, even if it is still supported by the hardware.

What might be of interest to you, though, is the Linux Device Drivers book, which is available for free download from O'Reilly Open Books. It will show you how to create basic device drivers in Linux, how to insert them into the kernel, and run them. This would be the closet equivalent to the old DOS days. One thing about Linux is that it will let you create custom functions for the kernel, like drivers, you just need to learn how to follow its conventions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top