struct StringsBase *StringsBase=0L; /*#define RUN*/ #ifdef RUN long StrCpy(t,s) register char *t; register char *s; { while(*t++=*s++); }; /* strcpy $VER 0.1 */ #endif int main() { /* MAIN */ long el=0; char s[256],*p; StringsBase=(struct StringsBase *)OpenLibrary("Strings.library",0); StrCpy(s,"testing strcpy"); printf(" <%s>\n",s); if(StringsBase) CloseLibrary(StringsBase); return el; } /* END */ /* _StrCpy: ;long StrCpy(t,s) char *t; char *s; { ; while(*t++=*s++); ; }; link a5,#0 L3: move.l 12(a5),a0 addq.l #1,12(a5) move.l 8(a5),a1 addq.l #1,8(a5) move.b (a0),(a1) bne L3 unlk a5 rts _StrCpy: ; long StrCpy(t,s) register char *t; register char *s; { link a5,#0 movem.l a2-a3,-(sp) move.l 8(a5),a2 move.l 12(a5),a3 L3: move.l a2,d0 addq.l #1,a2 move.l d0,a1 move.b (a3)+,(a1) bne L3 movem.l (sp)+,a2-a3 unlk a5 rts ;libraryfunction _StrCpy: move.l A0,D0 beq .strcpyend .strcpyl move.b (a1)+,(a0)+ bne .strcpyl .strcpyend RTS */