emmanuel-marty/apultra

I adapted your code to an 8086 (segmented memory) depacker

ecm-pushbx opened this issue · 3 comments

Like I did with your LZSA2 depacker before, I adapted your "size-optimized aPLib decompressor for 8088" for use in my 86-DOS kernel/executable format. It is available in my hgweb repo.

The changes that I had to do:

  1. Use bp for stack frame to access variables throughout
  2. Count down remaining lengths of source and destination (needed to detect success or failure with overlapping buffers, also provides simple error checking)
  3. Use far pointers throughout, which are normalised after every use
  4. Add stack frame variables for the high words of distance and gamma
  5. Allow matches with >= 64 KiB distance and/or >= 64 KiB length
  6. Allow overlapping buffers by checking the pointers after matches and match bytes

Thanks! I will link to your Mercurial repos for both depackers. If you use it in production I'll be happy to link to your projects as well.

Thanks again, link added to the README

In 8f354ae did you mean to delete the link to the i8080 decompressors?