LEA TagData,A3 ; pack from MOVE.L #XPK_InBuf,(A3)+ MOVE.L MemoryPtr,(A3)+ MOVE.L #XPK_InLen,(A3)+ MOVE.L FileSize,(A3)+ ; pack to MOVE.L FileSize,D0 ; word aligned ADDQ #2,D0 AND.W #$FFFFFFFE,D0 MOVE.L D0,D1 ADD.L MemoryPtr,D0 MOVE.L #XPK_OutBuf,(A3)+ MOVE.L D0,(A3)+ ; XPK needs lots of space to work when compressing ADD.L #XPK_MARGIN,D1 ADD.L #XPK_MARGIN,D1 MOVE.L #XPK_OutBufLen,(A3)+ MOVE.L D1,(A3)+ ; pack how LEA FASTPacker,A1 MOVE.L #XPK_PackMethod,(A3)+ MOVE.L A1,(A3)+ ; how did it go LEA OutLen,A1 MOVE.L #XPK_GetOutLen,(A3)+ MOVE.L A1,(A3)+ ; technically a TagItem is two ULONGs so be sure to have enough allocated for them ; XPKExamine was acting poorly when i wasn't providing enough ULONGs MOVE.L #TAG_DONE,(A3)+ MOVE.L #TAG_DONE,(A3)+ ; pack! MOVE.L XpkmasterBase,A6 LEA TagData,A0 CALLLIB _LVOXpkPack CNOP 0,4 TagData DS.L 32 MemoryPtr DS.L 1 ; place where compressed data is stored. long enough to handle buffer needed for compression and decompression FileSize DS.L 1 ; the total bytes to compress OutLen DS.L 1 ; how big is the compressed output FASTPacker DC.B "FAST",0