LZ-Adv: Returning to Zshell from programs and checksums
[Prev][Next][Index][Thread]
LZ-Adv: Returning to Zshell from programs and checksums
-
Subject: LZ-Adv: Returning to Zshell from programs and checksums
-
From: Mark and/or Esmeralda Lybrand <maryesme@3-cities.com>
-
Date: Sat, 16 Nov 1996 19:00:55 -0800
-
In-Reply-To: <>
Howdy all!
First, let me again thank you for helping me out with my last spot of
code. I learned a valuable lesson about the difference between "call"
and "CALL_()" (BTW: the first calls an address and the second calls a
relative address.) That did, of course make my CALL_(GET_KEY) jump
somewhere scary.
I was working on some more code to look up values in the VAT. I was
having problems because my HL values were changing, so I pushed them.
Then, I was able to scroll through memory at my leisure looking at the
values there. But, when I tried to exit back to Zshell the calc crashed.
I hacked away some more (not wanting to have you guys find all my bugs)
and made and exit routine to pop HL back out before returning. Now the
code works fine. However, this brings up my question: What registers
(such as HL) are used when returning to Zshell? Or is there something
else behind this problem?
One final question: the compiler.85p program from Cliff Liang uses the
equation: "sum B-FD and FF/_>/B(dimL B)" to put the checksum into the
85s for Zshell. I understand that this adds all the values of the
program together, subtracts FD from them and then masks the value to get
only the LSB portion of the value. How was this formula arrived at and
how does Z80/Zshell use this checksum?
TIA
Mark. :)
<pre>
--
"No hay mal que por bien no venga"
- Spanish proverb
Mark and Esmeralda Lybrand
1330 West 10th Avenue #51
Kennewick WA 99336-6070
USA
Tel: (509) 586-1807
</pre>