Search code examples
assemblyx86dosx86-16low-level

Is there a point to learn legacy x86 16-bit segmentation and DOS assembler at 2021?


Is there a point to learn x86 assembly (protected mode, virtual x86 mode, segmentation, DOS calls etc.) at the end of 2021 by reading the old assembly books about 286/386/486 processors?

Or it will be better to start with a 64-bit version? As far as I know modern 64-bit CPUs use long mode and x86 is there for backward compatibility only and, as I understand, after some time will be removed.


Solution

  • These thing

    Is there a point to learn x86 assembly (protected mode, virtual x86 mode, segmentation, DOS calls etc.)

    Mostly no. These things are in the past (DOS isn't used nowadays often), and are specific to x86 ISA and are not likely to repeat in any new ISA.

    This:

    Or it will be better to start with a 64-bit version?

    Maybe.

    Programming directly in assembler isn't often used, but understanding assembly is helpful in profiling (especially making micro-optimizations and interpreting their results), and debugging (especially post-mortem dump analysis or debugging that involves running some code without source).

    Note that what you call 64-bit version is called x86-64, and together with 32-bit version (which has not very big difference from 64-bit version) it is referred to as "x86".

    That's why here we have which often covers issues related to the interpretation and performance of machine code for modern CPUs running in modern OSs.