Posted By

gfazioli on 09/14/09


Tagged

Motorola 680x0 Amiga


Versions (?)

ValueToStringBin


 / Published in: Assembler
 

URL: http://www.undolog.com

  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

Report this snippet  

You need to login to post a comment.