The remaining page zero locations from 212 to 255 are used by the OS's floating point package, a whole bunch of subroutines that BASIC uses when doing math and that kind of stuff. The routines themselves are stored in the OS ROM, so if you don't use them at all in your program, these locations will be free. Don't count on it though, even if you think you're not using the routines. They can sneak up on you when you least expect it.
Floating point math uses six-byte BCD, which was explained briefly under location VVTP (134,135). See the section in De Re Atari on the floating point package for more information.
Unfortunately, the listing for the floating point package is mighty hard to come by, so some of these locations are going to have real short explanations. My apologies to you, and my thanks to the OS Manual and Mapping the Atari for the information I couldn't find anywhere else.
Floating point register zero. A floating point register is just a place used to hold floating point numbers while operations are performed on them (it may also hold a partial result of an operation). They are all, including FR0 of course, six bytes long since they must hold a six byte BCD representation of the number.
FR0 is also used by the USR command. Remember that USR has the format X=USR(address [,argument][.... ]) where X can be any variable and the arguments are optional. If you want your machine language routine to give a value to X, you should store that value in the first two bytes of FR0 (212,213 - low byte and high byte respectively) before your RTS statement. BASIC will automatically convert these bytes into a floating point number and store it in X (or whatever variable you used for the call). If you're not using BASIC, you can use FR0 yourself to convert binary values to floating point and vice versa. Put the binary number in locations $D4 and $D5 and then JSR $D9AA to convert to floating point (the result will be stored in FR0). To convert back, JSR $D9D2. Note that you can't use these routines from BASIC since BASIC is constantly using FR0 and will mess up your values.
This isn't very well documented, but it appears to be an extra floating point register.
Floating point register one. FR1 has the same format as FR0 and is often used in conjunction with it, especially for two-number arithmetic.
Floating point register two.
A single-byte register used for single-byte calculations.
The value of the exponent (E). I suspect this is the exponent of the floating point number currently being processed, but this is only a suspicion.
The sign of the floating point number (same suspicion as above).
The sign of the exponent in EEXP (237).
The first character flag. Your guess is as good as mine.
The number of digits to the right of the decimal point (zero to eight).
An offset into the text buffer pointed to by INBUFF.
Finally something that can be understood! There are times when BASIC has to convert an ATASCII representation of a number to the corresponding floating point value (like when you type in X =1000). INBUFF points to a buffer used to hold the ATASCII representation. The result gets stored in FR0.
See LBUFF (1408 to 1535) for the buffer itself.
A temporary register.
Another temporary register.
Still another temporary register (will it never end?).
RADFLG determines whether the trigonometric functions (SIN, COS, etc.) are performed in radians or degrees. If it's zero, then radians are used. If it's six, then degrees are in fashion. SYSTEM RESET and NEW both restore RADFLG to radians (zero).
BASIC also calls this location DEGFLG.
FLPTR holds the address of the floating point number that the package is now operating on. FLPTR and FPTR2 (to follow) point to the addresses where the results of the current operation will be stored. The documentation is sketchy though, so I'm just making an educated guess.
FPTR2 holds the address of the second floating point number that the package is operating on.
Return to Table of Contents | Previous Chapter | Next Chapter