*CHDIR |
*CD |
The *CD command followed by a drive name (optional) and a path will change the current directory of the specified (or current) drive to the path specified.*CHDIR [d:][\][pth] *CD [d:][\][pth]
The *CD command followed only by a backslash will change the current working directory on the specified drive to the root directory for that drive. This is a quick way of getting to the top level directory on a drive.*CHDIR BBCBASIC\DOC *CD A:\LETTERS\RATES
*CD on its own will display the current working directory.*CHDIR \ *CD A:\
*CD followed by a drive name (only) will display the current working directory of that drive.
*DELETE |
*DEL |
This command will delete only one file at a time; wild cards are not permitted in the file specifier. If you wish to include wild-cards in the file specifier in order to delete more than one file, you should use the **DEL command.*DEL ufsp *DEL GAME1.DTA
OSCLI may also be used to delete files.
OSCLI "DEL "+<str> OSCLI "DEL "+name$ OSCLI "DEL GAME1.DTA"
*DIR |
*. |
*DIR [afsp]
*DIR List all .BBC files on the disk. *DIR B:*.* List all files on disk B. *.*.* List all the files in the current directory.
*DRIVE |
*DR. |
*DRIVE d: *DRIVE A:
*EDIT |
*E. |
This command will clear the screen, display the program on the screen starting with the specified line and enter the screen editing mode. Pressing the <Esc> key will exit the screen editing mode, clear the screen and return you to your original display mode.*EDIT line_number *EDIT 120
Whilst in the screen editing mode, the control keys have the following effect:
If you are at the top of the screen, pressing the cursor up key will cause the display to scroll back one line. The cursor will remain at the top of the screen on this newly displayed line. Similarly, if you are at the bottom of the screen, pressing the cursor down key will cause the display to scroll forward one line.
Screen Editing Keys Move up to the previous screen line Move down to the following screen line Move the cursor left one character Move the cursor right one character Ctrl/ Move the cursor to the start of the program line Ctrl/ Move the cursor to the end of the program line Enter Move the cursor to the start of the next program line BackSpace Backspace and delete Delete Delete the character at the cursor Insert Toggle between the insert and overwrite modes. In the
insert mode the cursor is an underline; in the overwrite
mode it fills the character cellTab Insert a line immediately following the current line Ctrl/U Clear the current line. The line number is not deleted Ctrl/Enter Delete the entire line including the line number PageUp Display the previous 12 program lines and move the
cursor to the start of the first line displayedPageDn Display the next 12 lines and move the cursor to the
start of the first line displayedHome Move the cursor to the start of the program End Move the cursor to the end of the program Esc Exit the screen editing mode
Editing takes place as you type; there is no opportunity to abort the edit as there is with the single line editor. The <Esc> key ends the edit; it does not abort it. Any changes you have made will remain. Also, unlike the single line editor, it is not possible to edit the line numbers. Consequently, the line editor may be more useful for making changes to individual program lines. See the keyword EDIT for more details.
If an EGA or VGA is fitted, the *EGA command will automatically map modes 0 to 7 to the equivalent EGA modes 0 to 15.*EGA [ON|OFF]
Normal operation may be restored with the command
Graphics operations in the EGA modes are significantly slower than in the CGA modes. If you don't need the extra EGA capabilities (16 colours, for example) you are recommended to use the CGA modes.*EGA OFF
*ERASE |
*ERA |
After *ESC OFF the <Esc> key simply returns the ASCII code for ESCape (27). *ESC ON (or *ESC) restores the normal abort action of the <Esc> key.*ESC [ON|OFF]
*EXEC ufsp *EXEC STARTUP.CMD
*FX 15 flushes the keyboard buffer.
*FX 15
If anything is entered following the '*HELP' the command is passed to the operating system for execution. This provides access to an online HELP utility, for example that supplied with later versions of MS-DOS.*HELP
*HELP COPY
The key number 'num' is from 0 to 23 as follows:*KEY num [str]
The string may contain the 'escape' symbol '|' in order to include non-printing characters. For example, |M indicates CR (carriage-return), |? indicates DEL, || indicates the escape character itself and |! causes bit 7 of the following character to be set. If the string is enclosed in quotes (which is optional), |" allows the character " to be included in the string.
No Key No Key 0 Ctrl/2 12 1 f1 13 2 f2 14 3 f3 15 4 f4 16 Ctrl/ 5 f5 17 Ctrl/ 6 f6 18 Home 7 f7 19 End 8 f8 20 PgUp 9 f9 21 PgDn 10 f10 22 Ins 11 Shift/Tab 23 Del
If there is insufficient room for the string, a 'Bad string' error will occur and the key will be loaded with as much of the string as would fit.
*KEY num without a string will empty the specified key and return it to its normal code (see the BBCBASIC(86) keyword GET.)
If the load address is given as more than four hexadecimal digits, the four least significant digits are interpreted as the offset value and the remaining digits as the segment value. For example,*LOAD ufsp aaaa *LOAD A:WOMBAT 8F00
will load a file called SCREEN.BBC into the CGA graphics screen RAM. This will not work for the EGA or VGA modes.*LOAD SCREEN B8000000
Remember that the command *LOAD 00001234 loads into a different memory from the command *LOAD 1234. The latter loads into BBCBASIC(86)'s data segment.
OSCLI may also be used to load a file. However, you must take care to provide the load address as a hexadecimal number in string format.
OSCLI "LOAD "+<str>+" "+STR$~<num> OSCLI "LOAD "+file_name$+" "+STR$~(start_address)
*LOCK ufsp *LOCK WOMBAT
*MKDIR |
*MD |
*MKDIR [d:][\][pth] *MD [d:][\][pth] *MKDIR \BBCBASIC\TRIALS *MD D:DATA
*OPT |
*O. |
All characters sent to the console are vectored with *OPT. There is no filtering of graphics commands etc. For example, COLOUR 3 in a program will cause the bytes 17 and 3 to be sent to the device selected by *OPT.
*OPT 0 VDU Emulator. The output is sent to the VDU Emulator. Control characters are filtered and action taken as described in the VDU Emulator section. *OPT 1 Auxiliary Output. The output is sent to the auxiliary output (COM 1). *OPT 2 Printer Output. The output is sent to the printer (PRN or LPT 1). *OPT 3 Standard Output. The output is sent to the currently selected 'standard output'. This is usually the screen, but it may be redirected. See your MS-DOS (PC DOS) User's guide for further details on output redirection. *OPT 4 Error Output. The output is sent to the 'error output'.
Because MS-DOS (PC DOS) treats all input and output devices as if they were files, you can also send output to the standard MS-DOS (PC DOS) devices by using PRINT#. The standard devices are listed below along with their file handles (file or channel numbers). It's not good practice to send normal output to the screen in this way because BBCBASIC(86) cannot keep track of the cursor position (and hence POS, VPOS and COUNT). It is, however, a reasonable way to write to the printer or the auxiliary (serial) device. It is also useful to be able to send messages to the screen via, for example, STDERR whilst sending the console output to a printer with *OPT 2. Don't forget, however, that output is sent as if to a file. Strings are terminated with a CR only and you will need to write the LF to the device yourself. Numbers would normally be sent in internal format and they will need to be converted to ASCII strings first using the STR$ function. (See also the Opening Files sub-section of the BBCBASIC(86) Disk Files section.)10 *OPT 2 20 PRINT "THIS WILL APPEAR ON THE PRINTER" 30 *OPT 0 40 PRINT "THIS WILL APPEAR ON THE SCREEN"
Handle Device Purpose Remarks 0 STDIN Standard Input Can't be accessed directly. 1 STDOUT Standard Output 2 STDERR Standard Error 3 STDAUX Serial device or modem 4 STDPRN Printer
*RMDIR |
*RD |
You can only remove an empty directory. If the directory contains any files you will get an 'Access denied' error (error code 189).*RMDIR [d:][\][pth] *RD [d:][\][pth] *RMDIR \BBCBASIC\TRIALS *RD D:DATA
*RENAME |
*REN |
If an ambiguous filename is used, a 'Bad directory' error (error code 206) will occur. If a file already exists with the new name, a 'File exists' error (error code 196) will occur.*RENAME ufspold ufspnew *REN ufspold ufspnew *RENAME ufspnew=ufspold *REN ufspnew=ufspold OSCLI "REN "+<str>+" "+<str> *REN OLDFILE NEWFILE *REN NEWFILE=OLDFILE OSCLI "REN "+file_name$+".BBC "+filename$+".BAK OSCLI "REN "file_name$+".BAK="+filename$+".BBC"
*RUN |
*/ |
This command causes a .EXE or a .COM file to be loaded and run.
For this to work, BBCBASIC(86) must have access to COMMAND.COM and there must be sufficient RAM to load the required program whilst BBCBASIC(86) remains in memory.
*SAVE |
*S. |
You MUST specify the start address (aaaa) and either the length of the area of memory (llll) or its end address+1 (bbbb). There is no 'load address' or 'execute address'.
If the save address is given as more than four hexadecimal digits, the four least significant digits are interpreted as the offset value and the remaining digits as the segment value. For example,*SAVE ufsp aaaa +llll *SAVE ufsp aaaa bbbb *SAVE "WOMBAT" 8F00 +80 *SAVE "WOMBAT" 8F00 8F80
will save the contents of the CGA graphics screen ram to a file called SCREEN.BBC. This will not work for EGA or VGA modes.*SAVE SCREEN B8000000 +4000
Remember that the command *SAVE 00001234 +200 saves a different area of memory from the command *SAVE 1234 +200. The latter saves from BBCBASIC(86)'s data segment.
OSCLI can also be used to save a file.
OSCLI "SAVE "+<str>+" "+STR$~(<num>)+" "+STR$(<num>) OSCLI "SAVE "+ufn$+" "+STR$~(add)+"+"+STR$~(len)
*SPOOL ufsp *SPOOL *SPOOL LISTING
You can use this command to add text to the end of a previously used spool file.*SPOOLON ufsp *SPOOLON LISTING
*TYPE |
*T. |
*TYPE ufsp *TYPE ADDRESS.LST
*UNLOCK ufsp *UNLOCK ADDRESS.DTA
Apart from *TV, the following BBC Micro commands are not trapped by BBCBASIC(86) and, as previously described, they will be passed to MS-DOS for action. Since this is most probably not what is intended, you should ensure that these commands do not occur in programs which have been transferred from the BBC Micro.
You can locate any of these (or other) commands with the LIST IF statement. For example,
will list all the lines of a program which include the *COPY command.LIST IF *COPY
Where applicable, the appropriate resident star or MS-DOS command is indicated alongside the BBC Micro's star command.
Resident Star Command/MS-DOS Equivalent
*LOCK, *UNLOCK ATTRIB (Access with *ATTRIB)
Resident Star Command/MS-DOS Equivalent
DISKCOPY (Access with *DISKCOPY)
Resident Star Command/MS-DOS Equivalent
or word-processor/editor.COPY CON <ufsp> (Access with *COPY CON <ufsp>)
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
DEFRAG {Access with *DEFRAG)
Resident Star Command/MS-DOS Equivalent
COPY (Access with *COPY)
Resident Star Command/MS-DOS Equivalent
DEL (Access with **DEL)
Resident Star Command/MS-DOS Equivalent
*CHDIR
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
Use the DUMP utility supplied on the BBCBASIC(86) distribution disk (access with *DUMP).
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
DIR (Access with **DIR)
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
PATH is similar .
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
LABEL (Access with *LABEL)
Resident Star Command/MS-DOS Equivalent
Not applicable.
Resident Star Command/MS-DOS Equivalent
See DELETE
CONTENTS |
CONTINUE |