[comp.sys.ibm.pc] Turbo C - >Graphics, CGA, EGA, et.al.

tim@ur-cvsvax.UUCP (Tim Takahashi) (08/12/87)

Just got a Tandy 3000 with EGA and Turbo C. Here are a couple of questions
 concerning TC :

 1. Turbo C does not, apparently, honor ANSI.SYS and its associated 
      calls. Any reason, patch?

 2. Turbo C has no support for graphics. Any solutions? Should I poke
      directly into screen memory?

 3. Would Microsoft C be any better in these regards?

 Tim

ccs016@ucdavis.UUCP (Patrick Tully) (08/13/87)

> Just got a Tandy 3000 with EGA and Turbo C. Here are a couple of questions
>  concerning TC :
> 
>  1. Turbo C does not, apparently, honor ANSI.SYS and its associated 
>       calls. Any reason, patch?

   What do you mean? It worked for me fine. Do you have the DEVICE set?
DEVICE = ANSI.SYS in config.sys.
 
Patrick Tully
pstully@ucdavis
..ucdavis!deneb!ccs016

jpn@teddy.UUCP (John P. Nelson) (08/13/87)

In article <661@ur-cvsvax.UUCP> tim@ur-cvsvax.UUCP (Tim Takahashi) writes:
> 1. Turbo C does not, apparently, honor ANSI.SYS and its associated 
>      calls. Any reason, patch?

I cannot verify this.  Tim does not mention exactly what "associated calls"
he is attempting to use, nor what Turbo C functions he is using to attempt
to invoke them.  However, a simple test shows that Turbo C can, indeed, take
advantage of ANSI.SYS if it is loaded:

#define ESC '\033'
main()
    {
    printf("%c[H%c[J%c[7mthis should be inverse%c[m\n", ESC, ESC, ESC, ESC);
    }

I assume that Tim is either 1. writing C code which accesses the BIOS
rather than going through DOS (As far as I know, none of the standard
Turbo C IO functions do this!), or 2. he does not have ANSI.SYS loaded,
or 3. He is not generating ANSI escape sequences correctly.

todd@uhccux.UUCP (The Perplexed Wiz) (08/13/87)

In article <661@ur-cvsvax.UUCP> tim@ur-cvsvax.UUCP (Tim Takahashi) writes:
> 2. Turbo C has no support for graphics. Any solutions? Should I poke
>      directly into screen memory?

There's a graphics demo program called 'BAR.C' on of of the disks that
comes with Turbo C.  In it are functions you can study/extract to build
your own graphics routines.
>
> 3. Would Microsoft C be any better in these regards?

I don't have my copy of Microsoft C 5.0 or QuickC yet (sent in my upgrade
check and request though).  However, this as-yet-unavailable release
has a full graphics library (unlike previous versions of Microsoft C).
Would any of you Microsoft C 5.0 beta-testers be willing to comment on
this new library?

-- 
Todd Ogasawara, U. of Hawaii Center for Teaching Excellence
UUCP:		{ihnp4,seismo,ucbvax,dcdwest}!sdcsvax!nosc!uhccux!todd
ARPA:		uhccux!todd@nosc.MIL
INTERNET:	todd@uhccux.UHCC.HAWAII.EDU

jay@splut.UUCP (08/16/87)

In article <661@ur-cvsvax.UUCP>, tim@ur-cvsvax.UUCP (Tim Takahashi) writes:
> Just got a Tandy 3000 with EGA and Turbo C. Here are a couple of questions
>  concerning TC :
> 
>  1. Turbo C does not, apparently, honor ANSI.SYS and its associated 
>       calls. Any reason, patch?

My Turbo C does indeed support ANSI.SYS...in fact, I didn't realize that the
ANSI escape string to clear the screen wouldn't work on machines that didn't
run ANSI.SYS (gee, that sounds dumb...it struck me as BEING dumb when I
realized the problem! :-) until I ran into a machine at work that didn't
have ANSI.SYS loaded. Grrrrrr...

>  2. Turbo C has no support for graphics. Any solutions? Should I poke
>       directly into screen memory?

There are lots of nice, PC-specific things that TC doesn't support. Maybe
some enterprising soul will write a package that implements the Turbo Pascal
PC-specific calls (such as sound, graphics,...).

>  3. Would Microsoft C be any better in these regards?

Good question. Still, Microsoft C doesn't have the nice development
environment of TC...

-- 
>splut!<...Jay Maynard, K5ZC | uucp: ...!seismo!soma!uhnix1!sugar!splut!jay
"Don't ask ME about Unix...  | GEnie: JAYMAYNARD            (...e-i-e-i-o!)
I speak SNA!"                | CI$: 71036,1603   FidoNet: SysOp @106/64
The opinions herein are shared by neither of my cats, much less anyone else.