First sweep of command table done. Several TODOs and a proper scrutinize

next.
This commit is contained in:
Brian J. Bernstein 2021-04-05 22:38:28 -04:00
parent 8f5bf8801b
commit 7e43fd262d
1 changed files with 26 additions and 26 deletions

View File

@ -28,7 +28,7 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
| GET | GET varstr | dev | The GET statement is used to get a single keypress from the user. When encountered, the system will wait until a key is pressed. The key will be returned in varstr. Control characters will not be filtered out as they are with INPUT. |
| GOSUB | GOSUB label | dev | Appears to have same function as AppleSoft GOSUB. Only thing worth noting is that ACOS uses labels as targets instead of line numbers. |
| GOTO | GOTO label | Working | Appears to have same function as AppleSoft GOTO, again with the exception that ACOS uses labels not line numbers. |
| HOME | HOME | dev | Appears to have same function as applesoft HOME. Clears current window. REMY TODO: Does this clear the remote session as well? |
| HOME | HOME | dev | Clears the screen and positions the cursor at the top left. REMY TODO: Does this clear the remote session as well? |
| IF | IF *condition* [THEN] *statement1* [ELSE] *statement2* | dev | Evaluate *condition* and if true (or greater than zero), execute *statement1*. If optional <tt>ELSE</tt> statement is specified, then a false condition will execute *statement2*. If <tt>ELSE</tt> is used, it must appear on the same line as the <tt>IF</tt> statement. Logical constructs for *condition* supports parenthesis, <tt>AND</tt>, and <tt>OR</tt>.<p><tt>THEN</tt> is optional (as it is in AppleSoft BASIC) but if you use THEN, it cannot be followed by a label directly.(use IF arg THEN GOTO label). |
| INFO | expression=INFO(optional)<br>INFO(optional)=expression | dev | INFO can be used as either a statement or as a function. It is really a 'catch-all' in nature. many values that are more or less unrelated are returned. The following table gives the meanings of all the INFO data.<p><pre>argument r/w function<br>-------- ---- -----------------<br>INFO(0) r is there a caller online? (0=no)<br>INFO(1) r capacity of current message file.<br>INFO(2) r callers baud rate /300 (1=300)<br>INFO(3) r/w current number of nulls.<br>INFO(4) w top screen stats. (1=chat, 2=exec)<br>INFO(5) r/w executive user online? (1=yes)<br>INFO(6) r checks bit map for mail/msg bases for room.</pre> |
| INPUT | INPUT [#*device*,] [@*mode*,] [\\] ["*text*"] *variable* [,[\\] *variable*..] | dev | Gets input from a device or interactively with the user and stores the result in one-to-many variables. There are quite a few variations how the <tt>INPUT</tt> statement can be used, but at a minimum it requires one *variable* to be specified. <p> Specifying the *device* is required if inputting data from a device handle (e.g. an open file). Omitting the *device* will default to getting input from the user. <p> A text prompt can be optionally specified by supplying *text* before the variables. The text can serve as a prompt (e.g. "What is your name? *input here*"). If backslash (\\) is put before or after the *text*, this will result in a newline being part of the prompt (note distinction between this and using backslash for multiple variables). <p> Multiple variables can be specified in either a comma-separated or backslash (\\) way (or a mixture thereof), though this is typically for file input rather than interactive user input. As with the <tt>PRINT</tt> statement, the comma is taken literally (e.g. if you were to read multiple fields from a comma-separated file), and the backslash as part of the variable list implies that there will be a newline to parse (e.g. <code>INPUT #1, A\$\\B\$</code> reads two lines from the file, <tt>A\$</tt> on the first line and <tt>B\$</tt> on the second line). <p> The *mode* (with '@' symbol prefix) is an optional way of specifying how the <tt>INPUT</tt> command will behave. Using *mode* is ONLY for interactive input and cannot be combined with a *device*. The various modes are as follows: <p> <ul><li><tt>INPUT</tt> - (no mode specified) set the input mode to uppercase, don't accept a blank line. <li><tt>INPUT @0</tt> - set the input mode to uppercase, don't accept a blank line, just return the first character. <li><tt>INPUT @1</tt> - set the input mode to uppercase, don't accept a blank line, don't accept any commas. <li><tt>INPUT @2</tt> - set the input mode to uppercase, blank lines will be accepted. <li><tt>INPUT @3</tt> - accept everything. (upper & lower). </ul> |
@ -54,31 +54,31 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
| POKE | POKE address,value | dev | Sets the value of the memory location specified at *address* with *value*. REMY TODO: Does this work in A2osX? Perhaps limit it to $C000-CFFF? |
| POP | POP | dev | Works the same as the AppleSoft POP statement with the exception of it also can be used with the ACOS PUSH command. |
| POSITION | POSITION #device, record_length, record_number [,offset] | dev | The POSITION statement is used to position within a random access file. The *device* argument is the disk device channel number that was used to open the file. The *record_length* argument is the length of each record. The *record_number* argument is the record number to be positioned to. The optional *offset* argument is the offset within the record that is to be positioned to. Note that there is no check to see if files actually conform to *record_length*; it along with the other *record_number* and *offset* arguments simply form a means of providing a calculation for a byte offset in the file as a while. For example, <code>POSITION #1, 1000, 3, 50</code> would result in seeking file device #1 to the 3050'th byte in the file. |
| PRINT | PRINT [#device,] [expression] | dev | [,expression] [;]<br>rules for PRINT:<br> control: ',' - the comma is used to separate expressions within the print statement and will be printed literally.<br> control: ';' - the semi-colon is also used to separate expressions it will not be printed when encountered, if a semi- colon is the last character in the line, then the carriage return will be suppressed.<br> control: '\' - the backslash is used to generate a newline character using the backslash, there is no need to put a bunch of print:print... statements.<br> exprs: TEXT - text must be contained within quotes and will be printed exactly as typed. within quotes, you may have any special characters including return. having an open quote with no close can prove to be an interesting experience.<br> exprs: STRING- the contents of the listed string will be printed.<br> exprs: NUMBER- the content of the listed number will be printed. |
| PUBLIC | PUBLIC label | dev | the PUBLIC statement is used to make a label within a program module available to other modules to link to. if you wish to link to another program module, and start execution at a point other than the beginning of the module, you will need to make that point public. you can have a maximum of 8 public labels within a program module. |
| PUSH | PUSH label | dev | the PUSH statement is a sub-set of the GOSUB statement. it does not actually change the current point of execution, but places a return address in a table so that the next time a RETURN statement is encountered, control will return to this present point. a POP statement will remove the last address added to the return table. |
| RAM | RAM | dev | the RAM function is really just a constant pointer. it just points to a free 64 bytes of memory that has been set aside for program use. |
| RAM2 | RAM2 | dev | the RAM2 function is the same as the RAM function except that it points to a different 64 bytes that are available for program use. generally this memory is used in conjunction with the READ, WRITE, NIBBLE and BYTE functions. |
| RANDOM | expression=RANDOM(number) | dev | the RANDOM function is used to generate a random number within the range 0-number. a new random number will be generated everytime the system goes to get input. if you take two random numbers in a row, they will always be the same. if you need more than one, use the RND$ string between. the will do a temporary re-random. |
| READ | READ # device,memloc,number | dev | the READ statement is used to load data from a file into memory in its binary form without any processing or changing. the input does not have to come from a file, it can come from the editor or a message file. it is similar to an apple dos BLOAD command. |
| READY | READY filename | dev | READY #MSG(number)<br>the READY statement is used to make a message file ready for use. it is similar to an OPEN statement being used before a file is accessed. after a message file is ready, all the following references to MSG will be directed to that file. once a message file has been made ready, it can also be used in its second syntax to ready a specific message within the file.this is generally used if further references to the file will use the device channel associated with the message base. |
| RETURN | RETURN | dev | appears to have same function as the applesoft RETURN statement. |
| REWIND | REWIND | dev | the REWIND statement is to change the pointer within a message file to some previously accessed point within the file. normally this is used in conjunction with the READY MSG(x):COPY #7 statements. using REWIND will put the internal pointer back to where it was before the last message operation took place. this is generally used for doing a 're-read' function of sorts. |
| RIGHT$ | string=RIGHT$(string,length) | dev | appears to have same function as the applesoft RIGHT$. |
| RND$ | char=RND$ | dev | the RND$ function is used to generate random characters. each time RND$ is accessed a new random character will be returned. be warned: the random number is generated from timing how long a user takes to enter his input. this is really a pretty random number since it is based on the users typing skill and speed. the only problem is that the random character generator can start repeating patterns after about 15-20 characters have been generated and before another input has taken place. |
| SET | SET string=memloc,number | dev | the SET statement is another statement set up for the optimum management of memory. with SET you can manually set up pointers for strings anywhere in memory. along with the locations of the string, you can also specify the length. whenever the string is accessed, the text present at the memory locations will be returned. |
| SETINT | SETINT (string1 [,string1...]) | dev | SETINT ("") SETINT (number)<br>the SETINT command is used to set up 'interrupt' keys. once setup the system will check for those keys whenever text is being displayed. if one of the keys are encountered, all further output will be supressed until an input statement of some kind is encountered or the SETINT is reset. to reset the SETINT command, use the second syntax. if you wish to set the interrupt keys to those pre-defined by the acos config program, use the third syntax. SETINT(1) will set the interrupt key to the 'file stop' character. SETINT(2) will set the interrupt keys to the 'file stop' and 'file next' characters. |
| STR$ | string=STR$(number) | dev | appears to have same function as the applesoft STR$. |
| TEXT | TEXT | dev | used to clear the screen and any window on the local console. |
| THEN | THEN | dev | same as applesoft THEN, separates statements within IF statements. |
| TIME$ | string=TIME$ | dev | the TIME$ function is used to get the current time from your clock. if your system is equipped with a clock, the time will be returned in a "HH:MM:SS XM" format. if your clock is in the 24 hour configuration then it will be returned in the "HH:MM:SS" format. if you have no clock, then your estimated time on will be returned. the estimated time is based upon the number of characters output and the speed they were sent. the format for estimated time is "HH:MM:SS ET". when the clock is first reset via a MODEM(0) command, the time will be "00:00:00 ET" and will advance from there. |
| TONE | TONE (number,number) | dev | the TONE function is used to generate a tone from the speaker in your computer. the first argument is the pitch and the second is the duration. |
| UPDATE | UPDATE | dev | the UPDATE statement is used to write any information about the current message base from memory out to disk. normally, certain things are buffered and will stay within memory for long periods of time. in the event of a power failure or a system reset, this data will be lost before it is written out to disk. use the UPDATE statement to force the data to be written out to disk. |
| USE | USE filename [,any options] | dev | the USE statement is used to access a routine that is external to the acos language. what happens is that the USE statement loads in an external command and transfer control to that command. the command will normally get parameters from the continuation of the line after the filename argument. |
| VAL | expression=VAL(string) | dev | appears to have same function as applesoft VAL. |
| WHEN$ | WHEN$=address | dev | string=WHEN$ WHEN$=string<br>the WHEN$ function is really just a data compression scheme. you initially point WHEN$ to a address in memory. at this address there must be 2 free bytes. when you read from WHEN$, the 2 bytes will be retrieved from the memory location and translated into a "MM/DD/YY" format. when you assign WHEN$ a value, the current date will be read and changed into a 2 byte compressed format and saved at the current address pointer. |
| WIDTH | expression=WIDTH(number) | dev | the WIDTH function is really an interface to the config program. it will return 4 widths that were setup as the most commonly used widths under config, along with the width that should be used for a default when the video width is not known. WIDTH(1-4) will return the 4 most commonly used widths. WIDTH(0) will return the number of the width(1-4) that should be used as a default. |
| WRITE | WRITE #device,memloc,number | dev | the WRITE statement is the opposite of the READ statement. it is used to write unprocessed binary data from memory to a file or other device. almost all the device channels can be written and none will generate errors. just specify the memory location and length to be written. |
| PRINT | PRINT [#device,] [expression] [,expression] [;] | dev | Sends/displays text or data to the screen, remote user, or specified device handler. There are a few rules for PRINT:<p><ul><li>control: '<tt>,</tt>' - the comma is used to separate expressions within the print statement and will be printed literally, i.e. this is for creating comma-separated file output.<li>control: '<tt>;</tt>' - the semi-colon is also used to separate expressions it will not be printed when encountered, if a semi-colon is the last character in the line, then the carriage return will be suppressed.<li>control: '<tt>\\</tt>' - the backslash is used to generate a newline character. Using the backslash, there is no need to put a bunch of <code>print:print...</code> statements.<li>exprs: TEXT - text must be contained within quotes and will be printed exactly as typed. Within quotes, you may have any special characters including return. Having an open quote with no close can prove to be an interesting experience. BJB TODO: Need to figure out what this means!?<li>exprs: STRING- the contents of the listed string will be printed.<li>exprs: NUMBER- the content of the listed number will be printed.</ul> |
| PUBLIC | PUBLIC label | dev | The PUBLIC statement is used to make a label within a program module available to other modules to <tt>LINK</tt> to. If you wish to link to another program module, and start execution at a point other than the beginning of the module, you will need to make that point public. You can have a maximum of 8 public labels within a program module. |
| PUSH | PUSH label | dev | The PUSH statement is a subset of the GOSUB statement. It does not actually change the current point of execution, but places a return address in a table so that the next time a RETURN statement is encountered, control will return to this present point. A POP statement will remove the last address added to the return table. |
| RAM | RAM | dev | The RAM function is really just a constant pointer. It just points to a free 64 bytes of memory that has been set aside for program use. |
| RAM2 | RAM2 | dev | The RAM2 function is the same as the RAM function except that it points to a different 64 bytes that are available for program use. Generally this memory is used in conjunction with the READ, WRITE, NIBBLE and BYTE functions. |
| RANDOM | expression=RANDOM(number) | dev | The RANDOM function is used to generate a random number within the range 0-number. A new random number will be generated every time the system goes to get input. If you take two random numbers in a row, they will always be the same. If you need more than one, use the RND$ string between. The RND$ string will cause the random number generator to re-random. |
| READ | READ #device, memloc, number | dev | The READ statement is used to load data from a file into memory in its binary form without any processing or changing. The input does not have to come from a file, it can come from the editor or a message file. It is similar to an Apple DOS BLOAD command. |
| READY | READY filename<br>READY #MSG(number) | dev | The READY statement is used to make a message file ready for use. It is similar to an OPEN statement being used before a file is accessed. After a message file is ready, all the following references to MSG will be directed to that file. Once a message file has been made ready, it can also be used in its second syntax to ready a specific message within the file. This is generally used if further references to the file will use the device channel associated with the message base. |
| RETURN | RETURN | dev | Appears to have same function as the AppleSoft RETURN statement. BJB TODO: rewrite this. |
| REWIND | REWIND | dev | The REWIND statement is to change the pointer within a message file to some previously accessed point within the file. Normally this is used in conjunction with the READY MSG(x):COPY #7 statements. Using REWIND will put the internal pointer back to where it was before the last message operation took place. This is generally used for doing a 're-read' function of sorts. |
| RIGHT$ | string=RIGHT$(source, length) | dev | Returns the last *length* number of characters from the *source*. |
| RND$ | char=RND$ | dev | The RND$ function is used to generate random characters. Each time RND$ is accessed a new random character will be returned. Be warned: the random number is generated from timing how long a user takes to enter his input. This is really a pretty random number since it is based on the users typing skill and speed. The only problem is that the random character generator can start repeating patterns after about 15-20 characters have been generated and before another input has taken place. REMY TODO: Is this how your implementation works? |
| SET | SET string=memloc, number | dev | The SET statement is another statement set up for the optimum management of memory. With SET you can manually set up pointers for strings anywhere in memory. Along with the locations of the string, you can also specify the length. Whenever the string is accessed, the text present at the memory locations will be returned. |
| SETINT | SETINT (string1 [,string1...])<br>SETINT ("")<br>SETINT (number) | dev | The SETINT command is used to set up 'interrupt' keys. Once setup the system will check for those keys whenever text is being displayed. If one of the keys are encountered, all further output will be suppressed until an input statement of some kind is encountered or the SETINT is reset. To reset the SETINT command, use the second syntax. If you wish to set the interrupt keys to those pre-defined by the ACOS config program, use the third syntax. SETINT(1) will set the interrupt key to the 'file stop' character. SETINT(2) will set the interrupt keys to the 'file stop' and 'file next' characters. |
| STR$ | string=STR$(number) | dev | Returns the numerical supplied numerical expression as a string. |
| TEXT | TEXT | dev | Used to clear the screen and any window on the local console. BJB REMY TODO: How is this different from HOME? |
| THEN | THEN | dev | Separates statements within IF statements. |
| TIME$ | string=TIME$ | dev | The TIME$ function is used to get the current time from your clock. If your system is equipped with a clock, the time will be returned in a "HH:MM:SS XM" format. If your clock is in the 24 hour configuration then it will be returned in the "HH:MM:SS" format. If you have no clock, then your estimated time on will be returned. The estimated time is based upon the number of characters output and the speed they were sent. The format for estimated time is "HH:MM:SS ET". When the clock is first reset via a MODEM(0) command, the time will be "00:00:00 ET" and will advance from there. REMY TODO: How is your implementation of no clocks? |
| TONE | TONE (pitch, duration) | dev | The TONE function is used to generate a tone from the speaker in your computer. BJB TODO: Need to determine limits. |
| UPDATE | UPDATE | dev | The UPDATE statement is used to write any information about the current message base from memory out to disk. Normally, certain things are buffered and will stay within memory for long periods of time. In the event of a power failure or a system reset, this data will be lost before it is written out to disk. Use the UPDATE statement to force the data to be written out to disk. |
| USE | USE filename [,any options] | dev | The USE statement is used to access a routine that is external to the ACOS language. What happens is that the USE statement loads in an external command and transfer control to that command. The command will normally get parameters from the continuation of the line after the filename argument. REMY TODO: This is used for protocol handlers; have you implemented something for this? |
| VAL | expression=VAL(string) | dev | Returns the numerical value of a number spelled out in a string. |
| WHEN$ | WHEN\$=address<br>string=WHEN\$<br>WHEN\$=string | dev | The WHEN$ function is really just a data compression scheme. You initially point WHEN$ to a address in memory. At this address there must be 2 free bytes. When you read from WHEN$, the 2 bytes will be retrieved from the memory location and translated into a "MM/DD/YY" format. When you assign WHEN$ a value, the current date will be read and changed into a 2 byte compressed format and saved at the current address pointer. |
| WIDTH | expression=WIDTH(number) | dev | The WIDTH function is really an interface to the config program. It will return 4 widths that were setup as the most commonly used widths under config, along with the width that should be used for a default when the video width is not known. WIDTH(1-4) will return the 4 most commonly used widths. WIDTH(0) will return the number of the width(1-4) that should be used as a default. |
| WRITE | WRITE #device, memloc, number | dev | The WRITE statement is the opposite of the READ statement. It is used to write unprocessed binary data from memory to a file or other device. Almost all the device channels can be written and none will generate errors. Just specify the memory location and length to be written. |