A 12F might be a good choice. Cheaper too.

However, what you have should fit, with a little modification.


The complex IF statements are creating 3 (T)emp vars, which are word sized. (even though it's only using 1 bit per WORD)
So it's using 6 bytes that it doesn't really need too.

If you change all the IF statements to something like this for the first one, I believe it should fit.

Code:
    ;if (lowinput=0) and (overload=1) and (overtemprature=0) then
    if (lowinput=0) THEN
        if (overload=1) THEN
            if (overtemprature=0) THEN
                while count1<2
                gosub overloadmode
                count1=count1+1
                wend
                outputpin =1
                
                while count1<7
                gosub overloadmode
                count1=count1+1
                wend
                
                outputpin =0
                count1=0
            ENDIF
        ENDIF
    ENDIF
hth,