Article View: rec.games.programmer
Article #1713DOS experts please help (io stuff)
From: Troy ENGLISH
Date: Wed, 16 Dec 1992 05:11
Date: Wed, 16 Dec 1992 05:11
31 lines
1606 bytes
1606 bytes
Well, hello all. I am just starting out trying to write a small little arcade style game in DOS, yes I know it would be a hell of a lot easier with an amiga but oh well. Anyways I have a problem, all i want to do is use the keyboard for movement of a guy on the screen, however the input is just so slow.... Really simple, if you hold down an arrow key I want the guy to go that direction until you let go of the key. right now I am using int 21h service 0xb to test if there is input and then int 16h service 0 to get it. However I ran a profiler on the code and found that it was spending 75% plus of its time in the int service !!! (for holding the key down continuously ) and the man just crawls across the screen . and its not the drawing routines since they all are amounting to about 10% of the time total for all drawing routines to the screen. So how in the hell do I get it to check the keyboard faster? Thanks, this is really annoying. Troy -- ***************************************************************** --Your naive idiocy makes me very angry -- Job (The Lawnmower man) "I want to lie Shipwrecked and comatose, drinking fresh mango juice" --Part of Themesong to Red Dwarf
Technical Details
Message-ID:
<BzC6EH.Lp@cs.mcgill.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!olivea!charnel!sifon!homer.cs.mcgill.ca!troyeShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!charnel!sifon!homer.cs.mcgill.ca!troye From: troye@cs.mcgill.ca (Troy ENGLISH) Newsgroups: rec.games.programmer Subject: DOS experts please help (io stuff) Message-ID: <BzC6EH.Lp@cs.mcgill.ca> Date: 16 Dec 92 05:11:04 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS - Mcgill University, Montreal, Canada Lines: 31