...
Mnemonic | Function Index Number | Function Code | Functionality | Description |
---|---|---|---|---|
FP_AND | 0 | $21 | (Integer only) bitwise Bitwise logical AND | (Integer only) Input parameters in HLhlC and DEdeB. Result in HLhlC. |
FP_IDV | 1 | $24 | (Integer only) quotient Quotient after division | (Integer only) Input parameters in HLhlC and DEdeB (returns HLhlC / DEdeB). Result in HLhlC. |
FP_EOR | 2 | $27 | (Integer only) bitwise Bitwise logical excusive OR | (Integer only) Input parameters in HLhlC and DEdeB. Result in HLhlC. |
FP_MOD | 3 | $2A | (Integer only) remainder Remainder after division | (Integer only) Input parameters in HLhlC and DEdeB (returns the remainder of HLhlC / DEdeB). Result in HLhlC. |
FP_OR | 4 | $2D | (Integer only) bitwise Bitwise logical OR | (Integer only) Input parameters in HLhlC and DEdeB. Result in HLhlC. |
FP_LEQ | 5 | $30 | Test for less than or equal to | Input parameters in HLhlC and DEdeB (test is HLhlC <= DEdeB). Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_NEQ | 6 | $33 | Test for not equal to | Input parameters in HLhlC and DEdeB. Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_GEQ | 7 | $36 | Test for greater than or equal to | Input parameters in HLhlC and DEdeB (test is HLhlC >= DEdeB). Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_LT | 8 | $39 | Test for less than | Input parameters in HLhlC and DEdeB (test is HLhlC < DEdeB). Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_EQ | 9 | $3C | Test for equality | Input parameters in HLhlC and DEdeB. Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_MUL | 10 | $3F | Multiplication | Input parameters in HLhlC and DEdeB. Result in HLhlC. |
FP_ADD | 11 | $42 | Addition | Input parameters in HLhlC and DEdeB. Result in HLhlC. |
FP_GT | 12 | $45 | Test for greater than | Input parameters in HLhlC and DEdeB (test is HLhlC > DEdeB). Result in HLhlC (-1 for TRUE; 0 for FALSE). |
FP_SUB | 13 | $48 | Subtraction | Input parameters in HLhlC and DEdeB (returns HLhlC - DEdeB). Result in HLhlC. |
FP_PWR | 14 | $4B | Raise to power | Input parameters in HLhlC and DEdeB (returns HLhlC ^ DEdeB). Result in HLhlC. |
FP_DIV | 15 | $4E | Division | Input parameters in HLhlC and DEdeB (returns HLhlC / DEdeB). Result in HLhlC. |
FP_ABS | 16 | $51 | Magnitude (ABSolute value) | Input parameters in HLhlC. Result in HLhlC. |
FP_ACS | 17 | $54 | Inverse cosine (Arc CoSine) | Input parameters in HLhlC. Result in HLhlC, in radians. |
FP_ASN | 18 | $57 | Inverse sine (Arc SiNe) | Input parameters in HLhlC. Result in HLhlC, in radians. |
FP_ATN | 19 | $5A | Inverse tangent (Arc TaNgent) | Input parameters in HLhlC. Result in HLhlC, in radians. |
FP_COS | 20 | $5D | Cosine | Input parameters in HLhlC, in radians. Result in HLhlC. |
FP_DEG | 21 | $60 | Convert radians to degrees | Input parameters in HLhlC, in radians. Result in HLhlC, in degrees. |
FP_EXP | 22 | $63 | Exponentiation | Raise 'e' [2.718...] to power of. Input parameters in HLhlC. Result in HLhlC. |
FP_INT | 23 | $66 | Integer truncation | (floor truncation, not rounding) Input parameters in HLhlC. Result in HLhlC. |
FP_LN | 24 | $69 | Natural logarithm | (Naperian or base 'e') logarithm Input parameters in HLhlC. Result in HLhlC. |
FP_LOG | 25 | $6C | Common (base 10) logarithm | Input parameters in HLhlC. Result in HLhlC. |
FP_NOT | 26 | $6F | (Integer only) bitwise Bitwise logical NOT | (Integer only) Input parameters in HLhlC. Result in HLhlC. |
FP_RAD | 27 | $72 | Convert degrees to radians | Input parameters in HLhlC, in degrees. Result in HLhlC, in radians. |
FP_SGN | 28 | $75 | Sign (signum) | Input parameters in HLhlC. Result in HLhlC. |
FP_SIN | 29 | $78 | Sine | Input parameters in HLhlC, in radians. Result in HLhlC. |
FP_SQR | 30 | $7B | Square root | Input parameters in HLhlC. Result in HLhlC. |
FP_TAN | 31 | $7E | Tangent | Input parameters in HLhlC, in radians. Result in HLhlC. |
FP_ZER | 32 | $81 | Return the constant zero | (as an integer) Input irrelevant. Result in HLhlC (all zero). |
FP_ONE | 33 | $84 | Return the floating point constant 1 | Input irrelevant. Result in HLhlC (HL=hl=0, C=$80) |
FP_TRU | 34 | $87 | Return the integer constant -1 | Input irrelevant. Result in HLhlC (HL=hl=$FFFF, C=$00) |
FP_PI | 35 | $8A | Returns pi | (the floating point representation of pi) Input irrelevant. Result in HLhlC. |
FP_VAL | 36 | $8D | Returns the numeric value of a string | HL points to start of string (null-terminated). Result in HLhlC, and DE points to last character read; if the call succeeded, this will be the terminator byte. If the call failed, HLhlC = 0. |
FP_STR | 37 | $90 | Return string representation of number | Number to convert to string, in in HLhlC. DE points to space to insert string. DE points to character after string when call returns. The de (alternate) register pair contains a format control variable which has the effect of the two middle bytes of the BBC BASIC format control variable @%:
|
FP_FIX | 38 | $93 | Round a number to integer | Input parameters in HLhlC (the call has no effect with C=0). Result in HLhlC. |
FP_FLT | 39 | $96 | Convert from integer to floating point | Input parameters in HLhlC (the call has no effect with C<>0). Result in HLhlC. |
FP_TST | 40 | $99 | Test a number for zero and sign | Input parameters in HLhlC. Result in A (0 for zero; $40 for positive; $C0 for negative). |
FP_CMP | 41 | $9C | Compare two numeric values | Input parameters in HLhlC (left) and DEdeB (right). Result in A:
|
FP_NEG | 42 | $9F | Negate number, ie. result = -input | Input parameters in HLhlC. Result in HLhlC. |
FP_BAS | $A2 | Execute operation using index number | Perform one of the above functions using the operation index number in A, eg.: ld a, 33 should call FP_ONE and return 1 (floating point). This facility can be useful if the operation depends on some parameter, to avoid writing selfmodifying code. |