문제

If I've loaded a value into register X and one into register Y, and I want to compare them... usually I have to do something like:

ldx value_1
ldy value_2
pshy
cpx 0,sp
ins

But that's 3 operations for the compare. Is there not a way to do this directly? I've tried cmp 0,y and cmp y, but those don't do what I want.

Is this just something I'll have to live with?

Thanks,

z.

도움이 되었습니까?

해결책

For X and Y, I think yes, you have to load them first.

If you can use A and B though, you might be able to use SBA. That would subtract the contents of B from A, setting your zero and other flags just like in a comparison.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top