[comp.sys.ibm.pc] Silly EGA question, but...

daemon@watmath.UUCP (01/23/87)

Using C or assembler or generic language other than BASIC
I cant find in my limited documentation just HOW EXACTLY does one
write/make graphics/colours on an AT EGA console. (dos3.x)
BASIC has its keywords for doing graphics things, but how do generic
programs do things the hard way?

          - Ken Dykes
            Software Development Group, U. of Waterloo
            Waterloo, Ontario, Canada.  N2L 3G1  (+1 519) 885 1211
            uucp:    {ihnp4,decvax,allegra,utzoo}!watmath!watbun!kgdykes
            bitnet:  kgdykes@water
            kgdykes%watbun@waterloo.csnet
            kgdykes%watbun%waterloo.csnet@csnet-relay.arpa

tom@uw-warp.UUCP (01/27/87)

In article <4602@watmath.UUCP>, daemon@watmath.UUCP writes:
> Using C or assembler or generic language other than BASIC
> I cant find in my limited documentation just HOW EXACTLY does one
> write/make graphics/colours on an AT EGA console. (dos3.x)
> BASIC has its keywords for doing graphics things, but how do generic
> programs do things the hard way?
> 
>           - Ken Dykes
>             Software Development Group, U. of Waterloo
>             Waterloo, Ontario, Canada.  N2L 3G1  (+1 519) 885 1211
>             uucp:    {ihnp4,decvax,allegra,utzoo}!watmath!watbun!kgdykes
>             bitnet:  kgdykes@water
>             kgdykes%watbun@waterloo.csnet
>             kgdykes%watbun%waterloo.csnet@csnet-relay.arpa

I used the video interrupt, INT 10h, to write pixels on the EGA from assembly
language.  The same thing could also be done from C.  That was a lot easier
than trying to understand how to access the hardware directly.  INT 10h is
documented in the DOS Technical Reference Manual.  You also have to use
INT 10h to get the card into the correct mode.  I think you get some
documentation with it that tells about the modes, otherwise you'll have to
resort to trial and error.-- 
Tom May.	uw-beaver!uw-nsr!uw-warp!tom

jallen@netxcom.UUCP (John Allen) (02/03/87)

In article <651@uw-warp.UUCP> tom@uw-warp.UUCP (Tom May) writes:
>In article <4602@watmath.UUCP>, daemon@watmath.UUCP writes:
>> I cant find in my limited documentation just HOW EXACTLY does one
>> write/make graphics/colours on an AT EGA console. (dos3.x)
>> BASIC has its keywords for doing graphics things, but how do generic
>> programs do things the hard way?
>> 
>>           - Ken Dykes
>
>I used the video interrupt, INT 10h, to write pixels on the EGA from assembly
>[deleted]   You also have to use
>INT 10h to get the card into the correct mode.  I think you get some
>documentation with it that tells about the modes, otherwise you'll have to
>resort to trial and error.-- 
>Tom May.	uw-beaver!uw-nsr!uw-warp!tom


I'd sure hate to use the "trial and error" method.  I've got 3 EGA clones
that came with little or no programmer documentation (caveat buyer).
Since I wanted to write stuff that would run on "most" EGAs, this was OK.
I got the IBM PC Technical Reference - the one with the adapters in it -
and used the EGA BIOS listing.  This also delivered a notable side effect:
Of the three EGA clones available to me for development and testing, none
behaved according to the IBM BIOS specs (in certain cases), and each
behaved differently in others.


John Allen
=========================================================================
NetExpress Communications, Inc.      seismo!{sundc|hadron}!netxcom!jallen
1953 Gallows Road, Suite 300         (703) 749-2238
Vienna, Va., 22180
=========================================================================