AT. -- INDIRECT FILE PROCESSOR The indirect command file processor provides BATCH like capabilities for controling taskbuilds and routine processes. It is sufficiently complex that is is practically a program language. Any MCR command appearing in the command file will be executed if the terminal's privlege allows it to do so. Directives (commands to ...AT.) can be used to control the logic flow of MCR commands, input data from the user's terminal, and create files for future use. A command file is started by @filename.ext/sw where .cmd is the default extension and a number of switches may be used. Specific HELP on the use of AT. may be obtained with the keywords. DIRECTIVE [LIST , name] LABEL EXPRESSIONS [NUMERIC , STRING] SYMBOLS [LOGICAL , NUMERIC , STRING , SUBSTITUTION] SWITCHES 2 LABEL Any statement in an indirect command file, may have a label. This label is used as a reference point to branch back to or to jump to(.GOTO, .ONEROR, .GOSUB). A label may contain only alphanumeric characters and a $. Lables may be from 1-6 characters long and are followed by a colon, :, and must be preceded by a period (.). Labels may be declared as direct access labels by placing them on lines by themselves. This enables very fast jumps to a label for frequently used labels. 2 DIRECTIVE 3 LIST LABLE Define a lable .ASK Ask operater a YES/NO question. .ASKN Ask operator for numeric value. .ASKS Ask operator for string value. .CHAIN filename Close current file, and start executing new one. .CLOSE Close an open output file. .DATA Send a single line of data to a secondary file .DEC Decrement numeric symbol by 1. .DELAY Delay execution for specified time. .DISABLE Disable substitution, data, global symbol,lowercase or escape recognition. .ENABLE Enable substitution, data, global symbol,lowercase, or escape recognition. .GOTO Goto the specified lable .GOSUB Goto a subroutine. .IF Determine if symbol,or string expression meets one of several possible conditions. .IFACT/.IFNACT Determine if task is active or not active on TI: .IFDF/.IFNDF Determine if a symbol is/is not defined .IFINS/.IFNINS Determine if a task is installed. .IFLOA/.IFNLOA Determine if a driver is loaded. .IFT/.IFF Determine if a logical symbol is True or False. .INC Increment a numeric symbol. .ONERR Branch to a label if error detected. .PAUSE Pause for operator action. .RETURN Return from subroutine. .SETT/.SETF Set logical symbol True/False. .SETN Set value of numeric symbol .SETS Set value of string symbol. .TEST string sym Test length and character type of string symbol. .WAIT Wait for specified task to exit. .XQT Start a task but do not wait for it to complete. 3 .ASK Three forms are available to ask a question and wait for a reply. They are, .ASK, .ASKN, .ASKS. For HELP with .ASKN, or .ASKS try HELP AT. DIRECTIVE .ASK [.ASKN, or .ASKS]. .ASK Ask a question and wait for reply .ASK ssssss txt-string where: ssssss = 1 - 6 character symbol to be assigned a true/false value. txt-string = any ascii string of characters preceeded by a blank. The processor recognizes only 4 answers to a .ASK directive. 1. Y - set symbol ssssss to true. 2. N - set symbol ssssss to false. 4. - set symbol false. 4. - set special logical symbol to true if and only if escape recognition has been enabled. 4 .ASKN .ASKN Ask for definition of Numeric symbol. .ASKN ssssss txt-string .ASKN[low:high] ssssss txt-string .ASKN[::def] ssssss txt-string .ASKN[low:high:def] ssssss txt-string (brackets are required syntax) Where: low:high = inclusive limits for response. Octal assumed unless a decimal point present. def = the default value. ssssss = the 1 to 6 character symbol to be assigned a value. 4 .ASKS .ASKS ask for a definition of a string symbol .ASKS ssssss txt-string .ASKS [Low:high] ssssss txt-string (brackets required syntax) where: ssssss = 1-6 character symbol to be assigned to a value. txt-string = any ascii string of characters preceded by at least one blank. low:high = the inclusive limit for he numbetr of characters response string. 3 .CHAIN .CHAIN Continue processing using another file. Closes the current indirect file and erases all local symbols and then opens a new command file(however data files not closed). format: CHAIN filespecifier/SW where /SW is one of the switches /DE, /TR, /MC 3 .SETT .SETT/.SETF Set a symbol True or False .SETT ssssss or .SETF ssssss where: ssssss is a 1-6 charachter logical symbol being set. 3 .SETN .SETN Set Symbol to Numeric Value .SETN ssssss numexp where: ssssss = 1-6 character numeric symbol numexp = a numeric expression(no embedded blanks or tabs allowed). 3 .SETS .SETS Set Symbol to STring Value .SETS ssssss strexp where: ssssss = 1-6 character string symbol strexp = any string expression 3 .INC .INC Increment a Numeric Symbol .INC ssssss Increment the symbol ssssss by 1. 3 .DEC .DEC ssssss Decrement a numeric symbol by one. .DEC Decrement a Numeric Symbol 3 .IF .IF ssssss relop-expr Command Test if symbol meets specified conditio where: ssssss = 1-6 character symbol name relop = one of the following relational operators EQ or = - equal to NE or <> - not equal to GE or >= - greater than or equal to LE or <= - less than or equal to GT or > - greater than LT or < - less than expr = expression of same type as symbol Command = indirect file processor command(.GOTO, etc) MCR command, etc. .IF clauses may be combined into elaborate tests using the logical operators .OR and .AND to combine various types of IF clauses. Further types of IF clauses may be found by typing HELP AT. DIRECTIVE .IF [.IFACT, .IFDF, .IFINS, .IFLOA, or .IFT] 4 .IFACT .IFACT/.IFNACT Test if task is active(not active) .IFACT tttttt Conditional Command Execute Conditional Command if task tttttt is active. .IFNACT tttttt Conditional COmmand Execute Conditional Command if task tttttt is not active. 4 .IFDF .IFDF/.IFNDF Test if Symbol is Defined(not defined) .IFDF symbol Conditional Command .IFNDF symbol Conditional Command 4 .IFINS .IFINS/.IFNINS Test if task is installed(not installed) .IFINS tttttt Conditional Command .IFNINS tttttt Conditional Command 4 .IFLOA .IFLOA/.IFNLOA Test if Driver is Loaded .IFLOA dd: Conditional Command .IFNLOA dd: Conditional Command 4 .IFT .IFT/.IFF Test if condition is true or false .IFT logical-symbol Conditional Command .IFF logical-symbol Conditional Command 3 .TEST .TEST Test String Symbol Length .TEST ssssss where ssssss is a string symbol. The .TEST directive places the length of the string into , and sets the special logical symbols and according to the type of characters in ssssss. 3 .DELAY .DELAY Delay execution for a specified period of time. .DELAY nnu where: nn = Number of time units to delay. u = T - tics; S - seconds; M - minutes; H - hours. The value of nn is taken to be octal if no decimal point (.) is present. 3 .WAIT .WAIT Wait for a Task to Finish Execution .WAIT tttttt where tttttt is the task name. If tttttt is omitted the task name defaults to TTnn, where nn is the nymber of the user's terminal. 3 .PAUSE .PAUSE Pause for operator action. The operator must type RES tttttt where tttttt is the name of the indirect file processor task active at TI: to start .AT going again. 3 .GOTO .GOTO label Branch to a labelwhere label is any of the labels in the command file. 3 .GOSUB .GOSUB label Jump to subroutine whose starting point is marked with the label. When a .RETURN is encountered, return to the next statement following the .GOSUB. 3 .RETURN .RETURN Return to the next statement following the last .GOSUB. 3 .ONERR .ONERR label If an error in the logic, syntax, data entry, etc. is detected in .AT. , goto the label last specified by the .ONERR directive. 3 .OPEN .OPEN [#N] filename (brackets not part of syntax) Where file name is name of file to be created, N specifies which of 4 possible files(0-3) may be open. If omitted, .OPEN defaults to zero. The default extension for the file name is .DAT. 3 .CLOSE .CLOSE [#N] Close the specified output file(file 0 if #N is omitted. 3 .DATA .DATA [#N] text-string Output a line of data to the file open on channel #N. 3 .XQT Command line Start up a task without waiting explicitly for it to finish. 3 .ENABLE Specific HELP may be requested on .ENABLE SUBSTITUTION .ENABLE DATA .ENABLE LOWERCASE .ENABLE GLOBAL .ENABLE EXCAPE 3 LOWERCASE If the command .ENABLE LOWERCASE has been issued, values entered at the terminal in response to a .ASKS are not converted from lowercase to uppercase. 3 DATA If the command .ENABLE DATA #N is given, all lines following the .ENABLE DATA are output to the secondary file. 3 GLOBAL If global symbols have been enabled(.ENABLE GLOBAL), then global symbols will be preserved across chain boundaries. 3 SUBSTITUTION Substitution must be enabled if one is to substitute an input parameter into a command string. 3 ESCAPE If escape sequence recognition is recognized, the logical symbol will be set true if the answer to a .ASK, .ASKS, or .ASKN is answered with an ESCAPE. 3 .DISABLE .DISABLE DATA [#N] .DISABLE GLOBAL .DISABLE LOWERCASE .DISABLE ESCAPE Undoes whatever was done with the .ENABLE commands. 2 SYMBOLS There are three symbol types: LOGICAL, STRING, NUMERIC. A Logical symbol may be either true or false. A String symbol may have up to 80 ASCII characters. A Numeric symbol is assigned a value in the range of 0-65535(10) and may be defined as either decimal or octal. In addition a symbol may be either local or GLOBLE. A local symbol, is erased when a command file is chained to from another. However, the value of globlal symbols are preserved. If global symbols have been enabled (.ENABLE GLOBAL), then symbols preceeded by a $ become global symbols. 3 LOGICAL True if the last querry was answered with a single escape. True if answer to last numeric querry was defaulted. True if last string entered via .ASKS or tested with .TEST contains only alphanumeric characters. True if last string entered via .ASKS or tested with .TEST contains only RADIX-50 characters(alphanumeric characters plus . and $). True if system is mapped. 3 NUMERIC Memory size in K words. Unit number of system device (SY:). Length of string entered via .ASKS, or tested with .TEST. 3 STRING Device mnemonic of system device(SY:). Current UIC. System UIC. 3 SUBSTITION If SUBSTITUTION is enabled (.ENABLE SUBSTITUTION) the string or numeric symbol name enclosed in single quotes (') is replaced with its assigned value. When a numeric symbol is substituted into a string, the type(octal or decimal) is determined by the value assigned via an .ASKN or .SETN directive. 2 EXPRESSIONS The INDIRECT FILE PROCESSOR can evalueate two types of expressions, NUMERIC and STRING. By utilizing numeric and string substitution into general expressions which are evaluated as the command file executes, it is possible to develope very powerful and general subroutines. 3 NUMERIC Numeric symbols or constants may be combined with another symbols or constants by logical and arithmetic operators to form a numeric experssion. Arithmetic operators are used to add (+), subtract (-), multiply (*), and divide (/0. Logical operators are the inclusive or (!), and logical and (&). No embedded blanks or tabs are permitted between operators. Expressions are evaluated from left to right unless parenthesis are used to form subexpressions that are evaluated first. An expression type is octal only if all operands are octal. Numeric expressions are permitted as second operands in numeric .IF and .SETN directives, and as range and default arguments in .ASKN and .ASKS directives. 3 STRING A string constant is a string of up to 80. printable characters enclosed in double quotes ("). Null strings are permitted. "ABCDEFG" and "" are both string constants. String constants are assigned with the .SETS and .ASKS directives. Substrings may be used with both the .SETS and .IF directives. example: .SETS S1 "ABCDEFG" .SETS S2 S1[1:3] Sets the string symbol S" to be ABC. Strings may be combined with the concatenation operator (+) to form a strin expression. example: .SETS S3 S1+"B"+S2[1:3] 2 SWITCHES The INDIRECT FILE PROCESSOR supports three switches which may be appended to any indirect command file sent directly to AT. /TR Indicate that a trace of each processed command line is to be displayed at TI:(good for debugging). /DE Delete the command file after processing. /MC Send the commands to MCR The defaults are /NOTR, /NODE, /MC