Graphics and C
ijk at houxt.UUCP
ijk at houxt.UUCP
Fri Jun 22 06:28:35 AEST 1984
In the March 1984 PC Tech Journal, there are some assembler graphics
routines for the IBM PC (and close look alikes). These are excerpted
from "The Waite Group: BLUEBOOK of ASSEMBLY ROUTINES for the IBM PC"
by Christopher L. Morgan. These routines allow you to paint pixels,
draw boxes, and even draw straight lines quite efficiently. To be callable
from C, I modified these routines to take arguments from the stack
per normal calling conventions. (As posted, they use global variables,
which violate good programming std). In addition, by studying the tech
manual for int hex 10, I developed subordinate routines to
set graphics mode, set colors, draw characters, etc. Finally,
as an experiment, I came up with a C routine to draw a circle
(and then plotted it with the set pixel rtn; note that you have to
account for a 6/5 aspect ratio of the display).
I would publish these routines, but since they're from a book,
I don't want to violate the copywrite. Unfortunately, these
routines are specifically tied to the IBM display characteristics -
if your machine doesn't duplicate them, then you're out of luck.
Ihor Kinal
houxt!ijk
More information about the Comp.lang.c
mailing list