home bbs files messages ]

Just a sample of the Echomail archive

Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.

   CBM      Commodore Computer Conference      4,328 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,841 of 4,328   
   Harry Potter to Andreas Kohlbach   
   Re: cc65 compression technique optimizat   
   09 Oct 19 12:03:12   
   
   INTL 3:770/1 3:770/3   
   REPLYADDR rose.joseph12@yahoo.com   
   REPLYTO 3:770/3.0 UUCP   
   MSGID: <6fd55ee2-b040-4c2f-a366-a77f40806535@googlegroups.com> 84df34d5   
   REPLY: <87tv8haguo.fsf@usenet.ankman.de> 3ead89ac   
   PID: SoupGate-Win32 v1.05   
   On Wednesday, October 9, 2019 at 2:55:44 PM UTC-4, Andreas Kohlbach wrote:   
   > Yes, post some snippets please. I won't be able to help because I am a   
   > lousy 6502 assembly coder but generally interested what you have done so   
   > far.   
   > --   
   > Andreas   
   >   
   It is written in C using cc65.  Here are two code snippets:   
   -------------------------   
   static unsigned sslz_getcomp (int pos, register unsigned char len)   
   {   
      register unsigned i2, j2; //register unsigned char k;   
      static unsigned char k, n, o;//=0;   
      static unsigned char comp, compa, bestcomp;   
      bestcomp=(len<<3)+2;   
      tmpcptr=&InBuffer[pos];   
      i=5;   
      if (len<=3) i=7;   
      if (len<=2) i=7;   
      j2=(len<=2?60:len<=3?600:7*1024);   
      if (pos=4) {   
            if (i2==1) {i+=3; k+=3;}   
            if (i2==250) {i+=4; k+=3;}   
            if (i2==1800) {i+=3; k+=3;}   
         }   
         j=i; n=0;   
         for (e=0; e=2) {   
            if (n>=2) o=1;   
            bestcomp=j;   
            //m=1;   
            sslz_offs=i2-1;   
            //memcpy (&sslz_best, &sslz_tocomp, sizeof(sslz_tocomp));   
            __asm__ (   
               "\tldx\t_buflen\n"   
               "\tdex\n"   
               "@aaa:\r\n"   
               "\tlda\t_sslz_tocomp,x\n"   
               "\tsta\t_sslz_best,x\n"   
               "\tdex\n"   
               "\tbpl\t@aaa\n"   
               );   
         }   
      }   
      sslz_comp=bestcomp;   
      return o;   
   }   
   -------------------------   
         j=0; y=&InBuffer[in+i];   
         for (k=0; k<108 && j<108; /*++k*/) {   
            if ((len!=2 && len!=3 && len<7) && j>=12) {j=108; break;}   
            m=0;   
            --y;   
            if ((unsigned)y<(unsigned)&InBuffer) {k= 108; break;}   
            if (cin[i]==*y) break;   
            if (j>=0) {   
               for (l=1;l<=j; ++l) {   
                  //if (InBuffer[in+i-l-1]==InBuffer[in+i-j-1]) {   
                  if (*y==y[l]) {   
                     m=1; break;   
                  }   
               }   
            }   
            if (m) {++j; continue;}   
            ++j;   
            ++k;   
         }   
   xcomp:   
         l2=in+i;   
         if (k<108 && j<108) {   
            po_offs[i]=k; //comp+=/*5-(k<4)*/(k<6?1:getnumbits(po_g   
   tnumlits(vz.InPos-buflen+i+1)));   
            if (len!=2 && len!=3 && len<7) comp+=EstimDist(k, po_ge   
   numlits(in+i));   
            else comp+=EstimDist (k, po_getnumlits2(l2));       }   
         else {   
            po_offs[i]=-1;   
            if ((len!=2 && len!=3 && len<7)) x=po_writelit (l2, InBuffer[l2], &l);   
            else x=po_writelit1a (in+i, InBuffer[in+i], &l);   
            po_nl1[i]=x; po_nl2[i]=l;   
            comp+=EstimDist (x, l)+1;   
         }   
      }   
   ------------------------------   
      
   --- SoupGate-Win32 v1.05   
    * Origin: Agency HUB, Dunedin - New Zealand | Fido<>Usenet Gateway (3:770/3)   
   SEEN-BY: 1/19 123 15/2 16/0 57/0 123/130 131 132/174 153/250 203/0   
   SEEN-BY: 220/70 221/0 1 6 360 226/16 227/114 229/101 275 354 426 1014   
   SEEN-BY: 230/0 240/5138 5832 5853 249/1 206 317 400 261/38 267/800   
   SEEN-BY: 280/5003 310/31 317/3 320/119 219 322/0 757 342/200 633/267   
   SEEN-BY: 633/280 640/1138 1321 1384 712/620 848 770/0 1 3 100 340   
   SEEN-BY: 772/0 1 210 500 2432/390 2454/119   
   PATH: 770/3 1 712/848 640/1384 221/1 320/219 240/5832 229/426   
      

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca