Board index » delphi » "repeat until keypressed problem.

"repeat until keypressed problem.

       I have a 386-40 that "repeat until keypressed"
does not seem to work on, is this a known problem with
some clones?
       It seems to be a problem with 3,0, 4,0 and 6,0
but I haven't tried to check it out good yet, I thought
it was funny at first, but now I am wondering if others
are having the same problem.   I think the bios is
American Megatrends Inc.

       It does seem to work ok on my AMD K5.

Ken Fischer

---

 

Re:"repeat until keypressed problem.


In article <Es5EJp....@iglou.com>,
  kefis...@iglou.com (Ken Fischer) wrote:

Quote

>        I have a 386-40 that "repeat until keypressed"
> does not seem to work on, is this a known problem with
> some clones?
>        It seems to be a problem with 3,0, 4,0 and 6,0
> but I haven't tried to check it out good yet, I thought
> it was funny at first, but now I am wondering if others
> are having the same problem.   I think the bios is
> American Megatrends Inc.

>        It does seem to work ok on my AMD K5.

> Ken Fischer

> ---

I first started using TP6 on my parents old 386 / 33DX (yeah DX!)
never had a problem.  Check autoexec & config.sys for bad device
drivers or TSRs that could be doing {*word*194} things to the keyboard
interrupt.  I don't see how this could be a processor problem...

Who knows?  Try some stuff like

repeat
  if keypressed then begin sound(1000); delay(100); nosound; end;
until false;

BTW my old BIOS was American Megatrends... Oak Tek video card, hmmm dos
5.0, 120mb IDE HD, 14,400 modem and sb16.

if all else fails do a "mem /c |more" and see if your memory is less than
655360 (total).  Could be a virus or a drive overlay program if it's less.
(I would rather have the virus personally).  Just some thoughts... Good luck!

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/   Now offering spam-free web-based newsreading

Re:"repeat until keypressed problem.


Quote
In article <Es5EJp....@iglou.com>, Ken Fischer <kefis...@iglou.com> wrote:
>       I have a 386-40 that "repeat until keypressed"
>does not seem to work on, is this a known problem with
>some clones?

Present your code. Most likely there is a big there. Also describe the
symptoms exactly.

Osmo

Re:"repeat until keypressed problem.


Quote
Ken Fischer wrote:

>        I have a 386-40 that "repeat until keypressed"
> does not seem to work on, is this a known problem with
> some clones?
>        It seems to be a problem with 3,0, 4,0 and 6,0
> but I haven't tried to check it out good yet, I thought
> it was funny at first, but now I am wondering if others
> are having the same problem.   I think the bios is
> American Megatrends Inc.

>        It does seem to work ok on my AMD K5.

> Ken Fischer

> ---

I don't think that it's a processor problem (because what on earth
should the processor do with the scan codes?). I think, it could be
  a) your fault: {$M 65535,655350,655350} is much to big.
  b) maybe your keyboard is corrupted.
  c) maybe you have loaded a TSR that get the keys before you.
     etc.

Try to post your code and we'll se to help you.
Or (if you really want to wait for user response), go to my homepage
and download the pas.zip (pascal/assembler source with object-files)
from
http://www.informatik.uni-halle.de/~rehsack/prog/pascal/pas.zip
There are in the UNIT DosExtr.TP{U|P} procedures Keypressed{2|3};
Those are procedures, they wait for a key and (while not keypressed)
call the int 28h (dos idle interrupt - for print.com etc.)

Good luck.

--
Jens Rehsack --- <rehs...@helios.informatik.uni-halle.de>
                 please remove the # at begin and end to remail
                 http://www.informatik.uni-halle.de/~rehsack/

Re:"repeat until keypressed problem.


What's the source?

Christian Datzko

Re:"repeat until keypressed problem.


In article <6i6fdg$...@kruuna.Helsinki.FI>, Osmo Ronkanen
<ronka...@cc.helsinki.fi> writes

Quote
>In article <Es5EJp....@iglou.com>, Ken Fischer <kefis...@iglou.com> wrote:
>>       I have a 386-40 that "repeat until keypressed"
>>does not seem to work on, is this a known problem with
>>some clones?

>Present your code. Most likely there is a big there. Also describe the
>symptoms exactly.

I think he better post what else he is loading in config.sys and
autoexxec.bat - I would suspect a TSR is looking at scancodes before the
program.

--
Pedt Scragg                    <newsmas...@pedt.demon.co.uk>

Never curse the Crocodile's mother before crossing the river

Re:"repeat until keypressed problem.


Quote
Pedt Scragg wrote:

: Osmo Ronkanen writes
: >In article <Es5EJp....@iglou.com>, Ken Fischer  wrote:
: >>       I have a 386-40 that "repeat until keypressed"
: >>does not seem to work on, is this a known problem with
: >>some clones?
: >
: >Present your code. Most likely there is a big there. Also describe the
: >symptoms exactly.
:
: I think he better post what else he is loading in config.sys and
: autoexxec.bat - I would suspect a TSR is looking at scancodes before the
: program.

       I remarked out the only TSR (a VGA to TV converter
box hot key TSR), it didn't help any.
       I'll check everything and post what I find, thanks.

Ken Fischer

---

Re:"repeat until keypressed problem.


In article <Es6z7F....@iglou.com>, Ken Fischer <kefis...@iglou.com>
writes

<snipped about 386/40 and repeat until keypressed>

Quote

>       I remarked out the only TSR (a VGA to TV converter
>box hot key TSR), it didn't help any.

I remember using one of these when carting a portable around with a
4inch screen - the TSR used to mess a lot of things up - including the
timer.

Quote
>       I'll check everything and post what I find, thanks.

The thought occurred - does the problem occur in a minimalist program.

program test;
uses crt;
begin
 repeat until kepressed;
 writeln('Keypressed!');
end.

If the prog above immediately terminates then your own prog is not the
culprit, if it does wait for a keypress then either something between
the repeat and until is likely to be the culprit or you've installed
something in your program that gets involved with the Keyboard Interrupt
- have you installed any interrupt handlers in your program?

--
Pedt Scragg                    <newsmas...@pedt.demon.co.uk>

Never curse the Crocodile's mother before crossing the river

Re:"repeat until keypressed problem.


Quote
Pedt Scragg wrote:

: The thought occurred - does the problem occur in a minimalist program.
:
: program test;
: uses crt;
: begin
:  repeat until kepressed;
:  writeln('Keypressed!');
: end.
:
: If the prog above immediately terminates then your own prog is not the
: culprit, if it does wait for a keypress then either something between
: the repeat and until is likely to be the culprit or you've installed
: something in your program that gets involved with the Keyboard Interrupt
: - have you installed any interrupt handlers in your program?

      The above will work correctly, I think, and
repeat

until something;   works fine, I now think I need
to study how the keypressed thing is supposed
to work, I don't usually use it, but I remember
code that does.

repeat
  Write(' HI ');
until keypressed;   does not terminate with a
                    keypress reliably, never
on first keypress, so my question is, "should it?".
       I thought I should be able to use true and
false with keypress too, but that doesn't seem to
work.  
       It will take me a while to figure it out,
thanks.

Ken Fischer

---

Re:"repeat until keypressed problem.


Quote
Pedt Scragg (newsmas...@pedt.demon.co.uk) wrote:

: <snipped about 386/40 and repeat until keypressed>

      I found the problem at 4:15 AM, it seems in
TP3.0  Compiler directive break must be off {$C-}
but TP4.0 doesn't require it.
      I found this in the TP4.0 manual, and what
a difference it makes in TP3.0.
      I apologize for such a simple problem.

Sincerely,

Ken Fischer

---

Other Threads