Inkey$; Inp - AMSTRAD cpc 6128 User Instruction

Integrated computer/disc system
Hide thumbs Also See for cpc 6128:
Table of Contents

Advertisement

The state of
[SHIFT]
and
[CONTROL]
in conjunction with the key specified in the
<integer expression> is identified as follows:
Value returned
[SHIFT]
[CONTROL]
-1
UP/DOWN
UP/DOWN
0
UP
UP
32
DOWN
UP
128
UP
DOWN
160
DOWN
DOWN
Associated keywords: C LEA R I N PUT, INK E Y $, JOY
INKEY$
INKEY$
10 CLS
20 PRINT "SeLect Yes or No
30 a$:;:INKEY$
40
IF
a$="" THEN 30
50
IF
a$="y" OR a$="Y" THEN
60
IF
a$="n" OR a$="N" THEN
70 GOTO 30
80 PRINT "You have seLected
90 PRINT "You have seLected
run
(Y/N)?"
80
90
YES":END
NO"
specified key
UP
DOWN
DOWN
DOWN
DOWN
FUNCTION: I Nterrogates the KEYboard, returning the current $tring reflecting
any key that is pressed'. If no key is pressed, INK E Y $ returns an empty string. In the
above example, lines 40 and 70 tell the program to loop back to line 30 after
interrogating the keyboard string.
Associated keywords: C LEA R I N PUT, INK E Y
INP
I N P ( <port number> )
PRINT INP(&FF77)
255
FUNCTION: Returns the I N Put value from the I/O address specified in the <port
number>.
Associated keywords: 0 UT, W A I T
Chapter 3 Page 34
Complete List of Keywords

Advertisement

Table of Contents
loading

Table of Contents

Save PDF