AMSTRAD cpc 6128 Manuel d'utilisateur Page 77

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 105
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 76
The Amstrad CPC Firmware Guide
77
The Maths Firmware
&BDC1 MOVE REAL (&BD3D for the 464)
Action Copies the five bytes that are pointed to by DE to the location held in HL
Entry DE points to the source real value, and HL points to the destination
Exit
HL points to the real value in the destination, Carry is true if the move went properly, F is corrupt, and all
other registers are preserved
Notes For the 464 only, A holds the exponent byte of the real value when the routine is exited
&BD64 INTEGER TO REAL (&BD40 for the 464)
Action Converts an integer value into a real value
Entry
HL holds the integer value, DE points to the desti- nation for the real value, bit 7 of A holds the sign of
the integer value - it is taken to be negative if bit 7 is set
Exit HL points to the real value in the destination, AF and DE are corrupt, and all others are preserved
&BD67 BINARY TO REAL (&BD43 for the 464)
Action Converts a four byte binary value into a real value at the same location
Entry HL points to the binary value, bit 7 of A holds the sign of the binary value - negative if it is set
Exit
HL points to the real value in lieu of the four byte binary value, AF is corrupt, and all others are
preserved
Notes
A four byte binary value is an unsigned integer up to &FFFFFFFF and is stored with the least significant
byte first, and with the most significant byte last
&BD6A REAL TO INTEGER (&BD46 for the 464)
Action Converts a real value, rounding it into an unsigned integer value held in HL
Entry HL points to the real value
Exit
HL holds the integer value, Carry is true if the conversion worked successfully, the Sign flag holds the
sign of the integer (negative if it is set). A, IX and the other flags are corrupt, and all other registers are
preserved
Notes This rounds the decimal part down if it is less than 0.5, but rounds up if it is greater than, or equal to 0.5
&BD6D REAL TO BINARY (&BD49 for the 464)
Action Converts a real value, rounding it into a four byte binary value at the same location
Entry HL points to the real value
Exit
HL points to the binary value in lieu of the real value, bit 7 of B holds the sign for the binary value (it is
negative if bit 7 is set), AF, B and IX are corrupt, and all other registers are preserved
Notes See REAL TO INTEGER for details of how the values are rounded up or down
&BD70 REAL FIX (&BD4C for the 464)
Action
Performs an equivalent of BASIC's FIX function on a real value, leaving the result as a four byte binary
value at the same location
Entry HL points to the real value
Exit
HL points to the binary value in lieu of the real value, bit 7 of B has the sign of the binary value (it is
negative if bit 7 is set), AF, B and IX are corrupt, and all others are preserved
Notes
FIX removes any decimal part of the value, rounding down whether positive or negative - see the
BASIC handbook for more details on the FIX command
&BD73 REAL INT (&BD4F for the 464)
Action
Performs an equivalent of BASIC's INT function on a real value, leaving the result as a four byte binary
value at the same location
Entry HL points to the real value
Exit HL points to the binary value in lieu of the real value, bit 7 of B has the sign of the binary value (it is
Vue de la page 76
1 2 ... 72 73 74 75 76 77 78 79 80 81 82 ... 104 105

Commentaires sur ces manuels

Pas de commentaire