Atari 400 Basic Reference Manual page 111

Vintage computer
Hide thumbs Also See for 400:
Table of Contents

Advertisement

KEYBOARD
CONTROLLER
H-14
Appendix
This program alters registers on a chip called a PIA. To set these back to the
default values in order to do further I/0, hit
'"iiil@i;iiJMI
or POKE P ACTL,60. If
this program is to be loaded from disk, use LOAD, not RUN and wait for the
busy light on the disk drive to go out. Do not execute the program before this
light goes out, otherwise the disk will continue to spin.
1 GRAPH!C3 0
5
PRIHT
:p~~IHT
II
KE''t''BOAF.:D
CONTPOLLE~:
DEt10
11
10 Dit1 F.:OL·K 3 ) . .
!$(
13 ) . . 5'UTTOt-i$( 1)
30 GOSUE: 6(1(10
40 FOR Ct-H=1 TO 4
60 POSIT I Of·i 2,
Ct-H:~Q+5
: pp I t·H
II
COt-H~:OLLEP
#
II
j
CNT
j
II : II
j
70
t-~E:~T
orr
80 FOR Ct-H
=
1 TO 4 : GOSUB 7(100 : PO::; IT I Of·i 19
I
CNT +CNT +5 :
P~:
HH
BUTTOf·i$
j :
t·E·::T Ct-l
T
120 GOTO :30
6000 REt1
:~~t
::;ET UP FOP
COt·H~:OLLER::;
:=ti::
6010
PORTA=54~316
: F'OF.:TE:=54017 : PACTL =54(11 :::
: PBCTL=54t119
6020 POKE
PACTL.48=POKE
PORTA,255:FOKE F
ACTL
52:
POKE POIHA . .
221
6025
PD~<E
PBC:TL
I
48 : POt<E
POF.~TB
J
255 : FIOKE p
OCTL
52:
POKE
PORTS, 221
6030 ROt·J( 0 )=23:3 :
F.~O~J(
1 )=221
=
F.fil,j( 2
)=
1 :::7 :
~~0
W<3 )=119
6040 I$=
II
1234567:39:i;/.)#
II
6050 RETUF.:H
7000 REl1 :$::* F.:ETURri
BUTTOt·~$
mTH CHAPACTE
R FOR
BUTTOI-~
L·JHICH HA:3 BEEt·i PRE::SED Ot·i C
ONTF.:OLLER l]iT ( 1-4 ) . :f.t
7001 REr-1
::;q:
t·iOTE : A 1
~H
LL BE
PETUF:t-~EO
I
F
~~0 COt-H~~OLLER
E
COl·~HECTED.
::;:::~
7002
~:El1 :*:~~
A SPAC:E
~,~ILL
BE
F~ETfJ~~f·~E[;
IF
THE
COHT~:CILLH~
IS
COf·ii·~ECTED
BUT
~·~0
t=Tr' H
AS
E:EEt·~ PRE~3~:;ED
.
:~;:~:
7003 PORT=POF.:TA: IF Ct·iT>2 THEN
F!O~~T=POF.~TE~
7005 P=1
700:3
PAD=O~T
+ClH -2
7010
FO~~
._1=€1 TO 3
70"20 POKE
POfH . . Rm·K
J)
703~3
FOR I= 1 TO 10 : t·E:<T I
7050 IF PADDLE::: PAD+1 >>1[1
THEri
P=.J+._i+.J+2:
GOTO 7090
7060 IF PADDLE:::
PAD
>
>
10
THEf~
P=.J+ ._i+ ._l+ 3 : GO
TO 709e
7070 IF STRIG( CfH -1 )=0
THEf.~
P=.J+.J+._i+4: GO
TO 7€190
7080 NE::-=:T J
7090 BUTTOH!=
I$(
P . . P)
7095
RETURr·~

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

800

Table of Contents