UN-NEW-UNDO-OLD-BRING-IT-BACK,-SO-TO-SPEAK -------------------------------------------------------------------------------------------------- TOOL: Built-In ML-Monitor , BASIC 7.0 Language: Assembler / BASIC 7.0 Extra: - Author: Misel Zivanovic {of this doc only and from BASIC solution part!} Note: (C) 15th JAN 2026 - www.lived.ch, mzretro.ch Information: I found this one here: The Transactor Magazine Volume 7 Issue 06 I didn't thought it is going to work, but it did! This like this one are always needed... --------------------------------------------------------------------------------------------------- Accidentally deleted a BASIC 7.0 program? No worries! Here is your cure... {YOUR PROGRAM} 10 print 20 print "i will be deleted" 30 print "do unnew!!!!" {START THE ML-MONITOR} moN {monitor shortcut} monitor pc sr ac xr yr sp ; fb000 00 00 00 00 f8 {ENTER THESE LINES}: a 00b00 a9 01 lda #$01 a 00b02 a0 00 ldy #$00 a 00b04 91 2d sta ($2d),y a 00b06 20 4f 4f jsr $4f4f a 00b09 4c 82 4f jmp $4f82 a 00b0c ---------------------------------------------- OR DO copy/paste THESE TWO LINES AND EXIT ML-MONITOR >00b00 a9 01 a0 00 91 2d 20 4f:I.?..- o >00b08 4f 4c 82 4f 00 00 00 00:ol.o.... ---------------------------------------------- x {to EXIT THE MONITOR} new {TO DELETE THE BASIC PROGRAM} ready. list {TOCONFIRM IT IS DELETED} {all gone after the NEW command! No listing!} ready. sys 2816 {TO START UN-NEW {OR OLD}} ready. list {TO SEE IT'S BACK AGAIN} 10 print 20 print "i will be deleted" 30 print "do unnew!!!!" ready. --------------------------------------------------------------------------------------------------- This is actually working without any issues. BASIC 7.0 Un-New in BASIC DIRECT MODE! --------------------------------------------------------------------------------------------------- AND CAN THIS BE DONE ALSO IN BASIC? WHY TORTURE ASSEMBLER WITH THAT, RIGHT! --------------------------------------------------------------------------------------------------- Extended functionality of the SYS commands is probably well known to everyone. And my best guess is, with few SYS commands we can achieve the same Un-New {or OLD}, as with previous assembler only solution: C128 SYS command: {to SET the values} SYS 4864,A,X,Y,S {to read the values} RREG A,X,Y,S I tried like this in BASIC direct mode and it immediately was OKAY!: new {TO DELETE THE PROGRAM AGAIN} AND THEN: {type in all as one line or do copy/paste, VICE emulator} AND HIT ENTER -------------------------------------------------------------------------- poke2816,145:poke2817,45:poke2818,96:sys2816,1,0,0,0:sys20303:sys20354 -------------------------------------------------------------------------- And your program is back again! EXPLANATION: This {sta ($2d),y} is : poke2816,145:poke2817,45 RTS {so return to BASIC is this} : poke 2818,96 THIS {lda #$01 and ldy #$00} is : sys2816,1,0,0,0 And then the last two calls : jsr $4f4f, jmp $4f82 --------------------------------------------------------------------------------------------------- I wish i had the access to this MAG 40 years ago, hehe...