ClausB Posted February 9, 2013 Share Posted February 9, 2013 (edited) But one of the best uses I have ever seen for ADC #0 is swapping nybbles. ;SwapNybblesRoutine ;state of carry doesn't matter before hand, ;carry is always clear afterward, and the nybbles are swapped. asl ; 2 adc #0 ; 2 asl ; 2 adc #0 ; 2 asl ; 2 adc #0 ; 2 asl ; 2 adc #0 ; 2 This same nybble swapper is in an early Decuir cart as part of his CHRST routine: http://www.atariage....t/#entry2533650 He must have used it a lot since he calls it with BRK instead of JSR. Oh, and, nice work on those divide routines! Edited February 9, 2013 by ClausB Quote Link to comment Share on other sites More sharing options...
bogax Posted February 9, 2013 Share Posted February 9, 2013 This same nybble swapper is in an early Decuir cart as part of his CHRST routine: http://www.atariage....t/#entry2533650 He must have used it a lot since he calls it with BRK instead of JSR. Oh, and, nice work on those divide routines! asl adc #$80 rol asl adc #$80 rol Quote Link to comment Share on other sites More sharing options...
ClausB Posted February 10, 2013 Share Posted February 10, 2013 Nice! But that's not what Decuir did. 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.