🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #2188

Bug in GEMDOS (was TVX bug)

#2188
From: Bruce Wampler
Date: Tue, 07 Oct 1986 17:01
38 lines
2084 bytes
   My previous posting was correct about the cause of the TVX bug, but
wrong in the fix.  Since this seems to be a general bug/feature of
GEMDOS, my solution might be of general interest.

    There is some incorrect interaction between GEMDOS function 7
(unechoed keyboard input, probably the others too) and GEMDOS
function 9 (print a line, probably the other character at a time, too.).

You can write characters faster to GEMDOS 9 than it can display them
on the screen.  If you are doing this while the user has the
key clamped down at a very fast repeat rate, soon everything
will die.  The bug seems to be that GEMDOS 9 doesn't bother to
check the conout status to see that it can take more characters.

My solution was to go to the bios directly (trap 13), passing up the GEMDOS
functions.  Character output should be done like this:

 char_out(output_char) char output_char;
  {
    while (!bios(8,2))		/* check output status */
	if (bios(1,2))		/* check if input waiting */
	    save_input_char(bios(2,2)); /* do SOMETHING with input chr */
    bios(3,2,output_char);	/* now safe to write char */
  }

Apparently, GEMDOS 9 doesn't do the output status check.  Maybe
the other GEMDOS character output routines do, but I didn't check
them.  (For anyone interested, the REAL fix to TVX is to change
ttwtln to use ttwt, and put the above fix into dispch, and throw
away the extra input characters.)
--
Dr. Bruce E. Wampler
University of New Mexico
Department of Computer Science
Albuquerque, NM 87131

..{ucbvax | seismo!gatech | ihnp4!lanl}!unmvax!wampler
Technical Details
Message-ID: <402@unmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!cmcl2!lanl!unm-la!unmvax!wampler

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!cmcl2!lanl!unm-la!unmvax!wampler
From: wampler@unmvax.UUCP (Bruce Wampler)
Newsgroups: net.micro.atari16
Subject: Bug in GEMDOS (was TVX bug)
Message-ID: <402@unmvax.UUCP>
Date: Tue, 7-Oct-86 13:01:56 EDT
Article-I.D.: unmvax.402
Posted: Tue Oct  7 13:01:56 1986
Date-Received: Wed, 8-Oct-86 08:29:13 EDT
Organization: Univ. of New Mexico, Albuquerque
Lines: 38
Keywords: The real story