tc1.5 getc() prob. w/Tiny model

haskins at s.cs.uiuc.edu haskins at s.cs.uiuc.edu
Sat Oct 29 02:24:00 AEST 1988



In working with Turbo C v1.5, I was using getch <conio.h> in a user
input routine, compiled with a Tiny model.  While running, after about
a dozen uses, it would look like it was getting infinite input from 
somewhere besides the keyboard (the spade character all the time),
effectively locking things up.

When I compiled it under a Small model, the problem went away.  So
where's the documentation saying that you can't use it getch (or getchar
from <stdio.h> either) very many times in the Tiny model (no stack)?

Here's a code snippet:

void  FnDecl(...
{
   char letter;
...
   do
      switch (letter = getch())
      {
...

Of course the obvious knee-jerk solution is to NOT USE THE TINY MODEL,
but some space is saved by making it into a .COM file.

So where does it say that you can't use it?

---------------------------------------------------
Lloyd M. Haskins          -- haskins at s.cs.uiuc.edu



More information about the Comp.lang.c mailing list