Dec 152017
Graphics demo written in Turbo C and Masm 6.0. Gives some tips for accessing graphic modes using ASM and a high level language.
File GRSOUND.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Graphics demo written in Turbo C and Masm 6.0. Gives some tips for accessing graphic modes using ASM and a high level language.
File Name File Size Zip Size Zip Type
DEMO.DOC 4924 2321 deflated
DEMO.EXE 62660 36735 deflated
EGAVGA.BGI 5363 3878 deflated
FONT.001 1241 549 deflated
PHOTO.001 31236 6550 deflated

Download File GRSOUND.ZIP Here

Contents of the DEMO.DOC file


To run the demo program you must have a monitor capable of EGA high
resolution 640x350 mode 16. Place the files DEMO.EXE, PHOTO.001
FONT.001 and EGAVGA.BGI in the current directory and type:


This demo program is the result of some study of graphics mode
and interrupt driven sound programming. I purchased the Turbo C runtime
library in order to be able to study the inner workings of the compiler,
but unfortunately the most essential items needed in graphics
programming are not supplied with that library. These are the floating
point and graphics library code. Unless you have the time to sit and
write a floating point library in assembler or buy it, then the
application programmer is limited to a mixed language model using a
higher level language such as C or Pascal with an assembler library to
control the video card fully. Borland's graphic library is quite nice,
but since they do not supply the run time library for it, I have been
hard put to add routines to the library which are not based on the
library itself. Whenever Borland's graphic initialization code is
executed, my programs crash if I try to transfer a PCX file or other bit
image to the screen by direct memory moves. This makes it impossible to
combine bit mapped and drawn images as shown in this demo.

The only solution is to buy a library written in assembler or to write
one yourself so that it can be modified. Since I have not written one
myself yet, I have not included it in this file. What I will include is
some discussion of how you can learn to program the video modes without
spending $1000.00 in books or buying thousands of dollars in code
libraries. It may also prevent you from downloading 100 files which
don't do much of anything toward enhancing your knowledge of graphic
mode programming.

Three public domain files that I downloaded have aided me much in
beginning this library:


The programs contained in this archive were adapted from "Advanced
Graphics in C" by Nelson Johnson, published by Osborne/McGraw-Hill,
copyright 1987 by Osborne/McGraw-Hill. Used with the permission of
Osborne/McGraw-Hill. Program adaptations are solely the work of
Imagimedia Technologies, Inc. and are not a publication of

This archive was useful since it gives some useful information on
algorithms for drawing circles and arcs not contained in the RTGRAPH.ZIP


RTGRAF EGA/VGA Video Routines with Source by: Rip Toren, POB 674
Columbia, MD 21045

This archive includes some assembler files to control the video card and
manipulate files in PCX file format. He also lists his most

1(APGEGA/VGA) Advanced Programmer's guide to the EGA/VGA. Authors
George Sutty & Steve Blair. Publisher BRADY 1988, a division of Simon &
Schuster. ISBN 0-13-729030-X


Written by Juan Jimenez Micro Consulting Associates 868 Ashford 6B San
Juan, P.R. 00907-1018 (809) 725-9470 FAX (809) 721-8470 GEmail:

This is a simple interrupt driven background sound system which is
offered to the public domain. There is no critical error handler
supplied with this simple example, but this should be considered in your
applications. Also, you will have to do a lot of humming if you intend
to use this package for queued music without writing some additional
tools, but it is a nicely written example, and quite worthy of notice.

Notes & Suggestions:

If you are using Turbo C as I do, you may use their driver to get video
card information and then pass it to your application prior to starting
your own graphics routines. The real problem that you are faced with
is loading bit mapped information and moving it about the screen while
the Borland driver is inialized. You will need to write your own screen
drawing functions that you wish to use while doing your own bit
manipulations on screen, such as circle arc, box etc.

PCX files: Make sure that you configure your PCX file program to modify
your files and save them in EGA 16 color mode if you intend to
experiment with RTGRAPH. If you are using VGA or SVGA you'll need to
modify the RTGRAPH routines some. The routines do not contain clipping

You should pick up the EMS Toolkit for C Programmers directly from
Intel. They will send it to you free if you are a software developer.
It is really useful if you are going to process large arrays in memory
for graphics applications. You can use this assembler library developed
for Microsoft C with Turbo C 2.0 with no modification whatsover.

You can modify the circle and arc routines in ADVGRAPH to use the point
plot functions in RTGRAPH.

Those of you on the BBS - Programmer's Corner can download these three
archives from that board.

Victor E. Cummings
P.O. Box 12295
Baltimore, MD 21281
(301) 675-3607

 December 15, 2017  Add comments

Leave a Reply