Date : Sat, 21 Nov 2009 23:27:45 +0000 (GMT)
From : kranser@... (Steve Fewell)
Subject: Quine
LIST when appearing in programs is actually still tokenised [token &C9].
So a tokeniser/detokeniser is not needed.
When running a program, BASIC checks the Memory PAGE that the code is running
from, if it is &07 (Command Line) [&0700-&07FF], commands &C6 and above
are executed, if a program is running, commands greater than or equal to
&CF are executed - all other commands are treated as a variable name - which
would result in Syntax Error for token &C9!
There doesn't seem to be a way to hack BASIC or to trick it into executing
token &C9 while running a program!
Command Line only tokens are as follows:
C6
Steve.
--- On Sat, 21/11/09, Rick Murray <rick@...> wrote:
> I wonder if there is a way to "hack"
> BASIC's memory so that it consists
> of a program which is, essentially:
>
> ???10 LIST
>
> (given that LIST is normally an immediate command and not
> permitted in
> programs)
>
> ?
>
>
> A detokeniser to list itself is an amusingly quirky
> approach, I like! :-)
>
> Best wishes,
>
> Rick.
>
>
>