Commodore PET User Manual page 346

Table of Contents

Advertisement

The parameter value is passed to the USR subroutine in system loca-
tions that function as a floating point accumulator (FAC) for ail functions. The
FAC resides in six bytes from memory locations 94 to 99 (5E
16-6316).
The
FAC has the following format:
O=positive
-1 =negative
(FAC
ating
nt)
99
98
97
96
95
Fraction
Flo
1
1
Poi
11
Sign
!
Exponent
f
Memory location.
94
Like floating variables. the exponent is stored in ex cess 128 format and the
fraction is normalized with the high-order bit of byte 95 (the high-order byte of
the fraction) set to 1. The difference between this format and the variable format
is that the high-order 1 bit is present in byte 95 of the FAC. An extra byte (99) is
used to hold the sign of the fraciton. (This is do ne for ease of manipulation by the
functions that use the FAC.)
The USR subroutine must fetch the value passed to it from the FAC
locations. It must deposit the value being returned into the FAC before ter-
minating. If the USR subroutine does not alter the FAC, then the same value
is returned to the program as was passed from it.
333

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cbm

Table of Contents