[A83] Re: finding the absolute value of hl
[Prev][Next][Index][Thread]
[A83] Re: finding the absolute value of hl
Augh!!!!!
I have gone back and forth through nearly a thousand lines of code for a
week trying to fix this stupid bug, and that was my problem?!?! I
rewrote a fifty line block six times, and every time I repeated that same
error!! I feel so stupid!!! But, come to think of it, there is nothing
new about that. This helps everything!! At the very least, while
seeking the exterminate this bug, I found some others that had not yet
began to reek havoc. I suppose that this in not as bad as the time that
put a semicolon at the end of a for command in a c++ program. I can
laugh at that now, but at the time my feelings were beyond words. I just
sat there and stared at the computer screen for five minuets, then I
compiled the code, and watched my OpenGL particle engine spit out sparks
for another ten minuets. No, this is not half as bad... Thank you very
much!!!
On Mon, 04 Aug 2003 17:12:49 +0100 "Patai Gergely"
<patai_gergely@fastmail.fm> writes:
> > bit 7,h
> > jp z,HL_Is_Positive
> > ex hl,de
> > or a
> > ld hl,0000h
> > sbc hl,de
> > ex hl,de
> > HL_Is_Positive:
> >
> > I cannot see anything wrong, but I am fighting with this
> horrendous bug,
> > and I am becoming desperate!
> >
> You shouldn't exchange hl and de in the end. BTW if you want to
> preserve
> de, you can use this code to negate hl (destroys the accumulator,
> but
> it's usually less of a problem):
>
> ld a,l
> cpl
> ld l,a
> ld a,h
> cpl
> ld h,a
> inc hl
>
> --
> http://www.fastmail.fm - I mean, what is it about a decent email
> service?
>
>
>
________________________________________________________________
The best thing to hit the internet in years - Juno SpeedBand!
Surf the web up to FIVE TIMES FASTER!
Only $14.95/ month - visit www.juno.com to sign up today!
Follow-Ups: