80-Bus News


April–June 1982 · Volume 1 · Issue 2

Page 46 of 55

LIST – XBASIC now prints graphics characters and not keywords when you list a program. It is able to distinguish between keywords and graphics characters you type in.

REDUCE – This removes accessory material from the program i.e. spaces and REM statements. There are three modes of action:–
a) removes spaces except those in REM statements DATA statements and within quotes
b) removes REM statements (if the REM statement is at the beginning of a line then the text is removed but the REM remains so you still have to delete those line numbers)
c) combines a) and b).

Renumber – Renumbers a line from the specified start and increments each subsequent line as specified. A CHECK is performed first and other safeguards are included so that the program is not corrupted.

FIND – This finds the lines where the following string argument occurs, scrolling them up from the bottom of the screen.

TRACE – This is another of those commands you only dream about!! The command is turned on by the argument 1 and off by the argument 0. The variables you want displaying are stored in a subsequent string expression , you can have up to 20, i.e. the number you can squeeze onto a line!!! Following RUN you single step through the program using ENTER. The number of the current line being interpreted is displayed at the top of the screen followed by the current values of the variables asked for. Program debugging becomes so easy!! Alternatively, instead of having to hold down the ENTER key, argument 1 can be replaced with ‘n’ where ‘n’ is a delay of about ‘n’msec.

XLIST – This lists a single specified line followed by the numbers of lines making references to it. Another very useful little thing.

XREF – As XLIST but the specified line is not listed.

DEC – This converts a hexadecimal number to a decimal number.

HEX – This converts a decimal number to a hexadecimal number.

CALL – This calls a machine code subroutine. The first argument is the subroutine’s address in decimal. Using subsequent arguments it is possible to pass values to the subroutine.

GET – This returns the ASCII value of the next key pressed, or if no key is pressed it returns 0. No more mucking around with machine code subroutines using DOKEs and DEEKs.

INKEY – As for GET but the keyboard is scanned until the next key is pressed and its ASCII value is returned.

INLIN – This returns an entire screen line containing the cursor after ENTER. This can be used instead of INPUT as it allows the use of the cusor keys to edit the line while waiting for ENTER.

TEST – This tests to see whether a specifed key is pressed down, returning a value 0 if not and 1 if it is. The code specifying the key to be tested is NOT the ASCII value, but a hardware generated number related to the keyboard wiring. A full table is supplied in the manual’s appendices.

LINE – Yet another superb command. This uses the Nas Graph ‘pixels’ to draw a line between two points X1,Y1 and X2,Y2. The argument 0 resets the line, 1 sets it and 2 inverts it. It’s very fast!!

PLOT – This sets, resets or inverts the point X,Y.

Page 46 of 55