EasyManua.ls Logo

Commodore CBM - Page 386

Commodore CBM
447 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Program
4.
CALLING VOU.
5
REM
PROGRAM
4
CALLING
YOU
10
REM
*******
B
LAN
K E T
*~*****
20
REM
CONT
1
NUOUS-L
1
NE
DI
SPLA'T'
OF
ONE
30
REM
CHARACTER
ENTERED
FROM
THE
40
REM
KEYBOARD
50
REM
*******************************
60
GOSUB
90
70
END
90
PRINT"HIT A
fŒ'T'
OR
<R>
TO
END".:
100
GET
C$: 1F C$=""
GOTO
100
105
IF
C$=CHR$(13)
GOTO
170
110
PF.:
1
NT":"]"
.;
:
REM
CLERF.:
SCREEN
120
FOR
1=1
TO
920
:REM
920/40=23
LINES
130
PRItH
C$;
140
~~EXT
150
PRINT"PHEW!"
160
GOTO
90
1
70
RETUF~t~
Changes
Add:
Change:
Delete:
Lines
5.
60, 70
Line 170
None
Comments
The program from line 90 through line 170 can
be
structured
as
a subroutine
simply by changing line 170 from
an
END
to a
RETURN.
Add a two-line main pro-
gram just ahead of the subroutine to cali
it
by a
GOSUB
90 and then
END.
Note
that the subroutine maintains control until the
RETURN
key
is
struck.
373

Table of Contents

Other manuals for Commodore CBM

Related product manuals