(editors note: this was downloaded off the Internet)
Here is a list of Z88 BBC BASIC Commands Statements and functions, I’ve commented on some to help clarify. Abbreviations are listed in brackets, they can be typed in as such to save memory.
COMMANDS:
AUTO [AU.] line numbering DELETE [DEL.] LIST [L.] LISTO controls the appearance of a listed program (4 options) LOAD [LO.] NEW OLD recover program after using the "NEW" command. RENUMBER [REN.] TRACE [TR.]
STATEMENTS:
BPUT# [BP.#] output a byte. CALL [CA.] call machine code with paremeters CHAIN [CH.] CLEAR [CL.] CLOSE# [CL.#] CLS DATA [D.] DEF define function or procedure. DIM (supports integer variables) ELSE [EL.] END ENDPROC FN FOR [F.] GOSUB [GOS.] GOTO [G.] IF INPUT [I.] INPUT LINE INPUT# input from file. LET LOCAL [LOC.] NEXT [N.] ON ON ERROR OPT assembler options with four different options. OSCLI operating system command. Allows string expression to be passed. PRINT [P.] also controls field width, sci. notation,decimal places etc. PRINT# [P.#] write to file PROC (PROCEDURE) PUT output to port READ REM REPEAT [REP.] REPORT [REPO.] report error RESTORE [RES.] RETURN [R.] RUN does not clear A%-Z% SAVE [SA.] SPC print spaces STEP [S.] STOP TAB TAB(X) or TAB(X,Y) THEN [TH.] TO UNTIL [U.] VDU [V.] output bytes to screen WIDTH [W.]
FUNCTIONS:
ABS
ACS arc cosine
ASC ASCII value.
ASN arc sine
ATN arc tangent
BGET# [B.#] byte from data file.
CHR$
COS cosine
COUNT [COU.] returns the number of chars. sent to
output stream since the last new line.
DEG degrees
EOF#
ERL error line.
ERR error code.
EVAL [EV.] evaluate string. example:A=10:B=20
PRINT EVAL ("A+B")/would return 30.
EXP exponent
EXT# extent of file. Total length of file whose
channel number is its argument.
FALSE [FA.]
GET/GET$ wait for key.
HIMEM [H.] first byte of free memory.
INKEY/INKEY$
INSTR
INT
LEFT$
LEN
LN natural logarithem
LOG logarithem
LOMEM [LOM.] lower memory bound.
MID$
OPENIN [OP.] open file for output.
OPENOUT open file for output.
OPENUP [OPENU.] open file for update.
PAGE [PA.] program area. Can be altered to allow several progs. to be in memory at once.
PI
POS horizontal cursor position.
PTR# file pointer.
RAD radians.
RIGHT$
RND with optional paremeters.
SGN
SIN sine
SQR
STR$
STRING$ repeats strings. A$=STRING$(2,"Z88") returns "Z88Z88"
TAN [T.] tangent
TIME [TI.] elapsed time clock
TIME$ EXAMP:Sunday April 3,1988,10:17:30 AM
TOP returns the value of the first free location after the end of the current program.
TRUE
USR call machine code at specified address.Passes the least sig.bytes of the INT. variables A%,B%,C%
D%,E%,H%,L% and F% into corresponding registers of the Z80 on entry.
VAL value of string
VPOS [VP.] vertical cursor position
OPERATORS:
+,*,^,-,/ DIV integer divide MOD modulo
RELATIONAL OPERATORS:
<,<=,<>,=,>,>=
LOGICAL OPERATORS:
AND [A.] EOR NOT OR
The equivalent of PEEK & POKE on the Z88 is handled by the use of indirection operators using VECTORS. (VEC)
INDIRECTION OPERATORS include:
? byte indirection ! word indirection $ string indirection
For you math people. Here is the output of a program I found in TI PPC NOTES, it was converted to run on a Tandy Model 100. Hopefully I translated it correctly to run on the Z88. it checks the math operations of the computer.
RADIX= 2 PRECISION= 32 FPWIDTH= 4.2949673E9 CLOSEST RELATIVE SEPARATION FOUND IS UlpOne= 2.32830644E-10 ADD/SUBTRACT HAS A GUARD DIGIT AS IT SHOULD.
OTHER NOTES:
1/3 returns .333333333 1=1 returns -1 Empty loop to 10000 takes 13.5 secs. to execute. Empty INTEGER loop to 10000 takes 12.5 secs. to execute.
I’ve found it to be roughly as fast as a 4.77 MZ PC. but the Z88 is more accurate.
I’ve had pretty good luck loading M/S BASIC programs & running some programs unchanged. The W/P in the Z88 with its fast global search & replace makes it much easier to convert programs when you have to.
You can route output to the printer at anytime by pressing the square key (Alt.),+,& P. Square -P turns it off. You can send the output to a RAM file by pressing the square key +S, to turn it off would be square key-S.
The screen size in Z88 BBC BASIC is 8 lines by 94 columns. I will later upload screen codes to turn on BOLD,UNDERLINE,FLASH etc. (not supplied in the manual) Graphic commands are not supported from BASIC,such as PLOT,LINE,DRAW but I’m sure someone will be able to access the ROM routines.
Sound (not much) is in the form of PRINT CHR$(7) (bell code).
The only special codes you need to tack on to an ASCII file to load into BASIC are: #B & .J, the S#B routes the stream to the BASIC area, the .J tells it to “JAM” any commands while it’s loading. You may also include “NEW” to the sequence to delete the old program first.
The Z88 includes CLI files (Command Line Interpreter). Using special codes you can build batch/macro files that can act on all the features of the Z88, including unattended operations. A few examples:”#”=the square key,”|”=the diamond key,.T> creates output file etc.
You can have many BASIC programs ACTIVE at the same time (memory providing) switching between them by pressing square key”B”,or by pressing the index key and choosing which one you want. Actually you can have many documents,programs and worksheets ACTIVE switching between them in a like manner.
I am no expert on BASIC but if there is something you would like me to try on the Z88 I’ll try to accomodate.
Z88 File Exchange with Other Computers
NOTICE!!!! Z88 USERS, OR POTENTIAL USERS! Not only is the Z88 a great standalone personal and extremely portable computer, but it can be of great use with most other computers that you may own. If you have a MAC, you can use MACLink to transfer files and data between the two. The same goes for the IBM type computers with the program PCLink. For QL users there is the QLink to do the same thing, as well as some PD or shareware programs to do pretty much the same. To find out how to exchange files between your TS2068, get the back issue of UPDATE or a copy of the Z88 Source Book from UPDATE. If it is an Amiga computer that you wish to exchange data with then you need to have both the PCLink and the AmigaLink software. Now just where do you think you can find all of this software? In North America the ONLY place that has all of these is Mechanical Affinity. Give Frank a call or place an order for one of the above. It will open up a whole new use for your Z88.