Heaven/TQA Posted December 28, 2006 Share Posted December 28, 2006 Guys, if i do some div 2 calculation of different variables. do i have to set a CLC in front of each LSR or does LSR automaticly reseting the carry bit? assume something like that lda var10 lsr sta var2 lda var20 lsr sta var3 ... Quote Link to comment Share on other sites More sharing options...
Thomas Jentzsch Posted December 28, 2006 Share Posted December 28, 2006 LSR (and ASL) don't shift the carry into, ROR (and ROL) do. Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted December 28, 2006 Share Posted December 28, 2006 LSR doesn't write the carry to bit 7, ROR does. LSR: LSR: -byte - 0->76543210->C ROR: -byte - C->76543210->C So a CLC in front of a LSR is not necessary. Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted December 28, 2006 Author Share Posted December 28, 2006 excellent... thanks for quick help! 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.