Arduino Due using the same language ?

I seem to be able to use bitRead to read the bits in 0x400940E8 bit 0 and bit 8 are both already set to 0.
This means that WPSWS0 and WPHWS0 are bot set to write protect off. It would seem that I should be able to do a simple bitWrite(0x40094000, 0x13, 0), However it seems that I have to define a long =x and use the x as the IDE thinks that it is a stinking 16 bit joe he is talking to. This becomes;

long x = 0x40094000;
bitWrite(x, 0x13, 0);

and later i do

int y = bitRead(x, 0x13);
Serial.print(y);

and darn if it still ain't a 1

Tried several other things like above mentioned and the compiler wont complie, guess the due was just a waste of money I will continue the project with a leaf labs maple. Already have working code for that, just wanted to make my new pcb compatible with avr and sam3. The maple pins out a little different but the IDE can call a register by name timer_suchandsuch = timer_suchandsuch & 0xshit=0 | 0xnewvalue and presto pwm is set, Real similar to the old mega2650.

Could be that I just was not supposed to be building my own inverters, but my homemade grid tie worked hard all summer long and saved me $200 or so. It only runs at the frequency of the power co. Now in the fall it is only doing 3 kwh on a good day Jul and Aug it was giving 8 to 9. Think I just need more sun and panels to catch it. Longer days would be nice too. It runs an UNO with a very short sketch.

Guess I'll just modify the pcb for maple and role on that. Just seemed that due would have been a more capable kind of guy.

Thank you all for the advice and interest,
James