Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!ira.uka.de!smurf!flatlin!tpki!kaiki!kai From: kai@kaiki.toppoint.de (Kai Voelcker) Newsgroups: comp.lang.pascal Subject: Re: procession towards keypressed continues Message-ID: <5DF322w164w@kaiki.toppoint.de> Date: 17 May 91 01:33:15 GMT References: <1991May14.151208.11501@javelin.sim.es.com> Organization: Toppoint Mailbox e.V. Kiel, W. Germany Lines: 39 tpehrson@javelin.sim.es.com (Tim Clinkenpeel) writes: > i finally got my kepressed function, as follows: > > function keypressed:boolean; > var regs:registers; > begin > with regs do begin > ah:=$00; keypressed:=(FZero and flags)=$00; --------- the int call is missing !! > end; > end; > > and my code looks something like: > > ... > while not keypressed do begin > otherstuff; morestuff; end; > case upcase(readkey) of > ... > > and now my gripes: > > 1. otherstuff et al is never being reached. i suppose i have some initializ- ^^^^^^^^^^^^^ of course not > ation that needs doing. what and how? > > 2. once 1 is resolved, a second key will be required at the (readkey), correc > i would like to know an efficient way around this (use the key that was > pressed to bypass not keypressed). Why do You don't use direct bios calls? These TP syndroms especially for readkey are nonsense. Use int 16h to get ascii value and scancode at one time. And use inline, did You ever see what TP produces for an intr(,,) call ??? ________________________________________________________________________ | Kai Voelcker, Kappelner Str 18, D-2300 Kiel 1, voice: +49 431 335605 | | kai@kaiki.toppoint.de interests: 386asm, c, pascal; OR algorithms | | >>> polite notice: I have to pay for incoming mail. Thanks <<< | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~