How did Apple ][ basic programs protect against listing?












37














I seem to recall from my high-school days that certain Apple ][ programs protected themselves from being listed and therefore modified.



If you tried to do it, the machine would simply reboot.



How did they achieve this, and can it be bypassed to get at the code?










share|improve this question



























    37














    I seem to recall from my high-school days that certain Apple ][ programs protected themselves from being listed and therefore modified.



    If you tried to do it, the machine would simply reboot.



    How did they achieve this, and can it be bypassed to get at the code?










    share|improve this question

























      37












      37








      37







      I seem to recall from my high-school days that certain Apple ][ programs protected themselves from being listed and therefore modified.



      If you tried to do it, the machine would simply reboot.



      How did they achieve this, and can it be bypassed to get at the code?










      share|improve this question













      I seem to recall from my high-school days that certain Apple ][ programs protected themselves from being listed and therefore modified.



      If you tried to do it, the machine would simply reboot.



      How did they achieve this, and can it be bypassed to get at the code?







      apple-ii copy-protection






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 23 at 0:37







      user6464





























          3 Answers
          3






          active

          oldest

          votes


















          37














          One way was to place an in-line reboot command into the actual listing.



          Apple ][ DOS had a feature that would monitor the output stream and, if it found a special character output at the start of a line, the rest of the line would be treated as a command. This character was Ctrl+D, meaning you could get a disk listing from your program with something like:



          PRINT CHR$(4);"CATALOG"


          You could also use the slot activation command IN#6 which would generally reboot the machine, assuming your disk controller was in slot 6 (it usually was).



          But, of course, that would only work with a print command if you were running your program. For protecting against someone listing it, an extra layer of trickery was required.



          To do this, you would create a line at the start of your program:



          10 REM XXIN#6


          and then use POKE commands to change the XX into a Ctrl+M (to start a new line) and Ctrl+D (to flag a command), before saving.



          After that, an attempt to LIST the program would result in the machine rebooting. So this is probably something you wanted to do once development was done, just before shipping :-)



          In order to bypass it, it's a simple matter of working out the errant line and just deleting it. In the case above, that would be acheived by just entering the stand-alone:



          10


          on the command line and, voila, the program is unprotected. To stop this, some developers started numbering the programs with less "normal" line numbers such as 2718. However, since the line numbers are stored in memory as well, you could PEEK at the program to work out what the first line number was, and then delete that one.






          share|improve this answer



















          • 3




            My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
            – supercat
            Nov 23 at 2:56






          • 1




            It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
            – Mr Lister
            Nov 23 at 11:05










          • Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
            – fadden
            Nov 23 at 16:07






          • 2




            @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
            – Mr Lister
            Nov 23 at 16:24










          • @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
            – supercat
            Nov 25 at 4:07



















          18














          If I recall correctly, there were lots of variations to implement this scheme. Besides embedding characters in the listing that would reboot, or clear the screen every so often, a particular one I remember worked roughly like this:



          The listing only consisted of a single CALL. The internal structure of the BASIC program was carefully changed so the listing was stopped there, but there was a lot of stuff after this single command. This call would be to an embedded machine program somewhere in the BASIC listing, which would re-arrange the structure to make the whole program visible, and also register itself with some hooks to make it invisible again. You could defeat this protection by disassembling the machine code and running part of it. Or even by pressing RESET or something at a proper time, I forgot the details.



          Not all BASIC programs that consisted of a single CALL were like this. There were also pure machine programs which disguised itself as BASIC programs in this way for some reason I never understood.






          share|improve this answer



















          • 1




            Possibly to use the basic loader?
            – Joshua
            Nov 23 at 19:17



















          12














          There were multiple ways of protecting the program, including:





          • order of line numbers could be altered to produce:




            • circular listings;

            • missing lines;

            • out-of-order lines;

            • out-of-bounds addressing;



          • the "resume" flag could be set such that any command could cause the program to run again;


          • the start-address for the program could be altered so that another (or none) listing would show;

          • line-linking could be altered to run "unreachable" lines;

          • the DOS interpreter accepts special characters so that slot code can be run ("PR#6" being the most common, but "DELETE HELLO" works equally well).
            This sounds like what you were seeing.

          • the code could be self-modifying as it ran.


          There was also a modification to the KBDIN routine to point to the reset routine, so that if you achieved a prompt and tried to type something, the machine would reboot.



          For a more detailed description, see section 7.20 in "A Brief Description of Some Popular Copy-Protection Techniques on the Apple ][ Platform" (http://pferrie.host22.com/papers/apple2_prot.pdf).






          share|improve this answer

















          • 1




            That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
            – user6464
            Nov 25 at 0:22











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "648"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f8364%2fhow-did-apple-basic-programs-protect-against-listing%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown
























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          37














          One way was to place an in-line reboot command into the actual listing.



          Apple ][ DOS had a feature that would monitor the output stream and, if it found a special character output at the start of a line, the rest of the line would be treated as a command. This character was Ctrl+D, meaning you could get a disk listing from your program with something like:



          PRINT CHR$(4);"CATALOG"


          You could also use the slot activation command IN#6 which would generally reboot the machine, assuming your disk controller was in slot 6 (it usually was).



          But, of course, that would only work with a print command if you were running your program. For protecting against someone listing it, an extra layer of trickery was required.



          To do this, you would create a line at the start of your program:



          10 REM XXIN#6


          and then use POKE commands to change the XX into a Ctrl+M (to start a new line) and Ctrl+D (to flag a command), before saving.



          After that, an attempt to LIST the program would result in the machine rebooting. So this is probably something you wanted to do once development was done, just before shipping :-)



          In order to bypass it, it's a simple matter of working out the errant line and just deleting it. In the case above, that would be acheived by just entering the stand-alone:



          10


          on the command line and, voila, the program is unprotected. To stop this, some developers started numbering the programs with less "normal" line numbers such as 2718. However, since the line numbers are stored in memory as well, you could PEEK at the program to work out what the first line number was, and then delete that one.






          share|improve this answer



















          • 3




            My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
            – supercat
            Nov 23 at 2:56






          • 1




            It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
            – Mr Lister
            Nov 23 at 11:05










          • Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
            – fadden
            Nov 23 at 16:07






          • 2




            @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
            – Mr Lister
            Nov 23 at 16:24










          • @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
            – supercat
            Nov 25 at 4:07
















          37














          One way was to place an in-line reboot command into the actual listing.



          Apple ][ DOS had a feature that would monitor the output stream and, if it found a special character output at the start of a line, the rest of the line would be treated as a command. This character was Ctrl+D, meaning you could get a disk listing from your program with something like:



          PRINT CHR$(4);"CATALOG"


          You could also use the slot activation command IN#6 which would generally reboot the machine, assuming your disk controller was in slot 6 (it usually was).



          But, of course, that would only work with a print command if you were running your program. For protecting against someone listing it, an extra layer of trickery was required.



          To do this, you would create a line at the start of your program:



          10 REM XXIN#6


          and then use POKE commands to change the XX into a Ctrl+M (to start a new line) and Ctrl+D (to flag a command), before saving.



          After that, an attempt to LIST the program would result in the machine rebooting. So this is probably something you wanted to do once development was done, just before shipping :-)



          In order to bypass it, it's a simple matter of working out the errant line and just deleting it. In the case above, that would be acheived by just entering the stand-alone:



          10


          on the command line and, voila, the program is unprotected. To stop this, some developers started numbering the programs with less "normal" line numbers such as 2718. However, since the line numbers are stored in memory as well, you could PEEK at the program to work out what the first line number was, and then delete that one.






          share|improve this answer



















          • 3




            My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
            – supercat
            Nov 23 at 2:56






          • 1




            It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
            – Mr Lister
            Nov 23 at 11:05










          • Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
            – fadden
            Nov 23 at 16:07






          • 2




            @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
            – Mr Lister
            Nov 23 at 16:24










          • @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
            – supercat
            Nov 25 at 4:07














          37












          37








          37






          One way was to place an in-line reboot command into the actual listing.



          Apple ][ DOS had a feature that would monitor the output stream and, if it found a special character output at the start of a line, the rest of the line would be treated as a command. This character was Ctrl+D, meaning you could get a disk listing from your program with something like:



          PRINT CHR$(4);"CATALOG"


          You could also use the slot activation command IN#6 which would generally reboot the machine, assuming your disk controller was in slot 6 (it usually was).



          But, of course, that would only work with a print command if you were running your program. For protecting against someone listing it, an extra layer of trickery was required.



          To do this, you would create a line at the start of your program:



          10 REM XXIN#6


          and then use POKE commands to change the XX into a Ctrl+M (to start a new line) and Ctrl+D (to flag a command), before saving.



          After that, an attempt to LIST the program would result in the machine rebooting. So this is probably something you wanted to do once development was done, just before shipping :-)



          In order to bypass it, it's a simple matter of working out the errant line and just deleting it. In the case above, that would be acheived by just entering the stand-alone:



          10


          on the command line and, voila, the program is unprotected. To stop this, some developers started numbering the programs with less "normal" line numbers such as 2718. However, since the line numbers are stored in memory as well, you could PEEK at the program to work out what the first line number was, and then delete that one.






          share|improve this answer














          One way was to place an in-line reboot command into the actual listing.



          Apple ][ DOS had a feature that would monitor the output stream and, if it found a special character output at the start of a line, the rest of the line would be treated as a command. This character was Ctrl+D, meaning you could get a disk listing from your program with something like:



          PRINT CHR$(4);"CATALOG"


          You could also use the slot activation command IN#6 which would generally reboot the machine, assuming your disk controller was in slot 6 (it usually was).



          But, of course, that would only work with a print command if you were running your program. For protecting against someone listing it, an extra layer of trickery was required.



          To do this, you would create a line at the start of your program:



          10 REM XXIN#6


          and then use POKE commands to change the XX into a Ctrl+M (to start a new line) and Ctrl+D (to flag a command), before saving.



          After that, an attempt to LIST the program would result in the machine rebooting. So this is probably something you wanted to do once development was done, just before shipping :-)



          In order to bypass it, it's a simple matter of working out the errant line and just deleting it. In the case above, that would be acheived by just entering the stand-alone:



          10


          on the command line and, voila, the program is unprotected. To stop this, some developers started numbering the programs with less "normal" line numbers such as 2718. However, since the line numbers are stored in memory as well, you could PEEK at the program to work out what the first line number was, and then delete that one.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 26 at 0:40

























          answered Nov 23 at 0:49







          user6464















          • 3




            My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
            – supercat
            Nov 23 at 2:56






          • 1




            It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
            – Mr Lister
            Nov 23 at 11:05










          • Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
            – fadden
            Nov 23 at 16:07






          • 2




            @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
            – Mr Lister
            Nov 23 at 16:24










          • @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
            – supercat
            Nov 25 at 4:07














          • 3




            My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
            – supercat
            Nov 23 at 2:56






          • 1




            It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
            – Mr Lister
            Nov 23 at 11:05










          • Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
            – fadden
            Nov 23 at 16:07






          • 2




            @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
            – Mr Lister
            Nov 23 at 16:24










          • @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
            – supercat
            Nov 25 at 4:07








          3




          3




          My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
          – supercat
          Nov 23 at 2:56




          My recollection is that you could simply type the control-D as part of the input line. No need for poking about. One could list a program without processing such things by typing :PR#0 with a colon before it to ensure it's processed as a BASIC command rather than a DOS one.
          – supercat
          Nov 23 at 2:56




          1




          1




          It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
          – Mr Lister
          Nov 23 at 11:05




          It's been a while for me, but I seem to remember that just a chr$(4) in the middle of a line wasn't enough; it had to be the first character on the line, i.e. there had to be a chr$(13) preceding it or it would be ignored.
          – Mr Lister
          Nov 23 at 11:05












          Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
          – fadden
          Nov 23 at 16:07




          Yes, it needed to be CR + Ctrl-D or DOS wouldn't see it. Issuing the "FP" command was probably better than rebooting, because it just quietly erased the program, leaving you to wonder what just happened. On a different note, some programs loaded up with Ctrl-G just to be annoying. Maybe they hoped the beeping and delays would be off-putting.
          – fadden
          Nov 23 at 16:07




          2




          2




          @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
          – Mr Lister
          Nov 23 at 16:24




          @fadden Ha, one of the first machine language utilities I wrote was one that intercepted the output of control chars, checked if they came from LIST output, and displayed inverse letters if so. Those were the days.
          – Mr Lister
          Nov 23 at 16:24












          @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
          – supercat
          Nov 25 at 4:07




          @MrLister: Ah, probably the control-D could be typed, but a control-M needed to be poked in front of it.
          – supercat
          Nov 25 at 4:07











          18














          If I recall correctly, there were lots of variations to implement this scheme. Besides embedding characters in the listing that would reboot, or clear the screen every so often, a particular one I remember worked roughly like this:



          The listing only consisted of a single CALL. The internal structure of the BASIC program was carefully changed so the listing was stopped there, but there was a lot of stuff after this single command. This call would be to an embedded machine program somewhere in the BASIC listing, which would re-arrange the structure to make the whole program visible, and also register itself with some hooks to make it invisible again. You could defeat this protection by disassembling the machine code and running part of it. Or even by pressing RESET or something at a proper time, I forgot the details.



          Not all BASIC programs that consisted of a single CALL were like this. There were also pure machine programs which disguised itself as BASIC programs in this way for some reason I never understood.






          share|improve this answer



















          • 1




            Possibly to use the basic loader?
            – Joshua
            Nov 23 at 19:17
















          18














          If I recall correctly, there were lots of variations to implement this scheme. Besides embedding characters in the listing that would reboot, or clear the screen every so often, a particular one I remember worked roughly like this:



          The listing only consisted of a single CALL. The internal structure of the BASIC program was carefully changed so the listing was stopped there, but there was a lot of stuff after this single command. This call would be to an embedded machine program somewhere in the BASIC listing, which would re-arrange the structure to make the whole program visible, and also register itself with some hooks to make it invisible again. You could defeat this protection by disassembling the machine code and running part of it. Or even by pressing RESET or something at a proper time, I forgot the details.



          Not all BASIC programs that consisted of a single CALL were like this. There were also pure machine programs which disguised itself as BASIC programs in this way for some reason I never understood.






          share|improve this answer



















          • 1




            Possibly to use the basic loader?
            – Joshua
            Nov 23 at 19:17














          18












          18








          18






          If I recall correctly, there were lots of variations to implement this scheme. Besides embedding characters in the listing that would reboot, or clear the screen every so often, a particular one I remember worked roughly like this:



          The listing only consisted of a single CALL. The internal structure of the BASIC program was carefully changed so the listing was stopped there, but there was a lot of stuff after this single command. This call would be to an embedded machine program somewhere in the BASIC listing, which would re-arrange the structure to make the whole program visible, and also register itself with some hooks to make it invisible again. You could defeat this protection by disassembling the machine code and running part of it. Or even by pressing RESET or something at a proper time, I forgot the details.



          Not all BASIC programs that consisted of a single CALL were like this. There were also pure machine programs which disguised itself as BASIC programs in this way for some reason I never understood.






          share|improve this answer














          If I recall correctly, there were lots of variations to implement this scheme. Besides embedding characters in the listing that would reboot, or clear the screen every so often, a particular one I remember worked roughly like this:



          The listing only consisted of a single CALL. The internal structure of the BASIC program was carefully changed so the listing was stopped there, but there was a lot of stuff after this single command. This call would be to an embedded machine program somewhere in the BASIC listing, which would re-arrange the structure to make the whole program visible, and also register itself with some hooks to make it invisible again. You could defeat this protection by disassembling the machine code and running part of it. Or even by pressing RESET or something at a proper time, I forgot the details.



          Not all BASIC programs that consisted of a single CALL were like this. There were also pure machine programs which disguised itself as BASIC programs in this way for some reason I never understood.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 25 at 9:33









          JakeGould

          1095




          1095










          answered Nov 23 at 6:55









          dirkt

          8,93312447




          8,93312447








          • 1




            Possibly to use the basic loader?
            – Joshua
            Nov 23 at 19:17














          • 1




            Possibly to use the basic loader?
            – Joshua
            Nov 23 at 19:17








          1




          1




          Possibly to use the basic loader?
          – Joshua
          Nov 23 at 19:17




          Possibly to use the basic loader?
          – Joshua
          Nov 23 at 19:17











          12














          There were multiple ways of protecting the program, including:





          • order of line numbers could be altered to produce:




            • circular listings;

            • missing lines;

            • out-of-order lines;

            • out-of-bounds addressing;



          • the "resume" flag could be set such that any command could cause the program to run again;


          • the start-address for the program could be altered so that another (or none) listing would show;

          • line-linking could be altered to run "unreachable" lines;

          • the DOS interpreter accepts special characters so that slot code can be run ("PR#6" being the most common, but "DELETE HELLO" works equally well).
            This sounds like what you were seeing.

          • the code could be self-modifying as it ran.


          There was also a modification to the KBDIN routine to point to the reset routine, so that if you achieved a prompt and tried to type something, the machine would reboot.



          For a more detailed description, see section 7.20 in "A Brief Description of Some Popular Copy-Protection Techniques on the Apple ][ Platform" (http://pferrie.host22.com/papers/apple2_prot.pdf).






          share|improve this answer

















          • 1




            That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
            – user6464
            Nov 25 at 0:22
















          12














          There were multiple ways of protecting the program, including:





          • order of line numbers could be altered to produce:




            • circular listings;

            • missing lines;

            • out-of-order lines;

            • out-of-bounds addressing;



          • the "resume" flag could be set such that any command could cause the program to run again;


          • the start-address for the program could be altered so that another (or none) listing would show;

          • line-linking could be altered to run "unreachable" lines;

          • the DOS interpreter accepts special characters so that slot code can be run ("PR#6" being the most common, but "DELETE HELLO" works equally well).
            This sounds like what you were seeing.

          • the code could be self-modifying as it ran.


          There was also a modification to the KBDIN routine to point to the reset routine, so that if you achieved a prompt and tried to type something, the machine would reboot.



          For a more detailed description, see section 7.20 in "A Brief Description of Some Popular Copy-Protection Techniques on the Apple ][ Platform" (http://pferrie.host22.com/papers/apple2_prot.pdf).






          share|improve this answer

















          • 1




            That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
            – user6464
            Nov 25 at 0:22














          12












          12








          12






          There were multiple ways of protecting the program, including:





          • order of line numbers could be altered to produce:




            • circular listings;

            • missing lines;

            • out-of-order lines;

            • out-of-bounds addressing;



          • the "resume" flag could be set such that any command could cause the program to run again;


          • the start-address for the program could be altered so that another (or none) listing would show;

          • line-linking could be altered to run "unreachable" lines;

          • the DOS interpreter accepts special characters so that slot code can be run ("PR#6" being the most common, but "DELETE HELLO" works equally well).
            This sounds like what you were seeing.

          • the code could be self-modifying as it ran.


          There was also a modification to the KBDIN routine to point to the reset routine, so that if you achieved a prompt and tried to type something, the machine would reboot.



          For a more detailed description, see section 7.20 in "A Brief Description of Some Popular Copy-Protection Techniques on the Apple ][ Platform" (http://pferrie.host22.com/papers/apple2_prot.pdf).






          share|improve this answer












          There were multiple ways of protecting the program, including:





          • order of line numbers could be altered to produce:




            • circular listings;

            • missing lines;

            • out-of-order lines;

            • out-of-bounds addressing;



          • the "resume" flag could be set such that any command could cause the program to run again;


          • the start-address for the program could be altered so that another (or none) listing would show;

          • line-linking could be altered to run "unreachable" lines;

          • the DOS interpreter accepts special characters so that slot code can be run ("PR#6" being the most common, but "DELETE HELLO" works equally well).
            This sounds like what you were seeing.

          • the code could be self-modifying as it ran.


          There was also a modification to the KBDIN routine to point to the reset routine, so that if you achieved a prompt and tried to type something, the machine would reboot.



          For a more detailed description, see section 7.20 in "A Brief Description of Some Popular Copy-Protection Techniques on the Apple ][ Platform" (http://pferrie.host22.com/papers/apple2_prot.pdf).







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 24 at 2:52









          peter ferrie

          4562516




          4562516








          • 1




            That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
            – user6464
            Nov 25 at 0:22














          • 1




            That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
            – user6464
            Nov 25 at 0:22








          1




          1




          That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
          – user6464
          Nov 25 at 0:22




          That's an impressive PDF by the way. I've only just finished reading it and it brought back some fond memories of some of the games :-)
          – user6464
          Nov 25 at 0:22


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Retrocomputing Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fretrocomputing.stackexchange.com%2fquestions%2f8364%2fhow-did-apple-basic-programs-protect-against-listing%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Plaza Victoria

          In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

          How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...