When a star command is issued, BBCBASIC(86) first checks to see if it is one of the resident star commands. If it is not a resident command, it is passed to MS-DOS (PC DOS) for action. MS-DOS then treats it as if it had been entered in the operating system command mode in the normal way.
Drives A: to P: are accepted in file specifications. Filenames in star commands may optionally be enclosed in quotes; unmatched quotes will cause a 'Bad string' error. The standard MS-DOS (PC DOS) 'wild-cards' may be used when an ambiguous file specifier is acceptable.[drive:][\][path\]filename.extension
drive: The single letter name (A to P) of the drive where the file will be found. The colon is mandatory. If the drive name is omitted, the currently logged-on drive is assumed. path The list of directories which must be followed in order to find the specified file. The names of each directory in the path must be separated by the backslash character. If the path is omitted, the current directory on the specified drive is assumed. filename The name of the file. The length of the name must not exceed 8 characters. extension The optional extension of the file. If an extension is used it must be separated from the filename by a full-stop. If the extension is omitted, .BBC is assumed.
? Allow any single character in this position. If this is used as the last character in the name, a null character will be accepted. * Allow any character (including a null) from the position of the '*' to the end of the name or extension.
{} | The enclosed items may be repeated 0 or more times. |
[] | The items enclosed are optional, they may occur zero or one time. |
num | A numeric constant. |
str | A string constant. |
<num> | A numeric variable. |
<str> | A string variable. |
afsp | An ambiguous file specifier. |
ufsp | An unambiguous file specifier. |
d: | A disk drive name. |
dir | A directory name. |
pth | A directory path ( \dir\dir\etc ). |
*HELP OSCLI("HELP")
The appropriate .EXE or .COM file will be loaded and executed by COMMAND.COM.
For example, you can copy files by using the *COPY command, which will be processed by COMMAND.COM.
Unlike the resident commands, commands passed to COMMAND.COM do NOT assume an extension of .BBC if the extension is omitted.*COPY source-afsp dest-afsp /V *COPY ADDRESS.DTA B:
will execute BBCBASIC(86)'s resident directory listing command, (only .BBC files in this case) but*DIR
will pass the command to COMMAND.COM and you will get the standard MS-DOS (PC DOS) directory listing (all the files plus date/time stamps, etc).**DIR
|A gives ^A. |a gives lower-case A. |? gives Del. |" gives the quote marks ". || gives the escape character |. |! sets bit 7 of the following character.
OSBYTE and OSWORD are accessed in the same way as on a BBC Micro by USR to addresses &FFF4 (OSBYTE) and CALL to address &FFF1 (OSWORD).
Because a call to either of these addresses only provides a single function, it is not strictly necessary to pass the OSBYTE or OSWORD function number in A%, but it is best to do so to ensure compatibility with any future enhancements to BBCBASIC(86).
A%=&87 char=(USR(&FFF4) AND &FF00) DIV 256
The character is loaded into byte zero of the 9 byte table called 'pattern' and the pattern is returned in the 8 bytes 'pattern?1' to 'pattern?8. As with the BBC Micro, the address of the table 'pattern' is passed in X% and Y%. The least significant byte is passed in X% and the most significant in Y%DIM pattern 8 ?pattern=character A%=&A X%=pattern MOD 256:Y%=pattern DIV 256 CALL &FFF1
See the program INKEY.BBC for an example of the use of OSKEY.
OSRDCH: CALLF [&300] ;Waits for and returns a char in the al register. OSWRCH: CALLF [&304] ;Sends the char in the al register to the VDU driver. OSKEY: CALLF [&308] ;With the time limit set in the ax register. Returns a character in the al register. The carry flag is set to zero if a timeout has occurred. OSCLI: CALLF [&30C] ;With the dx register set to the address of the command string. The string must be terminated by a CR.
CONTENTS |
CONTINUE |