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


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

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



No, the problem was that I was jumping on condition of a carry, which is
an output of _findsym.  But I had a brain fart and mixed up 10h and 20h
so the carry flag was messed with, and so it jumped, even though I
didn't want it to.

I FINALLY got the entire memLock module of Lockdown to work, so I'll now
release it;  version 1.3 had a memLock, but I recalled it from ticalc
when I realized it had an insidious calc-killing bug in it.  The new
version is 1.4, and hopefully will work just fine, but I would
appreciate it if people would test it and report any bugs.  If there are
no bugs reported by tomorrow morning (it is ~8:30 PM here right now),
I'll submit it to the ticalc archives.  Hopefully this won't get a
recall :)

Cassady Roop

Jeanne9005@aol.com wrote:
> 
> Could it possibly that you make the jump 4 times?  One of them most likely
> ends up there, even without the three bytes to test with...
> 
> Glen
> tutorial1.cjb.net
> 
> In a message dated 11/12/99 8:15:58 PM Eastern Standard Time,
> croop@oregontrail.net writes:
> 
> >
> >  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
> >
> 
> Glen
> tutorial1.cjb.net
Warning
Could not process part with given Content-Type: application/x-zip-compressed; name="lockdown.zip"

References: