2 ms·
From the file linked in https://www.vogons.org/viewtopic.php?p=534845#p534845 https://www.vogons.org/viewtopic.php?p=534845#p534845, it looks like 'mov fs, ax'
by andrewf 2y ago
From the file linked in https://www.vogons.org/viewtopic.php?p=534845#p534845 https://www.vogons.org/viewtopic.php?p=534845#p534845, it looks like 'mov fs, ax' may have been 5 cycles compared to 3 for 'mov dx, ax', with no penalty in the other direction? So probably net faster than using memory instead.
But +15 cycles if you're in protected mode. In this case I think you'd also cause a fault by storing values into a segment register which weren't valid indexes into the LDT/GDT.
- qingcharles 2y agoThank you!