List BASIC Keywords Program in Wiki Doesn't Work

May 22, 2019
409
211
43
It is definitely wrong. The underlying ROM architecture has changed, and BASIC doesn't live where it used to.

Since BASIC currently accesses the KERNAL ROM bank, you cannot currently read BASIC code from BASIC itself.

The values that program reads are likely the tokens in this include file:


So while there's nothing wrong with the program, it simply can't access the BASIC ROM.

This should be fixed in a future update. There is already an issue filed to allow PEEK to use different ROM banks, and the developers know that this is currently a problem.
 
  • Like
Reactions: Panda

mobluse

New Member
Sep 20, 2019
21
8
3
This should be fixed in a future update. There is already an issue filed to allow PEEK to use different ROM banks, and the developers know that this is currently a problem.
Do you mean this issue?
 
May 22, 2019
409
211
43
Do you mean this issue?
Yes. I was having trouble finding it the other day.

If Mike implements that issue as suggested, we'll have a BANK command that would set the bank number used for POKE, PEEK, and SYS, in addition to the new block commands.

I proposed it that way (rather than having the bank number as part of POKE, PEEK, and SYS) to maintain compatibility with existing BASIC 2 syntax, among other reasons: VPOKE is much slower than POKEing VERA, probably because of the extra parameter parsing. Also, since not all POKE and PEEKs use banked memory, adding a bank parameter would mean inconsistent syntax: POKEs below $A000 would have only two parameters, while POKES above that address would have three. This slows down the POKE statement even more, and it's already slow enough.
 
  • Like
Reactions: Schlowski

mobluse

New Member
Sep 20, 2019
21
8
3
Is it not possible to switch ROM bank to where the BASIC keywords are using POKE or SYS and get the byte from ROM?
 
May 22, 2019
409
211
43
Is it not possible to switch ROM bank to where the BASIC keywords are using POKE or SYS and get the byte from ROM?
you can try it, but I suspect the PEEK command itself switches the ROM bank. Since BASIC itself needs the ROM to be set to a specific bank, part of the flow of PEEK would be to set the bank before it reads the value, then set the bank back to the BASIC ROM after the value has been read.