As mentioned in this answer about how the C64 stores BASIC program text, MS-BASIC uses a pointer called TXTTAB that points to the start of the program text, which is typically at address 1 in a page. For example, on the Commodore 64 it's at address $0801:
PRINT PEEK(44), PEEK(43)
8 1
As 8-Bit Show and Tell points out at 20:29 in this video (which is demonstrating a technique developed decades ago), when moving the BASIC program text start area, you need to ensure that the byte just before your new TXTTAB start point is set to 0 for BASIC to function properly:
POKE 1024 [the byte before the new
TXTPTR], yeah, that's the start of BASIC memory, just putting a zero there, which is necessary; if you don't do that you'll get syntax error when you try to do anything in BASIC, even if you try and LIST.
This is not entirely correct; in VICE I tried POKE 2048,1 and LIST still worked, but other commands, such as NEW, RUN and GOTO 10 (after I'd entered a line 10) did produce ?SYNTAX ERROR.
The Apple II+ (emulated with AppleWin) running Applesoft BASIC has similar issues; POKE 2048,1 produces ?SYNTAX ERROR when I type NEW (though it does clear the program) and with the program 10 PRINT "HELLO" in memory, typing RUN produces ?SYNTAX ERROR in 65044.
The same issues also arise on an MSX2 machine (Sony HB-F1XD emulated with OpenMSX): POKE 32768,1 produces syntax errors for NEW and RUN with a program similar to the above.
Why is that location required to be zero?
[TXTTAB]-1rather than[TXTTAB]). He could make it work fine after loading by setting the value inTXTTABto $0800 and putting 0 in $07FF. Or recreate the problem above by putting 1 in $07FF. I am not shifting my program to the wrong location; I am simply changing a location just outside my program, a location one that doesn't have any apparent use. – cjs Jun 06 '22 at 01:25RUNcommand, though not theNEWcommand. It didn't come up in my search because the answer misspellsTXTTABasTEXTTAB. (It is spelt correctly in comments on that answer; apparently search doesn't look at comments.) – cjs Jun 06 '22 at 06:20NEW, and what other commands would also be affected by this design decision.) – cjs Jun 06 '22 at 06:32NEWto you that issuing a close by dupe does create an automated entry? Come on... I think it's a good idea to turn such default entries into something more useful, do you? Also, the only 'aggro' here is added by you by replying within seconds in defensive manner.What about using that time to think rather before writing (did again, didn't you) and see how to improve your questions instead of trying to force it down? – Raffzahn Jun 06 '22 at 08:28