diff --git a/.Docs/Acosx Words.md b/.Docs/Acosx Words.md
index fdae61d7..248ee019 100644
--- a/.Docs/Acosx Words.md
+++ b/.Docs/Acosx Words.md
@@ -7,7 +7,6 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
## Words
| Word | Syntax | Status | Short | Description | Comment |
|-|-|-|-|-|-|
-| Word | Syntax | Status | Short | Description | Comment |
| ADDINT | ADDINT (*string1* [,*string2*...]) | Not Yet Implemented | Add keys to the interrupt table. | The ADDINT command will add more keys to the existing interrupt keys table. previous keys will not be cleared. The functions of the keys is the same as with the SETINT command. | |
| APPEND | APPEND #*device* | Not Yet Implemented | Set write operations for specified device to append to the end. | The APPEND statement is generally used to add data to an existing file. If you issue an APPEND statement, the file pointer will be moved to the end of the file. You can also find out the length of a file by doing an APPEND and then using the MARK function. Mark will then return the length of the file in bytes. | |
| BYTE | byte=*number*
byte=(*number*)
byte=(*number*)=*number*256 | Not Yet Implemented | Byte-level data manipulation function. | The BYTE function is similar to the FLAG function. It is a low overhead data storage unit. Just point to where in memory you want the data to be stored using the first syntax, and you can then access the data using the second or third syntax's. | |
@@ -18,7 +17,7 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
| COPY | COPY *filename* [,#*device*]
COPY #*device* [,#*device*] | Not Yet Implemented | Copy file or device contents to target device. | The COPY command is used for displaying and copying information from device to device. The first argument can be a filename, in which case, the file is opened and input is taken from that file, or it can be a device. The second device is optional. If present all output will be routed there, otherwise it will be displayed to the modem/console. The second argument may not be another filename. If you wish to copy to a file, open the file with the OPEN command, and copy to that device. | |
| CREATE | CREATE *filename* | Not Yet Implemented | Create an empty file. | The CREATE statement is used to create an empty file on the disk. The new file can be opened and read and written to just as any other file would be. If you want to create a new file, you must use the CREATE statement first unlike some other languages which will create files by simply using the OPEN command on a file that does not already exist. If the file already exists, the file (contents or timestamp) will not be modified in any way. | |
| CRUNCH | CRUNCH | Not Yet Implemented | Truncate specified message database. | The CRUNCH statement is used in conjunction with the MSG commands. It is used to "CRUNCH" together (truncate) a message file to reclaim space from deleted messages. | |
-| DATE$ | *string*=DATE$ | Not Yet Implemented | Return string with current date. | The DATE$ function returns the current date in MM/DD/YY format. The input will be taken from whatever device was configured as a clock. If 00/00/00 is returned, then there is no clock in the system and the date hasn't been set. | |
+| DATE$ | *string*=DATE$ | Impl. | Return string with current date. | The DATE$ function returns the current date in MM/DD/YY format. The input will be taken from whatever device was configured as a clock. If 00/00/00 is returned, then there is no clock in the system and the date hasn't been set. | |
| ECHO | ECHO=*string*
ECHO="" | Not Yet Implemented | Specify or clear characters to be echoed during user input. | The ECHO statement is used to set the echo character to be used with the INPUT statement (e.g ECHO="\*"
will mask password entry with asterisks). Once the echo has been set, that character will be sent each time a user types a character when entering text. The ECHO statement in the second syntax (setting to an empty string) will reset the echo function to normal where user input will send the character that is being typed. | |
| EDIT | EDIT(*number*) | Not Yet Implemented | Text editor operations. | The EDIT statement is the command used to interface ACOS with its editor. With the different EDIT statements, you can clear the editor, see how much space is free, etc. The following list gives all legal calls:
To setup the FLAG function, you need to first point it to a location in memory (*memloc*), which is typically 'ram' or 'ram2', but you can specify an offset, e.g. FLAG=ram+20
will specify that you're using the 20th byte inside of the 'ram' location.
Once the pointer is set up, you can use the FLAG function just like any variable using the remaining syntax forms outlined for reading/writing flags. | |
| FOR | FOR *numvar*=*startvalue* TO *targetvalue* [STEP *number*]
...
NEXT | Not Yet Implemented | Program loop iteration declaration. | Creates a loop in program execution that sets a variable *numvar* to initially *startvalue* and increments its value with each iteration and will repeat until that variable reaches *targetvalue*. The STEP keyword is optional, but allows you to specify *number* which overrides the typical +1 increment of the loop, i.e. you can count by 2 by specifying STEP 2
or you can *decrement* by specifying a negative step number. In general, operates much the same way as AppleSoft FOR-NEXT loops, However, you can only have ONE for loop active at a time, i.e. the NEXT command does not allow for a variable, it only operates on the currently active FOR loop. | |
| FREE | FREE | Not Yet Implemented | Return amount of free memory. | Has the same function as the AppleSoft FRE(0) command, in that it returns the amount of free memory. REMY TODO: Does this garbage collect? | |
-| GET | GET *varstr* | Not Yet Implemented | Get a single character from user. | The GET statement is used to get a single keypress from the user. This is a blocking call in that 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. | |
+| GET | GET *varstr* | Testing | Get a single character from user. | The GET statement is used to get a single keypress from the user. This is a blocking call in that 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* | Impl. | Call subroutine at specified label. | Calls subroutine *label* in the program and sets the point in code so that when a RETURN function is encountered, execution will resume after the GOSUB
statement. While behaves the same way as AppleSoft basic, it is worth pointing out that ACOS uses labels as targets instead of line numbers. | |
| GOTO | GOTO *label* | Impl. | Redirect program execution to specified label. | Redirects program execution to continue from *label*. Unlike GOSUB, no record of where the GOTO call occurred. As with GOSUB, it is worth pointing out that ACOS uses labels as targets intead of line number. | |
-| HOME | HOME | Not Yet Implemented | Clear screen. | Clears the screen and positions the cursor at the top left. REMY TODO: Does this clear the remote session as well? | |
+| HOME | HOME | Impl. | Clear screen. | 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* | Impl. | Logical condition test and execution. | Evaluate *condition* and if true (or greater than zero), execute *statement1*. If optional ELSE keyword is specified, then a false condition will execute *statement2*. If ELSE is used, it must appear on the same line as the IF statement, i.e. there is no multi-line if/then/else construct like some other languages. Logical constructs for *condition* supports parenthesis, AND, and OR.
THEN 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*)
INFO(*optional*)=*expression* | Not Yet Implemented | Byte-level data manipulation function, specific to ACOS internals. | INFO can be used as either a statement or as a function. It is really a 'catch-all' of ACOS state value functions in nature in that many values that are more or less unrelated are accessible through it. The following table gives the meanings of all the INFO data.
argument r/w function| | -| INPUT | INPUT [#*device*,] [@*mode*,] [\\] ["*text*"] *variable* [,[\\] *variable*..] | Not Yet Implemented | Get input from user, device, or file. | 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 INPUT statement can be used, but at a minimum it requires one *variable* to be specified.
-------- ---- -----------------
INFO(0) r is there a caller online? (0=no)
INFO(1) r capacity of current message file.
INFO(2) r callers baud rate /300 (1=300)
INFO(3) r/w current number of nulls.
INFO(4) w top screen stats. (1=chat, 2=exec)
INFO(5) r/w executive user online? (1=yes)
INFO(6) r checks bit map for mail/msg bases for room.
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.
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).
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 PRINT 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. INPUT #1, A\$\\B\$
reads two lines from the file, A\$ on the first line and B\$ on the second line).
The *mode* (with '@' symbol prefix) is an optional way of specifying how the INPUT command will behave. Using *mode* is ONLY for interactive input and cannot be combined with a *device*. The various modes are as follows:
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.
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).
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 PRINT 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. INPUT #1, A\$\\B\$
reads two lines from the file, A\$ on the first line and B\$ on the second line).
The *mode* (with '@' symbol prefix) is an optional way of specifying how the INPUT command will behave. Using *mode* is ONLY for interactive input and cannot be combined with a *device*. The various modes are as follows:
LINK "A:MSG.SEG","BULLETINS"
). The label must be enclosed in quotes or must be in a string variable. Note that for the label to be usable by the LINK command, the label must be declared as PUBLIC in the target file. | |
| LOG | LOG *drivespec* | Not Yet Implemented | Change current filesystem drive. | The LOG statement simply changes the default disk drive to the *drivespec* drive. If the drive is not legal, a BAD DRIVE SPECIFIER error will occur. | |
| MARK | *expression*=MARK(*device*)MARK(1)=0
assuming it was file device #1. MARK has a second function in that it can be used to see if a file exists. Normally ACOS will not generate an error if a file exists, so it can be hard to tell if there is one. To see if a file exists: OPEN #1,filename
| |
-| MID$ | *string*=MID$(*source*, *start* [,*length*]) | Not Yet Implemented | Return a number of characters from the middle of a string. | Returns the contents of *source* into *string* starting at character position *start* to the end of *source*, or only up to *length* number of characters. | |
+| MID$ | *string*=MID$(*source*, *start* [,*length*]) | Impl. | Return a number of characters from the middle of a string. | Returns the contents of *source* into *string* starting at character position *start* to the end of *source*, or only up to *length* number of characters. | |
| MODEM | MODEM(*number*) | Not Yet Implemented | Modem (remote session) manipulation function. | The MODEM command is used for controlling the communication session with the remote user. The ACOS language was originally written for modems and thus the keyword is kept for consistency despite A2osX having replaced the underlying communications with a networking stack. Regardless, the functionality remains the same albeit applied to telnet sessions. The modem functions are as follows:
IF MARK(1) PRINT "FILE EXISTS"
CLOSE #1
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*) | Not Yet Implemented | Return a number of characters from the end of a string. | Returns the last *length* number of characters from the *source*. | |
+| RIGHT$ | *string*=RIGHT$(*source*, *length*) | Impl. | Return a number of characters from the end of a string. | Returns the last *length* number of characters from the *source*. | |
| RND$ | *char*=RND$ | Not Yet Implemented | Returns a random character. | 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 or are you using an A2osX random generator? | |
| SET | SET *string*=*memloc*, *number* | Not Yet Implemented | Sets a string to a location in memory. | 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*...])