MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Pages: 1

Fr45h3r
MAME Fan
Reged: 05/25/10
Posts: 1
Send PM


CMPA instruction M6809 CPU
#222852 - 05/25/10 02:41 PM


Hi All,
I'm just working on a driver and i've come across an instruction that doesn't work how i'm expecting it too. (apologies if this is something simple)

The instruction is CMPA #$32

If the value in A is < 0x31, the flags Negative and carry are set (expected)
If the value in A is 32, the zero flag is set.
Between 33 and 7F , no flags are set, the next instruction (BGE) is executed as expected
However, between 80 and B1, the Overflow flag is set, and values between B2 and FF has the negative flag is set (no carry)
What i'm seeing, is any value of A above 7F does not jump to the address in the BGE instruction.

Is anyone able to shed some light on this ?

Thanks in advance
-rob


Pages: 1

MAMEWorld >> Programming
View all threads Index   Threaded Mode Threaded  

Extra information Permissions
Moderator:  Pi 
0 registered and 110 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 2828