1) Stuffing chars into keyboard buffer, - Reply
Neil Kube wrote:
> Has anybody written a routine which allows you to place characters into
> the keyboard buffer?
The following routine is perhaps marginally frendlier than Lee woo seob's
suggestion. Jiri
-- snip -------------------------------------------------
procedure clearkb()
poke(#41C,peek(#41A))
end procedure
procedure stuffkb(sequence str)
integer head,newtail,tail
head=peek(#41A)
tail=peek(#41C)
for i=1 to length(str) do
newtail=tail+2
if newtail>60 then newtail=30 end if
if newtail=head then
exit
else
poke(1024+tail,str[i])
tail=newtail
poke(#41C,tail)
end if
end for
end procedure
stuffkb("dir /w\r\n")
|
Not Categorized, Please Help
|
|