Re: Still working on the keyboard: is this function available in Euphoria??
- Posted by "Hayden McKay" <hmck1 at dodo.com.au> Dec 21, 2003
- 393 views
Isn't the keyboard buffer 32 bytes long starting at 0040:001E (#41E)? Or is the 32 Byte word at 0040:001E just the start position of keyb buffer? How did you get 16 bytes long? I would like some help on this one as I have been stuck writing keyb buffer stuff in the past because of some confution here. ----- Original Message ----- From: "paul larmuseau" <plarmuseau at pandora.be> To: <EUforum at topica.com> Sent: Sunday, December 21, 2003 10:02 AM Subject: Still working on the keyboard: is this function available in Euphoria?? > > > community.borland.com > > Article #16214: Stuff The Keyboard Buffer > > Technical Notes Database > > TN1214C.txt Stuff The Keyboard Buffer > Category :C++ > Platform :All > Product :C++ All > > Description: > /* > > SIMULATE KEYSTROKES > > Often one needs to simulated keystrokes: to automate data entry, to insert > standard text into an editor ( just like THELP ) etc. etc. BIOS (ATs and > above ) provides a function to stuff keys into the BIOS keyboard buffer. > The following is a generic function which takes an ASCIIZ string and inserts > the contents of the latter in the keyboard buffer (NOTE: The keyboard buffer > is 16 bytes long but only 15 characters can be inserted) followed by a > Carriage Return. It is useful when writing a 'MENU' like program which > would could create a batch file based on the user's requests and *stuff* the > name of the batch file in the keyboard buffer prior to exiting. The last > command in the batch file would run the Menu program again ! > */ > #include > /*[]----------------------[ STUFF KEYBOARD USING STRING]------------------[] > This function stuffs the keyboard buffer with the contents of an ASCIIZ > > string... A carriage return is appended... > */ > int StuffKbd( char *); > int StuffKbd( char *str ) > { > _AL = 0x00; // Assume success ! > while(*str && !_AL) // While successful and more characters > { > _AH = 0x05; // Function 05: Kbd Buffer Write > _CH = 0x00; // Scan Code is Zero > _CL = *str++; // Load ASCII Code > geninterrupt(0x16); // Interrupt 16H > } > if (!_AL) // If successful in last call > { > _CX = 0x1C0D; // Load Carriage Return > _AH = 0x05 ; // Function 05: Kbd Buffer Write > geninterrupt(0x16); // Interrupt 16H > } > return (_AL); // Return 0: Success - 1: Failure > } > int main(void) > { > StuffKbd("DIR C:\\"); // Request Directory Listing of Root > return 0; // End ... > } > > > Reference: > > > 7/2/98 10:42:21 AM > Last Modified: 01-SEP-99 > > ----- Original Message ----- > From: "Bernie Ryan" <xotron at bluefrognet.net> > To: <EUforum at topica.com> > Sent: Saturday, December 20, 2003 5:14 PM > Subject: Proxy source code Atten: Kat > > > > Kat: > > Here is a small proxy written in "C" which can be easily adapted > > to Euphoria. > > http://www.programmersheaven.com/zone15/cat241/17838.htm > > Bernie > > > > > > TOPICA - Start your own email discussion group. FREE! > > > > > > > TOPICA - Start your own email discussion group. FREE! > > > -- > Incoming mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.551 / Virus Database: 343 - Release Date: 11/12/03 > --- --