[Coco] Extended Color BASIC program on an Arduino

Tony Cappellini cappy2112 at gmail.com
Wed Apr 3 03:21:32 EDT 2013


Date: Tue, 2 Apr 2013 20:58:42 -0500
From: Allen Huffman <alsplace at pobox.com>
Subject: [Coco] Extended Color BASIC program on an Arduino
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Message-ID: <9E7C6324-48E8-4C0F-B001-262460080402 at pobox.com>
Content-Type: text/plain;       charset=us-ascii

>>Just for fun, I decided to translate my Extended Color BASIC code for
*ALL RAM* BBS over to Arduino C >>tonight.

At this link
http://appleause.com/2013/04/03/extended-color-basic-to-arduino-sketch/

You wrote:
"The userlog and message base is not yet functional, and likely never will
be since the Arduino only has 2K of memory versus 32K on the CoCo 1 it was
designed for. "

That's not quite accurate.
Being of the modified Harvard architecture, the older (non-Arm based)
Arduino Uno (for example)
have 2K of SRAM for static data, stack & heap, and 32k of program space,
which is in flash.
The Arduino sketches actually execute out of flash.

I don't know how much program space your All Ram BBS will need, but if you
don't use
all of the 32K for code, you can actually move static strings into program
space via a simple macro.
This helps to preserve that precious 2K of SRAM space.

Here is a line of code from an Arduino sketch that shows how to move your
string data
out of SRAM.

Serial.print(F("THIS STRING TAKES UP TOO MUCH SRAM"));
The macro F() actually does a lot under the covers.

Earlier versions of the Arduino IDE didn't have this macro, which made it
much more laborious
for the user to move their string data to flash.



More information about the Coco mailing list