🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #33419

keyboard buffer, was Re: Crawio()

#33419
From: Edgar Roeder
Date: Mon, 01 Aug 1988 15:45
37 lines
1942 bytes
In article <1095@atari.UUCP>, apratt@atari.UUCP (Allan Pratt) writes:
> 
>                   ...  Thank you for your concern, though.  It's a little
> late in the release process to get major changes in, but if there are
> little things you're afraid we may have overlooked, please MAIL to
> me with your ideas.

Since i can't get to you by mail ('pandora refuses connection' on every path i
tried), i post this to the net.

I have found another nice "feature" in the ST-keyboard buffering routines.

First the scenario:

The old TOS (Blitter-TOS and previous ones) uses a buffer of 80 longs for
buffering keyboard input on GEMDOS-level. Three variables control this
process:	1. a counter, which is incremented on adding and decremented on
		   deleting of a char
		2. a head-pointer which is incremented after adding a char to
		   the beginning of the buffer
		3. a tail-pointer, which is incremented after deleting a char
		   from the end of the buffer
Whenever the two pointers get equal, they are reset to point to the beginning
of the buffer.
When the count of characters in the buffer gets 80, the console beeps and no
char is added.

And now the problem:

When you are typing faster than the program reads (and have always <80 chars
in the actual buffer between head and tail), the buffer overflows into
user-RAM, because the head pointer is always incremented and never checked
against the high end of the buffer. Conclusion: the ST crashes.

Is this fixed in the new ROM-code ???

- Edgar
Technical Details
Message-ID: <578@sbsvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!unido!sbsvax!roeder
References: <567@sbsvax.UUCP> <1095@atari.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!mcvax!unido!sbsvax!roeder
From: roeder@sbsvax.UUCP (Edgar Roeder)
Newsgroups: comp.sys.atari.st
Subject: keyboard buffer, was Re: Crawio()
Summary: another bug in keyboard buffering
Message-ID: <578@sbsvax.UUCP>
Date: 1 Aug 88 15:45:02 GMT
References: <567@sbsvax.UUCP> <1095@atari.UUCP>
Organization: Universitaet des Saarlandes, Saarbruecken, West Germany
Lines: 37