On 17 Jan 2007, at 10:17, Malcolm Lear wrote:
>
> Is this normal behavior for a 68K processor. I'm doing a word
> comparison
> between a memory location and a data register. It seems that data
> in the
> most significant word of the register is effecting the result. In the
> example
> below the test ends up at notequal. Unfortunately I've not got
> access to
> a real CPU to try this on (only QPC).
>
> Malcolm
>
>
> start move.l #$ffff0000,d0
> lea test,a4
> cmp.w (a4),d0
> beq.s equal
> bra.s notequal
> test dc.w 0
> equal nop
> notequal nop
This works absolutely as expected on both a Q60 and QPC2 (latest
version). That is, the branch does go to "equal". I assume you used
QMON or whatever to step through the program else you can't see what
is happening.
(Why don't you use
cmp.w test,d0
instead of
lea test,a4
cmp.w (a4),d0
??)
George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm