How to unsqueeze
a program

 

Sometimes an application or program is set up in such a way as to make UnSqueeze fail to unsqueeze the code. Or alternatively your unsqueezer may fail for one reason or another.
But it is still perfectly possible to unsqueeze the code.

D. Ruck wrote how to do this in comp.sys.acorn.programmer. I reproduce the original article here.
Message ID: comp.sys.acorn.programmer <111325544a.druck@druck.freeuk.net>

 

You could always do it by hand:-

1) F12

2) *Load <program>

3) *MEMORYI 8000 +4
   note address1 in the BL instruction

4) *MEMORYI <BL address1> +100
   look for MOV PC, Rx instruction, note registerX and address2

5) *BreakSet <instruction address2>

6) *GO 8000
   (runs, stops at breakpoint)

7) *ShowRegs
   Note address3 in the Rx register
   
8) *MemoryI <Rx address3>
   look for MOV PC, Ry instruction, note registerY and address4
   
9) *BreakSet <instruction address4>

10) *Continue
    (continues, stops at breakpoint)
    
11) *ShowRegs
    Note address in the Ry register
    
12) If Ry is &8004 its an AIF format, so
    *Save <program> 8000 <address3>
    *SetType <program> FF8
    Other wise is a plain executable
    *Save <program> 8000 <address3> <address4>

---druck

 

 

The above doesn't seem to apply to the newer types of squeezed file. So here's my suck'n'see method.

  1. Note the size of the WimpSlot. Then convert it to hex-&8000.
     Ie, a 324K wimpslot would be 49000.

  2. *Load the program.

  3. *MemoryI 8000 +4
     Note the address in the BL instruction.

  4. *MemoryI <BL address> +100
     Look for ADD PC, Rx,#&xx
     It should follow SWI "XOS_SynchroniseCodeAreas".
     Note the register and what is added.
     Note the address of this instruction.

  5. *BreakSet <instruction address>

  6. *Go 8000

  7. If you don't Darren Salt's Debugger Plus, type *ShowRegs.

  8. Note the value of the register you noted in step 4.
     Now add to the value of the register, the amount added in step 4.
     This is your new address.

  9. *MemoryI <new address>
     Look for B &8000 after "XOS_SynchroniseCodeAreas".
     Note that address.

 10. *BreakSet <B &8000 instruction address>

 11. *Continue

 12. *Save <filename> 8000 +<slot value from step 1>

     I think you can replace the slot value with the address from
     step 8. Try it.

 


Return to assembler index
Copyright © 2004 Richard Murray / 2001 David J. Ruck