Bryan Posted April 20, 2004 Share Posted April 20, 2004 But the links that have been posted are already correct: Quote Link to comment Share on other sites More sharing options...
Cybergoth Posted April 20, 2004 Share Posted April 20, 2004 Hi there! But the links that have been posted are already correct: That's what I meant when I was repeating Eriks quote Greetings, Manuel Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 20, 2004 Share Posted April 20, 2004 Hm, I suppose I shouldn't post while being on a Java training. Quote Link to comment Share on other sites More sharing options...
Nukey Shay Posted April 20, 2004 Share Posted April 20, 2004 Turns out I was wrong about my earlier post...as I could only find LDA-BPL/BMI combos in that other program. But just as a test, I'd altered Adventure's routine... ;original LDA Jstick ;Get joystick record. AND #$C0 ;Merge out previous presses. CMP #$40 ;Was it previously pressed? BNE PickupPutdown_2 ;If not branch. ;works BIT Jstick BVS PickupPutdown_2 ;fails LDA Jstick AND #$40 BVS PickupPutdown_2 ;fails LDA Jstick AND #$40 CMP #$40 BVS PickupPutdown_2 Quote Link to comment Share on other sites More sharing options...
ErikM Posted April 20, 2004 Share Posted April 20, 2004 I wonder if there might be different behavior in different versions of the 6502 architecture? I know the 65C02 has additional instructions and addressing modes that the 6502 and 6507 don't. Perhaps later versions of the chip do update the V flag on a compare instruction...? Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted April 20, 2004 Share Posted April 20, 2004 Perhaps later versions of the chip do update the V flag on a compare instruction...? I don't know, but I suppose not, else that would have broken backward compatibility for legal (or documented) opcodes. Quote Link to comment Share on other sites More sharing options...
EricBall Posted April 21, 2004 Share Posted April 21, 2004 Sorry, I was wrong about the Compare instructions. (I've modified my post.) I assumed that since CMP is so close to SBC that it would also affect the oVerflow flag (and didn't check my own refs ). Wierd. I wonder why the designers decided to explicitly exclude it. Maybe there is a well known routine which needs that behaviour. Sorry Erik, we were both wrong. Quote Link to comment Share on other sites More sharing options...
Bryan Posted April 21, 2004 Share Posted April 21, 2004 I think the reason CMP's are excluded is because the purpose of V is to guarantee accuracy when doing extended calculations with signed numbers. Since CMP doesn't affect any values, V wasn't deemed necessary. -Bry Quote Link to comment Share on other sites More sharing options...
EricBall Posted April 22, 2004 Share Posted April 22, 2004 I think the reason CMP's are excluded is because the purpose of V is to guarantee accuracy when doing extended calculations with signed numbers. Since CMP doesn't affect any values, V wasn't deemed necessary. My point is it probably required extra transistors for CMx to not update V, and all indications are the 6502 design team didn't waste transistors without a good reason. Quote Link to comment Share on other sites More sharing options...
Bryan Posted April 22, 2004 Share Posted April 22, 2004 It's probably part of the same logic that suppresses the result from being written to A. -Bry Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.