swab.S revision 1.3
11.1Smycroft#include "DEFS.h" 21.1Smycroft 31.1SmycroftENTRY(swab) 41.3Smycroft movl sp@(4),a0 | source 51.3Smycroft movl sp@(8),a1 | destination 61.3Smycroft movl sp@(12),d0 | count 71.3Smycroft lsrl #1,d0 | count is in bytes; we need words 81.3Smycroft beq swdone 91.1Smycroft 101.1Smycroftswloop: 111.1Smycroft movw a0@+,d1 121.1Smycroft rorw #8,d1 131.1Smycroft movw d1,a1@+ 141.1Smycroft subql #1,d0 151.3Smycroft bne swloop 161.1Smycroft 171.1Smycroftswdone: 181.1Smycroft rts 19