home *** CD-ROM | disk | FTP | other *** search
- AND
- Bitwise logical and between two integers.
- Priority 6.ABS
- This function gives the absolute
- value of a number:
- ABS(-3.14) = 3.14ACS
- This function gives the arc
- cosine of a number.
- This is the inverse function of <COS>:
- ACS(COS(x)) = xADVAL
- This function gives the
- value of the specified
- analogue port or buffer.ASC
- This function gives the
- ASCII code of the first
- character of a string:
- ASC("A") = 65
- ASC("AB") = 65ATN
- This function gives the
- arc tangent of a number.
- ATN(<TAN>(x)) = xAUTO
- This command automatically generates
- line numbers for typing in a program.
- AUTO [base number[,step size]]APPEND filename.
- This command appends
- a file to the program
- and renumbers the new lines.BGET#channel
- This function gives
- the next byte from
- the specified file.BPUT
- BPUT#channel,number
- put byte to open file.
-
- BPUT#channel,string[;]
- put string to open file,
- with[out] newline.BEATS
- BEATS x
- Set the number of microbeats in a bar.
-
- x = BEATS
- Gives the current number of microbeats.BEAT
- This function gives the
- current microbeat number.COLOUR
- COLOUR a [TINT t]
- Set text foreground colour
- [and tint] (background 128+a).
-
- COLOUR a,p
- Set palette entry for logical
- colour a to physical colour p.
-
- COLOUR a,r,g,b
- Set palette entry for a
- to r, g, b physical colour.CALL address {,parameter}
- Call machine code routine at the given address.
- Before the routine is entered, the assembler
- registers are set up as follows:
- R0 = A%
- R1 = B%
- R2 = C%
- R3 = D%
- R4 = E%
- R5 = F%
- R6 = G%
- R7 = H%
- R8 = Pointer to BASIC's workspace
- R9 = Pointer to <parameter list=>call0>
- R10 = Number of parameters
- R11 = Pointer to BASIC's string accumulator
- R12 = BASIC's LINE pointer
- R13 = BASIC's stack
- R14 = Link back to BASIC, and <environment info=>call3> ptr.CASE
- CASE expr OF
- WHEN expr{,expr}^ : lines
- WHEN expr{,expr}^ : lines
- OTHERWISE
- lines
- ENDCASECHAIN name
- Load and run a new Basic program.
- If used from within a Basic program,
- this program is discarded.CHR$ x
- This function gives
- the one character string
- of the supplied ASCII code.CLEAR
- Forget all variables.CLOSE#channel
- Close file previously opened with
- OPEN<IN=>OPENIN>/<UP=>OPENUP>/<OUT=>OPENOUT>#channel.CLG
- Clear graphics screen
- to current graphical
- backround colour.CLS
- Clear text screen to
- current background colour.COS x
- This function gives the
- cosine of a number.COUNT
- This function gives the number
- of characters PRINTed since
- the last newline.CIRCLE
- CIRCLE [FILL] x,y,r
- Draw circle outline [solid].DATA
- Introduces line of DATA to be <READ>.
- The list of items is separated by commas.
-
- <LOCAL> DATA, <RESTORE> DATA: save and restore current DATA pointer.DEG
- This function gives the value in
- degrees of a number in radians.
- DEG 3.14 = 180DEF
- DEF <FN>|<PROC>name [(parameter list)].
- Define function or procedure
- End function with =expression.
- End procedure with ENDPROC.DELETE start,end
- This command deletes all lines
- between the specified numbers.a DIV b
- Integer division, rounded towards zero.
- Priority 3.DIM
- DIM fred(100,100)
- Create and initialise an array.
-
- DIM fred% 100
- Allocate space for a byte array etc.
-
- DIM(fred())
- Function gives the number of dimensions.
-
- DIM(fred(),n)
- Function gives the size of the n'th dimension.DRAW
- DRAW [BY] x,y
- Graphics draw to [relative by] x,y.ENDPROC
- End of procedure definition.EDIT
- This command calls
- the ARM BASIC Editor.
- (Rubbish.. Don't use..)ENDWHILE
- End of <WHILE> structure.ENDCASE
- End of <CASE> structure.ENDIF
- End of <IF> structure.END
- END
- Statement marking end of program execution.
-
- END = expression
- Alter amount of memory allocated to BASIC.
-
- x = END
- Gives the end address of memory used.ENVELOPE
- ENVELOPE takes 14 numeric
- parameters separated by commas.ELSE
- Part of the <IF>
- or <ON> structure.EVAL
- This function evaluates
- a string: EVAL("2*X+1").ERL
- This function gives the line
- number of the last error.ERROR
- Part of ON ERROR
- LOCAL ERROR
- and RESTORE ERROR statements.
- Cause an error: ERROR [EXT] number,string.EOF#channel
- This function gives TRUE
- if at end of open file;
- else FALSEa EOR b
- Bitwise logical exclusive-or
- between two integers.
- Priority 7.ERR
- This function gives the error
- number of the last error.EXP x
- This function gives the
- exponential of a number.
- <LN>(EXP(x)) = x
- EXP(<LN>(x)) = xEXT#channel
- x = EXT#channel
- Gives the length (extent)
- of an open file.
-
- EXT#channel = expression
- Sets the length of an open file.ELLIPSE
- ELLIPSE [FILL] x,y,maj,min[,angle]
- Draw ellipse outline [solid].FOR
- FOR variable = start value TO limit value [STEP step size]
- statements..
- NEXT [variable]FALSE
- This function gives the logical
- value 'false' i.e. 0.FILL
- FILL [BY] x,y
- Flood fill from [relative to] point x,y.FN
- Call a function with FNfred(x,y)
- Define one with <DEF> FNfred(a,b).GOTO line nr
- Continue execution at specified line.
- Don't use this! Please! Use of line numbers
- should be avoided at all costs.GET
- x = GET
- Gives the ASCII value of the
- next input character.
-
- x$ = GET$
- Gives the next input character
- as a one character string.
-
- x$ = GET$#channel
- Gives next string from the file.GOSUB line nr
- Call subroutine at given line number.
- Don't use this! Please! Use of line numbers
- should be avoided at all costs.GCOL
- GCOL a [TINT t]
- Set graphics foreground colour
- [and tint] (background 128+a).
-
- GCOL action,a [TINT t]
- Set graphics fore|background
- colour and action.HIMEM
- This psuedo-variable reads or sets the
- address of the end of BASIC's memory.HELP
- This command gives help on
- usage of the interpreter.INPUT
- INPUT [LINE]['|<TAB>|<SPC>]["display string"][,|;]variable
- Input from user.
- INPUT LINE ... can also be written as LINE INPUT ...
-
- INPUT#channel,list of variables
- Input data from open file.IF
- Single line if:
- IF expression [THEN] statements [ELSE statements].
-
- Block if:
- IF expression THEN
- lines
- [ELSE lines]
- ENDIFINKEY
-
- INKEY$ nr = CHR$(INKEY nr)
-
- INKEY 0 to 32767
- Function waits nr centiseconds to read character.
-
- INKEY -255 to -1
- Function checks specific key for TRUE|FALSE.
-
- INKEY -256
- Function gives operating system number.INT nr
- This function gives the nearest
- integer less than or equal to the number:
- INT 3.14 = 3
- INT -3.14 = -4INSTR
- INSTR(string,sub string [,start pos])
- Find sub string position.
-
- INSTR("ABC","C") = 3
- INSTR("ABC","X") = 0INSTALL filename
- Permanently install a function
- and procedure library.LIST
- This command lists the program:
- LIST [start line][,[end line]] [IFpattern].
- List lines in the given range.
- If no range, then list all lines.
- If just start line: list this one line
- If start line,: list all lines from this one.
- If [IFpattern] : only list lines containing pattern
-
- See <LISTO> for how lines will be printed.LISTO number.
- Bits mean:
- 0: space before line
- 1: indent structure
- 2: split lines at :
- 3: don't list line number
- 4: list tokens in lower case
-
- Default options are %0000LINE
- LINE x1,y1,x2,y2
- Draw a line from x1,y1 to x2,y2
- Equivalent to:
- MOVE x1,y1
- DRAW x2,y2
-
- Part of <INPUT> LINE or LINE INPUT statement.LOAD
- This command loads a new program,
- replacing the old one.LOMEM
- This psuedo-variable reads or sets the
- address of the start of the variables.LOCAL
- LOCAL list of variables
- Make things private to function or procedure.
-
- LOCAL DATA
- Save DATA pointer on stack.
- Only a LOCAL ERROR should come after this.
-
- LOCAL ERROR
- Save error control status on stack.
- Must be last LOCAL statement.LEFT$
- LEFT$(string,nr)
- Gives leftmost nr of characters from string.
-
- LEFT$(string)
- Gives leftmost LEN-1 characters.
-
- LEFT$(string variable [,count]) = string2
- Overwrite all [or count] characters from start,
- with characters from string2.LEN
- This function gives the
- length of a string.
- LEN"A" = 1
- LEN"" = 0LET
- Optional part of assignment.
- LET A% = 42
- A% = 42LOG
- This function gives the common
- logarithm (base 10) of a number.
- LOGx = <LN>(x)/LN(10)LN x
- This function gives the natural
- logarithm (base e) of a number.
- LN(e^x) = x, e = 2.718....LIBRARY filename
- Functions and procedures of the
- named program can be used.LVAR
- This command lists all
- variables in use.MID$
- MID$(string,position)
- Gives all of string starting from position.
-
- MID$(string,position,count)
- Gives some of string from position.
-
- MID$(string variable,position[,count]) = string2
- Overwrite all [or count] characters in
- string variable, with characters from string2.MODE
- MODE nr
- Set screen mode.
- nr = MODE
- Gives the current screen mode.MOD
- a MOD b
- Remainder after integer division
- between two integers. Priority 3.
-
- MOD array()
- The MOD function gives the square root
- of the sum of the squares
- of all the elements in a numeric array.MOVE
- MOVE [BY] x,y
- Graphics move to [relative by] x,y.MOUSE
- MOUSE x,y,z[,t]
- Sets x,y to mouse position;
- z to button state [t to time].
-
- MOUSE COLOUR a,r,g,b
- Set mouse palette entry for a
- to r, g, b physical colour.
-
- MOUSE OFF
- Turn mouse pointer off.
-
- MOUSE ON [a]
- Sets mouse pointer 1 [or a].
-
- MOUSE RECTANGLE x,y,width,height
- Constrain mouse movement to inside rectangle.
-
- MOUSE STEP a[,b]
- Sets mouse step multiplier to a,a [or a,b].
-
- MOUSE TO x,y
- Positions mouse and pointer at x,y.NEXT
- NEXT [variable[,variable]^]
- Closes one or several <FOR>..NEXT structures.NEW
- This command erases
- the current program.NOT x
- This function gives the number
- with all bits inverted (0 and 1 exchanged).
- NOT %0000000000000000000000000000001 (1)
- = %1111111111111111111111111111110 (-2)OLD
- This command recovers the
- program just after a <NEW>.ON
- ON
- Cursor on.
-
- ON ERROR [LOCAL|OFF]
- Define error handler.
-
- ON expression GOTO|GOSUB|PROC.... ELSE
- Call from specified list item.
- Don't use GOTO or GOSUB! Please!
- Use of line numbers should be
- avoided at all costs.OFF
- OFF
- Turn cursor off.
-
- Part of <TRACE> OFF,
- ON <ERROR> OFF statements.OF
- Part of the <CASE> statement.ORIGIN x,y
- Sets x,y as the new
- graphics 0,0 point.OR
- Bitwise logical or between
- two integers. Priority 7.x = OPENIN filename
- The function opens a file
- for inputx = OPENOUT filename
- The function opens a file
- for outputx = OPENUP filename
- The function opens a file
- for input and output.OSCLI string
- Give string to Operating
- System Command Line Interpreter.OTHERWISE
- Part of <CASE> structure.OVERLAY array$()
- Set an array of filenames
- for overlay libraries.
- (Only one of the given libraries
- will be loaded at any given time)PRINT
- PRINT ['|<TAB>|<SPC>]["display string"][expression][;]
- Print things in fields defined by @%.
-
- PRINT#channel,list of expressions
- Print data to open file.PAGE
- This psuedo-variable reads or sets
- the address of the start of the program.PTR#channel
- x = PTR#channel
- Gives the position in a file.
-
- PTR#channel= x
- Sets the position in a file.PI
- This function gives the value
- of 'pi' (3.1415926535).PLOT n,x,y
- Graphics operation <n=>SWI.os_plot0>.POINT
- x = POINT(x,y)
- Gives the logical colour
- of a graphics point.
- See also <TINT>
-
- POINT [BY] x,y
- Set pixel at [relative to] x,y.
-
- POINT TO x,y
- Position pointer at x,y,
- if not linked to mouse.PROC
- PROCfred(x,y)
- Call a procedure.
-
- DEF PROCfred(a,b)
- Define a procedure.POS
- This function gives
- the x-coordinate
- of the text cursor.QUIT
- QUIT
- Leave the interpreter.
-
- x = QUIT
- Gives TRUE if BASIC was entered
- with a -quit option.RETURN
- End of a <GOSUB> subroutine.REPEAT
- REPEAT
- lines
- UNTIL boolean exprREPORT
- REPORT
- Print last error message.
-
- x$ = REPORT$
- Gives last error string.READ
- READ list of variables
- Read the variables in turn
- from DATA statements.REM
- Ignores everything until a colon or end
- of line. Note that to REM out a line
- like PRINT "x:" will cause problems due
- to the colon in the string.RUN
- Clear variables,
- and start execution
- at beginning of program.RAD x
- This function gives the value
- in radians of a number in degrees.
- RAD(180) = 3.1415...
- <DEG>(RAD(x)) = xRESTORE
- RESTORE [+][number]
- Restore the data pointer
- to first or given line, or
- move forward number lines
- from the start of the next line.
-
- RESTORE DATA
- Restore DATA pointer from stack.
-
- RESTORE ERROR
- Restore error control status from stack.RIGHT$
- RIGHT$(string,number)
- Gives rightmost number
- of characters from string.
-
- RIGHT$(string)
- Gives rightmost character.
-
- RIGHT$(string variable [,count]) = string2
- Overwrite characters at end of
- string variable, with all [or count]
- characters from string2 RECTANGLE
- RECTANGLE [FILL] xlo,ylo,width[,height]
- [TO xlo,ylo]
- Draw a rectangle outline [solid],
- or copy/move the rectangle.RENUMBER [base,[step]]
- This command renumbers
- the lines in the program.
- Default values for
- base and step, is 10.STEP
- Part of the <FOR> structure.SAVE [filename]
- This command saves the current program.
- If filename is omitted, and first line
- in program is 10 REM >string,
- this string is used instead.SGN x
- This function gives the values
- -1 if x is negative
- 0 if x is zero
- 1 if x is positiveSIN x
- This function gives
- the sine of a number.
- x is given in radians.SQR
- This function gives the
- square root of a number.
- SQR(X*X) = XSOUND
- SOUND channel,amplitude,pitch,duration [,start beat]
- Make a sound.
-
- SOUND ON|OFF
- Enable|disable sounds.SPC n
- In <PRINT> or <INPUT> statements:
- prints out n spaces.STR$[~] nr
- Gives string representation
- [in hex if ~] of a number.STRING$(nr,string)
- Gives string replicated
- nr times.STOP
- Stop program.STEREO channel,pos
- Set the stereo position
- for a channel.SUM array()
- This function gives
- the sum of all elements
- in an array.SUMLEN array$()
- Gives the total length
- of all elements
- of a string array.SWAP var1,var2
- Exchange the contents
- of the two variables.
- SWAP A%,B%
- is equivalent to
- tmp% = A%
- A% = B%
- B% = tmp%SYS
- SYS expr {,expr}^ [TO var1 {,varn}^ [;var2]]
- The SYS statement calls one of the <SWI=>SWI.$> routines
- in the operating system, or in a extension module.TAN nr
- This function gives
- the tangent of a number.
- TAN x = <SIN> x / <COS> xTAB
- In <PRINT> or <INPUT> statements:
- TAB(n)
- Move text cursor to column n.
- PRINT TAB(10)"column 10"
-
- TAB(x,y)
- Move text cursor to
- screen position x,y.
- PRINT TAB(0,0)"Upper left corner"TEMPO
- TEMPO expr
- Set the sound microbeat tempo.
-
- x = TEMPO
- Gives the current microbeat tempo.THEN
- Part of the <IF> structureTIME
- Read/Set clock:
-
- TIME = 12345
- x = TIME
- TIME$ = "Tue, 10 Dec 1991.18:51:50"
- x$ = TIME$TINT
- TINT a,t
- Set the tint for <COLOUR>|<GCOL>|fore|back a
- to t in 256 colour modes.
-
- a = TINT(x,y)
- Gives the tint of a point in 256 colour modes.TO
- Part of <FOR> structure.TOP
- Gives the address
- of the end
- of the program.TRACE
- TRACE [STEP] ON|OFF|PROC|nr
- Trace [in single step mode] on or off
- or procedure or function calls
- or lines below the number.TRUE
- This function gives
- the logical value 'true' i.e. -1.TWINO nr
- This command converts the program
- to text with a <LIST option=>LISTO>,
- and calls Twin.TWIN
- This command converts
- the program to text,
- and calls Twin.UNTIL
- Part of <REPEAT> structure.USR adr
- This function gives the value
- returned by the machine code routine
- at the given address.VDU
- VDU <nr=>VDU.$> {,|;[|]nr} [,|; or |]
- List of values to be sent to vdu.
- , : preceding value is 8 bit.
- ; : preceding value is 16 bit.
- | : 8 bytes of zeroes.VAL str$
- This function gives the numeric
- value of a textual string.
- VAL "42" = 42VPOS
- This function gives
- the y-coordinate
- of the text cursor.VOICES expr
- Set the number of
- sound voice channels.VOICE channel,string
- Assign a named sound algorithm
- to the voice channel.WHILE
- WHILE expr
- lines
- ENDWHILEWHEN
- Part of <CASE> structure.WAIT
- Wait for vertical sync.WIDTH expr
- Set width of output.ASN
- This function gives the
- arc sine of a number.
- This is the inverse function of <SIN>:
- ASN(SIN(x)) = xIndex
- #Table 23 10
- <ABS >
- <ACS >
- <ADVAL >
- <AND >
- <APPEND >
- <ASC >
- <ASN >
- <ATN >
- <AUTO >
- <BEAT >
- <BEATS >
- <BGET >
- <BPUT >
- <CALL >
- <CASE >
- <CHAIN >
- <CHR >
- <CIRCLE >
- <CLEAR >
- <CLG >
- <CLOSE >
- <CLS >
- COLOR
- <COLOUR >
- <COS >
- <COUNT >
- <DATA >
- <DEF >
- <DEG >
- <DELETE >
- <DIM >
- <DIV >
- <DRAW >
- <EDIT >
- <ELLIPSE >
- <ELSE >
- <END >
- <ENDCASE >
- <ENDIF >
- <ENDPROC >
- <ENDWHILE >
- <ENVELOPE >
- <EOF >
- <EOR >
- <ERL >
- <ERR >
- <ERROR >
- <EVAL >
- <EXP >
- <EXT >
- <FALSE >
- <FILL >
- <FN >
- <FOR >
- <GCOL >
- <GET >
- <GOSUB >
- <GOTO >
- <HELP >
- <HIMEM >
- <IF >
- <INKEY >
- <INPUT >
- <INSTALL >
- <INSTR >
- <INT >
- <LEFT >
- <LEN >
- <LET >
- <LIBRARY >
- <LINE >
- <LIST >
- <LISTO >
- <LN >
- <LOAD >
- <LOCAL >
- <LOG >
- <LOMEM >
- <LVAR >
- <MID >
- <MOD >
- <MODE >
- <MOUSE >
- <MOVE >
- <NEW >
- <NEXT >
- <NOT >
- <OF >
- <OFF >
- <OLD >
- <ON >
- <OPENIN >
- <OPENOUT >
- <OPENUP >
- <OR >
- <ORIGIN >
- <OSCLI >
- <OTHERWISE >
- <OVERLAY >
- <PAGE >
- <PI >
- <PLOT >
- <POINT >
- <POS >
- <PRINT >
- <PROC >
- <PTR >
- <QUIT >
- <RAD >
- <READ >
- <RECTANGLE >
- <REM >
- <RENUMBER >
- <REPEAT >
- <REPORT >
- <RESTORE >
- <RETURN >
- <RIGHT >
- <RND >
- <RUN >
- <SAVE >
- <SGN >
- <SIN >
- <SOUND >
- <SPC >
- <SQR >
- <STEP >
- <STEREO >
- <STOP >
- <STR >
- <STRING >
- <SUM >
- <SUMLEN >
- <SWAP >
- <SYS >
- <TAB >
- <TAN >
- <TEMPO >
- <THEN >
- <TIME >
- <TINT >
- <TO >
- <TOP >
- <TRACE >
- <TRUE >
- <TWIN >
- <TWINO >
- <UNTIL >
- <USR >
- <VAL >
- <VDU >
- <VOICE >
- <VOICES >
- <WAIT >
- <WHEN >
- <WHILE >
- <WIDTH >
- #EndTableRND
- x = RND
- Gives a random integer.
-
- x = RND(n) where n\<0
- Initialise random number
- generator based on n.
-
- x = RND(0)
- Last RND(1) value.
- x = RND(1)
- Random real 0..1.
-
- RND(n) where n>1
- Random integer between 1 and INT(n).Parameter list:
- 0 Address of last parameter
- 4 <Type=>call1> of last parameter
- 8 Address of last but one parameter
- 12 <Type=>call1> of last but one parameter
- .
- .Parameter-type:
- Type Example Address points to
- ---- ---------- -------------------------------------
- &000 ?x Byte-aligned byte
- &004 !x,x%,x(n) Byte-aligned word
- &005 |x,x,x(n) Byte-aligned 5-byte real
- &080 x$,$(n) Byte-aligned address-word,length-byte
- &081 $x String, terminated by 13
- &104 x%() Word-aligned ptr to integer <array=>call2>
- &105 x() Word-aligned ptr to real <array=>call2>
- &180 x$() Word-aligned ptr to string <array=>call2>Array:
- 0 Subscript limit 1st dimension.
- 4 Subscript limit 2nd dimension.
- .
- .
- n 0
- n+4 Total nr of entries.
- n+8 Array elements..
-
-
- DIM x(I-1,J-1,K-1) :
-
- Address of x(i,j,k) :
- ((i*J+j)*K+k)*element_size + n+8Environment info:
- 0 B CALL2REAL Return address.
- 4 STRACC String accumulator
- 8 PAGE Current PAGE value
- 12 TOP Current TOP value
- 16 LOMEM Current variable start
- 20 HIMEM Current stack end
- 24 MEMLIMIT Limit of available memory
- 28 FSA Free space start
- 32 TALLY Value of COUNT
- 36 TIMEOF not used
- 40 ESCWORD Exception flag word
- 44 WIDTHLOC Value of WIDTH
- 48 B VARIND Get value of L-value
- 52 B STOREA Store value into L-value
- 56 B STSTORE Store string into type 128 string
- 60 B LVBLNK Convert string name into L-value addr and type
- 64 B CREATE Create new variable
- 68 B EXPR Use expr analyser on string
- 72 B MATCH Lexical analyse source string to dest string
- 76 B TOKENADDR Ptr to string for given token
- 80 0
- 84 9 Nr of additional routines present.
- 88 B FSTA
- 92 B FLDA
- 96 B FADD
- 100 B FSUB
- 104 B FMUL
- 108 B FDIV
- 112 B FLOAT
- 116 B FIX
- 120 B FSQRTOPT
- Set BASIC assembler options
- Bit: Meaning when set:
- ---- -----------------------------------
- 0 Assembly listing enabled
- 1 Assembler errors enabled
- 2 Assembled code placed at O% instead of P%
- 3 Check if assembled code exceeds memory limit L%