How Can I Stop Variables Being Cleared at Startup?

Use the __persistent qualifier (see Persistent Type Qualifier), which will place the variables in a different psect that is not cleared by the runtime startup code.