This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

error 65: access violation at C:0xFF00 : no 'execute/read' permission

#include <REG2051.H>

#define         SL      P1_4
#define         SR      P1_5

#define         A       P1_6
#define         EN      P1_7

unsigned char F = 0x00;
unsigned char PF = 0;

void Go_To_Sleep (void)
{
PCON = 0x01;
}

void main (void)
{
        IT0 = 0;
        EX0 = 1;
        EA = 1;
        Go_To_Sleep ();
}
void Ext_Int (void) interrupt 0

{
F=~F;
if(F==0x00)
        {
        A=0;
        }
else
        {
        A=1;
        }
        while(PF==0)
        {
        EN=1;
        if(A==0)
                {
                if(SR==1)
                        {
                        PF=1;
                        }
                }
        else
                {
                if(SL==1)
                        {
                        PF=1;
                        }
                }
        }
        EN=0;
        PF=0;
}


0