Re: A83: Protection XOR prog


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

Re: A83: Protection XOR prog




'Ans' can never be a program.
Squish expects ans to contain a string which is the
name of a program.
'chkfindsym' looks at the type of var to look up,
if it's a program then it searches a different symbol
table than if it's any other type of var. If the type is not
set to be prog or protprog in OP1 then chkfindsym will not find 
the var. Findsym should only be used to look up nn program 
vars.

 

Later,
Pat

------------------
Original text

From: "Revenant" <revenant_1@hotmail.com>, on 8/18/98 6:30 AM:

Ya, It should be _chkfindsym Does anybody know the difference? All know 
is that I have gotten the one to work in programs I have made.

Revenant

> Ya my program was pretty confusing to me when I wrote it but I got it
>done finally.  
>(Stuff in inside)
>
>>
>>
>>This program was designed to change whatever 
>>protection mode a program
>>has to it's opposite (protected->normal and vise 
>>versa).  Could someone
>>tell me what's wrong with it?
>>
>>BTW: Sorry Jimmy, your prog takes up way too much 
>>space for such a small
>>task .  I trried to see if I could learn something 
>>from your source, but
>>it is confusing :  (
>>
>>--Thanks
>>
>>.NOLIST
>>#include "master_m.inc"
>
>  You are the first person I've seen with there own
>  include file that they didn't change the names around
>  ex.. in mine _zerooop1 is _01
>
>>.LIST
>>
>>.org $9327
>>
>>
>>        call    _zeroop1        ; 0->op1
>>        ld      a,tans          ; load A with Ans
>>        ld      (op1+1),a       ; load byte after
>>start of op1 with Ans
>>        call    _findsym        ; look for prog
>
>
>  Shouldn't this be _chkfindsym??
>  I don't know for sure.
>
>
>>        jp      c,_errundefined ; error if not there
>>        ld      a,(hl)          ; load A with obj #>
>>        and     %00011111       ; Required bit mask
>>        inc     a               ; A+1->A
>>        cp      PROTPROGOBJ     ; is it protected now?
>>        jp      z,DoneAdding    ; then it's done
>>        ld      a,PROGOBJ       ; or else it will be 
>>normal
>>DoneAdding:
>>
>>        ld      (hl),a          ; load HL with new obj 
>>        call    clrLCDfull      ; clear screen
>>        call    _homeup         ; goto upper left 
>>        ld      hl,Title        ; point HL to string
>>        call    _puts           ; display string
>>        ld      hl,10*256+23    ; load pencol/penrow >#'s to HL
>>        ld      (PENCOL),hl     ; store to >pencol/penrow
>>        ld      hl,Author       ; point HL to string
>>        call    _vputs          ; display string
>>        ret
>>Title:
>> .db "    ZXORPROT    ",0
>>Author:
>> .db "By Mastermind",0
>>.end
>>.end
>
>
>_________________________________________________________
>DO YOU YAHOO!?
>Get your free @yahoo.com address at http://mail.yahoo.com
>
>



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


Follow-Ups: References: