EasyManua.ls Logo

Commodore PET - APPENDIX H: PET Features; Features of PET BASIC

Commodore PET
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...
Chapter 6: VARIABLES, Floating Point Variable Format
Use
the
following
program to examine floating .point representations:
1~)
INPUT
A
20
X=PEEK(125)*256+PEEK(124)+2
30
PRINT
A;
"=";PEEK(X);PEEK(X+l);PEK(X+2);PEEK(X+3);PEEK(X+4)
4(1
GOTO
10
This
is
the same one given in Chapter 6 except for the system locations at line 20
being
PEEKed.
Chapter 6 : CONSTANTS
Instead
of
pointer (42.43). the pointer in the diagrams
is
(124,125).
Chapter 6: ARRAY STORAGE FORMAT
Use
the
following
program for viewing sample Array Area entries:
10
DI
t'1
A
(5)
.'
B;':
(2.,2)
.'
[:$
(
10)
F~Et'1
::;;At1F'LE
ARRA'T"S
20
FOR
1=0
TO
5:A(I)=INEXT
30
FOR
1=0
TO
2
FOR
J=0
TO
2B%(J,I)=100+3*I+JNEXT
J,I
4(1
FOI<:
1=0
TO
10:[:$(I)=CHR$(A:::;C("A")+I)
:t·Œ/';T
50
X=PEEK(127)*256+PEEK(126)
:REM
POINT
TO
ARRAY
AFEA
60
Y=PEEK(129)*256+PEEK(128)
REM
END
OF
ARRAYS
70
FOF:
1
=:,.,;
TO
'T'
80
PRINT
I,PEEK(I)
:.71~1
GET
D$:
IF
D$=""
THHJ
GOTO
90:
RH1
HIT fŒ'T'
FOF:
t'JE>':T
ELEt'1EtH
100
He';T
This
is
the same
as
the program in Chapter 6 except for the system locations
accessed in lines 50 and
60.
Chapter 6: ASSEMBLy LANGUAGE PROGRAMMING
For
the old ROMs, item
2,
Top
of
Core discussion should read
as
follows:
2. Top of Memory. Memory locations 134 and 135 contain the pointer to
the top of memory.
On
8K
PETs
this value
is
8192. You can temporarily set the top
of memory pointer to a lower address, thereby reserving a number
of
bytes from
the new pointer value to the actual top
of
memory for storage of
an
assembly
language program.
To
set the pointer, say,
down
1000 bytes, you
will
need to
store the value 7192 (8192-1000) converted into low, high address order, e.g.:
High Law
7192
10
=1C18
16
----..
1C
16
=2810 and 18
1
6 =2410
412

Table of Contents

Related product manuals