Posted By


gfazioli on 09/14/09

Tagged


Statistics


Viewed 145 times
Favorited by 0 user(s)

ValueToStringBin


/ Published in: Assembler
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ***************************************************************************************
  2. * (20-Feb-1995) --- ValueToStringBin(buffer, value, optlen) (a0,d0,d1)
  3. ***************************************************************************************
  4. _LVOValueToStringBin
  5. movem.l d0/a0,-(sp)
  6. tst.l d1
  7. bne.s ConvBin_NoDefault
  8. moveq #32,d1
  9. ConvBin_NoDefault
  10. andi.w #$FF,d1
  11. subq.b #1,d1
  12. moveq #"0",d2
  13. ConvBin_Loop
  14. btst d1,(sp) * Fast Code
  15. beq.s ConvBin_Zero
  16. moveq #"1",d2
  17. ConvBin_Zero
  18. move.b d2,(a0)+
  19. moveq #"0",d2
  20. dbf d1,ConvBin_Loop
  21. ConvBin_Exit
  22. movem.l (sp)+,d0/a0
  23. rts

URL: http://www.undolog.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.