[Coco] C interpreter for Coco BASIC?
Kip Koon
computerdoc at sc.rr.com
Sun Mar 12 21:46:48 EDT 2017
Hi Lee,
I am definitely interested in a copy of this Small Basic in C. The C source code has to be much better organized than Color Basic's original assembly code. Argh! I never could make total sense of it all!
Kip Koon
computerdoc at sc.rr.com
http://www.cocopedia.com/wiki/index.php/User:Computerdoc
-----Original Message-----
From: Coco [mailto:coco-bounces at maltedmedia.com] On Behalf Of Lee Patterson
Sent: Sunday, March 12, 2017 12:36 AM
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Subject: Re: [Coco] C interpreter for Coco BASIC?
Years back I found something called Small Basic. I just googled it again, and got some other hits that didn’t seem like the same thing. Wish I had kept track of where I originally got it from. I was able to update it to use labels instead of line numbers, and actually used it as a script interpreter for MUD I worked on. Pretty simple interpreter to use and modify.
Very small, consisting of 2 files and a total of 877 lines:
334 EXPARSE.C
543 SBASIC.C
877 total
Supported the following:
"print", PRINT,
"input", INPUT,
"if", IF,
"then", THEN,
"else", ELSE,
"goto", GOTO,
"for", FOR,
"next", NEXT,
"to", TO,
"gosub", GOSUB,
"return", RETURN,
"end", END,
>From the source:
/**********************************************************/
/* SMALL BASIC Interpeter (sbasic.c) V0.2 */
/* Copyright (C) 1994 James J. Bielman */
/* Adapted from _C Power User's Guide_ by Herbert Schildt */ /**********************************************************/
If you are interested, I can email the zip of it.
Lee
On 3/12/17, 12:14 AM, "Coco on behalf of RETRO Innovations" <coco-bounces at maltedmedia.com on behalf of go4retro at go4retro.com> wrote:
Before I go roll my own interpreter for the Coco tokenized BASIC, anyone
know of an open source C implementation?
Jim
--
RETRO Innovations, Contemporary Gear for Classic Systems
www.go4retro.com
store.go4retro.com
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
--
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco
More information about the Coco
mailing list