A83: Re: RE: Edit-locking


[Prev][Next][Index][Thread]

A83: Re: RE: Edit-locking




After creating a program, do this to edit lock a program

call _chkfindsym
ld (hl),6

This code assumes that you just made the program so its name is still stored
in op1.

Joe Wingbermuehle
http://www.usmo.com/~joewing/

-----Original Message-----
From: Evil Sam <evil_sam@hotmail.com>
To: assembly-83@lists.ticalc.org <assembly-83@lists.ticalc.org>
Date: Friday, October 30, 1998 4:45 PM
Subject: A83: RE: Edit-locking


>
>>... 3 words: read mathews tutorials...
>
>  4 words: Enough about the tutorials. Any ASM question asked on this
>list gets that response. Rather boring, no wonder that Linus guy left.
>
>
>   I read his tutorial before sending my post and got this out of it:
>
>If I take out the "all program" stuff from his tutorial:
>
>  ld hl,NameProg
>  rst 20h
>  call _chkfindsym  ;just this prog not Progptr
>
>  ld a, (hl) ;Get type.
>  and %00011111 ;Mask out
>
>  ld   a,06h ;Load protected.
>  ld   (hl),a ;Change it!
>
>skip1:
>  dec hl ;Past T
>  dec hl ;Past DAL
>  dec hl ;Past DAH
>  ld b, (hl) ;To the size!
>skip2:
>  dec hl
>  djnz skip2
>  ret
>
>
>
>   It works, but my real question is how do I make a lock-protected
>program without doing all that crap after the program is made. Why can't
>I simply set the prog type to 6 when it is created? That won't work

>    Sam
>
>______________________________________________________
>Get Your Private, Free Email at http://www.hotmail.com
>