Re: RE: [MSX] Pascal/MsxPad problem

2002-11-29 Thread Maurizio Morandi
Hi Slotman, you wrote:

 At 11:39 AM 28/11/2002 +0100, you wrote:
 There is another way to handle keys instead of the keypressed 
 function ??
 
 Check the msx.inc that comes with MSXPad -- there's a inkey function 
 at the
 end of the file which returns the char pressed, just like inkey$ 
 from basic
 
I know it, but it wait until a key is pressed. Not exactly like the basic inkey$.
I've tested it like this:

repeat
begin
   c:=ord(inkey);
   writeln(c);
end;
until c=13;

 Thanx again.
 mau_rizio
 
 
 Hope it helps,
MSXPad helps a lot, thank you for making it :)

Bye
Maurizio


___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx



Re: RE: [MSX] Pascal/MsxPad problem

2002-11-29 Thread The MSX Files
At 11:33 AM 29/11/2002 +0100, you wrote:
Hi Slotman, you wrote:

 At 11:39 AM 28/11/2002 +0100, you wrote:
I know it, but it wait until a key is pressed. Not exactly like the basic
inkey$.
I've tested it like this:

repeat
begin
   c:=ord(inkey);
   writeln(c);
end;
until c=13;


Just use it like this:

if keypressed then c:=ord(inkey);

and it will not wait for a keypress =)


Bye,



SLotman
MSX Files ( http://www.msxfiles.cjb.net )
Megaram Project ( http://megaram.msxfiles.cjb.net )
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx



RE: RE: [MSX] Pascal/MsxPad problem

2002-11-28 Thread Frits Hilderink
 
  I noticed that the interrupts are turned off after each pset/point.
  This causes the 'keypressed' not to function since the 50/60 
  hz
  interrupt also scans for keys. Please add a /$FB after the
  inline function.
 It works! Thank you very much :)
 Perhapse interrupts are turnerd off to speed up the routines?

Nope... the interrupts are turned off to make sure that between
the sequence of OUT instructions no interrupt is accepted.

 
 There is another way to handle keys instead of the keypressed 
 function ??
 

This is the keypressed routine that is used in turbo pascal 3.3e,
i don't know how the original turbo pascal 3.0 did it. But this
is very fast.

LD HL,(0F3FAH)
LD A,(0F3F8H)
SUB L
LD A,1  ; assume there are characters present
JR NZ,L0316_OK  ; jump if characters present

DEC A   ; FALSE if not
L0316_OK:
LD L,A
LD H,0
RET



___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx



Re: RE: [MSX] Pascal/MsxPad problem

2002-11-28 Thread The MSX Files
At 11:39 AM 28/11/2002 +0100, you wrote:
There is another way to handle keys instead of the keypressed function ??

Check the msx.inc that comes with MSXPad -- there's a inkey function at the
end of the file which returns the char pressed, just like inkey$ from basic

Thanx again.
mau_rizio


Hope it helps,


SLotman
MSX Files ( http://www.msxfiles.cjb.net )
Megaram Project ( http://megaram.msxfiles.cjb.net )
___
MSX mailing list ([EMAIL PROTECTED])
Info page: http://lists.stack.nl/mailman/listinfo/msx