home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / amos_tips / unpack / unpack.amos / unpack.amosSourceCode
Encoding:
AMOS Source Code  |  1992-03-02  |  1.0 KB  |  47 lines

  1. '*************************************************************** 
  2. '*                          UnPack.AMOS                        * 
  3. '*                   ï¿½1992 by Volker Stepprath                 * 
  4. '*  Decrunches a datafile which was packed with Squash before  * 
  5. '*************************************************************** 
  6. '
  7. '**** Choose a packed file ****
  8. '
  9. FILE$=Fsel$("","","Please choose a file to unpack !","")
  10. '
  11. If FILE$<>""
  12.   '
  13.   '**** Get large of file **** 
  14.   '
  15.   Open In 1,FILE$
  16.     L=Lof(1)
  17.   Close 1
  18.   '
  19.   '**** Reserve MORE memory then enough **** 
  20.   '
  21.   Reserve As Work 7,200000
  22.   '
  23.   '**** Load packed file ****
  24.   '
  25.   Bload FILE$,7
  26.   '
  27.   '**** Unpack file **** 
  28.   '
  29.   Print "Unpacking "+FILE$+" ..."
  30.   C= Extension_5_00E4(Start(7),L)
  31.   Print "Unpacked length:"+Str$(C)+" bytes !"
  32.   '
  33.   '**** Write unpacked file back ****
  34.   '
  35.   FILE$=Fsel$("","","Please choose file to write back","the unpacked datas !")
  36.   If FILE$<>""
  37.     Bsave FILE$,Start(7) To Start(7)+C
  38.   End If 
  39.   '
  40.   '**** Erase reserved memory **** 
  41.   '
  42.   Erase 7
  43.   '
  44. End If 
  45. '
  46. Wait 50
  47. Edit