Posted By

Zufolek on 11/01/09


Tagged


Versions (?)

6502 Subroutine To Return a Power of 2


 / Published in: Assembler
 

  1. ;returns power of 2 for arg in accumulator
  2. pow2
  3. tax
  4. lda Pow2Tab,x
  5. rts
  6.  
  7. Pow2Tab
  8. .byte 1
  9. .byte 2
  10. .byte 4
  11. .byte 8
  12. .byte 16
  13. .byte 32
  14. .byte 64
  15. .byte 128

Report this snippet  

You need to login to post a comment.