Re: A83: Comparing strings


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

Re: A83: Comparing strings




On 21-May-99, you wrote:


> Hi everybody,  (hi Doctor Nick)
>         I'm just wondering, if I wanted to compare two strings, each 3 
> characters in length, could I put them into Op1 and Op2 and call the routine 
> _cpop1op2? This should work wouldn't it?

> James Vernon
> jimbob_v@hotmail.com

Don't assume that _cpop1op2 compares the actual 11 bytes in op1 and op2. All
it's supposed to do is compare two floating point numbers. Try to do
something with the cpi or cpir instruction. Isn't there a strcmp rom call
somewhere? (Not sure however.)

Linus
-- 
                                                           wwww 
                                                          (o)(O)
.-->                                           .-------mm--(__)--mm--------.
| Linus Akesson                                | http://linusworld.cjb.net |
`---------------^-- ----- --- --  -- -  -   -  `---------ooO--Ooo----------'
               Sometimes you just gotta say "What the fuck!"



References: