Added port support, and removed things from BASIC_DEVELOPMENT it does not yet support
This commit is contained in:
@@ -81,19 +81,6 @@ input $1
|
||||
|
||||
## Keywords
|
||||
|
||||
You can do this to get the MikeOS API version number:
|
||||
```
|
||||
x = VERSION
|
||||
```
|
||||
Or you can retrieve the lower word of the system clock like this:
|
||||
```
|
||||
x = TIMER
|
||||
```
|
||||
To get the current ink colour, use:
|
||||
```
|
||||
x = INK
|
||||
```
|
||||
|
||||
## The editor
|
||||
|
||||
You can run your .BAS programs by using the BAS core util eg.
|
||||
@@ -176,13 +163,6 @@ Get the position of the cursor. Example:
|
||||
curspos a b
|
||||
```
|
||||
|
||||
## DELETE
|
||||
|
||||
Removes a file from the disk. Returns 0 in the R variable if the operation was a success, 1 if the delete operation couldn't be completed, or 2 if the file doesn't exist. Example:
|
||||
```
|
||||
delete "myfile.txt"
|
||||
```
|
||||
|
||||
## DO
|
||||
|
||||
Perform a loop until a condition is met (UNTIL or WHILE). You can also set up an infinite loop with LOOP ENDLESS at the end. Example:
|
||||
@@ -205,10 +185,6 @@ else print "Goodbye"
|
||||
|
||||
Terminates execution of the BASIC program and hands control back to the operating system.
|
||||
|
||||
## FILES
|
||||
|
||||
Prints a list of files that are on the disk on the screen.
|
||||
|
||||
## FOR
|
||||
|
||||
Begins a loop, counting upwards using a variable. The loop must be finished with a NEXT instruction and the relevant variable. Example:
|
||||
@@ -423,15 +399,6 @@ print hex x
|
||||
```
|
||||
In the first print command, the output is 109. In the second, the output is the ASCII character for 109 -- that is, 'm'. And in the third command, it shows the hexadecimal equivalent of 109.
|
||||
|
||||
## RAND
|
||||
|
||||
Generate a random integer number between two values (inclusive) and store it in a variable. Example:
|
||||
```
|
||||
Make X a random number between 50 and 2000
|
||||
|
||||
rand x 50 2000
|
||||
```
|
||||
|
||||
## READ
|
||||
|
||||
Read data bytes from a label, first specifying the offset and a variable into which to read. For instance, in the following example we read a small program and poke it into memory locations 50000 to 50012. We then call that location to run the program:
|
||||
@@ -453,14 +420,6 @@ mydata:
|
||||
190 87 195 232 173 60 195 89 111 33 13 10 0
|
||||
```
|
||||
|
||||
## RENAME
|
||||
|
||||
Renames one file to another. Literal strings and string variables are allowed. Afterwards, R contains 0 if the operation was a success, 1 if the file was not found, 2 if the write operation failed, or 3 if the target file already exists. Example:
|
||||
```
|
||||
$1 = "myfile.dat"
|
||||
rename "oldfile.txt" $1
|
||||
```
|
||||
|
||||
## RETURN
|
||||
|
||||
Switches execution back to the position of the prior GOSUB statement. See GOSUB above for more information. Example:
|
||||
@@ -468,17 +427,6 @@ Switches execution back to the position of the prior GOSUB statement. See GOSUB
|
||||
return
|
||||
```
|
||||
|
||||
## SAVE
|
||||
|
||||
Saves data from memory to a file on the disk. The first parameter is the filename, the second the location in RAM where the data starts, and the third the number (in bytes) the amount of data to save. After execution, the R variable contains 1 if the file save operation failed (eg if it's a write-only medium), 2 if the file already exists, or 0 if it was successful. Examples:
|
||||
```
|
||||
save "myfile.txt" 40000 256
|
||||
|
||||
$1 = "myfile.txt"
|
||||
x = 40000
|
||||
y = 256
|
||||
save $1 x y
|
||||
```
|
||||
|
||||
## STRING
|
||||
|
||||
|
||||
Reference in New Issue
Block a user