1. get_key()
Hello all,
Here's a short Euphoria routine designed to replace get_key().
It returns the same output, and it has two advantages over the built in routine:
Control-C doesn't print ^C, it just returns the correct value.
It's about 10 times as fast :)
Here's the code:
-------------------------------------------
include machine.e
function get_key()
sequence regs
if compare(peek({1050,2}),peek({1052,2})) then
regs=repeat(0,10)
regs[REG_AX]=#1000
regs=dos_interrupt(#16,regs)
return remainder(regs[REG_AX],256)
else
return -1
end if
end function
--------------------------------------------
Regards,
Michael Bolin