From: drew@juliet.cs.colorado.edu (Drew Eckhardt) Subject: Re: Graphics library and mouse support in GCC ? Date: 28 Jul 1992 03:00:54 GMT
In article <bibhas.712287107@femto.engr.mun.ca> bibhas@pico.engr.mun.ca (Bibhas Bhattacharya) writes:
>I will be very much interested to know the graphics library and mouse
>support with GCC. What could be the equivalent of the QUICK C interrupt
A vgalib is available from the FTP sites that supports VGA/SVGA graphics under
Linux. You can also use X (if you have suitable hardware) and any of the
X libraries. MGR is available too.
As far as mouse support, one of the windowing systems will handle that for
you, otherwise your on your own. The code in the selection package, or
MGR will show you how to digest the packets from the mouse.
>caller function int86() and others.
There is none. The DOS/BIOS model is completely different from the Unix
paradigm. All system calls are interfaced by name through library
routines. You want to write to a device, call write(2). You want to do
non-blocking I/O, use select(2). Anything in section 2 of the manual is a
syscall, and is analogous to DOS/BIOS intXX's.
If you were persistant, you could bypass the library interface and
use the native syscall mechanism, but this would be messy and non
portable.
Every Unix understands read(), nobody else will understand the int 0x80
Linux uses for the syscall interface, or the call gates that other i386
Unices may use.
You cannot call BIOS routines from protected mode, and without DOS running,
you can't make any DOS calls.
If you want to program under Linux, the GCC libraries are ANSI C, plus
a standard Unix unistd lib that is a hybrid of BSD/SYSV/POSIX. Libc, libm,
and friends will be documented in any 'C' programming book, a Unix programming
book will cover the unix specific syscalls.
Also, assorted libraries like dbm, and crypt are available.
There are inumerable books on programming X11 on levels ranging from
raw xlib or xt, to the Widget sets and C++ class libraries.
MGR has man pages, as far as the Linux specific things like vgalib,
some documentation is there, but you're pretty much on your own.
Linux was developed by hacker types
for hackertypes. Hackers write in awk, yacc, and even machine code
(hexadecimal when necessary), not english, so the source code is the
documentation, and something readable to mortals is not always readily
available.