Download Print this page

Atari 400 Technical Reference Manual page 107

Home computer system
Hide thumbs Also See for 400:

Advertisement

FRO (00D4l =
6-byte internal form of FP number.
FRl (OOEOl =
6-byte internal form of FP number.
FLPTR (OOFCl =
2-byte pointer
(10,
hi) to a FP.
number.
INBUFF (00F3l = 2-byte pointer (lo,hi) to an ASCII text
buffer.
CIX (OOF2l =
l-byte
i
nd e x
I
used as offset to buffer
pointed to by INSUFF.
LBUFF (0580l =
result buffer for the FASC rout i ne.
FUNCTIONS/CALLING SEGUENCES
Descriptions of these floating point routines assume that
a pseudo register is not altered by a given routine. The
numbers in
s~uare
brackets (xxxxl are the ROM addresses of the
routines.
ASCII to Floating Point Conversion (AFP)
Function: This routine takes an ASCII string as input and
produces a floating point number in internal form.
Calling
se~uence:
INBUFF = pointer to buffer containing the ASCII
representation of the number.
CIX
=
the buffer offset to the first byte of the ASCII
number.
JSR
ses
FRO
=
CIX
=
AFP [D800l
first byte of ASCII number is invalid
floating point number.
the buffer offset to the first byte after the ASCII
number.
Algorithm: The routine takes bytes from the buffer until it
encounters a byte that cannot be part of the number. The bytes
scanned to that point are then converted to a floating point
number.
If the first byte encountered is invalid, the carry bit
is set as a flag.
Floating Point to ASCII Conversion (FASC)
Function: This routine converts a floating point number from
internal form to its ASCII representation.
OPERATING SYSTEM C016555 -- Section
8
122

Hide quick links:

Advertisement

loading

This manual is also suitable for:

800