Post Reply 
(HP50g) HpPascal and contrast of the screen
10-27-2017, 07:29 PM (This post was last modified: 10-27-2017 07:35 PM by Gilles59.)
Post: #10
RE: (HP50g) HpPascal and contrast of the screen
I did not find an example of ASM with Byte.

But I changed this :

Code:
function readkey : char;
begin
 asm
     lc(2) 0
     :bclrdk
     gosbvl #4840        *POPKEY
     goc bclrdk
     a=r1
     d1=a
     dat1=c b
 end;
 result := chr( ScanToAscii[ ord(result) ] );
end;

with this :

Code:
function readkey2 : Byte;
begin
 asm
     lc(2) 0
     :bclrdk
     gosbvl #4840        *POPKEY
     goc bclrdk
     a=r1
     d1=a
     dat1=c b
 end;
end;

And this works fine with this program :

Code:
Program Texte;
Uses CrtHP_Test;
Var a : Byte;
Begin
 WriteLn('Keyboard test :DEL to exit');
 Repeat 
  a:=ReadKey2; WriteLn(a);
 Until a=21;
End.

TU David, I will try your suggestion.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (HP50g) HpPascal and contrast of the screen - Gilles59 - 10-27-2017 07:29 PM



User(s) browsing this thread: 4 Guest(s)