4 ms·
> I find 64-bit assembly much easier to get started with compared to 32-bit: Simpler calling convention (on UNIX, at least), no segments, more registers, etc.
by wolfgke 10y ago
> I find 64-bit assembly much easier to get started with compared to 32-bit: Simpler calling convention (on UNIX, at least), no segments, more registers, etc.
Segments are used in about the same amount on x86-64 vs. x86-32. Where they are used a lot is in 16 bit mode (real mode).
- csl 10y agoOh, well, then I stand corrected. I thought it was by and large dropped in 64-bit mode? (I remember a lot of segment usage in 32-bit, but I only ever coded in real mode back in the day...)
- wolfgke 10y ago> I thought it was by and large dropped in 64-bit mode? Indeed: cs, ds, ss and es cannot be used in 64 bit mode (source: https://en.wikipedia.org/w/index.php?title=X86_memory_segmentation&oldid=728102976#Later_developments https://en.wikipedia.org/w/index.php?title=X86_memory_segmen...), but fs and gs can still be used. On x86 in 32 bit they are never used at least in ring 3. So not much difference. fs and gs may still be used in both x86-32 and -64 and gs is for both: Under Windows for accessing the Thread Environment Block and under Linux for accessing per-CPU data.