superfury wrote:I know that on a 186+ it generates an #UD. What happens on a 8086, which doesn't support #UD? Is it simply implemented as a NOP instruction? Or is it actually executed?
Good question, I would try it if I had a 8088/8086. Even if it did change CS, most likely it would not empty the prefetch queue, so it would contain instructions fetched from old cs and new cs (ip is not reset). So if any piece of software would use the mov cs, ax instruction, it would be quite specific environment it works in, regarding bus cycles and DMA cycles, so that the change of CS happens at exactly correct point. That's why opcodes that change CS without emptying prefetch queue have "do not use" explanation in manuals, and later they generate #UD.