On Tue, Dec 15, 2009 at 1:05 PM, Asad Abbas <[email protected]> wrote: > > Hy All, > > What does the function > > inportb() do?
It's a DOS only function to read hardware. <http://www.delorie.com/djgpp/doc/libc/libc_473.html> > Can we use same function in Cpp or any-other function is available which do > the same thing? If the target is DOS (as opposed to, say, Windows or Linux) yes. However you're likely going to have to re-write that section of code. > Actual code lines are: > > if (inportb (0X60) == 30) movebat ('A'); > if (inportb (0X60) == 44) movebat ('Z'); > if (inportb (0X60) == 36) movebat ('J'); > if (inportb (0X60) == 50) movebat ('M'); <http://dclh.electricalandcomputerengineering.dal.ca/csteaching/pcdev.html> That looks to be reading the keyboard. Find out your compiler specific functions for reading the unbuffered keyboard input, and replace that section of code. -- PJH http://shabbleland.myminicity.com/ http://www.chavgangs.com/register.php?referer=9375 http://www.kongregate.com/?referrer=Shabble
