swab.S revision 1.5
11.5Sjtc/* $NetBSD: swab.S,v 1.5 1997/01/04 03:21:20 jtc Exp $ */ 21.4Sthorpej 31.1Smycroft#include "DEFS.h" 41.1Smycroft 51.1SmycroftENTRY(swab) 61.3Smycroft movl sp@(4),a0 | source 71.3Smycroft movl sp@(8),a1 | destination 81.3Smycroft movl sp@(12),d0 | count 91.3Smycroft lsrl #1,d0 | count is in bytes; we need words 101.5Sjtc jeq swdone 111.1Smycroft 121.1Smycroftswloop: 131.1Smycroft movw a0@+,d1 141.1Smycroft rorw #8,d1 151.1Smycroft movw d1,a1@+ 161.1Smycroft subql #1,d0 171.5Sjtc jne swloop 181.1Smycroft 191.1Smycroftswdone: 201.1Smycroft rts 21