@Override
    public void writeTo(WordWriter out)
        throws IOException {
        int opword = opcode.getCode();
        if(opcode.isBasic()) {
            opword |= (valueA.evaluate() << 4) | (valueB.evaluate() << 10);
        } else {
            opword |= (valueA.evaluate() << 10);
        }

        out.writeWord(opword);

        if(valueA.hasNextWord())
            valueA.getData().writeTo(out);
        if(opcode.isBasic() && valueB.hasNextWord())
            valueB.getData().writeTo(out);
    }