3-6

From C64-Wiki
Jump to navigationJump to search

The four zeropage addresses in the range 3–6 holds a pair of vectors that points to two BASIC ROM routines for conversion between binary integers and floating point figures:

  • Addresses 3 and 4 contains the values 170/$AA and 177/$B1, which, taken as a 16-bit address, points to 45482/$B1AA; the FACINX routine that converts a floating point number into binary form.
  • Addresses 5 and 6 contains the values 145/$91 and 179/$B3, which points to 45969/$B391; the GIVAYF routine that converts binary numbers to floating point.

These values are set up by the BASIC initialization routine at 58303–58401/$E3BF–E421, but neither the BASIC system nor KERNAL ever uses them for any purpose! Machine code programmers are thus free to use these bytes for their own purposes.