Stuff Keyboard.

 BBS: Inland Empire Archive
Date: 04-13-93 (06:36)             Number: 297
From: JOE NEGRON                   Refer#: NONE
  To: DOUG MILLER                   Recvd: NO  
Subj: Stuff Keyboard.                Conf: (2) Quik_Bas
DM> Can anyone tell me how to stuff keys into the keyboard buffer?

Here ya go:

============================== Begin code ==============================

DECLARE SUB StuffBuf (Keys$)

'* SUB StuffBuf

'*    Inserts Keys$ into the keyboard buffer just as if it had been
'*    entered from the keyboard.  Note that only fifteen characters may
'*    be inserted or the machine may lock up.
SUB StuffBuf (Keys$) STATIC
   Work$ = LEFT$(Keys$, 15)                  '15 characters maximum
   Length% = LEN(Work$)

   DEF SEG = 0
   POKE &H41A, &H1E                          'buffer head
   POKE &H41C, &H1E + Length% * &H2          'buffer tail

   FOR X% = 1 TO Length%                     'POKE each char one by one
      POKE &H41C + X% * &H2, ASC(MID$(Work$, X%))
   NEXT X%


   Work$ = ""
=============================== End code ===============================

          --Joe in Bay Ridge, Brooklyn, NY, Tue, 04-13-1993--

... Put on your seatbelt.  I wanna try something...
 X Blue Wave/QWK v2.12 X

--- Maximus 2.01wb
 * Origin: * BlueDog BBS * (212) 594-4425 * NYC FileBone Hub (1:278/709)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET