Thread View: alt.msdos.programmer
5 messages
5 total messages
Started by Chris Bradley
Tue, 02 Jan 1990 04:06
Quick Screen Access in C
Author: Chris Bradley
Date: Tue, 02 Jan 1990 04:06
Date: Tue, 02 Jan 1990 04:06
8 lines
706 bytes
706 bytes
Greetings all,
I have a need to do quick access to the video screen (instead of loading
ANSI.SYS and using printf(''); commands for video cursor control.) I know that
QUICK Basic will absolutely scream with print's. Is there anything equivalent
in C? By the way, I'm using MSC 5.1.
-->Chris
Re: Quick Screen Access in C
Author: Dion Hollenbeck
Date: Tue, 02 Jan 1990 14:48
Date: Tue, 02 Jan 1990 14:48
18 lines
1217 bytes
1217 bytes
From article <3659@escargot.UUCP>, by chrisb@escargot.UUCP (Chris Bradley):
> Greetings all,
>
> I have a need to do quick access to the video screen (instead of loading
> ANSI.SYS and using printf(''); commands for video cursor control.)
>
If all you want is quick cursor control, why not use "int86" or "int86x"
(check the manual for which one is appropriate) to invoke the BIOS
INT 10H for video control. One of the functions will set the cursor
position for you with very little overhead. It is also portable to
any decent clone. Even if the video is real strange, the BIOS
interface will generally be compatible.
Dion Hollenbeck (619) 455-5590 x2814
Megatek Corporation, 9645 Scranton Road, San Diego, CA 92121
uunet!megatek!hollen or hollen@megatek.uucp
Re: Quick Screen Access in C
Author: Kaleb Keithley
Date: Tue, 02 Jan 1990 18:01
Date: Tue, 02 Jan 1990 18:01
49 lines
1860 bytes
1860 bytes
In article <3659@escargot.UUCP> chrisb@escargot.UUCP (Chris Bradley) writes:
>Greetings all,
>
>I have a need to do quick access to the video screen (instead of loading
>ANSI.SYS and using printf(''); commands for video cursor control.) I know that
>QUICK Basic will absolutely scream with print's. Is there anything equivalent
>in C? By the way, I'm using MSC 5.1.
>
>-->Chris
Well, it's definitely not portable, but it's faster than anything else around,
and you can test for hardware in order to make it more portable, but this is
what I did for some dedicated software...
struct char_attr {
char ch;
unsigned char attr;
};
struct Screen {
struct char_attr screen[25][80];
};
main()
{
int loop;
struct Screen far *screen = 0xB8000000;
for (loop = 0; loop < 25; loop++)
screen->screen[loop][loop].ch = 'A';
}
This code is not intended to be the finest example of coding around, but if it
gives you any ideas...
Note: b8000000 is the address for all color monitors, in text mode, I believe
in either 25, 43, and 50 row mode. for Herc mono, use 0xB0000000.
Have fun...
Chewey, get us outta here!
kaleb@mars.jpl.nasa.gov (818)354-8771
Kaleb Keithley
Re: Quick Screen Access in C
Author: Richard Sitze
Date: Fri, 05 Jan 1990 18:15
Date: Fri, 05 Jan 1990 18:15
16 lines
1083 bytes
1083 bytes
(I killed post-news just as I started to post, so I'm retrying this, sorry if you read this twice). In the overview section of the Library Reference manual (a handy section to have!), on page 65: Console and Port I/O I'm sure these routines use the BIOS calls to talk to the port. If you want anything faster, use the pointers mentioned by someone else... But if you have an older CGA (or other type of display) then watch out for a flakey screen with direct access to the memory. Also, poking to memory won't move the cursor... <ras>
Re: Quick Screen Access in C
Author: Charles Hannum
Date: Sat, 06 Jan 1990 19:42
Date: Sat, 06 Jan 1990 19:42
10 lines
1034 bytes
1034 bytes
... or you can get a copy of a high performance windowing system, like C-Scape (commercial) or the C Window BOSS (shareware), or one of many, many others. I will be distributing my own (portable!) windowing system some time this summer. Anyway, look around. Some of these are mighty fine packages, with advanced input functions, complete windowing functions, "smart" line drawing functions, and many other nice features. Some, like CXL, even have extended and expanded memory, and mouse functions. Anyway, there's a lot of software out there that will do what you want. Just look around.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads