How do assembly languages depend on operating systems?

前端 未结 7 2058
余生分开走
余生分开走 2020-12-14 04:38

As An assembly language implements a symbolic representation of CPU instructions which are independent on OSes while assemblers are always running under some OS, I was wonde

7条回答
  •  被撕碎了的回忆
    2020-12-14 04:59

    The assembly language should be the same; as you point out, the instruction set depends only on the CPU and its architectural design. Where you start getting into trouble with different OSs, I believe, is when you start invoking e.g. interrupts (typically for I/O) which can definitely mean programs written for e.g. MSDOS won't work on e.g. Solaris (maybe a bad example).

提交回复
热议问题