Jump to content
IGNORED

Fast divide by seven?


brpocock

Recommended Posts

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 by ClausB
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...