[HELP] Help is available on APPEND CAPTURE, ABORT, BAUD, BREAK, CAPTURE, CARRIER, CD, CHAIN, CLIP, CLOSE, CLR, CLS, COM, COMINPUT, DIR, DLOAD, DTR, DUPLEX, ENVIRON, EXEC, FKEY, FSEL, FRE, GEM, INPUT, INSTR, KEYINPUT, KILL, LFEED, LINE INPUT, LOAD, LOAD CAPTURE, LOAD TERM, LOAD XFER, LOG, MENU, MID$, MKDIR, MODE, OPEN, PARITY, PAUSE, PLAY, REPLACE$, RMDIR, SAVE, SAVE CAPTURE, SBITS, SEND, SET, STRIP, TA, TERM, TOPW, TYPE, ULOAD, UNLOAD, WAIT, and WHILE [ABORT] ABORT XFER Aborts a file transfer, if one is in progress [APPEND CAPTURE] APPEND CAPTURE "filename" appends the capture buffer to the specified file. [BAUD] BAUD nn Sets baud rate to value nn, where nn is a valid baud rate. [BREAK] BREAK ON|OFF| / Set or reset the hardware break bit in the serial port. [CAPTURE] CAPTURE ON|OFF|/ turns text capture on or off or toggles it. [CARRIER] CARRIER ON|OFF enables/disables carrier event trapping. CARRIER CLEAR removes a carrier event trap. [CD] CD "path" sets default path. Path should end with a backslash '\'. [CHAIN] Chains to a new Basic. An optional filename specifies a file to run. [CLIP] CLIP ON|OFF enables/disables clipboard event trapping. CLIP CLEAR removes a clipboard trap. CLIP$ returns the contents of the GEM clipboard. [CLOSE] CLOSE #n Closes a file previously opened with OPEN. Closing a file twice or using an invalid file number will not cause an error. [CLR] Sets all variables to zero, undimensions arrays, frees all strings. [CLS] Clears the Basic window. [COM] COM ON|OFF enables/disables serial port event trapping. COM CLEAR removes a serial port trap. [COMINPUT] COMINPUT var$[,FULL|,HALF] Reads data from the serial port into a string variable. The optional parameter HALF causes serial input to be displayed on the terminal screen. FULL causes terminal display AND echo back to the sender. TERM OFF must be set or else characters will be lost. [DIR] DIR by itself prints out a directory of the current path. DIR "pathname" prints a specific directory (wildcards allowed). [DLOAD] DLOAD("protocol","file",...) Downloads one or more files using specified protocol. Returns number of files transferred. [DTR] DTR ON|OFF turns the DTR signal on or off on the serial port. [DUPLEX] DUPLEX FULL|HALF|/ sets duplex for the terminal screen. [ENVIRON] ENVIRON "aaa=bbb" sets the environment variable "aaa" to value "bbb" [EXEC] EXEC mode,"FILENAME","cmdline" Executes file as a TOS program. Mode should be 0. [FKEY] FKEY nnn,"string" assignes a string to a key. The number nnn specifies which key. For function keys F1 to F10 use the numbers 1 through 10. For Shifted function keys F1 to F10, use the numbers 11 through 20. The cursor keys numbers are as follows: 51 is Up 55 is Shift-Up 52 is Down 56 is Shift-Down 53 is Right 57 is Shift-Right 54 is Left 58 is Shift-Left To assign a string to a key and have it interpreted as a Basic command, add 200 to the key number,for both function keys and cursor keys. To define ALT-key macros with this command, use the ascii key value as the key number. Uppercase Ascii for Basic macros, lowercase Ascii for non-Basic. Examples: FKEY ASC("A"),"BAUD 1200" FKEY ASC("a"),"This is Alt A" [FSEL] FSEL$("path","filename") Pops op the GEM file selector and returns a filename. "path" is the path to be displayed in the file selector. It can be a full or partial path, or just a wildcard spec, e.g. "*.TXT". "filename" is the name to be displayed initially in the file selector. [FRE] FRE(3) returns the number of characters waiting in the serial buffer. FRE(2) returns the number of bytes in the capture buffer. FRE(1) returns the number of lines in the capture buffer. FRE(0) returns the largest available free memory block in the system. FRE(-1) returns total space used for strings. FRE(-2) returns the total number of string slots currently allocated. FRE(-3) returns the number of strings currently in use. FRE(-4) returns the number of bytes used for storing the current program. FRE(-5) returns the size in bytes of the variable name table. FRE(-6) returns the size in bytes of the variable value table. FRE(-7) returns the size in bytes of the array table. Each element of an array takes 4 bytes in this table. FRE(-8) returns the size of the run-time stack. FRE(-9) returns the number of labels in the label table. FRE(-10) returns the size in bytes of the label name table. FRE(-11) returns the number of bytes allocated to the capture buffer. Any other value returns the same as FRE(0). [GEM] GEM mode,"FILENAME","cmdline" Executes an external GEM program. Mode should be 0. [INPUT] INPUT variable INPUT "prompt";variable Prompts user for input in the basic window. Optional prompt will appear in front of the question mark. Input to any Basic variable, including an array. INPUT #n,variable For reading data from a file into a variable. n is a file number used in the OPEN statement that opened the file. [INSTR] INSTR([start,]"string","key") Searches "string" for "key" and returns the location of "key" in "string" or 0 for failure. Start is the (optional) starting location of the search. [KEYINPUT] KEYINPUT var$ Waits for you to press a key in the terminal window and then returns that key in the string variable. Works only in the terminal window. [KILL] KILL "file" deletes a file. Wildcards are allowed. [LFEED] LFEED ON|OFF|/ LFEED ON causes a line feed to be generated internally every time a Carriage Return character is received. LFEED OFF turns this feature off. LFEED / toggles the line feed setting. [LINE INPUT] LINE INPUT var$ LINE INPUT "prompt";var$ Reads an entire line of input into a string variable. LINE INPUT #n,var$ Reads an entire line from a file into a string variable. The line ends when a line feed is encountered, or 255 characters have been read, whichever comes first. Open text files in Ascii mode (see OPEN) for proper results. [LOAD] LOAD "file.bas" loads a Basic program into memory. See also LOAD TERM, LOAD CAPTURE, and LOAD XFER. [LOAD CAPTURE] LOAD CAPTURE "filename" loads the file into the capture buffer. [LOAD TERM] LOAD TERM "file.emu" loads a terminal emulation module. See also UNLOAD and MODE. [LOAD XFER] LOAD XFER "file.trf" loads a file transfer module. See also UNLOAD [LOG] Acts line Basic PRINT, but output goes to the capture buffer. [MENU] MENU n1,n2 Allows a Basic program to simulate selecting a Storm menu item. n1 is the menu title index, where Desk=0, File=1, Edit=2, etc. n2 is the item number in the menu dropdown; the top item is number 1. [MID$] MID$(dest$,start[,length]) = new$ Replaces a portion of destination string with a new string. dest$ is a string variable or a string array reference. new$ is a string which will be used to replace a portion of dest$. Length is an optional number specifying the number of characters to replace. Start is a number specifying the position where you want to start replacing. var$ = MID$("string",Start,Count) Returns the substring of "string" starting at location Start and continuing for Count letters. Count is optional. Omitting Count returns the string starting from location Start. The first letter in a string is considered to start at position 1. [MKDIR] MKDIR "dirname" creates a folder (directory). [MODE] MODE "name" sets terminal emulation to "name". [OPEN] OPEN "mode",#n,"filename" Opens a file in Basic. n is a digit from 1 to 15 which is the file number that is used in subsequent input # or print # commands. "mode" can be one of the following: "w" creates a text file for writing, discards previous contents. "r" opens a text file for reading. "a" append; opens or creates a text file for writing at end of file. "r+" opens text file for update (reading or writing). "w+" creates text file for update, discards previous contents. Adding a "b" to mode, e.g. "wb" opens the file in binary mode. Text mode does CR->CR/LF translation so that a CR-LF combination in the file is replaced with a single line feed character when you read from the file, and vice-versa when writing to a file. [PARITY] PARITY ODD|EVEN|NONE Sets parity for the serial port, odd, even, or no parity. Word size is automatically set to 8 bits for no parity, 7 bits for even or odd parity. [PAUSE] PAUSE nn pauses for the specified number of seconds. [PLAY] PLAY str$ Uses the GEM Xbios Dosound call to play sounds. [REPLACE$] REPLACE$(dest$,start[,length]) = new$ Replace$ is a lot like MID$, except that it will expand or shrink the destination string. This means you can replace a part of string with a string that is a different length. [RMDIR] RMDIR "dirname" Deletes a directory (folder). You cannot delete a directory that contains files; you must delete all contained files first. [RUBOUT] RUBOUT ON|OFF|/ Setss the terminal Destructive Backspace setting. RUBOUT ON means that backspace characters erase the previous character on a line. [SAVE] SAVE "file.bas" saves a Basic program in tokenized format. See also SAVE CAPTURE. [SAVE CAPTURE] SAVE CAPTURE "filename" saves the capture buffer to the indicated file. [SBITS] Sets stop bits used by the serial port. SBITS 3 actually sets stop bits to 1.5. [SEND] The same as Basic print, except output is to the serial port. [SET] Used to access profile file settings. Example: SET "STORM","Paths","DownloadPath","C:\DOWNLOAD\" sets the download path. SET$("STORM","Paths","DownloadPath") returns the download path as a string. SET("STORM","Terminal","LocalEcho") returns 1 if half duplex is in effect. Available profile files are "STORM","DIALDIR",and "STORMKEY" [STRIP] STRIP ON|OFF|/ Sets whether the high bit is masked off from characters input from the serial port. [TA] TA ON|OFF|/ Turns typeahead on or off, or toggles the state of typeahead. [TERM] TERM ON|OFF TERM OFF shuts off terminal processing of serial characters except during WAIT statements. TERM is automatically enabled during WAIT, PAUSE or KEYINPUT commands. [TOPW] TOPW by itself brings the Basic window to the top. TOPW n brings the specified window to the top. e.g. 1 is the terminal window. 2 is the capture window. 3 is the Basic window. 4 through 10 are editing windows. 11 is the file transfer window. [TYPE] The same as Basic print, except output is to the terminal screen. Note: To send output to the serial port, use SEND. [ULOAD] ULOAD("protocol","file",...) Uploads one or more files using specified protocol. Returns number of files transferred. [UNLOAD] UNLOAD TERM "name" unloads a terminal emulation. Use the name in the terminal emulations dialog, not the filename. e.g. UNLOAD TERM "VIDTEX" UNLOAD XFER "name" unloads a file transfer. Use the name in the Transfer Protocols dialog, not the filename. e.g. UNLOAD XFER "XYMODEM". [WAIT] WAIT 10,"string1","string2",... Waits for one or more strings to be received at the serial port. The optional timeout specified how many seconds to wait. Omit the timeout to wait 'forever' (actually, 120 days). WAIT(0) returns the result of the last WAIT command. '0' means the WAIT timed out. '1' means the first string was found, '2' means the second string was found, and so forth. [WHILE] WHILE expr statements WEND While the expression evaluates to TRUE, executes the statements inside the loop. If the expression is FALSE, skips to the next statement past the WEND statement. A WHILE/WEND block can span multiple lines and can begin or end in the middle of a line.