pbuffer[0] = (opcode & 0x0F);
no need to set it to zero and then unconditionally OR something.