80-Bus News |
March–April 1984 · Volume 3 · Issue 2 |
Page 36 of 51 |
---|
this location, with the use of the pointer comand, longer line lengths may be achieved.
Variables may be named to any length but only the first five letters are distinguished. Integer variables are defined by the use of a % suffix i.e. A%, B% etc. Any numerical variable followed by % will be truncated to its integer form. Hex numbers are catered for by preceeding any hex number with an ampersand sign (&).
The XBASIC editor takes two forms, namely screen editor and line editor. Normally under command mode, the Editor is in screen edit mode and during a program run is in line edit mode, although this can be altered for special purposes (see IOM command).
As under ROM BASIC with the additional facilities of:
CTRL A – Home cursor to top left corner of screen. CTRL W – Erase whole line that cursor is sitting upon irrespective of where it is in that line. CTRL X – Erase to end of line from the current cursor position. CTRL O – Erase to end of screen from current cursor position. CTRL P – Print screen contents to printer. ESC – Abandon a line. This does not delete the line as it does in ROM BASIC. The Ok prompt is printed. This took a while to get used to.
As for ROM BASIC in input mode within a program except that CTRL P will dump screen contents to printer. Cursor left wil delete previous input during input mode.
As supplied, three devices are assigned under XBASIC. Device 0 is the default value and assigns the Nascom output to the VDU and input from the keyboard. Device 0 is the only one that uses the screen editor. Device 1 is output to a printer (may be serial or parallel) and is the device utilised when CTRL P is used. Input is not assigned and is as for device 0. Device 2 is output to serial port and input from the serial port.
The output device is changed by use of the PRINT# command followed by the device number. e.g. PRINT#1:LIST would list the current XBASIC program to the printer. A number of devices may easily be added to cater for a modem or other such periphiral attached to a UART on the Nascom I/O board for example. A total of 255 (0 to 254) output and 255 input devices may be assigned! All disk and tape file handling is passed via device 255 and is therefore not assignable.
First the commands that have the same name as those within ROM BASIC that we all know and love but which are enhanced or act differently.
CLEAR – As for ROM BASIC except when followed by up to two values sets up the top most location available to BASIC and the size of the stack in addition to clearing the variables.
e.g. CLEAR&C000,300 increases the size of the stack from its default and minimum value of 256 to 300 bytes and the highest location available to XBASIC as BFFF hex. Any OBJ file loaded after this command will be loaded from C000H irrespective of its resident address when it was saved.
Page 36 of 51 |
---|