Re: A86: arg... sqrtKEY again...


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

Re: A86: arg... sqrtKEY again...




ive done this before
rst 10h					;move to OP1
rst 20h					;_findsym

you have them backwards

rst 20h is _mov10toop1
rst 10h is _findsym

thats all just change them :)

Ricky Cobb
arcadesdude@hotmail.com
icq# 41440378

>From: Cassady Roop <croop@oregontrail.net>
>Reply-To: assembly-86@lists.ticalc.org
>To: "assembly-86@lists.ticalc.org" <assembly-86@lists.ticalc.org>
>Subject: A86: arg... sqrtKEY again...
>Date: Fri, 12 Nov 1999 17:11:25 -0800
>
>
>The following code should copy three bytes from the sixth byte of the
>sqrtKEY program variable to a location called id_tag_copy.  Once there,
>the three bytes are tested to see if they are appropriate values.  My
>problem is that the bytes never get copied; after the 'rst 20h', I check
>to see if the var even exists;  if it doesn't, it jumps to a routine
>called memlock_compromised.  THIS ALWAYS HAPPENS.  The emulator tells me
>there is a var called (sqrt)KEY, but _findsym apparently returns saying
>it doesn't exist.  Now, what's REALLY spooky, is that I changed the 'jr
>c,...' to 'jr nc,...' in case I had the _findsym output backwards in my
>head.  IT STILL MADE THE JUMP.  HOW?  WHY?  No matter what I do, it
>alwasy makes that jump, according to the emulator.  The bytes never get
>copied.  Can someone point out the probably obvious error I have made?
>
>Cassady Roop
>
>
>ld hl, $5A92				;name of sqrtkey program
>rst 10h					;move to OP1
>rst 20h					;_findsym
>jr c, memlock_compromised	;if carry, then sqrtKEY doesn't exist.
>ld hl, $0006       	 ;adjust for the asm marker & size word, and jr
>instruction
>xor a				;adding two 24-bit values
>add hl,de 			;add offset
>adc a,b				;incase it went off a RAM page
>call _SET_ABS_SRC_ADDR
>xor a
>ld hl, id_tag_copy		;copy to a temp location
>call _SET_ABS_DEST_ADDR
>ld bc, $0003
>call _SET_MM_NUM_BYTES
>call _mm_ldir
>ld hl, id_tag_copy
>ld a, (hl)			;take a look at the id tag we ripped off the sqrtKEY
>program
>cp 'L'				;id tag of 'LDN' identifies it as lockdown's memlock module
>jr nz, memlock_compromised	;if not L, then it was deleted by another
>prog
>inc hl
>ld a, (hl)
>cp 'D'
>jr nz, memlock_compromised
>inc hl
>ld a, (hl)
>cp 'N'
>jr nz, memlock_compromised
>

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