Thanks for the heads up. As you preempted I will need "volatile", I was initially confused by the keyword as I considered all memory to be volatile. My actual code for modifying will now look like this. (For info only) void HTTPExecCmd(BYTE** argv, BYTE argc) { BYTE command, var,TmpByte,i; BYTE CurrentArg; WORD_VAL TmpWord; volatile WORD addr; //...snip ...// switch(command) { case CGI_CMD_MOD_REG: //command = 'z', HTML form has posted a Modify Register Request //eg http://10.0.0.20/z?0=3983&1=255 // javascript converts F8F into 3983 to pass to the server. for(CurrentArg = 1;argc > CurrentArg;CurrentArg+=2) { var = atoi(argv[CurrentArg]); switch(var) { case CMD_ADDR: // This key-pair has the address we want to change addr = atoi(argv[CurrentArg+1]); break; case CMD_VAL: //This key-pair has the value to write *((char*)addr) = atoi(argv[CurrentArg+1]); break; } } break; //...SNIP ...// } > Your welcome. You will need volatile for input only. Volatile simply tells the compiler that the contents may have changes since it did something last - this stops the compiler optimising it away. > > -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist