Re: A82: 1 Problem first....


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

Re: A82: 1 Problem first....




In a message dated 98-02-10 22:10:16 EST, you write:

> As you know, or don't know, I am now porting Pong 83z to the 82. I have 
>  it about half ported now, and it can be done by next Monday. But I only 
>  have 1 problem that somebody here might be able to help me with. The 
>  game uses
>  jp P   and
>  jp M   ;you know plus/minus jump tests
>  Since I use a MAC and CAZ does not support P and M, I must find an 
>  alternative. What do u suggest? Will C and NC work?
>  I do know of a way around this, but it will add about 100 bytes of code 
>  to the game, and it may slow it down a bit. So, I need an easy and fast 
>  way to do these tests but not use P or M.
>  Example
>  ld a,(variable)
>  cp 4
>  jp P,wherever
>  
>  How can I change the above?!? There are many more instances of this, 
>  this is just one example. Thanks for your help.
>  *MATT STACK*-->Is there a way to use P and M with CAZ at all??????
>  Ilya
>  -- 
>        
>  Ilya -- mailto:ilyamojo@geocities.com
>  TI-Philes Staff (Links and FAQ)

I used P (or was it M?) in SameGame's random routine.  I'm not sure how to use
it with a cp on top, but if you did a subtraction problem (example below) it
is very useful:

loop:
sub 5
jp p, loop

which would keep looping until a is less than zero.  without p, you could use
the following:

loop:
sub 5
or a
jr c, loop

which presents an intesting problem in my mind (which led to the discovery and
use of p in SameGame) would or a (or cp 0?) set the carry flag, ever?  No.
The simplest solution I can see is below:

loop:
sub 5
cp 1
jr c, loop
or a
jr z, loop

which will continue the loop until a no longer is zero (or positive, for that
matter).
Another solution: get some sort of DOS emu and use TASM ;-) (no flame wars
please)

~Adamman


Follow-Ups: