Sony HB-501P Service Manual page 19

Home computer
Hide thumbs Also See for HB-501P:
Table of Contents

Advertisement

Available languages

Available languages

4
FUNCTIONS
NUMERICAL FUNCTIONS
FUNCTION FOR DATA INPUT
A BS (X)
Give an absolute value.
ATN (X)
Give arc tangent.
CDBL (X)
Convert to the double precision type.
Cl NT (X)
Convert to the integer type.
(-32768^X^32767)
COS (X)
Give cosine of X radians.
OSNG (X)
Convert to the single precision type.
ERL
Give the number of the line with an error.
ERR
Give the error code.
EXP (X)
Give e*.
FIX (X)
Give the integer part of X
INT (X)
Give the maximum integer less than or
equal to X
LOG (X)
Give natural logarithm.
RND (X)
Give random number.
SGN (X)
Give 1 if X>0, 0 if X= 0 and -1 if X<0
SIN (X)
Give sine of X radians.
SQR (X)
Give square root.
TAN (X)
Give tangent of X radians.
STRING FUNCTIONS
LEFTS (X$, N)
: Give N characters from the left of X$.
M!D$ (X$, M [, Nj)
: Give N characters beginning with the
Mth character from the left of X$.
RIGHTS (X$, N)
Give N characters from the right of X$.
SPACES (N)
Give N spaces.
STRINGS (N, J)
Give N characters whose character code
is J.
STRINGS (N, X$)
: Give N times the first character of X$.
TAB (N)
: Move the cursor to the Nth position.
SPC (N)
; Give N spaces.
FUNCTION FOR CONVERSION BETWEEN NUMERICAL AND
STRING TYPES
ASC (X$)
: Give the character code of the first
character of X$.
BINS (X)
; Give a binary expression of X as a string
type data. (-32768^X^65535)
CHR$ (X)
: Give a character whose character code
is X.
HEX$ (X)
; Give a hexadecimal expression of X as a
string type data. (-32768^X^65535)
INSTR ([NJ X$, Y$)
: Give the position of Y$ after the Nth
character of X$.
LEN (X$)
; Give a number of characters of X$.
OCTS (X)
: Give an octal expression of X as a string
type data. (-32768^X^65535)
STRS (X)
; Convert to the string type.
VAL (X$)
: Convert to the numeric type.
OTHER FUNCTION
PLAY (N)
; Check if music is playing.
When N =1, 2 or 3 it gives -1 when
music is playing; otherwise it gives 0.
When N = 0, the status (-1 or 0) of each
music subcommand are ORed and the
result is given.
From the screen
CSRLIN
POS (X)
POINT (X, Y)
Give y-coordinate of the cursor.
Give x-coordinate of the cursor.
Give color code at point (X, Y).
From data file
EOF (file number)
: Give -1 when last data in file is read;
otherwise give 0.
INPUTS (N,
[ft]
file number) : Input and give fl characters from the fiie.
From the printer
LPOS (X)
: Give the position of the print head in the
printer buffer.
From memory
FRE (0)
FRE (" ")
PEEK (address)
VARPTR (variable)
VPEEK (address)
: Give unused area in memory.
: Give unused part or string area.
: Give the memory contents of the
address.
: Give the starting address of the memory
area storing the variable.
: Give the video RAM contents of the
address.
From the keyboard
INKEYS
: Give the character corresponding to the
pressed key.
INPUTS (X)
: Input X characters from the keyboard.
From I/O port
INP (port number)
: Input data from the I/O port.
From machine language subroutine
(9)
USER
to [> (X)
: Give the value from the user subroutine.
J
From joystick, paddle or touch pad
STICK (N)
: Give the direction of the joystick. (N = 0
for cursor move keys)
(Center= 0. Up = 1, Right up = 2, Right = 3,
Right down = 4, Down = 5, Left down = 6.
STRIG (N)
PDL (N)
PAD (N)
Left = 7, Left up = 8)
: Give -1 when the joystick trigger button
is pressed; otherwise, give 0. (N = 0 for
the space bar)
: Input data from the paddle.
: Give status of the touch pad.
When N = 0 or 4: Give -1 if the touch
pad is touched; otherwise, give 0.
When N = 1 or 5: Give x-coordinate of the
position touched.
When N = 2 or 6: Give y-coordinate of the
position touched.
When N = 3 or 7: Give -1 if the switch is
pressed; otherwise, give 0.
CONSTANTS
)
VARIABLES
,
* ✓
Constant
1
String type
Integer type
---—-
>
J
Floating-point type
t
Hexadecimal expression;
Octal expression
Binary expression
»
1
Variable
Variable name
«
Type declarator
1
--)
SPECIAL VARIABLES
TIME ; Retain a value in the timer. Q
SPRITES (sprite number): Retain thi
[Example] SPRITE$(1) = CHR$(&H18)
+ CHR$(&HFF) + CHR$(&!
CHR$(&H18) + CHR$(&H1f
• Special commands and fd
Display Processor)
BASE (expression)
: Used to read
the VDP table
VDP (numeric value) ; Used to read •
VDP register.
1-17

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hb-501f

Table of Contents