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

getting error 65 while simulate C programme

#include<reg51.h>
#include<stdio.h>
sfr p1=0X90;
void main ()
{ unsigned char z;
char mynum[]={"+1,+2,+3,+4,-1,-2,-3,-4"};
p1= 0xF0;
for (z=0;z<=8;z++) { p1=mynum[z]; }
}

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

please explane me how i can get rid of this error

- Richa Agrawal

  • How about starting to play with the sample applications you can find?

    Have you defined the memory regions for your project?

    And your program will not work. Your string does contain 8 numbers. But it isn't 8 entries long and will not put these 8 numbers on the port - the string store individual characters. '+' is one character. '1' is another. ',' is yet another character.

    If you have never programmed in C before, I recommend that you get a good book, and play along a bit on a PC before you start using C with your microcontroller.

    Another thing - your microcontroller don't have any operating system, so don't write applications that ends. What do you think happens when you have run through all lines of main() and falls past the '}' at the end? On a PC, you either get back to the desktop, or back to the command line. But you have neither a desktop nor a command line in your development board...