Skip to content

Commit

Permalink
Updated BASIC readme file (ghaerr#2195)
Browse files Browse the repository at this point in the history
* Improved descriptions

* Update README.md

* Update README.md

* Update README.md
  • Loading branch information
toncho11 authored Jan 21, 2025
1 parent 9faca6d commit 0081d89
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions elkscmd/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,17 @@ DIM variable(n1,n2...)
READ var
DATA NumberOrString [,NumberOrString...]
RESTORE [lineNumber]
CLS
CLS removes all text and graphics
PAUSE milliseconds
POSITION x,y sets the cursor
NEW
NEW clears the current program from memory
LIST [start],[end] e.g. LIST or LIST 10,100
RUN [lineNumber]
LOAD "filename" loads filename.bas
SAVE "filename" saves filename.bas
SAVE+ "filename" saves filename.bas, sets auto-run on load
DELETE "filename" deletes filename.bas
DIR
DIR list all *.bas files in current directory
MODE number (set graphics mode, e.g MODE 1 to use PLOT/DRAW/CIRCLE)
COLOR fg,bg
PLOT x,y
Expand Down Expand Up @@ -97,7 +97,7 @@ CODE(string) e.g. CODE(" ") -> 32
STR$(number) e.g. STR$(2) -> "2"
LEFT$(string,n)
RIGHT$(string,n)
MID$(string,start,n)
MID$(string,start,n) extracts a substring from a given string
COS(x) cosine
SIN(x) sine
TAN(x) tangent
Expand All @@ -110,17 +110,17 @@ POW(x,y) e.g. POW(2,0.5) -> 1.414 square root of 2
HEX$(number) e.g. HEX$(25923) -> "6543"
PEEK(offset,segment) Memory read byte from `segment:offset`
Architecture-specific
Architecture-specific:
PINREAD(pin)
ANALOGRD(pin) - not implemented
Not implemented
x^y x to the y power - use POW(x,y)
SQR(number) square root, use POW(number,0.5)
SGN(number) sign, use IF number < 0 etc
Not implemented, but alternatives exist:
x^y x to the y power, use POW(x,y) instead
SQR(number) square root, use POW(number,0.5) instead
SGN(number) get sign, use IF number < 0 etc instead
Not yet implemented
SCREEN$(line,col)
ATTR(line,col)
POINT(x,y)
Not yet implemented:
SCREEN$(line,col) - retrieves the ASCII code of the character displayed at (line,col)
ATTR(line,col) - returns the attribute byte for this screen position. The byte contains information about the color attributes of the pixel block at (line,col)
POINT(x,y) - checks whether the pixel at screen coordinates (x, y) is ON or OFF
```

0 comments on commit 0081d89

Please sign in to comment.