9

A BASIC program that was deleted with NEW or after a reset can be restored on Commodore computers as long as no new programs are entered or loaded (or the computer is powered off). For the C64, the following procedure has to be applied:

POKE2050,1:SYS42291:POKE46,PEEK(35)-(PEEK(781)>253):POKE45,PEEK(781)+2AND255:CLR

What are the respective commands for a C128 in C128 mode?

I know that the pointer to the BASIC text is at $2D/2E instead of $2C/2D and that BASIC start is at $1C00 if graphics are not used. But I think the Rechain Lines Routine (address $A533/42291 which is called by SYS) might be different.

1 Answer 1

10

Florian Müller's Vom C64 zum C128: Tips & Tricks (available through https://www.retrozone.ch/c128/books/download.php) gives this command in section 3.7.2:

POKE PEEK(45)+256*PEEK(46),1:DELETE 1
3
  • 2
    Works like a charm, thanks for the solution and the excellent reference given. One addition: if the BASIC program before the reset was at 0x4001 due to use of graphics, then entering the commands GRAPHIC1:GRAPHIC0 before the above line is necessary to adjust all pointers to a BASIC start at 0x4001.
    – Peter B.
    Mar 25, 2020 at 17:38
  • Broken link? You could try archive.org/details/… instead. By the way, it looks like "Tips & Tricks" may be the only English in the whole book. Unless those words are the same in German as English :-) Looks like trick may be but tip should be tipp? Keep in mind I know very little German, I just used google translate.
    – paxdiablo
    Aug 14, 2023 at 1:19
  • @paxdiablo — Retrozone.ch has added a checkbox mechanism where the user must confirm that they're downloading for personal use only and will not re-distribute. I've changed the link in the answer. BUT.... You don't have to read any German, the entire answer is right there — that's just the source. Aug 14, 2023 at 20:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .