This Technical Note discusses real variable storage in AppleSoft BASIC.
In AppleSoft BASIC, real variables (non-array) are stored sequentially starting at the address pointed to by locations $69 and $6A. The first two bytes are the name of the variable, the third is the exponent, and the fourth through seventh are the mantissa.
The equation which follows is: 2^(Exponent-1) * 1.Mantissa
A = 3 (real variable equal to 3)
The seven bytes look like:
41 00 Variable name = A 82 Exponent = 1 40 00 00 00 Mantissa = .5
which works out as:
2^1 * 1.5 = 3
B = 5 (real variable equal to 5)
The seven bytes look like:
42 00 Variable name = B 83 Exponent = 2 20 00 00 00 Mantissa = .25
which works out as:
2^2 * 1.25 = 5
This and all of the other Apple II Technical Notes have been converted to HTML by Aaron Heiss as a public service to the Apple II community, with permission by Apple Computer, Inc. Any and all trademarks, registered and otherwise, are properties of their owners.