MediaWiki:Sitenotice:
2024-03-02: The wiki ran out of disk space, so things were not working. This has been resolved by adding another 5GB of quota ;-) Thanks to Tim Lindner for reporting the issues. 2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)

BASIC:BASIC: Difference between revisions

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
m (changed header from commands to keywords)
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{NavBASIC}}
= NOTICE! =
Please do not edit this page or anything in this namespace at this time. I will be creating a template for the entries and begin filling them out. [[User:AllenHuffman|OS-9 Al]] ([[User talk:AllenHuffman|talk]]) 11:17, 21 April 2020 (CDT)
= BASIC =
= BASIC =
Tandy Color Computers contain a modular interpreter which understands a superset of the Beginner's All-purpose Symbolic Instruction Code (BASIC) programming language.
Tandy Color Computers contain a modular interpreter which understands a superset of the Beginner's All-purpose Symbolic Instruction Code (BASIC) programming language.
Line 4: Line 8:
There are up to four core modules available in Read-Only Memory (ROM) that detect and link to each other when combinations of these ROMs exist in a Color Computer.
There are up to four core modules available in Read-Only Memory (ROM) that detect and link to each other when combinations of these ROMs exist in a Color Computer.


== MODULES ==
== BASICs ==
[[Color BASIC]]
[[BASIC:Color BASIC|Color BASIC]] (CB) - the core module present in all models of Color Computer.
 
[[BASIC:Extended Color BASIC|Extended Color BASIC]] (ECB) - a graphics and sound package which was optional in the Color Computer 1 and 2.
 
[[BASIC:Disk Extended Color BASIC|Disk Extended Color BASIC]] (DECB) - Disk commands present when a disk controller cartridge is plugged in.
 
[[BASIC:Super Extended Color BASIC|Super Extended Color BASIC]] (SECB) - Present in the Color Computer 3 only and includes Color BASIC and Extended Color BASIC in lower memory - links to Disk BASIC ROM if a cartridge is present.
 
== Third Party ==
ADOS
 
ADOS 3


[[Extended Color BASIC]] (ECB)
HDB-DOS


[[Disk Extended Color BASIC]] (DECB)
RGB-DOS


[[Super Extended Color BASIC]] (SECB)
SDC-DOS


== KEYWORDS ==
== KEYWORDS ==
* [  CB]    [[ABS]]   Get absolute value of a signed number
Click the header (Module or Keyword) to sort this index. Sorting by Module will group all the Color BASIC (CB) commands, etc. together, or sorting by Keyword will sort by commands from all modules.
* [  CB]    [[+]]   Addition operator
{| class="wikitable sortable"
* [  CB]    [[AND]]   Boolean / Logical AND operator
|+ BASIC Keywords (sortable)
* [  CB]    [[ASC]]   ASCII code of first letter of string
! Module || Keyword || Description
* [ ECB]    [[ATN]]   Returns arctangent in radians
|-
* [SECB]    [[ATTR]]   Set the display attributes of a high-resolution text screen  
| CB || [[BASIC:BASIC:ABS | ABS]] || Get absolute value of a signed number
* [  CB]    [[AUDIO]]   Control the audio source
|-
* [DECB]    [[BACKUP]]   Duplicates the contents of the disk in the source drive on the disk in the destination drive
| CB || [[BASIC:+ | +]] || Addition operator
* [  CB]    [[BIRQSV]]    Interrupt service handler
|-
* [SECB]    [[BRK]]   Jump to a line number when the BREAK key is pressed
| CB || [[BASIC:AND | AND]] || Boolean / Logical AND operator
* [SECB]    [[BUTTON]]   Return if a Joystick Button is being pressed or not
|-
* [  CB]    [[CHR$]]   Convert number to Control, ASCII, or graphics code string
| CB || [[BASIC:ASC | ASC]] || ASCII code of first letter of string
* [ ECB]    [[CIRCLE]]   Draws a circle with center at point (x,y) radius r, specified color c and height/width ratio  
|-
* [  CB]    [[CLEAR]]   Clear RAM for string space
| ECB || [[BASIC:ATN | ATN]] || Returns arctangent in radians
* [  CB]    [[CLOAD]]   Cassette load
|-
* [  CB]    [[CLOSE]]   Close files
| SECB || [[BASIC:ATTR | ATTR]] || Set the display attributes of a high-resolution text screen  
* [  CB]    [[CLS]]   Clear screen
|-
* [SECB]    [[CMP]]   Set palette to composite defaults
| CB || [[BASIC:AUDIO | AUDIO]] || Control the audio source
* [ ECB]    [[COLOR]]   Sets foreground and background color
|-
* [  CB]    [[CONT]]   Continue the program from a stop
| DECB || [[BASIC:BACKUP | BACKUP]] || Duplicates the contents of the disk in the source drive on the disk in the destination drive
* [DECB]    [[COPY]]   Copies the contents of filename1 to filename2
|-
* [ ECB]    [[COS]]   Return cosine of an angle given in radians
| SECB || [[BASIC:BRK | BRK]] || Jump to a line number when the BREAK key is pressed
* [  CB]    [[CSAVE]]   Cassette save
|-
* [DECB]    [[CVN]]   Convert a 5-byte coded string created by MKN$ back to the number it represents
| SECB || [[BASIC:BUTTON | BUTTON]] || Return if a Joystick Button is being pressed or not
* [  CB]    [[DATA]]   Store data within a program
|-
* [ ECB]    [[DEF]]   Defines numeric function
| CB || [[BASIC:CHR$ | CHR$]] || Convert number to Control, ASCII, or graphics code string
* [ ECB]    [[DEL]]   Deletes program lines
|-
* [  CB]    [[DIM]]   Set aside memory for arrays
| ECB || [[BASIC:CIRCLE | CIRCLE]] || Draws a circle with center at point (x,y) radius r, specified color c and height/width ratio  
* [DECB]    [[DIR]]   Displays a directory of the disk in the drive you specify
|-
* [  CB]    [[/]]    Division operator
| CB || [[BASIC:CLEAR | CLEAR]] || Clear RAM for string space
* [ ECB]    [[DLOAD]]   Loads BASIC program at specified baud
|-
* [DECB]    [[DOS]]   With the OS-9 system diskette in drive 0, the DOS command boots the OS-9 operating system
| CB || [[BASIC:CLOAD | CLOAD]] || Cassette load
* [ ECB]    [[DRAW]]   Draws a line beginning at specified starting point of specified length and color
|-
* [DECB]    [[DRIVE]]   Changes the default drive to the drive you specify
| CB || [[BASIC:CLOSE | CLOSE]] || Close files
* [DECB]    [[DSKI$]]   Inputs data from a particular sector with in a particular track on the disk in the drive you specify
|-
* [DECB]    [[DSKINI]]   Formats a disk in the drive you specify
| CB || [[BASIC:CLS | CLS]] || Clear screen
* [DECB]    [[DSKO$]]   Writes string data on sector, track, and drive number you specify
|-
* [ ECB]    [[EDIT]]   Allows editing of program line
| SECB || [[BASIC:CMP | CMP]] || Set palette to composite defaults
* [  CB]    [[END]]   The end of the program
|-
* [  CB]    [[EOF]]   End of file
| ECB || [[BASIC:COLOR | COLOR]] || Sets foreground and background color
* [  CB]    [[=]]   Equality operator
|-
* [SECB]    [[ERLIN]]   Returns the BASIC line number where an error has occurred
| CB || [[BASIC:CONT | CONT]] || Continue the program from a stop
* [SECB]    [[ERR]]   Jump to a line number when an error occurs
|-
* [SECB]    [[ERRNO]]   Returns the BASIC error number for the error that has occurred
| DECB || [[BASIC:COPY | COPY]] || Copies the contents of filename1 to filename2
* [  CB]    [[EVAL]]   Evaluate a numeric expression
|-
* [  CB]    [[EXEC]]   EXECute code at address
| ECB || [[BASIC:COS | COS]] || Return cosine of an angle given in radians
* [  CB]    [[EXP]]   Generates ?SN in Color BASIC, implemented in Extended Color BASIC
|-
* [ ECB]    [[EXP]]   Returns natural exponential of number
| CB || [[BASIC:CSAVE | CSAVE]] || Cassette save
* [DECB]    [[FIELD]]   Organizes the space within a direct access buffer into fields
|-
* [DECB]    [[FILES]]   Tell the computer the number of buffers to reserve in memory
| DECB || [[BASIC:CVN | CVN]] || Convert a 5-byte coded string created by MKN$ back to the number it represents
* [ ECB]    [[FIX]]   Returns truncated (whole number) value
|-
* [  CB]    [[FOR]]   Start a loop
| CB || [[BASIC:DATA | DATA]] || Store data within a program
* [DECB]    [[FREE]]   Returns to the number of free granules on the disk in the drive you specify
|-
* [ ECB]    [[GET]]   Reads the graphic contents of a rectangle into an array for future use by PUT
| ECB || [[BASIC:DEF | DEF]] || Defines numeric function
* [  CB]    [[GO]]   Jump to line number
|-
* [  CB]    [[>]]    Greater Than operator
| ECB || [[BASIC:DEL | DEL]] || Deletes program lines
* [SECB]    [[HBUFF]]   Reserves an area in memory for high-resolution graphics
|-
* [SECB]    [[HCIRCLE]]   Draws a circle on the high-resolution graphics screen
| CB || [[BASIC:DIM | DIM]] || Set aside memory for arrays
* [SECB]    [[HCLS]]   Clear the high-resolution graphics screen to a specified color
|-
* [SECB]    [[HCOLOR]]   Set foreground and background color on the high-resolution graphics screen
| DECB || [[BASIC:DIR | DIR]] || Displays a directory of the disk in the drive you specify
* [SECB]    [[HDRAW]]   Draws on the high-resolution screen from a command string
|-
* [ ECB]    [[HEX$]]   Computes hexadecimal value
| CB || / || Division operator
* [SECB]    [[HGET]]   Stores a rectangle from the high-resolution screen into a buffer
|-
* [SECB]    [[HLINE]]   Draws a line on the high-resolution graphics screen
| ECB || [[BASIC:DLOAD | DLOAD]] || Loads BASIC program at specified baud
* [SECB]    [[HPAINT]]   Paints an area on the high-resolution graphics screen
|-
* [SECB]    [[HPOINT]]   Returns information on point x,y from the high-resolution graphics screen
| DECB || [[BASIC:DOS | DOS]] || With the OS-9 system diskette in drive 0, the DOS command boots the OS-9 operating system
* [SECB]    [[HPRINT]]   Prints a message on the high-resolution graphics screen
|-
* [SECB]    [[HPUT]]   Copies graphics from a buffer to a rectangle on the high-resolution graphics screen
| ECB || [[BASIC:DRAW | DRAW]] || Draws a line beginning at specified starting point of specified length and color
* [SECB]    [[HRESET]]   Resets a point on the high-resolution graphics screen to the background color
|-
* [SECB]    [[HSCREEN]]   Select and clear high-resolution graphics screen
| DECB || [[BASIC:DRIVE | DRIVE]] || Changes the default drive to the drive you specify
* [SECB]    [[HSET]]   Set point x,y on the high-resolution graphics screen to color c
|-
* [SECB]    [[HSTAT]]   Returns information regarding the high-resolution text screen cursor
| DECB || [[BASIC:DSKI$ | DSKI$]] || Inputs data from a particular sector with in a particular track on the disk in the drive you specify
* [  CB]    [[IF]]   Start a conditional check
|-
* [  CB]    [[INKEY$]]   Get a key
| DECB || [[BASIC:DSKINI | DSKINI]] || Formats a disk in the drive you specify
* [  CB]    [[INPUT]]   Read a line of text at a time
|-
* [ ECB]    [[INSTR]]   Searches for the first occurrence of target string
| DECB || [[BASIC:DSKO$ | DSKO$]] || Writes string data on sector, track, and drive number you specify
* [  CB]    [[INT]]   Convert a number to an integer
|-
* [  CB]    [[JOYSTK]]   Read and report joysticks
| ECB || [[BASIC:EDIT | EDIT]] || Allows editing of program line
* [DECB]    [[KILL]]   Deletes the filename you specify from the disk directory
|-
* [  CB]    [[LEFT$]]   Left part of a string
| CB || [[BASIC:END | END]] || The end of the program
* [  CB]    [[LEN]]   Length of a string
|-
* [  CB]    [[<]]    Less Than operator  
| CB || [[BASIC:EOF | EOF]] || End of file
* [  CB]    [[LET]]   Assign a variable
|-
* [ ECB]    [[LINE]]   Draw a line from (x1,y1) to (x2,y2)
| CB || [[BASIC:ELSE | ELSE]] || Alternate conditional statement
* [  CB]    [[LIST]]   List program to screen
|-
* [  CB]    [[LLIST]]   List program to printer
| CB || = || Equality operator
* [DECB]    [[LOAD]]   Loads the specified program file into memory from disk
|-
* [SECB]    [[LOCATE]]   Move the high-resolution text screen cursor to position x,y
| SECB || [[BASIC:ERLIN | ERLIN]] || Returns the BASIC line number where an error has occurred
* [DECB]    [[LOC]]   Returns the current record number of the buffer you specify
|-
* [DECB]    [[LOF]]   Returns the highest-numbered record of the buffer you specify
| SECB || [[BASIC:ERR | ERR]] || Jump to a line number when an error occurs
* [ ECB]    [[LOG]]   Returns natural logarithm
|-
* [SECB]    [[LPEEK]]   Return the contents of a virtual memory location $00000 - $7FFFF
| SECB || [[BASIC:ERRNO | ERRNO]] || Returns the BASIC error number for the error that has occurred
* [SECB]    [[LPOKE]]   Stores a value in a virtual memory location $00000 - $7FFFF
|-
* [DECB]    [[LSET]]   Left-justifies the data within the field you specify
| CB || [[BASIC:EVAL | EVAL]] || Evaluate a numeric expression
* [  CB]    [[MEM]]   Free memory
|-
* [DECB]    [[MERGE]]   Loads the specified program file from disk and merges it with the program that exists in memory
| CB || [[BASIC:EXEC | EXEC]] || EXECute code at address
* [  CB]    [[MID$]]   Middle of a string
|-
* [DECB]    [[MKN$]]   Convert a specified number into a 5-byte coded string for storage in a formatted disk file
| CB || [[BASIC:EXP | EXP]] || Generates ?SN in Color BASIC, implemented in Extended Color BASIC
* [  CB]    [[MOTOR]]   Tape drive motor control
|-
* [  CB]    [[*]]    Multiplication operator
| ECB || [[BASIC:EXP | EXP]] || Returns natural exponential of number
* [  CB]    [[NEW]]   Initialize the BASIC memory map
|-
* [  CB]    [[NEXT]]   End of a loop
| DECB || [[BASIC:FIELD | FIELD]] || Organizes the space within a direct access buffer into fields
* [  CB]    [[NOT]]   Boolean / Logical negation
|-
* [  CB]    [[OFF]]   AUDIO and MOTOR control token
| DECB || [[BASIC:FILES | FILES]] || Tell the computer the number of buffers to reserve in memory
* [  CB]    [[ON]]   Start of multi-way branch
|-
* [  CB]    [[OPEN]]   Open a file
| ECB || [[BASIC:FIX | FIX]] || Returns truncated (whole number) value
* [  CB]    [[OR]]   Boolean / Logical OR operator
|-
* [ ECB]    [[PAINT]]   Paints graphic screen starting at a point (x,y) withh specified color c stopping at border b
| CB || [[BASIC:FOR | FOR]] || Start a loop
* [SECB]    [[PALETTE]]   Store a color code into a palette register, or reset palette for CMP or RGB defaults
|-
* [ ECB]    [[PCLEAR]]   Reserves b number of 1.5K graphics memory pages
| DECB || [[BASIC:FREE | FREE]] || Returns to the number of free granules on the disk in the drive you specify
* [ ECB]    [[PCLS]]   Clears screen with specified color c
|-
* [ ECB]    [[PCOPY]]   Copy graphics from source page to destination page
| ECB || [[BASIC:GET | GET]] || Reads the graphic contents of a rectangle into an array for future use by PUT
* [  CB]    [[PEEK]]   Read a value from a memory address
|-
* [ ECB]    [[PLAY]]   Plays music of specific note, octave, note-length, tempo, pause
| CB || [[BASIC:GO | GO]] || Jump to line number
* [ ECB]    [[PMODE]]   Selections resolution and first memory page
|-
* [  CB]    [[POINT]]   Check color of a semigraphics pixel
| CB || > || Greater Than operator
* [  CB]    [[POKE]]   Write a value to a memory address
|-
* [ ECB]    [[POS]]   Returns current print position
| SECB || [[BASIC:HBUFF | HBUFF]] || Reserves an area in memory for high-resolution graphics
* [ ECB]    [[PPOINT]]   Tests whether specified graphics cell is on or off
|-
* [ ECB]    [[PRESET]]   Reset a point to background color
| SECB || [[BASIC:HCIRCLE | HCIRCLE]] || Draws a circle on the high-resolution graphics screen
* [  CB]    [[PRINT]]   Write to the screen
|-
* [ ECB]    [[PSET]]   Sets a specified point (x,y) to specified color c
| SECB || [[BASIC:HCLS | HCLS]] || Clear the high-resolution graphics screen to a specified color
* [ ECB]    [[PUT]]   Stores graphics from source into start/end rectangle on the screen
|-
* [  CB]    [[READ]]   Read a piece of data
| SECB || [[BASIC:HCOLOR | HCOLOR]] || Set foreground and background color on the high-resolution graphics screen
* [  CB]    [[REM ']]   Comments or remarks - FIXME Else uses this too?
|-
* [DECB]    [[RENAME]]   Renames a disk file
| SECB || [[BASIC:HDRAW | HDRAW]] || Draws on the high-resolution screen from a command string
* [ ECB]    [[RENUM]]   Allows program line renumbering
|-
* [  CB]    [[RESET]]   Clear a semigraphics pixel
| ECB || [[BASIC:HEX$ | HEX$]] || Computes hexadecimal value
* [  CB]    [[RESTORE]]   Start back at the first DATA item
|-
* [  CB]    [[RETURN]]   Return from a subroutine
| SECB || [[BASIC:HGET | HGET]] || Stores a rectangle from the high-resolution screen into a buffer
* [SECB]    [[RGB]]   Set palette to RGB defaults
|-
* [  CB]    [[RIGHT$]]   Right part of a string
| SECB || [[BASIC:HLINE | HLINE]] || Draws a line on the high-resolution graphics screen
* [  CB]    [[RND]]   Pseudo-random number generator
|-
* [DECB]    [[RSET]]   Right-justifies the data within the field you specify
| SECB || [[BASIC:HPAINT | HPAINT]] || Paints an area on the high-resolution graphics screen
* [  CB]    [[RUN]]   Start the program running
|-
* [DECB]    [[SAVE]]   Saves filename on disk
| SECB || [[BASIC:HPOINT | HPOINT]] || Returns information on point x,y from the high-resolution graphics screen
* [ ECB]    [[SCREEN]]   Selects either graphics (1) or text (0) screen and color-set (0 or 1)
|-
* [  CB]    [[SET]]   Draw a semigraphics pixel
| SECB || [[BASIC:HPRINT | HPRINT]] || Prints a message on the high-resolution graphics screen
* [  CB]    [[SGN]]   Get the sign of a number positive or negative
|-
* [  CB]    [[SIN]]   Sine of an angle
| SECB || [[BASIC:HPUT | HPUT]] || Copies graphics from a buffer to a rectangle on the high-resolution graphics screen
* [  CB]    [[SKIPF]]   Skip tape file
|-
* [  CB]    [[SOUND]]   Beep the speaker
| SECB || [[BASIC:HRESET | HRESET]] || Resets a point on the high-resolution graphics screen to the background color
* [ ECB]    [[SQR]]   Returns the square root of a number
|-
* [  CB]    [[STEP]]   FOR loop control
| SECB || [[BASIC:HSCREEN | HSCREEN]] || Select and clear high-resolution graphics screen
* [  CB]    [[STOP]]   Stop the program at the current line
|-
* [  CB]    [[STR$]]   Convert a number to a string
| SECB || [[BASIC:HSET | HSET]] || Set point x,y on the high-resolution graphics screen to color c
* [ ECB]    [[STRING]]   Returns a string of characters of specified length
|-
* [  CB]    [[SUB]]   Completion token for GOSUB
| SECB || [[BASIC:HSTAT | HSTAT]] || Returns information regarding the high-resolution text screen cursor
* [  CB]    [[-]]    Subtraction operator
|-
* [  CB]    [[TAB]]   Tabulation
| CB || [[BASIC:IF | IF]] || Start a conditional check
* [ ECB]    [[TAN]]   Returns tangent of angle given in radians
|-
* [  CB]    [[THEN]]   Completion token for IF
| CB || [[BASIC:INKEY$ | INKEY$]] || Get a key
* [ ECB]    [[TIMER]]   Returns contents or allows setting of timer
|-
* [  CB]    [[TO]]   Token for TO in GO TO
| CB || [[BASIC:INPUT | INPUT]] || Read a line of text at a time
* [ ECB]    [[TROFF]]   Turns off program tracer
|-
* [ ECB]    [[TRON]]   Turns on program tracer
| ECB || [[BASIC:INSTR | INSTR]] || Searches for the first occurrence of target string
* [DECB]    [[UNLOAD]]   Close any open files on the disk in the drive you specify
|-
* [  CB]    [[USR]]   User defined function
| CB || [[BASIC:INT | INT]] || Convert a number to an integer
* [  CB]    [[VAL]]   Convert a string to a number
|-
* [ ECB]    [[VARPTR]]   Returns address of pointer to the specified variable
| CB || [[BASIC:JOYSTK | JOYSTK]] || Read and report joysticks
* [DECB]    [[VERIFY]]   Turns the verify function on or off  
|-
* [SECB]    [[WIDTH]]   Set the text screen to a resolution in character width
| DECB || [[BASIC:KILL | KILL]] || Deletes the filename you specify from the disk directory
* [DECB]    [[WRITE]]   Writes the data to the buffer you specify
|-
| CB || [[BASIC:LEFT$ | LEFT$]] || Left part of a string
|-
| CB || [[BASIC:LEN | LEN]] || Length of a string
|-
| CB || < || Less Than operator  
|-
| CB || [[BASIC:LET | LET]] || Assign a variable
|-
| ECB || [[BASIC:LINE | LINE]] || Draw a line from (x1,y1) to (x2,y2)
|-
| CB || [[BASIC:LIST | LIST]] || List program to screen
|-
| CB || [[BASIC:LLIST | LLIST]] || List program to printer
|-
| DECB || [[BASIC:LOAD | LOAD]] || Loads the specified program file into memory from disk
|-
| SECB || [[BASIC:LOCATE | LOCATE]] || Move the high-resolution text screen cursor to position x,y
|-
| DECB || [[BASIC:LOC | LOC]] || Returns the current record number of the buffer you specify
|-
| DECB || [[BASIC:LOF | LOF]] || Returns the highest-numbered record of the buffer you specify
|-
| ECB || [[BASIC:LOG | LOG]] || Returns natural logarithm
|-
| SECB || [[BASIC:LPEEK | LPEEK]] || Return the contents of a virtual memory location $00000 - $7FFFF
|-
| SECB || [[BASIC:LPOKE | LPOKE]] || Stores a value in a virtual memory location $00000 - $7FFFF
|-
| DECB || [[BASIC:LSET | LSET]] || Left-justifies the data within the field you specify
|-
| CB || [[BASIC:MEM | MEM]] || Free memory
|-
| DECB || [[BASIC:MERGE | MERGE]] || Loads the specified program file from disk and merges it with the program that exists in memory
|-
| CB || [[BASIC:MID$ | MID$]] || Middle of a string
|-
| DECB || [[BASIC:MKN$ | MKN$]] || Convert a specified number into a 5-byte coded string for storage in a formatted disk file
|-
| CB || [[BASIC:MOTOR | MOTOR]] || Tape drive motor control
|-
| CB || * || Multiplication operator
|-
| CB || [[BASIC:NEW | NEW]] || Initialize the BASIC memory map
|-
| CB || [[BASIC:NEXT | NEXT]] || End of a loop
|-
| CB || [[BASIC:NOT | NOT]] || Boolean / Logical negation
|-
| CB || [[BASIC:OFF | OFF]] || AUDIO and MOTOR control token
|-
| CB || [[BASIC:ON | ON]] || Start of multi-way branch
|-
| CB || [[BASIC:OPEN | OPEN]] || Open a file
|-
| CB || [[BASIC:OR | OR]] || Boolean / Logical OR operator
|-
| ECB || [[BASIC:PAINT | PAINT]] || Paints graphic screen starting at a point (x,y) withh specified color c stopping at border b
|-
| SECB || [[BASIC:PALETTE | PALETTE]] || Store a color code into a palette register, or reset palette for CMP or RGB defaults
|-
| ECB || [[BASIC:PCLEAR | PCLEAR]] || Reserves b number of 1.5K graphics memory pages
|-
| ECB || [[BASIC:PCLS | PCLS]] || Clears screen with specified color c
|-
| ECB || [[BASIC:PCOPY | PCOPY]] || Copy graphics from source page to destination page
|-
| CB || [[BASIC:PEEK | PEEK]] || Read a value from a memory address
|-
| ECB || [[BASIC:PLAY | PLAY]] || Plays music of specific note, octave, note-length, tempo, pause
|-
| ECB || [[BASIC:PMODE | PMODE]] || Selections resolution and first memory page
|-
| CB || [[BASIC:POINT | POINT]] || Check color of a semigraphics pixel
|-
| CB || [[BASIC:POKE | POKE]] || Write a value to a memory address
|-
| ECB || [[BASIC:POS | POS]] || Returns current print position
|-
| ECB || [[BASIC:PPOINT | PPOINT]] || Tests whether specified graphics cell is on or off
|-
| ECB || [[BASIC:PRESET | PRESET]] || Reset a point to background color
|-
| CB || [[BASIC:PRINT | PRINT]] || Write to the screen
|-
| ECB || [[BASIC:PSET | PSET]] || Sets a specified point (x,y) to specified color c
|-
| ECB || [[BASIC:PUT | PUT]] || Stores graphics from source into start/end rectangle on the screen
|-
| CB || [[BASIC:READ | READ]] || Read a piece of data
|-
| CB || [[BASIC:REM | REM]] || Comments or remarks - FIXME Else uses this too?
|-
| DECB || [[BASIC:RENAME | RENAME]] || Renames a disk file
|-
| ECB || [[BASIC:RENUM | RENUM]] || Allows program line renumbering
|-
| CB || [[BASIC:RESET | RESET]] || Clear a semigraphics pixel
|-
| CB || [[BASIC:RESTORE | RESTORE]] || Start back at the first DATA item
|-
| CB || [[BASIC:RETURN | RETURN]] || Return from a subroutine
|-
| SECB || [[BASIC:RGB | RGB]] || Set palette to RGB defaults
|-
| CB || [[BASIC:RIGHT$ | RIGHT$]] || Right part of a string
|-
| CB || [[BASIC:RND | RND]] || Pseudo-random number generator
|-
| DECB || [[BASIC:RSET | RSET]] || Right-justifies the data within the field you specify
|-
| CB || [[BASIC:RUN | RUN]] || Start the program running
|-
| DECB || [[BASIC:SAVE | SAVE]] || Saves filename on disk
|-
| ECB || [[BASIC:SCREEN | SCREEN]] || Selects either graphics (1) or text (0) screen and color-set (0 or 1)
|-
| CB || [[BASIC:SET | SET]] || Draw a semigraphics pixel
|-
| CB || [[BASIC:SGN | SGN]] || Get the sign of a number positive or negative
|-
| CB || [[BASIC:SIN | SIN]] || Sine of an angle
|-
| CB || [[BASIC:SKIPF | SKIPF]] || Skip tape file
|-
| CB || [[BASIC:SOUND | SOUND]] || Beep the speaker
|-
| ECB || [[BASIC:SQR | SQR]] || Returns the square root of a number
|-
| CB || [[BASIC:STEP | STEP]] || FOR loop control
|-
| CB || [[BASIC:STOP | STOP]] || Stop the program at the current line
|-
| CB || [[BASIC:STR$ | STR$]] || Convert a number to a string
|-
| ECB || [[BASIC:STRING | STRING]] || Returns a string of characters of specified length
|-
| CB || [[BASIC:SUB | SUB]] || Completion token for GOSUB
|-
| CB || - || Subtraction operator
|-
| CB || [[BASIC:TAB | TAB]] || Tabulation
|-
| ECB || [[BASIC:TAN | TAN]] || Returns tangent of angle given in radians
|-
| CB || [[BASIC:THEN | THEN]] || Completion token for IF
|-
| ECB || [[BASIC:TIMER | TIMER]] || Returns contents or allows setting of timer
|-
| CB || [[BASIC:TO | TO]] || Token for TO in GO TO
|-
| ECB || [[BASIC:TROFF | TROFF]] || Turns off program tracer
|-
| ECB || [[BASIC:TRON | TRON]] || Turns on program tracer
|-
| DECB || [[BASIC:UNLOAD | UNLOAD]] || Close any open files on the disk in the drive you specify
|-
| CB || [[BASIC:USR | USR]] || User defined function
|-
| CB || [[BASIC:VAL | VAL]] || Convert a string to a number
|-
| ECB || [[BASIC:VARPTR | VARPTR]] || Returns address of pointer to the specified variable
|-
| DECB || [[BASIC:VERIFY | VERIFY]] || Turns the verify function on or off  
|-
| SECB || [[BASIC:WIDTH | WIDTH]] || Set the text screen to a resolution in character width
|-
| DECB || [[BASIC:WRITE | WRITE]] || Writes the data to the buffer you specify
|}

Latest revision as of 19:43, 11 July 2022

WELCOME
Looking for CoCo help? If you are trying to do something with your old Color Computer, read this quick reference. Want to contribute to this wiki? Be sure to read this first. This CoCo wiki project was started on October 29, 2004. --OS-9 Al

See Recent Changes. | About this site. | Join the E-Mail List or Facebook Group. | Contact me with updates/questions.

This page was last updated on 07/11/2022. Total Pages: 729. Total Files: 993.


Home / BASIC - BASIC


Page names in this section should be prefixed with "BASIC:" to put them in this namespace.

NOTICE!

Please do not edit this page or anything in this namespace at this time. I will be creating a template for the entries and begin filling them out. OS-9 Al (talk) 11:17, 21 April 2020 (CDT)

BASIC

Tandy Color Computers contain a modular interpreter which understands a superset of the Beginner's All-purpose Symbolic Instruction Code (BASIC) programming language.

There are up to four core modules available in Read-Only Memory (ROM) that detect and link to each other when combinations of these ROMs exist in a Color Computer.

BASICs

Color BASIC (CB) - the core module present in all models of Color Computer.

Extended Color BASIC (ECB) - a graphics and sound package which was optional in the Color Computer 1 and 2.

Disk Extended Color BASIC (DECB) - Disk commands present when a disk controller cartridge is plugged in.

Super Extended Color BASIC (SECB) - Present in the Color Computer 3 only and includes Color BASIC and Extended Color BASIC in lower memory - links to Disk BASIC ROM if a cartridge is present.

Third Party

ADOS

ADOS 3

HDB-DOS

RGB-DOS

SDC-DOS

KEYWORDS

Click the header (Module or Keyword) to sort this index. Sorting by Module will group all the Color BASIC (CB) commands, etc. together, or sorting by Keyword will sort by commands from all modules.

BASIC Keywords (sortable)
Module Keyword Description
CB ABS Get absolute value of a signed number
CB + Addition operator
CB AND Boolean / Logical AND operator
CB ASC ASCII code of first letter of string
ECB ATN Returns arctangent in radians
SECB ATTR Set the display attributes of a high-resolution text screen
CB AUDIO Control the audio source
DECB BACKUP Duplicates the contents of the disk in the source drive on the disk in the destination drive
SECB BRK Jump to a line number when the BREAK key is pressed
SECB BUTTON Return if a Joystick Button is being pressed or not
CB CHR$ Convert number to Control, ASCII, or graphics code string
ECB CIRCLE Draws a circle with center at point (x,y) radius r, specified color c and height/width ratio
CB CLEAR Clear RAM for string space
CB CLOAD Cassette load
CB CLOSE Close files
CB CLS Clear screen
SECB CMP Set palette to composite defaults
ECB COLOR Sets foreground and background color
CB CONT Continue the program from a stop
DECB COPY Copies the contents of filename1 to filename2
ECB COS Return cosine of an angle given in radians
CB CSAVE Cassette save
DECB CVN Convert a 5-byte coded string created by MKN$ back to the number it represents
CB DATA Store data within a program
ECB DEF Defines numeric function
ECB DEL Deletes program lines
CB DIM Set aside memory for arrays
DECB DIR Displays a directory of the disk in the drive you specify
CB / Division operator
ECB DLOAD Loads BASIC program at specified baud
DECB DOS With the OS-9 system diskette in drive 0, the DOS command boots the OS-9 operating system
ECB DRAW Draws a line beginning at specified starting point of specified length and color
DECB DRIVE Changes the default drive to the drive you specify
DECB DSKI$ Inputs data from a particular sector with in a particular track on the disk in the drive you specify
DECB DSKINI Formats a disk in the drive you specify
DECB DSKO$ Writes string data on sector, track, and drive number you specify
ECB EDIT Allows editing of program line
CB END The end of the program
CB EOF End of file
CB ELSE Alternate conditional statement
CB = Equality operator
SECB ERLIN Returns the BASIC line number where an error has occurred
SECB ERR Jump to a line number when an error occurs
SECB ERRNO Returns the BASIC error number for the error that has occurred
CB EVAL Evaluate a numeric expression
CB EXEC EXECute code at address
CB EXP Generates ?SN in Color BASIC, implemented in Extended Color BASIC
ECB EXP Returns natural exponential of number
DECB FIELD Organizes the space within a direct access buffer into fields
DECB FILES Tell the computer the number of buffers to reserve in memory
ECB FIX Returns truncated (whole number) value
CB FOR Start a loop
DECB FREE Returns to the number of free granules on the disk in the drive you specify
ECB GET Reads the graphic contents of a rectangle into an array for future use by PUT
CB GO Jump to line number
CB > Greater Than operator
SECB HBUFF Reserves an area in memory for high-resolution graphics
SECB HCIRCLE Draws a circle on the high-resolution graphics screen
SECB HCLS Clear the high-resolution graphics screen to a specified color
SECB HCOLOR Set foreground and background color on the high-resolution graphics screen
SECB HDRAW Draws on the high-resolution screen from a command string
ECB HEX$ Computes hexadecimal value
SECB HGET Stores a rectangle from the high-resolution screen into a buffer
SECB HLINE Draws a line on the high-resolution graphics screen
SECB HPAINT Paints an area on the high-resolution graphics screen
SECB HPOINT Returns information on point x,y from the high-resolution graphics screen
SECB HPRINT Prints a message on the high-resolution graphics screen
SECB HPUT Copies graphics from a buffer to a rectangle on the high-resolution graphics screen
SECB HRESET Resets a point on the high-resolution graphics screen to the background color
SECB HSCREEN Select and clear high-resolution graphics screen
SECB HSET Set point x,y on the high-resolution graphics screen to color c
SECB HSTAT Returns information regarding the high-resolution text screen cursor
CB IF Start a conditional check
CB INKEY$ Get a key
CB INPUT Read a line of text at a time
ECB INSTR Searches for the first occurrence of target string
CB INT Convert a number to an integer
CB JOYSTK Read and report joysticks
DECB KILL Deletes the filename you specify from the disk directory
CB LEFT$ Left part of a string
CB LEN Length of a string
CB < Less Than operator
CB LET Assign a variable
ECB LINE Draw a line from (x1,y1) to (x2,y2)
CB LIST List program to screen
CB LLIST List program to printer
DECB LOAD Loads the specified program file into memory from disk
SECB LOCATE Move the high-resolution text screen cursor to position x,y
DECB LOC Returns the current record number of the buffer you specify
DECB LOF Returns the highest-numbered record of the buffer you specify
ECB LOG Returns natural logarithm
SECB LPEEK Return the contents of a virtual memory location $00000 - $7FFFF
SECB LPOKE Stores a value in a virtual memory location $00000 - $7FFFF
DECB LSET Left-justifies the data within the field you specify
CB MEM Free memory
DECB MERGE Loads the specified program file from disk and merges it with the program that exists in memory
CB MID$ Middle of a string
DECB MKN$ Convert a specified number into a 5-byte coded string for storage in a formatted disk file
CB MOTOR Tape drive motor control
CB * Multiplication operator
CB NEW Initialize the BASIC memory map
CB NEXT End of a loop
CB NOT Boolean / Logical negation
CB OFF AUDIO and MOTOR control token
CB ON Start of multi-way branch
CB OPEN Open a file
CB OR Boolean / Logical OR operator
ECB PAINT Paints graphic screen starting at a point (x,y) withh specified color c stopping at border b
SECB PALETTE Store a color code into a palette register, or reset palette for CMP or RGB defaults
ECB PCLEAR Reserves b number of 1.5K graphics memory pages
ECB PCLS Clears screen with specified color c
ECB PCOPY Copy graphics from source page to destination page
CB PEEK Read a value from a memory address
ECB PLAY Plays music of specific note, octave, note-length, tempo, pause
ECB PMODE Selections resolution and first memory page
CB POINT Check color of a semigraphics pixel
CB POKE Write a value to a memory address
ECB POS Returns current print position
ECB PPOINT Tests whether specified graphics cell is on or off
ECB PRESET Reset a point to background color
CB PRINT Write to the screen
ECB PSET Sets a specified point (x,y) to specified color c
ECB PUT Stores graphics from source into start/end rectangle on the screen
CB READ Read a piece of data
CB REM Comments or remarks - FIXME Else uses this too?
DECB RENAME Renames a disk file
ECB RENUM Allows program line renumbering
CB RESET Clear a semigraphics pixel
CB RESTORE Start back at the first DATA item
CB RETURN Return from a subroutine
SECB RGB Set palette to RGB defaults
CB RIGHT$ Right part of a string
CB RND Pseudo-random number generator
DECB RSET Right-justifies the data within the field you specify
CB RUN Start the program running
DECB SAVE Saves filename on disk
ECB SCREEN Selects either graphics (1) or text (0) screen and color-set (0 or 1)
CB SET Draw a semigraphics pixel
CB SGN Get the sign of a number positive or negative
CB SIN Sine of an angle
CB SKIPF Skip tape file
CB SOUND Beep the speaker
ECB SQR Returns the square root of a number
CB STEP FOR loop control
CB STOP Stop the program at the current line
CB STR$ Convert a number to a string
ECB STRING Returns a string of characters of specified length
CB SUB Completion token for GOSUB
CB - Subtraction operator
CB TAB Tabulation
ECB TAN Returns tangent of angle given in radians
CB THEN Completion token for IF
ECB TIMER Returns contents or allows setting of timer
CB TO Token for TO in GO TO
ECB TROFF Turns off program tracer
ECB TRON Turns on program tracer
DECB UNLOAD Close any open files on the disk in the drive you specify
CB USR User defined function
CB VAL Convert a string to a number
ECB VARPTR Returns address of pointer to the specified variable
DECB VERIFY Turns the verify function on or off
SECB WIDTH Set the text screen to a resolution in character width
DECB WRITE Writes the data to the buffer you specify