Commodore 128 System Manual page 349

Table of Contents

Advertisement

TAN
Return tangent of argument
TAN(X)
This function returns the tangent of X, where X is an angle in
radians.
EXAMPLE:
PRINT TAN(.785398163)
1
USR
Call user-defined subfunction
USR(X)
When this function is used, the program jumps to a machine
language program whose starting point is contained in memory
locations 4633($1219) and 4634($121 A), (or 785($0311) and
786($0312) for C64 mode). The parameter X is passed to the
machine language program in the floating point accumulator. A
value is returned to the BASIC program through the calling
variable. You must redirect the value into a variable in your
program in order to receive the value back from the floating point
accumulator. An ILLEGAL QUANTITY ERROR results if you don't
specify this variable. This allows the user to exchange a variable
between machine code and BASIC.
EXAMPLE (128 Only):
10 POKE 4633,0
20 POKE 4634,192
30 A = USR(X)
40 PRINT A
Place starting location ($C000=49152:$00=0:$C0=192) of
machine language routine in location 4633 and 4634. Line 30
stores the returning value from the floating point accumulator.
Note: default 128 bank 15.
1 8 - 2 1

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

128d

Table of Contents