Re: A83: op commands


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

Re: A83: op commands




It's the equivalent of cp b which essentially subtracts b from a without 
storing the result.  All the flags are set as if it was a "real" cp opcode.

 call _cpop1op2
And then you can do any of these:
 jr z,op1_equals_op2
 jr nz,op1_notequalto_op2
 jr c,op1_lessthan_op2
 jr nc,op1_greaterthanorequalto_op2

In a message dated 2/12/00 4:00:12 AM Eastern Standard Time, 
JakeGuilbo@home.com writes:

> Well...after like 3 years of blandly staring at ASM tutorials, I think I
>  have found the light!  I would like to thank James Matthews for his
>  wonderfull, WONDERFULL Asm guru guide!  That thing is soooooo awesome!
>  
>  I do have a question though....
>  
>  How can/do I use the romcall _cpop1op2?
>  
>  What I mean is how exactly does that compare the OP values?  Does it
>  subtract op2 from op1 or what?  The TI ASM information says:
>  
>  ;  _CPOP1OP2 : COMPARE SIGNED FLOATING POINT OP1 & OP2   |
>  ;                                                        |
>  ;              - OP1 & OP2 ARE KEPT INTACT               |
>  ;                                                        |
>  ;   INPUT : OP1, OP2 = FLOATING POINT #'S                |
>  ;   OUTPUT : CA SET : OP1 < OP2                          |
>  ;            CA NOT SET : OP1 >= OP2                     |
>  ;            ZERO SET : OP1 = OP2                        |
>  ;---------------------------------------------------------
>  
>  What does CA SET/CA NOT SET mean?  The reason I ask is I need to do a loop
>  with these Op codes and I get the wrong result if i have:
>  
>      call _cpop1op2
>      jp nz,loop
>  
>  While I'm pretty sure Im saying, "Subtract Op2 from Op1.  If the result is
>  not zero, go to loop."  Am i F.O.S.???



----
Jonah Cohen
<ComAsYuAre@aol.com>
http://linux.hypnotic.org/~jonah/