Re: A86: Running Basic Programs


[Prev][Next][Index][Thread]

Re: A86: Running Basic Programs




When you write to the BASIC loader program, you have to write everything
in tokenized form, because the program was tokenized right before it
started your shell.  At least that's how I ended up doing it.  I made 9
':'s, not 8, because a name-length token precedes the actual name.  The
value of this token is ($32+length), where length is the number of
characters that make up the name, from 1 to 8.  Immediately following
this token write the characters of the name.

The reason it said 'Ded Hex' is because ASCII 'h'=$68, and the token $68
represents HEX.  ASCII 'i'=$69, which is the token for DEC.  Why they
are in reverse order I don't know.

Also, when I made my loader, I used this program instead, for reasons
which were good but I don't remember what they were:

Lbl Top
asm(shell
If Ans==0
Return
:::::::::
Goto Top

I think it had something to do with how it cleared the loader's ':::...'
string.  My shell contains the code for the tokenized version of the
above program, and then creates it whenever it is missing, so the
average idiot user can't just delete the loader.

Cassady Roop


Brent Schneider wrote:
> 
> I recently took out of my shell _exec_basic and put in the thing where it
> runs it from the basic program:
> 
> Lbl A
> ::::::::             <- 8 ':'s
> asm(shell
> If Ans==1
> Goto A
> Return
> 
> Well, in my shell, when I run basic program 'hi', it writes to the program
> just fine, but it gives me an error syntax and when I goto it, this is what
> shows:
> 
> Lbl A
> Dec Hex::::::        <- 6 ':'s
> asm(shell
> If Ans==1
> Goto A
> Return
> 
> Do I have to do some tokenize or something? Any ideas?
> 
> Thanks..
> Brent


References: