On Feb 6, 3:41 pm, Deckard <
boutil...@free.fr> wrote:
> A great tool Joshua. Thank you.
>
> Unfortunately, my program has a lot of commands which refer to
> assembly routines (poke, peek, call) and the compilation stops after
> the first "call" with message "Unsupported POKE location".
Actually, if it makes it that far, it's done compiling and trying to
execute. Try this:
10 PRINT "Hello World!"
20 END
30 POKE 0,0
This is syntactically correct, but 0 is not a supported POKE location.
It will run without reporting any errors, unless you remove line 20.
So, as far as my page is concerned, your code is syntactically
correct.
> And as a lot of applesoft basic program, the program also has extended
> commands which begin with ampersand and produce the message
> "ParseError: Native interop statement not supported: & in line xyz"
Yeah, my page is not an emulator so it's not going to be able to
validate that the runtime POKE, CALL or &--routines are valid. But
then again, there's provably no way to do that for arbitrary code
without running it, so I don't feel too bad. :)
(Back in the day, I don't think I ever used & routines. Possibly, if I
had, I never would have put that page together.)
> I've notice a strange thing:
>
> when I try to run the following pgm, a message is displayed with a bad
> number line: ParseError: Native interop statement not supported: & in
> line 30
>
> 10 print "A"
> 20 &
> 30 print "B"
Thanks, it should be reporting the parse error in line 20, of course.
I see the bug in the code (token lookahead is conflicting with the
line reporting), and I'll try to fix it soonish.
> On an Apple IIe computer, this program works.
My page flags unsupported commands (&, WAIT, HIMEM, etc) as errors at
parse time rather than runtime. It could arguably do it at runtime for
WAIT, HIMEM and so on, but IIRC I don't believe I could do so for & in
the non-trivial case since the parsing of tokens after the & is under
the control of the assembly routine and anything up the next line
number (or beyond, technically) could have a nonstandard meaning. That
said, I prefer the early errors for my use cases, so I'm not planning
on changing it. There are plenty of true emulators out there.
(I'm very much looking forward to BLuRry giving JavaScript and WebGL a
try. JSACE, anyone?)