pan_kaj
asked on
Keyboard buffer
How can I feed an ascii code in the keyboard buffer
using Turbo-C (MS-DOS) platform ?
The software should interpret as if the keyboard has
been pressed
using Turbo-C (MS-DOS) platform ?
The software should interpret as if the keyboard has
been pressed
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The answer proposed by kamarey is very cryptic and I am
unable to understand it.
I will appreciate a function which accepts an ASCII char as an
input and puts it in keyboard buffer something like given below:
void put_kb_buffer(char a)
{
return;
}
Will somebody help ?
unable to understand it.
I will appreciate a function which accepts an ASCII char as an
input and puts it in keyboard buffer something like given below:
void put_kb_buffer(char a)
{
return;
}
Will somebody help ?
mov ah,3fh; {function 3fh of dos interrupt}
mov bx,0;{handle for standard input}
mov cx,80h;{Maximum bytes to read}
mov dx,seg buffer;{DS:DX Buffer address}
mov ds,dx;
mov dx,offset buffer;
int 21h;
what essentially u're doin' in this is that opening the console as a file. Embed this code in C as some function.
Don't forget to add _asm before you write the declarations.
nadt