BBC BASIC Keywords
ABS | Absolute value (function) | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Returns the absolute positive value of its argument. | |||||||||||||||||||||||||||
ACS | Arc cosine (function) | |||||||||||||||||||||||||||
| Returns the arc cosine of its argument in radians. The permitted range of the argument is -1 to +1- For example,
will print 60, because COS(60°) is 0.5. | |||||||||||||||||||||||||||
AND (A.) | Logical AND (operator) | |||||||||||||||||||||||||||
| Performs a bitwise logical AND between two operands which are internally converted to 4 byte integers before the operation. It is normally used to join two conditions in an IF or UNTIL statement; thus
ensures that a rectangle is larger than 10 x 10. | |||||||||||||||||||||||||||
ASC | ASCII value (function) | |||||||||||||||||||||||||||
| Returns the ASCII character value of the first character of the argument string.
gives 90, the ASCII value of "Z". The brackets are optional, and | |||||||||||||||||||||||||||
ASN | Arc sine (function) | |||||||||||||||||||||||||||
| Returns the arc sine of its argument in radians. The permitted range of the argument is -1 to +1. | |||||||||||||||||||||||||||
ATN | Arc tangent (function) | |||||||||||||||||||||||||||
| Returns the arc tangent of its argument in radians. | |||||||||||||||||||||||||||
AUTO (AU.) | Automatic numbering (command) | |||||||||||||||||||||||||||
| Allows lines to be entered without first typing in the number of the line. The line numbers are preceded by the usual prompt (>). By default the starting line number and increment are both 10, but they may optionally be specified; for example
will start with line 20, and
will start at line 100 and increment by 20. AUTO will continue generating line numbers until you press | |||||||||||||||||||||||||||
BGET (B.#) | Byte from data file (function) | |||||||||||||||||||||||||||
| Returns a byte from the data file whose channel number is its argument. The file pointer is incremented after the byte has been read. For example,
reads the next character from file c.
| |||||||||||||||||||||||||||
BPUT# (BP.#) | Output a byte (statement) | |||||||||||||||||||||||||||
|
Puts a byte to the data file whose channel number is the first argument. The second argument's least significant byte is written to the file. The file pointer is incremented after the byte has been written. Thus
writes char to file channel. | |||||||||||||||||||||||||||
CALL (CA.) | Call machine-code (statement) | |||||||||||||||||||||||||||
| Calls a machine code subroutine at a specified address, passing parameters in a parameter block addressed by the Z80's IX register. The IY register is set to the address of the machine code subroutine being called. The processor's A, B, C, D, E, F, H, and L registers are initialised to the least significant bytes of A%, B%, C%, D%, E%, F%, H%, and L% respectively. This statement could cause corruption of the Cambridge Z88 memory, and should therefore only be used by experienced programmers. The parameter block contains the following list:
where the parameter types are as follows:
In the case of a string variable the parameter address is the address of a String Information Block which gives the current length of the string, number of bytes allocated, and start address, in that order.
| |||||||||||||||||||||||||||