Re: A86: ASM Converter from 85->86
[Prev][Next][Index][Thread]
Re: A86: ASM Converter from 85->86
>> to adjust the coordinates without affecting line direction. To fix the
>> problem, I'm going to have to move the viewable screen area to the middle
>> of the coordinate system so that the routine can accurately calculate the
>> distances. So, the screen system for the new game would go from (63, 127)
>> to (191, 63). Anybody know of a better way to do this?
>
>Have you thought about using signed comparisons? Rather than using "jr
>nc" and "jr c" you use "jr p" and "jr m". Your 8-bit numbers range from
>-128 to 127, which is just what you need for the LCD.
>
>Have I answered your question? I have a nagging feeling that I'm missing
>something important.
Signed comparisons only work with "jp CC", not "jr CC". The other thing
you're forgetting is that the routine is not my code, so I can't really
change it beyond the necessary translation. Signed comparisons would have
to be done in the code itself, and then they are better accomplished as
"bit 7, r \ jr Z, NN", because the comparisons would require another
instruction in front of them. In any case, there has to be some way of
making -1 less than 0 without storing/recalling the Carry Flag.
James Yopp
jyopp@pobox.com
"Time is the fire in which we burn."
Follow-Ups: