struct        StringsBase     *StringsBase=0L;

#define RUN
#ifdef RUN

char StrRot(s) register char *s;  {    /*  */
  register char *pt=s,c=*pt++;
  if(c) { do { }  while(*s++=*pt++); *--s=c; }
  return c;
 };                                             /* $VER: StrRot  mrz06 0.2 */

#endif

int main() {                                                     /* MAIN */
  long el=0,il,l=11; char s[1024],as[1024]; el--;
  StringsBase=(struct StringsBase *)OpenLibrary("Strings.library",0);
  if(StringsBase) {
   StrCpy(as,"Dies ist ein Teststring von StrRot");  StrCpy(s,as);
   printf("testing <%s> \n",s);
   for(il=1; il<8; il++) {
    StrRot(as); printf(" <%s> \n",as);
   }
   CloseLibrary(StringsBase);
  }
  return el;
 }                                                             /* END */

#ifdef  COMMENT

_StrRot:
      link    a5,#0
      move.l  8(a5),a0
         moveq.l #0,D0
         CMP.l   #(0),A0
         BEQ     StrRot2
         move.l  A0,A1
         move.b  (A0)+,D0
         tst.b   D0
         beq     StrRot2
StrRot4: move.b  (A0)+,(A1)+
         bne     StrRot4
         subq.l  #$01,A1
         move.b  D0,(A1)
StrRot2:
     unlk    a5
        RTS

testing <Dies ist ein Teststring von StrRot>
 <ies ist ein Teststring von StrRotD>
 <es ist ein Teststring von StrRotDi>
 <s ist ein Teststring von StrRotDie>
 < ist ein Teststring von StrRotDies>
 <ist ein Teststring von StrRotDies >
 <st ein Teststring von StrRotDies i>
 <t ein Teststring von StrRotDies is>

#endif

