1#include "DEFS.h" 2 3ENTRY(swab) 4 movl sp@(4),a0 | source 5 movl sp@(8),a1 | destination 6 movl sp@(12),d0 | count 7 lsrl #1,d0 | count is in bytes; we need words 8 beq swdone 9 10swloop: 11 movw a0@+,d1 12 rorw #8,d1 13 movw d1,a1@+ 14 subql #1,d0 15 bne swloop 16 17swdone: 18 rts 19