
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.cocopedia.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lcurtisboyle</id>
	<title>CoCopedia - The Tandy/Radio Shack Color Computer Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.cocopedia.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Lcurtisboyle"/>
	<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/Special:Contributions/Lcurtisboyle"/>
	<updated>2026-05-02T17:29:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Deluxe_Color_Computer&amp;diff=11403</id>
		<title>Deluxe Color Computer</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Deluxe_Color_Computer&amp;diff=11403"/>
		<updated>2024-11-15T04:49:42Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Hardware */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Deluxe Color Computer =&lt;br /&gt;
&lt;br /&gt;
== Pre-Production Boards ==&lt;br /&gt;
&lt;br /&gt;
Three pre-production (PP) boards for the canceled Deluxe Color Computer exist:&lt;br /&gt;
* Boisy Pitre has gathered two of the Deluxe pre-production boards, one from John Prickett and one from Greg Zumwalt which did not have Advanced or Deluxe ROMs.&lt;br /&gt;
* Brian Weiseler has Robert Kilgus&#039; Deluxe with Advanced Color BASIC 00.00.07 ROMs intact&lt;br /&gt;
&lt;br /&gt;
== Hardware ==&lt;br /&gt;
&lt;br /&gt;
The Deluxe Color Computer upgrades the [[Color Computer 2]] to include new hardware and software features&lt;br /&gt;
* Motorola 6847 T1 Video Display Generator (VDG) with true lowercase and lowercase descender characters&lt;br /&gt;
* General Instruments AY-3-8913 Programmable Sound Generator the same as [[Speech/Sound Cartridge (26-3144A)]], [[Symphony-12]], [[Philharmonic-12]], or [[CoCo PSG]]&lt;br /&gt;
* American Megatrends (AMI) S6551P Asynchronous Communication Interface Adapter (ACIA) the same as used in the [[Deluxe RS232 Pak]]&lt;br /&gt;
* Additional circuitry for 60Hz timer interrupts&lt;br /&gt;
* Additional color burst control&lt;br /&gt;
* Additional address decoding to make the PSG and S6551 into the CoCo memory map&lt;br /&gt;
* 2 button joystick support&lt;br /&gt;
==== Memory Map ====&lt;br /&gt;
* $FF00 - $FF1F - PIA 0&lt;br /&gt;
* $FF20 - $FF2F - PIA 1&lt;br /&gt;
* $FF30 - Option Control Register&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+ Option Control Register Description&lt;br /&gt;
|-&lt;br /&gt;
! Bit Position!! Function &lt;br /&gt;
|-&lt;br /&gt;
| 0|| A14&lt;br /&gt;
|-&lt;br /&gt;
| 1|| A15&lt;br /&gt;
|-&lt;br /&gt;
| 2|| Enable above for RAM range: $4000-$7FFF&lt;br /&gt;
|-&lt;br /&gt;
| 3|| Alternate color set (blue / green alpha display)&lt;br /&gt;
|-&lt;br /&gt;
| 4|| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 5|| N/A&lt;br /&gt;
|-&lt;br /&gt;
| 6|| Enable 60Hz interrupt&lt;br /&gt;
|-&lt;br /&gt;
| 7|| Enable cartridge select: 1 internal / 0 external&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
Deluxe_Option_Register_Description.jpg|Option Register&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;br /&gt;
* $FF38 AY-3-8910 Data register&lt;br /&gt;
* $FF39 AY-3-8910 Control Register Latch&lt;br /&gt;
* $FF3C SY6551 Transmit / Receive Register&lt;br /&gt;
* $FF3D SY6551 Read status registers&lt;br /&gt;
* $FF3E SY6551 Command register&lt;br /&gt;
* $FF3F SY6551 Control Register&lt;br /&gt;
&lt;br /&gt;
== Software ==&lt;br /&gt;
&lt;br /&gt;
The Deluxe Color Computer contains an upgraded Color BASIC which merges Color BASIC, Extended Color BASIC, and Disk Extended Color BASIC into a single 32K Advanced Color BASIC ROM image.&lt;br /&gt;
&lt;br /&gt;
Advanced Color BASIC includes a number of new features as well:&lt;br /&gt;
* [[Advanced Color BASIC Documentation]]&lt;br /&gt;
&lt;br /&gt;
[https://www.pagetable.com/?p=43 Bill Gates&#039; Easter Egg] exists in the Advanced Color BASIC as well from BF67 to BF70&lt;br /&gt;
&lt;br /&gt;
== Pictures ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;gallery&amp;gt;&lt;br /&gt;
DeluxeCoCoMotherboard.jpg|Main board&lt;br /&gt;
Deluxe_coco_daughter_card_front.jpg|Front of daughter card&lt;br /&gt;
deluxe_coco_daughter_card_back.jpg|Back of daughter card&lt;br /&gt;
&amp;lt;/gallery&amp;gt;&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11060</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11060"/>
		<updated>2024-05-22T06:06:29Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* COMMON */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC. There are known bugs (ON ERROR GOTO error codes are not contiguous is an example), and it includes Disk Extended BASIC (to support the built in 32K RAM drive).&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
(This includes mixing the case within a keyword.)&lt;br /&gt;
&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program). I believe strings were planned - current if passing a string or string array, the string lengths come through, but the ptr to the actual string data gets cleared.&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the &#039;&#039;&#039;Videotex&#039;&#039;&#039; screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11059</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11059"/>
		<updated>2024-05-22T05:44:42Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC. There are known bugs (ON ERROR GOTO error codes are not contiguous is an example), and it includes Disk Extended BASIC (to support the built in 32K RAM drive).&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
(This includes mixing the case within a keyword.)&lt;br /&gt;
&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the &#039;&#039;&#039;Videotex&#039;&#039;&#039; screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11058</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11058"/>
		<updated>2024-05-22T05:43:27Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
(This includes mixing the case within a keyword.)&lt;br /&gt;
&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the &#039;&#039;&#039;Videotex&#039;&#039;&#039; screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11057</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11057"/>
		<updated>2024-05-22T05:43:10Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Allows lowercase characters in keywords. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===  (This includes mixing the case within a keyword.)&lt;br /&gt;
&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the &#039;&#039;&#039;Videotex&#039;&#039;&#039; screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11056</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11056"/>
		<updated>2024-05-22T05:39:33Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TERM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the &#039;&#039;&#039;Videotex&#039;&#039;&#039; screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11055</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11055"/>
		<updated>2024-05-22T05:38:20Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Changed Commands: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the Vidtex/Videotex screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will change the 32x16 text display to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&#039;&#039;PLEASE NOTE&#039;&#039;: The VDG in the Deluxe is not a full implementation of the T1 VDG that appeared in late model Coco 2&#039;s (and were duplicated in the Coco 3). It does not support border (green/black) control, and some of the characters are different from both a regular VDG and a T1 VDG (the pipe symbol is an example).&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11054</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11054"/>
		<updated>2024-05-22T05:36:24Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Changed Commands: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the Vidtex/Videotex screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A &#039;&#039;&#039;CLS&#039;&#039;&#039; value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;SCREEN&#039;&#039;&#039; has a new option for it&#039;s first parameter. -1 will changing to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11053</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11053"/>
		<updated>2024-05-22T05:36:05Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Changed Commands: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the Vidtex/Videotex screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;EDIT&#039;&#039;&#039; command will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen. NOTE: While EDIT lets you select a line number range (and will display them) only the last line changed on screen will actually be committed to the BASIC program (if you edit line 10 and line 20, and hit ENTER to accept the changes after editing line 20, any changes to line 10 will be ignored).&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
SCREEN has a new option for it&#039;s first parameter. -1 will changing to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11052</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11052"/>
		<updated>2024-05-22T05:33:42Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Changed Commands: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the Vidtex/Videotex screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
SCREEN has a new option for it&#039;s first parameter. -1 will changing to true lowercase. So the acceptable values for the first parameter (the 2nd parameter is optional, for the colorset 0 or 1) are:&lt;br /&gt;
* SCREEN -1 (true lowercase)&lt;br /&gt;
* SCREEN 0 (inverse lowercase)&lt;br /&gt;
* SCREEN 1 (graphics mode)&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11051</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11051"/>
		<updated>2024-05-22T05:22:56Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TERM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon. It appears to support most of the Vidtex/Videotex screen controls (although without RLE graphics support).&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11050</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11050"/>
		<updated>2024-05-22T05:21:28Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* ENV param1,param2,param3,param4,param5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD). It appears that each parameter is actual two individual byte values&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does. (At first glance, it does not appear to)&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11049</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11049"/>
		<updated>2024-05-22T05:16:23Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11048</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11048"/>
		<updated>2024-05-22T05:16:08Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;&#039;&#039;&#039;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* &#039;&#039;&#039;POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;&#039;&#039;&#039;.  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11047</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11047"/>
		<updated>2024-05-22T05:15:35Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;.  Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11046</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11046"/>
		<updated>2024-05-22T05:14:14Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
* POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
* POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;   Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11045</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11045"/>
		<updated>2024-05-22T05:13:46Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;  (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;   Default value is 30 (1/2 a second)&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts. NOTE: I would not recommend changing the key repeat start delay value to below 15 (or even 20) as it will start repeating quick that it begins to operate with keybounce.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11044</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11044"/>
		<updated>2024-05-22T05:12:26Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;   (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;   Default value is 30 (1/2 a second)&lt;br /&gt;
&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11043</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=11043"/>
		<updated>2024-05-22T05:12:08Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
While there is no BASIC command to change either the key repeat speed, or the delay time before key repeat starts, Advanced Color Basic does initialize 2 memory locations in RAM with defaults, that one can change after the fact:&lt;br /&gt;
POKE &amp;amp;HA00,&amp;lt;key repeat delay value&amp;gt;   (0=no key repeat). Default value is 10 (1/6th of a second)&lt;br /&gt;
POKE &amp;amp;H9FF,&amp;lt;key repeat start delay value&amp;gt;   Default value is 30 (1/2 a second)&lt;br /&gt;
&lt;br /&gt;
Both delay values are a count of 1/60th second VSYNC interrupts.&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN ===&lt;br /&gt;
&lt;br /&gt;
Chains to another BASIC program. Optional line number to start 2nd program running from.&lt;br /&gt;
&lt;br /&gt;
 CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
 CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10948</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10948"/>
		<updated>2024-03-23T17:02:14Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TIME */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current number of 1/60th clock ticks that the current TIME$ value represents (including hours, minutes and seconds).&lt;br /&gt;
&amp;lt;br&amp;gt;Please note that it rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10947</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10947"/>
		<updated>2024-03-23T17:00:17Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* New commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
If no COMMON command has been issued before CHAIN, then all variables are initialized in the called program (same as RUN). However, any numeric variables or arrays defined in a COMMON command will be passed intact to the called program.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
This defines variables to pass along to a CHAIN&#039;ed program. From what I can tell, these can only be be numeric (either straight variables or arrays), but not strings. For regular variables, specify the 1 or 2 character variable name. For arrays, specify the array name with open and closes parenthesis, but with no number to designate how many elements (the chained program will inherit the size used by the calling program).&lt;br /&gt;
 COMMON A,B,C,SC()&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10946</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10946"/>
		<updated>2024-03-23T16:50:55Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* RESTORE enhancement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10945</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10945"/>
		<updated>2024-03-23T16:50:21Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* New device number: #-4 - tbd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== RESTORE enhancement ===&lt;br /&gt;
The RESTORE command by itself (as before) will reset the READ/DATA ptr to the first DATA line in the current BASIC program. A new option of specifying the line number of the DATA statement that the next READ should come from has been added.&lt;br /&gt;
ex.&lt;br /&gt;
  RESTORE 1000:&#039;This sets the next READ to get data from line 1000.&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10921</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10921"/>
		<updated>2024-03-13T05:05:30Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Line number can be a variable.&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10920</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10920"/>
		<updated>2024-03-13T05:04:28Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* CHAIN - tbd. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - Chains to another BASIC program. Optional line number to start 2nd program running from. ===&lt;br /&gt;
&lt;br /&gt;
CHAIN &amp;quot;PROGRAM[.BAS][,&amp;lt;line number&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10919</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10919"/>
		<updated>2024-03-13T04:57:51Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Allows lowercase characters in keywords, and key repeat is built in. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
=== Key repeat is built in. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10918</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10918"/>
		<updated>2024-03-13T04:52:11Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TERM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
 ALT-BREAK = Exit terminal&lt;br /&gt;
 F1 = toggle CR / CR LF&lt;br /&gt;
 F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10917</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10917"/>
		<updated>2024-03-13T04:51:50Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TERM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
* Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
* Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
* Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
* Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
* Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
* Right Arrow (without the alternate key, Control-I) will move the cursor right 8 spaces.&lt;br /&gt;
* Left Arrow (without the alternate key, Control-H) will move the cursor one space to the left, and clear the character.&lt;br /&gt;
* Control and &#039;U&#039;, Shift-Left Arrow will clear the line and move the cursor to the left.&lt;br /&gt;
* The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
* CLEAR (Control-L) will abort editing and clear the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* toneperiod: 0-4095&lt;br /&gt;
* amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
* channel: 1-3&lt;br /&gt;
* noiseperiod: 0-31&lt;br /&gt;
* amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
* 5 numeric parameters 0-65535 allowed (TBD)&lt;br /&gt;
&lt;br /&gt;
  TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
  NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
  NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
  TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
  SOUND command unaltered&lt;br /&gt;
&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands and Escape sequences within the terminal programming coming soon.&lt;br /&gt;
ALT-BREAK = Exit terminal&lt;br /&gt;
F1 = toggle CR / CR LF&lt;br /&gt;
F2 = toggle Local Echo on/off&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10808</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10808"/>
		<updated>2024-02-22T07:46:16Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1,200&lt;br /&gt;
* 9 = 1,800&lt;br /&gt;
* 10 = 2,400&lt;br /&gt;
* 11 = 3,600&lt;br /&gt;
* 12 = 4,800&lt;br /&gt;
* 13 = 7,200&lt;br /&gt;
* 14 = 9,600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&amp;lt;br&amp;gt;&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
  IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bit wise expressions:&lt;br /&gt;
  C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&amp;lt;br&amp;gt;&lt;br /&gt;
This counter increments 60 times per second and rolls over at 24 hours.&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
  10 A$=INPUT$(3,#0)&lt;br /&gt;
  20 ? A$&lt;br /&gt;
Will pause the program and wait for three key presses. They are put into A$. This will support cassette, serial and disk file I/O.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32  (executes the TERM (terminal program) command, I believe)&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10792</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10792"/>
		<updated>2024-02-19T00:41:56Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* MAPMODE  */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1200&lt;br /&gt;
* 9 = 1800&lt;br /&gt;
* 10 = 2400&lt;br /&gt;
* 11 = 3600&lt;br /&gt;
* 12 = 4800&lt;br /&gt;
* 13 = 7200&lt;br /&gt;
* 14 = 9600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.78 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10791</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10791"/>
		<updated>2024-02-19T00:40:30Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Advanced Color BASIC - added ROM vector calls = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1200&lt;br /&gt;
* 9 = 1800&lt;br /&gt;
* 10 = 2400&lt;br /&gt;
* 11 = 3600&lt;br /&gt;
* 12 = 4800&lt;br /&gt;
* 13 = 7200&lt;br /&gt;
* 14 = 9600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
    LBRA  $FD32&lt;br /&gt;
    LBRA  $FB1A&lt;br /&gt;
    LBRA  $FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10790</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10790"/>
		<updated>2024-02-19T00:39:38Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Advanced Color BASIC - added ROM vector calls = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1200&lt;br /&gt;
* 9 = 1800&lt;br /&gt;
* 10 = 2400&lt;br /&gt;
* 11 = 3600&lt;br /&gt;
* 12 = 4800&lt;br /&gt;
* 13 = 7200&lt;br /&gt;
* 14 = 9600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10789</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10789"/>
		<updated>2024-02-19T00:39:14Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Advanced Color BASIC - added ROM vector calls = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&amp;lt;br&amp;gt;&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&amp;lt;br&amp;gt;&lt;br /&gt;
==== First parameter: ====&lt;br /&gt;
BAUD&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 = 50&lt;br /&gt;
* 2 = 75&lt;br /&gt;
* 3 = 109.92&lt;br /&gt;
* 4 = 135.56&lt;br /&gt;
* 5 = 150&lt;br /&gt;
* 6 = 300&lt;br /&gt;
* 7 = 600&lt;br /&gt;
* 8 = 1200&lt;br /&gt;
* 9 = 1800&lt;br /&gt;
* 10 = 2400&lt;br /&gt;
* 11 = 3600&lt;br /&gt;
* 12 = 4800&lt;br /&gt;
* 13 = 7200&lt;br /&gt;
* 14 = 9600&lt;br /&gt;
* 15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
==== Second Parameter: ====&lt;br /&gt;
Sent to 6551 command register&amp;lt;br&amp;gt;&lt;br /&gt;
* 1: $09 00001001 - No Parity&lt;br /&gt;
* 2: $29 00101001 - Odd Parity&lt;br /&gt;
* 3: $69 01101001 - Even Parity&lt;br /&gt;
* 4: $A9 10101001 - Mark Parity&lt;br /&gt;
* 5: $E9 11101001 - Space Parity&lt;br /&gt;
* Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
==== Third parameter: ====&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
* Default: 8&lt;br /&gt;
&lt;br /&gt;
==== Fourth parameter: ====&lt;br /&gt;
Stop Bits&lt;br /&gt;
* 1 = 1 stop bit&lt;br /&gt;
* 2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
&lt;br /&gt;
[$800C] - Call $9254, which checks the 6551 initialized flag (&amp;gt;$0A04). If it is 0 (not initialized), it will initialize the 6551 &amp;amp; it’s related variables including 128 byte receive buffer. If not, it just returns.&lt;br /&gt;
&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer, OR wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10786</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10786"/>
		<updated>2024-02-19T00:27:59Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* Advanced Color BASIC - added ROM vector calls = */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10785</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10785"/>
		<updated>2024-02-19T00:27:21Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TERM - tbd. */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM ===&lt;br /&gt;
Executes the ROM based terminal program (the cursor changes from a blinking black one to a blinking blue one to let the user know that they are in terminal mode). Further details on commands within the terminal programming coming soon.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10784</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10784"/>
		<updated>2024-02-19T00:26:05Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TIME$ - tbd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ ===&lt;br /&gt;
Will either return the current 24 hour clock value, or set the 24 hour clock value, using a string format. The string format is &amp;quot;HH:MM:SS&amp;quot;, in 24 hour time format, so HH can be 0 to 23, MM can be 0 to 59, and SS can be 0 to 59.&lt;br /&gt;
Examples:&lt;br /&gt;
  A$=TIME$&lt;br /&gt;
  TIME$=&amp;quot;13:25:00&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10783</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10783"/>
		<updated>2024-02-19T00:23:54Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TIME */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer).&lt;br /&gt;
&lt;br /&gt;
=== TIME$ - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10782</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10782"/>
		<updated>2024-02-19T00:23:33Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TIME - returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME ===&lt;br /&gt;
Returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer) ===&lt;br /&gt;
&lt;br /&gt;
=== TIME$ - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
	<entry>
		<id>https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10781</id>
		<title>Advanced Color BASIC Documentation</title>
		<link rel="alternate" type="text/html" href="https://www.cocopedia.com/wiki/index.php?title=Advanced_Color_BASIC_Documentation&amp;diff=10781"/>
		<updated>2024-02-19T00:23:05Z</updated>

		<summary type="html">&lt;p&gt;Lcurtisboyle: /* TIME - tbd */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Advanced Color BASIC - New and updated features explained ==&lt;br /&gt;
&lt;br /&gt;
=== Introduction ===&lt;br /&gt;
This document explains the version 0.0.7 of Advanced Color BASIC ROM found late in 2023.&amp;lt;br&amp;gt;&lt;br /&gt;
It is from Robert Killgus&#039; collection.&amp;lt;br&amp;gt;&lt;br /&gt;
This is a very early version of the software and eventually became Deluxe Color BASIC.&lt;br /&gt;
&lt;br /&gt;
=== Allows lowercase characters in keywords. ===&lt;br /&gt;
&lt;br /&gt;
=== Full screen editor is always available. ===&lt;br /&gt;
Hold alternate and arrow keys to move the cursor around.&lt;br /&gt;
Alternate and &#039;I&#039; will insert a space and move the characters after the cursor to the right one space.&lt;br /&gt;
Alternate and &#039;D&#039; will delete the character under the cursor and shift the remaining characters to the left.&lt;br /&gt;
Alternate and &#039;E&#039; will delete the characters after the cursor to the end of the line.&lt;br /&gt;
Alternate and ‘H” will move the cursor to the top left corner of the screen.&lt;br /&gt;
Right Arrow (without the alternate key) will move the cursor right 9 spaces.&lt;br /&gt;
The break key will abort editing and put the cursor at the bottom left of the screen.&lt;br /&gt;
Press the enter key to commit an edited line. You do not have to be at the end of a line.&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-3. ===&lt;br /&gt;
Sends and receives data to/from the new serial port.&lt;br /&gt;
Uses:&lt;br /&gt;
PRINT #-3, &amp;quot;HELLO WORLD&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== New device number: #-4 - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== RAM Disk ===&lt;br /&gt;
Drive 4 is a RAM Disk. It has 12 granules available. It is available even if there is no disk cartridge inserted.&lt;br /&gt;
&lt;br /&gt;
If a disk cartridge is inserted on cold boot, you are presented with a menu option to go to BASIC or &amp;quot;Disk&amp;quot;. If you choose &amp;quot;Disk&amp;quot; the equivalent of a DOS command is executed.&lt;br /&gt;
&lt;br /&gt;
== New commands ==&lt;br /&gt;
&lt;br /&gt;
=== ERROR &amp;lt;value&amp;gt; ===&lt;br /&gt;
Will cause the computer to stop the program and issue the respective error.&lt;br /&gt;
&lt;br /&gt;
=== RESUME &amp;lt;line number&amp;gt; ===&lt;br /&gt;
Resumes a program at line number from the error handler.&lt;br /&gt;
&lt;br /&gt;
=== WHILE &amp;lt;boolean expression&amp;gt; / WEND ===&lt;br /&gt;
This is a loop construct that will execute the statements between WHILE and WEND repeatedly until the boolean expression is false.&lt;br /&gt;
&lt;br /&gt;
=== TONE channel, toneperiod, amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
toneperiod: 0-4095&lt;br /&gt;
amplitude: 0-15&lt;br /&gt;
&lt;br /&gt;
=== NOISE channel,noiseperiod,amplitude ===&lt;br /&gt;
channel: 1-3&lt;br /&gt;
noiseperiod: 0-31&lt;br /&gt;
amplitude 0-15&lt;br /&gt;
&lt;br /&gt;
=== ENV param1,param2,param3,param4,param5 ===&lt;br /&gt;
TBD 5 numeric parameters 0-65535 allowed &lt;br /&gt;
&lt;br /&gt;
TONE 1,2048,15 &#039; start tone 2048 on channel 1 at max volume&lt;br /&gt;
NOISE 2,31,15 &#039; start noise 31 on channel 2 at max volume&lt;br /&gt;
NOISE 2,0 &#039; stop noise on channel 2&lt;br /&gt;
TONE 1,0,0 &#039; stop tone on channel 1&lt;br /&gt;
SOUND command unaltered&lt;br /&gt;
TBD determine if PLAY command supports 3-voice like N60 BASIC (also by Microsoft) does&lt;br /&gt;
&lt;br /&gt;
=== CHAIN - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== COMMON ===&lt;br /&gt;
Restrictive comment. For Example:&lt;br /&gt;
10 COMMON This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The text after the COMMON command will not be executed, but the command after the colon will. This is different from REM&lt;br /&gt;
10 REM This is a comment : PRINT “HELLO WORLD”&lt;br /&gt;
The REM command will cause everything to be ignored on the whole line.&lt;br /&gt;
&lt;br /&gt;
=== TERM - tbd. ===&lt;br /&gt;
&lt;br /&gt;
=== CONFIG ===&lt;br /&gt;
Configures the UART Serial port:&lt;br /&gt;
CONFIG #-3,[1-15],[1-5],[5-8],[1-2]&lt;br /&gt;
First parameter:&lt;br /&gt;
BAUD&lt;br /&gt;
1 = 50&lt;br /&gt;
2 = 75&lt;br /&gt;
3 = 109.92&lt;br /&gt;
4 = 135.56&lt;br /&gt;
5 = 150&lt;br /&gt;
6 = 300&lt;br /&gt;
7 = 600&lt;br /&gt;
8 = 1200&lt;br /&gt;
9 = 1800&lt;br /&gt;
10 = 2400&lt;br /&gt;
11 = 3600&lt;br /&gt;
12 = 4800&lt;br /&gt;
13 = 7200&lt;br /&gt;
14 = 9600&lt;br /&gt;
15 = 19,200&lt;br /&gt;
Default: 6&lt;br /&gt;
&lt;br /&gt;
Second Parameter:&lt;br /&gt;
Sent to 6551 command register&lt;br /&gt;
1: $09 00001001 - No Parity&lt;br /&gt;
2: $29 00101001 - Odd Parity&lt;br /&gt;
3: $69 01101001 - Even Parity&lt;br /&gt;
4: $A9 10101001 - Mark Parity&lt;br /&gt;
5: $E9 11101001 - Space Parity&lt;br /&gt;
Transmit interrupt disabled&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
Third parameter:&lt;br /&gt;
Data word length, 5 to 8.&lt;br /&gt;
Default: 8&lt;br /&gt;
&lt;br /&gt;
Fourth parameter:&lt;br /&gt;
Stop Bits&lt;br /&gt;
1 = 1 stop bit&lt;br /&gt;
2 = 2 stop bits&lt;br /&gt;
Default: 1&lt;br /&gt;
&lt;br /&gt;
=== MAPMODE &amp;lt;value&amp;gt; ===&lt;br /&gt;
If the value is 0, the Color Computer is set to 0.89 MHz for the entire address space.&lt;br /&gt;
If the value is 1, the Color Computer is set to 1.76 MHz speed when reading from ROM, and 0.89 MHz when reading or writing to RAM.&lt;br /&gt;
&lt;br /&gt;
=== XOR ===&lt;br /&gt;
The exclusive or operator is true if 1 (and only 1) input is true, otherwise it is false.&lt;br /&gt;
This is used in the same sense as AND and OR in if/then statements:&lt;br /&gt;
IF A XOR B THEN 40&lt;br /&gt;
It is also use like AND and OR in bitwise expressions:&lt;br /&gt;
C = A XOR B&lt;br /&gt;
&lt;br /&gt;
=== ERR ===&lt;br /&gt;
Variable that contains the last error number.&lt;br /&gt;
&lt;br /&gt;
=== ERL ===&lt;br /&gt;
Variable that contains the line number where the last error occurred.&lt;br /&gt;
&lt;br /&gt;
=== TIME - returns the current value for the 24 bit timer (the old Extended BASIC &amp;quot;TIMER&amp;quot; still works as a 16 bit timer) ===&lt;br /&gt;
&lt;br /&gt;
=== TIME$ - tbd ===&lt;br /&gt;
&lt;br /&gt;
=== STRIG(button) ===&lt;br /&gt;
This function returns the state of one of the four joystick buttons. Negative 1 if pressed, zero if not pressed.&amp;lt;br&amp;gt;&lt;br /&gt;
Button numbers 1, 3, 5, 7 return the real time value of the button state. This allows rapid fire with the button held down.&amp;lt;br&amp;gt;&lt;br /&gt;
* 1 - Left joystick button 1&lt;br /&gt;
* 3 - Left joystick button 2&lt;br /&gt;
* 5 - Right joystick button 1&lt;br /&gt;
* 7 - Right joystick button 2&lt;br /&gt;
Button numbers 0, 2, 4, 6 return -1 if the button was pressed since the last time this function was called.&amp;lt;br&amp;gt;&lt;br /&gt;
It will then return 0 as long as the button is held down. A new button press will be required to get another -1. This is for single shot fire - the user needs to let go and press the button again in order to fire again.&lt;br /&gt;
* 0 - Left joystick button 1&lt;br /&gt;
* 2 - Left joystick button 2&lt;br /&gt;
* 4 - Right joystick button 1&lt;br /&gt;
* 6 - Right joystick button 2&lt;br /&gt;
&lt;br /&gt;
=== INPUT$(count, device) ===&lt;br /&gt;
Used to scan an input device and accumulate a string:&lt;br /&gt;
10 A$=INPUT$(3,#0)&lt;br /&gt;
20 ? A$&lt;br /&gt;
Will pause the program and wait for three keypresses. They are put into A$.&lt;br /&gt;
&lt;br /&gt;
=== ON ERROR GOTO &amp;lt;line number&amp;gt; ===&lt;br /&gt;
BASIC will jump to line number when an error is encountered. ERL and ERR will contain the line number with the error and the numeric error code, respectively.&lt;br /&gt;
&lt;br /&gt;
== Changed Commands: ==&lt;br /&gt;
&lt;br /&gt;
The EDIT will now accept a single line number or a range. The command will clear the screen, list the program line/lines and put the cursor at the start of the screen.&lt;br /&gt;
&lt;br /&gt;
A CLS value of 9 to 255 will cold start the computer. We suspect that this is a bug that should eventually be fixed.&lt;br /&gt;
&lt;br /&gt;
A CLS value greater than 255 will cause an ?FC error.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advanced Color BASIC - added ROM vector calls ===&lt;br /&gt;
&lt;br /&gt;
Like Color BASIC and Disk BASIC, which used Extended indirect addresses to call functions within the ROM’s (like JOYIN, DSKCON, etc.), Advanced Color BASIC seems to reserve from $8000-$8015 for additional calls as well. This allows the routines themselves to move around as the ROM was updated, but calling programs would have a set point to enter them.&lt;br /&gt;
[$8000] - Calls $FB00, which is a 3 entry table of LBRA instructions:&lt;br /&gt;
	LBRA	$FD32&lt;br /&gt;
	LBRA	$FB1A&lt;br /&gt;
	LBRA	$FD92&lt;br /&gt;
[$8002] - Calls $FB09, which is a 1 entry table of LBRA instructions (I assume more would have&lt;br /&gt;
been added later)&lt;br /&gt;
LBRA	$FE16&lt;br /&gt;
[$8004] - ??? (points to $09D4, which is in BASIC’s data area)&lt;br /&gt;
[$8006] - ??? (points to $E968)&lt;br /&gt;
[$8008] - ??? (points to $0ABE, which is in BASIC’s data area)&lt;br /&gt;
[$800A] - ??? (points to $AD15)&lt;br /&gt;
[$800C] - If $0A04=0, initialize the 6551 &amp;amp; it’s related variables including 128 byte receive&lt;br /&gt;
buffer (calls $9254)&lt;br /&gt;
[$800E] - ??? (points to $929D)&lt;br /&gt;
[$8010] - ??? (points to $DE28)&lt;br /&gt;
[$8012] - Calls $92E7, which will return a character from the 128 byte RS232 receive buffer,&lt;br /&gt;
OR&lt;br /&gt;
	wait for an RS232 character to be received if the buffer is empty.&lt;br /&gt;
[$8014] - Calls $92BD, which will transmit a character through the RS232.&lt;/div&gt;</summary>
		<author><name>Lcurtisboyle</name></author>
	</entry>
</feed>