BASIC System Statements and Functions - fvdhoef/aquarius-plus GitHub Wiki
DEF USR
Coming soon.
DEF USR
Coming soon.
GETSPEED
Coming soon.
IN
TYPE: USB BASIC system function
FORMAT: IN ( port )
Action: Reads a byte from the I/O port specified by port.
- port is an expression that reduces to an integer value in the range 0 to 255.
Examples of IN:
PRINT IN(252)
Prints cassette port input status
S=IN(254)
Sets variable S to Printer Ready status
FORMAT: IN ( address )
Action: Reads a byte from the I/O port specified by the least significant byte of address.
- address is an expression that reduces to an integer value in the range -32768 to 32767.
- Advanced: During the read, address is put on the Z80 address bus.
plusBASIC enhancement
- address can be an integer value in the range -65535 and 65535 ($0000 to $FFFF).
IN$
Coming soon.
OUT
TYPE: USB BASIC system statement
FORMAT: OUT port , byte
Action: Sends byte to the I/O port port.
- port is an integer expression specifying the I/O port the byte is to be sent to.
- If port is in the range 0 through 255, it directly corresponds to the I/O port number.
- If port is in the ranges -32768 through -1 or 256 through 32767.
- The the low byte specifies the I/O port to be written to.
- The high byte is placed on lines 7 through 15 of the address bus.
- byte is an integer between 0 and 255 specifying the value to be sent to the port.
Examples of OUT:
OUT 246, 12
Send a value of 12 to the SOUND chip
10 X=14:OUT 254, X
Send a value of 14 to the Cassette sound port
plusBASIC v0.22w enhancements
TYPE: plusBASIC system statement
FORMAT: OUT port , bytes { ; port , bytes ...}
Action: Sends one or more bytes to one or more Z80 I/O ports.
- port is an integer in the range -65536 through 65535.
- The low byte of port specifies the I/O port to be written to
- The high byte of port is place on lines 7 through 15 of the address bus.
- bytes is is a list of one or more byte values and/or strings, separated by commas.
Examples of OUT:
P$="ABCD":OUT 252,P$
Send bytes with values 64, 65, 66, and 67 to cassette port
10 OUT 254,0,$"010203",4
Sends bytes with values 0, 1, 2, 3, and 4, to the printer port.
OUT $EA,17;$EB,$"0468"
Sets the second color of palette 1 to RGB values 6, 4, and 8, respectively.
PAUSE
Coming soon.
SET FAST
TYPE: plusBASIC system statement
FORMAT: SET FAST ON
Action: Enables turbo mode (clock speed 7.16MHz)
FORMAT: SET FAST OFF
Action: Disables turbo mode.
SET SPEED
Coming soon.
SET USRINT
Coming soon.
VER
Coming soon.
VER$
Coming soon.
WAIT
Coming soon.