public int writeMemory(int address,int value){
        if(address>=0&&address<65536){
        memnc[address]=value;
        System.out.println("memnc["+address+"] =" + memnc[address]);
        return 1;}
        else return 0;
    }