home *** CD-ROM | disk | FTP | other *** search
/ Software 2000 / Software 2000 Volume 1 (Disc 2 of 2).iso / demos / d008.dms / in.adf / Lock.AMOS / Lock.amosSourceCode
Encoding:
AMOS Source Code  |  1991-02-11  |  1.9 KB  |  73 lines

  1. '----------------------------------------------------------------------------
  2. '
  3. ' AMOS Procedure Locker, by Francois Lionet. AMOS 1.2 and over ONLY! 
  4. '
  5. '----------------------------------------------------------------------------
  6. '
  7. '    To use, load this program as an accessory. Load your program in editor, 
  8. ' then call this program. It will lock all CLOSED procedures.  
  9. '    They will be definitively LOCKED! So be very carefull to have a 
  10. ' backup!  
  11. '
  12. '    Note to all hackers! I offer a bottle of good French champagne to the 
  13. ' first one who sends to Mandarin this program unlocked AND a program that 
  14. ' unlocks any AMOS program. Have fun discovering how I did it! Niark niark!  
  15. '
  16. '    AMOS 1.1 users: do NOT open a locked procedure!!!!! It will crash the   
  17. ' computer!
  18. '  
  19. '    PS: yes, of course, the procedure that locks the procedures is locked 
  20. ' by itself. Wicked izn't it?!?    
  21. '
  22. '----------------------------------------------------------------------------
  23. '
  24. Default Palette 0,0,$FFF,0
  25. Screen Open 7,640,72,4,Hires : Curs Off 
  26. Screen Display 7,,100,,
  27. Centre At(,2)+Border$("   AMOS Procedures locker   ",1)
  28. Locate 0,5
  29. '
  30. If Areg(3)=0
  31.    Centre "Sorry! I only work with AMOS 1.2 and over!"
  32.    BYEBYE
  33. End If 
  34. '
  35. If Dreg(0)=0
  36.    Centre "You must call me as an accessory!"
  37.    BYEBYE
  38. End If 
  39. '
  40. LOCKIT
  41. BYEBYE
  42. '
  43. Procedure LOCKIT
  44.    AD=Areg(3)
  45.    TKPROC=$376
  46.    Do 
  47.       L=Peek(AD)*2
  48.       Exit If L=0
  49.       If Deek(AD+2)=TKPROC
  50.          P=Deek(AD+10)
  51.          If Btst(15,P)
  52.             Bset 14,P
  53.             P=(P and $FF00)+Rnd(254)+1
  54.             Doke AD+10,P
  55.             Inc TT
  56.          End If 
  57.       End If 
  58.       AD=AD+L
  59.    Loop 
  60.    If TT
  61.       A$="I have locked"+Str$(TT)+" procedure"
  62.       If TT>1 : A$=A$+"s" : End If 
  63.       A$=A$+"."
  64.    Else 
  65.       A$="No procedures to lock!"
  66.    End If 
  67.    Centre A$
  68. End Proc
  69. Procedure BYEBYE
  70.    Print : Print 
  71.    Centre "Press any key"
  72.    Wait Key : Screen Close 7 : Edit 
  73. End Proc