User Tools

Site Tools


base:kernal_floating_point_mathematics

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
base:kernal_floating_point_mathematics [2020-04-22 06:06] – [7.3 Integer to FP] robin_8bstbase:kernal_floating_point_mathematics [2020-12-06 20:48] (current) – [7.1 FP to integer] pararaum
Line 224: Line 224:
 ==== 7.1 FP to integer ==== ==== 7.1 FP to integer ====
  
 +There seems to be only a single routine in the ROMs, see Lothar Englisch, "The Advanced Machine Language Book", Abacus Software, 1984, p 28. IT is located at $BC9B and converts the floating-point value in the FAC (the fractional portion is truncated) into a whole number. The four mantissa bytes ($62-$65) contain the value in a big-endian representation.
 ==== 7.2 FP to string ==== ==== 7.2 FP to string ====
  
Line 234: Line 235:
 **$bc44** = Convert signed 16-bit integer held in FAC1 at $63 (lo) and $62 (high) to FP\\ **$bc44** = Convert signed 16-bit integer held in FAC1 at $63 (lo) and $62 (high) to FP\\
 **$b391** = Convert signed 16-bit integer held in Y/A (lo/high) to a FP number in FAC1\\ **$b391** = Convert signed 16-bit integer held in Y/A (lo/high) to a FP number in FAC1\\
-**$bc3c** = Convert unsigned 8-bit integer held in A to a FP number in FAC1\\+**$bc3c** = Convert signed 8-bit integer held in A to a FP number in FAC1\\
 **$b3a2** = Convert unsigned 8-bit integer held in Y to a FP number in FAC1 **$b3a2** = Convert unsigned 8-bit integer held in Y to a FP number in FAC1
  
base/kernal_floating_point_mathematics.1587528409.txt.gz · Last modified: 2020-04-22 06:06 by robin_8bst