Path: utzoo!utgpu!watmath!clyde!mcdchg!chinet!att!osu-cis!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!tank!uxc!uxc.cso.uiuc.edu!m.cs.uiuc.edu!s.cs.uiuc.edu!haskins From: haskins@s.cs.uiuc.edu Newsgroups: comp.lang.c Subject: tc1.5 getc() prob. w/Tiny model Message-ID: <207600007@s.cs.uiuc.edu> Date: 28 Oct 88 16:24:00 GMT Lines: 30 Nf-ID: #N:s.cs.uiuc.edu:207600007:000:907 Nf-From: s.cs.uiuc.edu!haskins Oct 28 11:24:00 1988 In working with Turbo C v1.5, I was using getch 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 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@s.cs.uiuc.edu