MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

Fr45h3r
MAME Fan
Reged: 05/25/10
Posts: 1
Send PM
CMPA instruction M6809 CPU
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







Entire thread
Subject Posted by Posted on
* CMPA instruction M6809 CPU Fr45h3r 05/25/10 02:41 PM

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