title: Long jump with a selector decided at run time in x86
body: <p>I'm trying to perform a long jump in assembly so that I can load a descriptor from the GDT into the segment register CS. I realize I can do this by hard coding the address like this (<code>jmp 0xAB:some_label</code>) but I don't want to hard code the address like that. I see that the jump instruction has the following format (<code>jmp ptr16:32</code>) but I'm not quite sure what is the syntax for ptr16? I tried <code>AX,[AX], BX, [BX]</code> but nothing worked. I tried searching everywhere for how to perform such operation to no avail. So could someone provide the proper syntax for long jumping to an address that is specified at runtime (either in memory or in register)? </p>