286 OSCLI operating system command line interpreter Purpose It is very useful in a BASIC program to be able to send commands to the operating system. Such commands might include *FX commands followed by two numbers. When the program is written you do not always know which numbers are to follow the *FX statement. However, you cannot substitute variables such as X and Y directly after the *FX because these variables are not known to the command line interpreter but are only known to the BASIC language. Thus the statement would be meaningless to the operating system. The statement OSCLI provides a neat way of passing variables to the operating system in such cases.
OSCLI is followed by a string variable which is set to contain the values to be passed to the operating system. Note that numbers must be converted to string form by using the STR$ function; the above example would work correctly with the following. X=5:Y=3:*FX X,Y 10 X=5 20 Y=3 30 A$="FX "+STR$X+","+STR$Y 40 OSCLI A$ 10FN$="XYZ" : REM FILE NAME 20 START%= &4000 : REM START OF CODE 30 FINISH%= &6000 : REM END OF CODE 40 EXECADD%= &5000 : REM EXECUTION ADDRESS 300 OSCLI "SAVE "+FN$+" "+STR$~(START%)+" "+STR$~(FINISH%)+" "+STR$~(EXECADD%) Examples Note that no * is needed in the string. A statement which passes its string argument to the operating system command line interpreter. Description