checkpoint. Next up is PRINT.

This commit is contained in:
Brian J. Bernstein 2021-04-05 17:04:30 -04:00
parent c7467c408d
commit 8f5bf8801b
1 changed files with 39 additions and 39 deletions

View File

@ -15,45 +15,45 @@ This document lists all of the **ACOS Words** supported in the A2osX implementat
| CLOCK | CLOCK(0)<br>CLOCK(1)=expression<br>expression=CLOCK(2) | dev | The CLOCK function/statement is used for setting a time limit. It can also be used to find out how long someone has been using the system (i.e. how long since CLOCK(0) was called). The following options are available:<p><ul><li><tt>CLOCK(0)</tt>- This statement is used to reset the clock time to zero. It should be executed when your program begins.<li><tt>CLOCK(1)</tt>- You will need to set CLOCK(1) equal to the number of minutes you want as a time limit, or 0 for no limit. when the time limit expires, it will be handled as a "no carrier" situation. The program will jump to the NOCAR routine.<br><li><tt>CLOCK(2)</tt>- The CLOCK(2) function will return the number of seconds that a user has been connected. divide this number by 60 to find how many minutes they have been connected.</ul> |
| CLOSE | CLOSE<br>CLOSE #device | dev | The CLOSE command is used to close a disk file after you are done with it. If you give a device channel with the close command, only that file will be closed. If you CLOSE with no arguments, all open files will be closed. |
| COPY | COPY filename [,#device]<br>COPY #device [,#device] | dev | 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 | dev | 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 will not be touched in any way. |
| CRUNCH | CRUNCH | dev | the CRUNCH statement is used in conjunction with the MSG commands. it is used to "CRUNCH" together a message file in while messages have been killed. this allows you to maintain a sequential message file and get rid of all the blank deleted entries that might be there. |
| DATE$ | string=DATE$ | dev | 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=string1 | dev | ECHO=""<br>the ECHO statement is used to set the echo character to be used with the INPUT statement. 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 will reset the echo to the character that is being typed. |
| EDIT | EDIT(number) | dev | 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....<p><ul><li>EDIT(0)- clears the editor. there will be a total of 4096 bytes free after a clear takes place.<br><li>EDIT(1)- enter the editor. if no data is present, the editor will start to accept input right away. if other data is present, the editor will start in the prompt mode.<br><li>EDIT(2)- this is a function that returns the number of bytes used within the editor. if this number equals 0 the editor is empty.<br><li>EDIT(3)- this is used to set the video width to be used within the editor. any value from 1 to 255 is legal. the most often used widths are 32,40,64,80,128. all operations within the editor will be based around this width. you can also read the current width using EDIT(3) as a function.<br><li>EDIT(4)- this is used to set the 'back-space mode' that the editor will use. certain modes allow more control than others. mode 0 indicates that the actual mode is not known. the editor will work fine, but some functions will be disabled. under mode 1, the editor will assume that the user has a 'non-destructible' backspace. this allows all the editor functions to be used and is how the local console is setup. mode 2 tells the editor that the user has a 'destructible' backspace. under this mode, some functions are disabled, but the editor speeds up certain other functions. |
| END | END | dev | same as applesoft, terminates program. returns to acos restart state. |
| FILL | FILL start,length,data | dev | the FILL statement is used to fill an area of memory with some bytes of data. generally it is used to zero out memory. START is a 16 bit memory address, length is an 8 bit [0-255] number, and DATA is the byte that will be used to fill memory. |
| FLAG | expression=FLAG | dev | FLAG=number FLAG=(number) FLAG(number)=number1<br>the FLAG function is a low overhead way to store 1 bit information. you just need to point the FLAG function to a point in memory that you wish to store your data in, and you can manipulate as many flags as you need. each byte of memory can contain 8 flags. to setup the FLAG function, use the first syntax to point the function to a point in memory where the flags will be stored. once the pointer is setup, you can use the FLAG just like a variable using the second and third syntax for reading and writing the flags. |
| FOR | FOR numvar=number TO number STEP number | dev | ; NEXT<br>appears to have same function and limits as applesoft FOR-NEXT loops. |
| FREE | FREE | dev | appears to have same function as applesoft FRE(0) command. |
| GET | GET varstr | dev | the GET statement is used to get a single keypress from the keyboard. 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 | dev | 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. |
| IF | IF argument [THEN] statement [ELSE] statement | dev | appears to have same function as applesoft IF-THEN except it supports the ELSE directive when the statement was false. ELSE is optional. THEN is also optional but if you use THEN, it cannot be followed by a label directly.(use IF arg THEN GOTO label). |
| INFO | expression=INFO(optional) | dev | INFO(optional)=expression<br>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.<br>argument r/w function-------- --- -----------------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. |
| INPUT | INPUT [#device,] [@number,] [\] ["text"] | dev | variable [{,\}] variable..]<br>the INPUT statement is broken down into 4 different parts. the first part is the input device to be used. when omitted, the input is taken from the modem/console, otherwise input is taken from that device. the second part is the input mode. there is a restrictive mode placed on the input so that the inputed data is what you desire. the third part of INPUT is the prompt. the prompt is basically just a text string that will be printed prior to getting the input. the newline character '\' can be used at the beginning of the text. the last part of INPUT is the variable list. this is a list of variables that will be assigned the input. each variable in the list is separated by either a comma or backslash. if separated by a comma, then the actual typed input must be divided by a comma. if divided by a backslash, then the text must be separated by a carriage return.<br> INPUT default- set the input mode to uppercase, don't accept a blank line.<br> INPUT mode 0 - set the input mode to uppercase, don't accept a blank line, just return the first character.<br> INPUT mode 1 - set the input mode to uppercase, don't accept a blank line, don't accept any commas.<br> INPUT mode 2 - set the input mode to uppercase, blank lines will be accepted.<br> INPUT mode 3 - accept everything. (upper & lower). |
| INSTR | expression=INSTR(string,string) | dev | the INSTR function is used to search within a string for the existance of another string. the first string is that string which you are searching for. the second string is what will be searched. the case of the text will be ignored. the function will return the number of the first character where the match was found. if the function returns zero, no match was found. |
| KEY | expression=KEY(0) | dev | expression=KEY(1) expression=KEY(2)<br>the KEY function is used to check and see what if any keys have been pressed. it is generally used to check to see if a routine needs to be interrupted and is used in conjuction with the SETINT and ADDINT statements. this routine does not wait for a key, it returns either a zero for no key or the ascii value of the key. in the KEY(1) form, a non-zero byte will be returned if the key pressed was the 'file stop' character. in the KEY(2) form, a non-zero byte will be returned if the pressed key is the 'file next' key define in config. |
| KILL | KILL filename | dev | KILL #MSG(expression)<br>the KILL statement can be used in two different ways. in both ways it is used to delete data. in the first form, with the filename, it will delete the file from disk. in its second form, it will kill a message within the currently active message base. after using KILL on a message, it is always a good idea to follow it with an UPDATE. |
| LEFT$ | string=LEFT$(string,length) | dev | appears to have same function as applesoft LEFT$. |
| LEN | expression=LEN(string) | dev | appears to have same function as applesoft LEN. |
| LINK | LINK filename [,string-label] | dev | this statement will allow two program segments to be linked together. it is in this way that the problem of not enough memory is dealt with. the filename argument is mandatory and is in standard filename syntax. if you wish the execution to begin at a point other than the beginning of the module, then add on a comma followed by the name of the label IN STRING FORM. the label must be enclosed in quotes or must be in a string. ex: LINK "A:MSG.SEG","BULLETINS". you must also make use the PUBLIC command within the segment you are linking to so that the labels address is available to the link command. |
| LOG | LOG drivespec | dev | 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) | dev | MARK(device)=number<br>the MARK function will allow you to either set or check the point at which a file is doing i/o. if you want to go to the beginning of a file, you would issue a MARK(1)=0 assuming it was file 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 IF MARK(1) PRINT "FILE EXISTS" CLOSE #1 |
| MID$ | string=MID$(string,start [,length]) | dev | appears to have same function as applesoft MID$. |
| MODEM | MODEM(number) | dev | the MODEM command is multiple function for controlling the modem.<br> MODEM(0)- this command needs to be issued before any other modem command is used. its function is to initialize the modem driver for later use.<br> MODEM(1)- this command waits for an incoming call and establishes a connection. execution will continue when either a call is connected or the user goes into local mode.<br> MODEM(2)- this command causes the modem to hangup. all further output will be sent to console only. |
| MOVE | MOVE start,length TO destination | dev | the MOVE statement is used to move segments of memory around. the only limitation is that only a maximum of 255 bytes can be moved at any one time. both START and DESTINATION are 16 bit memory addresses while LENGTH is an 8 bit [0-255] number. |
| MSG | expression=MSG(number) | dev | MSG(number)=expression device={#MSG(number)}<br>the MSG function is a specialized function for the acos message handling routines. once a message file has been opened via the READY command, the MSG function is used to access individual messages within the message file. the MSG function has two radically different syntaxs. under the first and second syntax, it is being used to access and set information about a message. for each message, you can maintain one number that gives information about it via the MSG function. the MSG(0) function returns the number of messages within the message file and may not be changed. to access a message, it is used as a device channel. while to show the editor COPY#8 would suffice, since the message file is made up of many messages, it is necessary to tell which message you want to work with. COPY#MSG(3) would show message number three within the currently open message file. |
| NEXT | NEXT | dev | similar to the applesoft NEXT statement which is used with FOR-NEXT loops but with the exception you cannot use a variable after NEXT. (NEXT X is illegal). |
| NIBBLE | NIBBLE=number | dev | NIBBLE(number) NIBBLE(number)=number16<br>the NEXT function is similar to the FLAG function in that it is a low overhead data storage method. with the NIBBLE function, you can store 4 bit numbers that have the range 0-15. use the first syntax of NIBBLE to point to the point in memory where the data will be stored. use the second and third syntax to read and write the actual data. |
| NOT | expression= NOT expression | dev | the NOT operator is a booleon logic operator. it changes the value of an expression from true to false or from false to true. in booleon logic, false is considered to be zero while not false or true, is considered to be any other number. the NOT operator is most commonly used in IF statements. |
| ON NOCAR | ON NOCAR GOTO label | dev | the ON NOCAR statement is used to setup a routine that can be used whne carrier is lost from a remote user. when the carrier is lost, acos will then hang up the modem. it will then change the current execution point to the label that was setup. whenever you link to another segment you must set up a new ON NOCAR vector to a routine within that segment. if you don't have a vector set up and a remote caller drops carrier, the system will just sit there until it times out. |
| OPEN | OPEN #device,filename | dev | the OPEN statement is used to make disk files ready to do i/o with out a program. you open a disk file using either device channel 1 or 2, and all further references to that channel will access the file associated with it. when you are finished with the file, use the CLOSE command. this will free up the device channel for later use. if you try to use a channel that is already in use, or one besides channel 1 or 2, you will get a BAD DEVICE CHANNEL error. if the file you open does not exist, no error will be generated. if you try to read from the file, it will appear to be empty. use the CREATE command to make a file. |
| PDL | expression=PDL(number) | dev | the PDL function is used to read one of the paddles on the system. you can read paddle zero through three. the number returned will be in the range 0-255. |
| PEEK | expression=PEEK(address) | dev | appears to be the same as the applesoft PEEK function. |
| POKE | POKE address,value | dev | appears to be the same as the applesoft PEEK function. |
| POP | POP | dev | appears to be the same as the applesoft POP statement with the exception of it also can be used with the acos PUSH command. |
| POSITION | POSITION #device,number,number [,number] | dev | the POSITION statement is used to position within a random access file. the first argument is the disk device channel number that was used to open the file. the second field is the length of each record. the third field is the record number to be positioned to. the fourth field is the offset with in the record that is to be positioned to. |
| CREATE | CREATE filename | dev | 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 | dev | 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$ | dev | 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=string1<br>ECHO="" | dev | 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) | dev | 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....<p><ul><li><tt>EDIT(0)</tt>- clears the editor. there will be a total of 4096 bytes free after a clear takes place.<br><li><tt>EDIT(1)</tt>- enter the editor. if no data is present, the editor will start to accept input right away. if other data is present, the editor will start in the prompt mode.<br><li><tt>EDIT(2)</tt>- this is a function that returns the number of bytes used within the editor. if this number equals 0 the editor is empty.<br><li><tt>EDIT(3)</tt>- this is used to set the video width to be used within the editor. any value from 1 to 255 is legal. the most often used widths are 32,40,64,80,128. all operations within the editor will be based around this width. you can also read the current width using <tt>EDIT(3)</tt> as a function.<br><li><tt>EDIT(4)</tt>- this is used to set the 'back-space mode' that the editor will use. certain modes allow more control than others. mode 0 indicates that the actual mode is not known. the editor will work fine, but some functions will be disabled. under mode 1, the editor will assume that the user has a 'non-destructible' backspace. this allows all the editor functions to be used and is how the local console is setup. mode 2 tells the editor that the user has a 'destructible' backspace. under this mode, some functions are disabled, but the editor speeds up certain other functions. |
| END | END | dev | Same as AppleSoft, this command terminates program. Returns to ACOS restart state. |
| FILL | FILL start, length, data | dev | The FILL statement is used to fill an area of memory with some bytes of data. Generally it is used to zero out memory. START is a 16 bit memory address, length is an 8 bit [0-255] number, and DATA is the byte that will be used to fill memory. |
| FLAG | expression=FLAG<br>FLAG=number<br>FLAG=(number)<br>FLAG(number)=number1 | dev | The FLAG function is a low overhead way to store 1 bit information. You just need to point the FLAG function to a point in memory that you wish to store your data in, and you can manipulate as many flags as you need. Each byte of memory can contain 8 flags. To setup the FLAG function, use the first syntax to point the function to a point in memory where the flags will be stored. Once the pointer is setup, you can use the FLAG just like a variable using the second and third syntax for reading and writing the flags. |
| FOR | FOR numvar=number TO number STEP number<br>...<br>NEXT | dev | Appears to have same function and limits as AppleSoft FOR-NEXT loops. However, you can only have ONE for loop active at a time, i.e. the <tt>NEXT</tt> command does not allow for a variable, it only operates on the currently active FOR loop. |
| FREE | FREE | dev | 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 | 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? |
| 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> |
| INSTR | expression=INSTR(*match*, *source*) | dev | The <tt>INSTR</tt> function is used to search within a *source* string for the existence of the specified *match* string. The search is case insensitive. The function will return the numerical position of the first character in the *source* string where the *match* was found. Note that the first character in *source* string starts at <tt>1</tt>, not <tt>0</tt> like many other languages. So in other words, if the function returns zero, no match was found. |
| KEY | expression=KEY(0)<br>expression=KEY(1)<br>expression=KEY(2) | dev | The KEY function is used to check and see what if any keys have been pressed. It is generally used to check to see if a routine needs to be interrupted and is used in conjunction with the <tt>SETINT</tt> and <tt>ADDINT</tt> statements. This routine does not wait for a key, it returns either a zero for no key or the ASCII value of the key. In the <tt>KEY(1)</tt> form, a non-zero byte will be returned if the key pressed was the 'file stop' character. In the <tt>KEY(2)</tt> form, a non-zero byte will be returned if the pressed key is the 'file next' key defined in config. |
| KILL | KILL filename<br>KILL #MSG(expression) | dev | The <tt>KILL</tt> statement can be used in two different ways. In both ways it is used to delete data. In the first form, with the filename, it will delete the file from disk. In its second form, it will kill a message within the currently active message base. After using KILL on a message, it is always a good idea to follow it with an <tt>UPDATE</tt>. |
| LEFT$ | string=LEFT$(*source*, *length*) | dev | Returns the first *length* characters of *source* string. |
| LEN | expression=LEN(string) | dev | Returns the length of the supplied string. A result of zero means the string is empty. |
| LINK | LINK filename [,label] | dev | The <tt>LINK</tt> statement allows you to load a different program segment and execute that one, optionally starting at a specified label. The purpose of this is to allow for your code to be split up into multiple segments, but also to support additional code to be used without modifying the other. The *filename* argument is mandatory and is in the standard filename syntax. If you wish the execution to begin at a point other than the beginning of the module, then the *label* argument can be specified in string form (e.g. <code>LINK "A:MSG.SEG","BULLETINS"</code>). The label must be enclosed in quotes or must be in a string variable. Note that for the label to be usable by the <tt>LINK</tt> command, the label must be declared as <tt>PUBLIC</tt> in the target file. |
| LOG | LOG drivespec | dev | 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)<br>MARK(device)=number | dev | The MARK function will allow you to either set or check the point at which a file is doing I/O. If you want to go to the beginning of a file, you would issue a MARK(1)=0 assuming it was file 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: <p><code>OPEN #1,filename<br>IF MARK(1) PRINT "FILE EXISTS"<br>CLOSE #1</code> |
| MID$ | string=MID$(source, start [,length]) | dev | 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) | dev | 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:<p><ul><li><tt>MODEM(0)</tt> - this command needs to be issued before any other modem command is used. Its function is to initialize the modem driver for later use.<li><tt>MODEM(1)</tt> - this command waits for an incoming call and establishes a connection. Execution will continue when either a call is connected or the user goes into local mode.<li><tt>MODEM(2)</tt> - this command causes the modem to hangup (terminate telnet session). All further output will be sent to console only.</ul> |
| MOVE | MOVE start,length TO destination | dev | The MOVE statement is used to move segments of memory around. The only limitation is that only a maximum of 255 bytes can be moved at any one time. Both START and DESTINATION are 16 bit memory addresses while LENGTH is an 8 bit [0-255] number. |
| MSG | expression=MSG(number)<br>MSG(number)=expression<br>device={#MSG(number)} | dev | The MSG function is a specialized function for the ACOS message handling routines. Once a message file has been opened via the READY command, the MSG function is used to access individual messages within the message file. The MSG function has two radically different syntaxs. Under the first and second syntax, it is being used to access and set information about a message. For each message, you can maintain one number that gives information about it via the MSG function. The MSG(0) function returns the number of messages within the message file and may not be changed. To access a message, it is used as a device channel. While to show the editor COPY#8 would suffice, since the message file is made up of many messages, it is necessary to tell which message you want to work with. COPY#MSG(3) would show message number three within the currently open message file. |
| NEXT | NEXT | dev | For use with the <tt>FOR</tt> statement in FOR-NEXT loops. Unlike with AppleSoft or some other BASIC implementations, you cannot use a variable after NEXT. (NEXT X is illegal). |
| NIBBLE | NIBBLE=number<br>NIBBLE(number)<br>NIBBLE(number)=number16 | dev | The NEXT function is similar to the FLAG function in that it is a low overhead data storage method. With the NIBBLE function, you can store 4 bit numbers that have the range 0-15. Use the first syntax of NIBBLE to point to the point in memory where the data will be stored. Use the second and third syntax to read and write the actual data. |
| NOT | expression= NOT expression | dev | The NOT operator is a boolean logic operator. It changes the value of an expression from true to false or from false to true. In booleon logic, false is considered to be zero while not false or true, is considered to be any other number. The NOT operator is most commonly used in IF statements. |
| ON NOCAR | ON NOCAR GOTO label | dev | The ON NOCAR statement is used to setup a routine that can be used when carrier is lost from a remote user. When the carrier is lost, ACOS will then hang up the modem. It will then change the current execution point to the label that was setup. Whenever you link to another segment you must set up a new ON NOCAR vector to a routine within that segment. If you don't have a vector set up and a remote caller drops carrier, the system will just sit there until it times out. |
| OPEN | OPEN #device,filename | dev | The OPEN statement is used to make disk files ready to do I/O with out a program. You open a disk file using either device channel 1 or 2, and all further references to that channel will access the file associated with it. When you are finished with the file, use the CLOSE command. This will free up the device channel for later use. If you try to use a channel that is already in use, or one besides channel 1 or 2, you will get a BAD DEVICE CHANNEL error. If the file you open does not exist, no error will be generated. If you try to read from the file, it will appear to be empty. Use the CREATE command to make a file. |
| PDL | expression=PDL(number) | dev | The PDL function is used to read one of the paddles on the system. You can read paddle zero through three. The number returned will be in the range 0-255. |
| PEEK | expression=PEEK(address) | dev | Returns the value of the byte located at *address*. REMY TODO: Does this work in A2osX? Perhaps limit it to $C000-CFFF? |
| 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. |