[Coco] The Coco's first webserver, written in Basic09

Wayne Campbell asa.rand at gmail.com
Thu Dec 31 00:45:38 EST 2009


You are correct about the source, sort of. Basic09 does a compile of the 
source when you load your source file. After that, it acts on the 
intermediate code. The difference between packed code and running in the 
Basic09 environment is that the environment retains the lists for variable 
references and line references according to the source, and contains the 
variable names and line numbers you gave them. Packed code does away with 
those lists and condenses everything down to just the tokens and offsets. 
Execution-wise, they are treated identically. The RUN statement functions 
the same whether the code is packed or not. You call a named subroutine, or 
a subroutine identified by a string variable reference, passing whatever 
parameters are specified within the () of the statement, and yes, in the 
packed I-Code, there are tokens for ( and ), as they delimit the parameter 
list. If the subroutine specified does not exist, an error is returned. So, 
in Basic09, you are not really running the source.

Wayne

----- Original Message ----- 
From: "Willard Goosey" <goosey at virgo.sdc.org>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Wednesday, December 30, 2009 9:08 PM
Subject: Re: [Coco] The Coco's first webserver, written in Basic09


> On Wed, Dec 30, 2009 at 07:13:40PM -0500, Christian Lesage wrote:
>> On the other hand, is BASIC09 always compiled? I mean, do you
>> necessarily have to compile your scripts before you can RUN them? IIRC,
>> it is not mandatory, but I could be wrong.
>
> BASIC-09 source can only be RUN from within the BASIC09 interpeter.
> Compiled Icode can only RUN binary or Icode modules.
>
> It would be sort of cool if we had a stripped-down BASIC-09 interpeter
> engine as a subroutine module, so that a larger program could could
> hand it scripts, but that would use up a lot of the program's 64K code
> space.
>
> You don't want RUN, you need something like: SHELL "BASIC09 "+script
> That has its own issues.
>
> Willard
> -- 
> Willard Goosey  goosey at sdc.org
> Socorro, New Mexico, USA
> I search my heart and find Cimmeria, land of Darkness and the Night.
>  -- R.E. Howard
>
> --
> Coco mailing list
> Coco at maltedmedia.com
> http://five.pairlist.net/mailman/listinfo/coco 




More information about the Coco mailing list