Basic listing protection

By cax

Prophet (3737)

cax's picture

01-07-2003, 14:33

There is such thing as "list protection", which means - when you execute "list" command in basic, you see nothing or only part of the program, but when you run it - everything works, including the hidden lines.

1) How can I hide lines ?
2) I have a basic program with hidden lines. How to unhide ?

I ask this because I found a disk version of Darwin 4098 game, and try to understand how it's loader works. This loader contains hidden basic code.

Login or register to post comments

By anonymous

incognito ergo sum (116)

anonymous's picture

01-07-2003, 14:51

unhide usually works by typing RENUM.


Enlighted (5918)

NYYRIKKI's picture

01-07-2003, 16:57


Most typical trick is to set line number to #FFFF that will stop the LIST command. Another possibility is to add remarks after each line and fill those remarks with backspace.

If you download any of the BASIC programs at my site (for example Nyyrikki's MSX software corner demo), you can find both of these methods used and you may examine them.


RENUM does the trick in most cases. It may anyway mess up the linenumbers so that the program will do something else that it did before RENUM. As long hidden programs usually have also code to unhide the program in them self, best way is to execute that code after RENUM and reloading the program.

By ro

Scribe (4696)

ro's picture

03-07-2003, 18:56

OR unhook the list command with some poking in memory..
can't remember the right address but it works great.

I remember protecting my listings before... by putting some strange
characters in the first line... can't remember clearly.
Also a nice one: put the CLRhome char after remarks in listing...

By tcm1998

Expert (120)

tcm1998's picture

09-08-2003, 14:58

From the Tosec MSX2 disklist, I found Rick Dangerous not working. When I tried to investigate the problem I found that it was using a different and quite annoying technique.

After each basic line there were exactly as much chr$(127)'s which did delete the text again.
To make things even more complex, they also used filenames composed from 127 and +'s

10 bload"+++ +++",r ' ************************* (Where all the stars represent chr$(127)'s

To fix this, save the list in ascii and just load it in TED or a similar program.
Then delete all stuff after the remark sign and save it again.

Listing is back