| Run file for BasCompress
|
| Complicated because can call direct to back end if any parameters passed

IconSprites <Obey$Dir>.!Sprites
Set BasCompress$Dir <Obey$Dir>
Set BasCompressFE$Choices <Obey$Dir>.Choices
SetEval Alias$BasCompress "/<BasCompress$Dir>.!Run "

If "<System$Path>"="" Then Error System resources cannot be found

SetEval Old$CAsm 0
RMEnsure CAssembler 0    SetEval Old$CAsm 1
RMEnsure CAssembler 0.16 SetEval Old$CAsm 0
If <Old$CAsm> Then Error An old version of the CAssembler module is resident
UnSet Old$CAsm
Set BasCompressFE$Path <BasCompress$Dir>.,System:Modules.
RMEnsure CAssembler 0.16 RMLoad BasCompressFE:CAssembler
RMEnsure CAssembler 0.16 Error CAssembler module not found or too old

If "%0"="" Then RMEnsure FontWindow 1.40 RMLoad BasCompressFE:FontWindow
If "%0"="" Then RMEnsure FontWindow 1.40 Error FontWindow module not found or too old

|The following three lines ensure that if running wimp front end:
| 1. use my replacement DDEUtils if no ddeutils about
| 2. use Acorns' DDEUtils if possible
Set BasCompressFE$Path System:Modules.,<BasCompress$Dir>.
If "%0"="" Then RMEnsure DDEUtils 0.01 BasCompressFE:InitDDECy
If "%0"="" Then RMEnsure DDEUtils 0.01 WimpTask BasCompressFE:DDEUtils

UnSet BasCompressFE$Path

RMEnsure FPEmulator 2.70 RMLoad System:Modules.FPEmulator
RMEnsure FPEmulator 2.70 Error FPEmulator module not found or too old

WimpSlot -Min 128K -Max 128K
If "%0"<>"" Then WimpSlot -Min 96K -Max 96K
If "%0"<>"" Then /<BasCompress$Dir>.!RunImage %*0
If "%0"="" Then Set BasCompressFE$Dir <BasCompress$Dir>.!fe
If "%0"="" Then WimpSlot -Min 64K -Max 64K
If "%0"="" Then /<BasCompressFE$Dir>.!RunImage
