6.5 KiB
Extended BASIC
NOTE: Command syntax, behaviour details, and tokens are still subject to change! Currently the availability of some depends on the build configuration, in the future most (if not all) extended commands will be available only on machines with extended ROM, like the Mega65 or Ultimate 64.
DOS Wedge
The DOS Wedge commands are only available in direct mode, and they have to start from the first character of the line.
@
Displays the error/status read from the current drive. Current drive is either the last device used by any I/O command, the one set by DOS Wedge command, or 8 as a fallback.
@$
Displays the directory of the current drive. Does not destroy BASIC program in memory.
@device_number
Changes the current drive number.
@command
Sends the DOS command to the current drive.
Tape Wedge
The Tape Wedge commands are only available in direct mode, and they have to start from the first character of the line.
←L ["file_name"]
Loads the file from tape. Depending on the configuration, it tries to load the file in TurboTape 64 format, in the standard CBM format, or autodetects the file format.
←M ["file_name"]
Like above, but merges a BASIC program to the one already stored in memory.
←H
Launches a built-in tape head alignment tool. Destroys program in memory. Press RUN/STOP to terminate the tool.
Additional BASIC commands - I/O
MERGE "file_name" [, device_number]
Appends the BASIC program from a storage medium to the one currently present in memory.
BLOAD "file_name", device_number, start_address
Loads a binary file starting from the given memory location. Does not clear variables, does not perform BASIC program relinking, etc. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented.
BVERIFY "file_name", device_number, start_address
Verify operation for the binary data starting from a given addres. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented.
BSAVE "file_name", device_number, start_address, end_address
Saves the binary data from the given memory area. NOTE: for now syntax differs from the BASIC V3.5+ - this will be changed once the necessary BASIC infrastructure is implemented.
Additional BASIC commands - misc
COLD
Resets the machine. In direct mode asks for confirmation first.
FAST
Tries to switch the machine to turbo mode - details differ depending on the configured machine / motherboard.
SLOW
Tries to switch the machine back to 1 MHz operation mode.
OLD
Tries to restore program destroyed by the NEW command or a reset.
MEM
Displays BASIC memory usage information:
TXT- size of BASIC program text, always at least 2 bytes are usedVAR- bytes occupied by float and integer variables, string variable descriptors, and function descriptorsARR- bytes occupied by arrays (note: for string arrays only descriptors are stored here)STR- bytes occupied by strings, also the ones belonging to arraysSPC- unused space
CLEAR
Clears the screen content.
DISPOSE
Runs the garbage collector - disposes outdated strings.
Planned BASIC features, when V2 compatibility is reached
Ideas for the future, most of them suitable for Mega65 or other power machines only
- sound support
- 2D graphics support
- turtle graphics
- sprite support, including collision callback
- custom character set support
- sprite/character design within program, in a way similar to Simons BASIC
- joystick/mouse/lightpen/paddle commands/functions
- matrix operations
DISPOSEwith variable/array as parameter should remove the variable/array from memoryBLOAD,BVERIFYandBSAVEshould have syntax compatible with BASIC V7/V10- it should be possible to intercept Kernal errors from BASIC (prevent
?FILE NOT FOUND ERROR IN ..., etc.);ON ERROR GOTO? - support for numbers in hexadecimal and binary formats
CGOTOandCGOSUB- computatiuonal versions, should accept expressionsLABEL,LGOTOandLGOSUB- jump to label- some kind of subroutines with local variable namespace, possibly loaded from disc (like in Warsaw Basic 3.2)
- for Mega65 mode, move variables to a separate memory area, consider extending variable name length
- DOS Wedge should ask (
ARE YOU SURE?) before removing a file or formating the disc ←V(verify from tape) - if Kernal is extended to offer this feature- modulo function or opeerator
DPEEK,DPOKE,QPEEK,QPOKE- 2/4 bytePEEKandPOKEvariants- all the functions/commands accepting memory addresses should be able to access the whole Mega65 memory
- ability to limit memory used by basic to standard 38K or to 46K (memory model switch)
XORoperatorAUTO- line auto numberingRENUMBERfor chanign the line numbersIF ... THEN ... ELSE,BEGIN ... BEND- consider
BOOTcommand - possibly some commands for creating menus and dialog boxes
- more configurable
INPUT PRINT USING,PRINT AT(x, y),PRINT CENTRECURSORcommand from BASIC V10RESTOREshould accept lline number as argument- hex/dec conversion functions
DELETEcommand to delete several BASIC lines, as in BASIC V10FORloop should accept integer variable as indexFETCH,STASH,SWAP- REU supportDMAcommand for Mega65- geoRAM support
GO 64/GO 65should enable/disable C64 compatibility mode on Mega65NSYSfor Mega65 - nativeSYSfor Mega65, should not switch to C64 compatibilty modeDO ... LOOP,DO ... UNTIL,DO ... WHILE,EXITSEEK#to read-and-forget n bytesRECORD#command from BASIC V10GETKEYfrom BASIC V10HELPcommand from BASIC V7/V10- function to find substring position
WINDOWcommand from BASIC V7- functions to return cursor position
TRAPandRESUMESET DEFandSET DISKfrom BASIC V10SLEEPfrom BASIC V10TRON/TROFF- program tracingTYPEcommand from BASIC V10RUNshould be able to run program from device, as in BASIC V10PAGEandDELAYcommands from Simons BASIC, or something similarDUMPcommand from Simons BASIC, or something similar- function to insert a substring starting from given position
- function to generate string of n duplicated characters
- function to retrieve fractional part of a number
- command to fill text screen area with a character, inverse screen area, scroll, or change fg/bg color of screen area