Advertisement
FireRat_Genesis

S1 to S2 ...ed (68k)

Aug 5th, 2016
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Input:
  2. ;
  3. ; d7 = ((szChunkTable)/2)-1
  4. ; a0 = Source address
  5. ; a1 = Destination address
  6.  
  7. Convert:
  8. @loop:
  9.         move.b  (a0)+,d0
  10.  
  11.         move.b  d0,d1
  12.         move.b  d0,d2
  13.         move.b  d0,d3
  14.         move.b  d0,d4
  15.         move.b  d0,d5
  16.  
  17.         andi.b  #%00000011,d1
  18.         andi.b  #%00011000,d2
  19.         andi.b  #%01100000,d3
  20.         andi.b  #%10000000,d4
  21.         andi.b  #%00000100,d5
  22.  
  23.  
  24.         lsr.b   #1,d2
  25.         lsr.b   #1,d3
  26.         lsl.b   #4,d5
  27.  
  28.  
  29.         moveq   #0,d6
  30.         or.b    d1,d6
  31.         or.b    d2,d6
  32.         or.b    d3,d6
  33.         or.b    d4,d6
  34.         or.b    d5,d6
  35.  
  36.         move.b  d6,(a1)+
  37.         move.b  (a0)+,(a1)+
  38.         dbf d7,@loop
  39.         stop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement