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

When I step through this code I get the error message above

//Write an 8051 C program to read the P1.0 and P1.1 bits and issue an
//ASCII character to P0 according to the following table.
//P1.1 P1.0
//0 0 send ‘0’ to P0
//0 1 send ‘1’ to P0
//1 0 send ‘2’ to P0
//1 1 send ‘3’ to P0
//Solution:
#include <reg51.h>
void main(void)
{
        unsigned char z;
        z=P1;
        z=z &0x300;

                switch (z)
        {
                case(0):
                {
                P0='0';
                break;
                }
                case(1):
                {
                P0='1';
                break;
                }
                case(2):
                {
                P0='2';
                break;
                }
                case(3):
                {
                P0='3';
                break;
                }
         }
}