struct StringsBase *StringsBase=0L; /*#define RUN*/ #ifdef RUN long StrRv(s) register char *s; { register char *sp=s,c; if(*s) { do ; while(*sp++); sp--; sp--; do { c=*s; *s=*sp; *sp=c; s++; sp--; } while (s = ",s); StrRv(s); printf("<%s>\n",s); return el; } /* END */ #ifdef COMMENT _StrRv: move.l A0,A1 moveq.l #0,d0 cmp.l #(0),a0 beq strrvend tst.b (A0) beq strrvend strrvloop: cmp.b #(0),(A1)+ bne strrvloop subq.l #$02,A1 strrvwhile: move.b (A0),D0 move.b (A1),(A0)+ move.b D0,(A1) subq.l #$01,A1 cmp.l A0,A1 bhi strrvwhile moveq.l #1,D0 strrvend: RTS testStrRv = vRrtStset string = gnirts abc = cba ab = ba a = a <> = <> #endif