Date : Fri, 20 Nov 2009 01:26:22 +0000
From : rs423@... (Mick Champion)
Subject: Quine
Jonathan Graham Harston wrote:
>> Message-ID: <4B0538B1.4060506@...>
>>
>
> Mick Champion wrote:
>
>> right to add another if I can work out how GOTO is tokenised. E5
>> followed by what? ;-)
>>
>
> E5 followed by the tokenised line number. See
> http://mdfs.net/Docs/Comp/BBCBasic/Line/Numbers3
>
Thanks. I've done a few programs in assembly language, but never got my
head around things like LSR (logical shift right). In your decode
listing, you do this 4 times. If I wanted to multiply, off the top of my
head, I'd do something like
CLC
LDA byte1
LDX #0
.loop
ADC byte1
STA byte1
BCC a
INC byte2
.a
INX
CPX#4
BNE loop
Am I missing something?
From the link JGH wrote ;
> Within BBC Basic programs lines line numbers (eg after GOTO, GOSUB,
> RESTORE) are encoded to make them easily found by RENUMBER, and to prevent
> them appearing tp be control characters or tokens by forcing them into the
> range &40-&7F.
>
Thanks again. that's a good explanation as to why the line numbers are
tokenised.
Mick