What kind of projects (besides the obvious OS stuff) use assembly language?

后端 未结 16 1774
野的像风
野的像风 2021-02-14 15:48

Seemingly, no one uses assembly nowadays other than to develop device drivers, or the very core of OS kernels etc. Anyone has knowledge of it being currently used for other thin

相关标签:
16条回答
  • 2021-02-14 16:04

    Just as an anecdote: Roller Coaster Tycoon was written entirely (or almost) in x86 assembly by Chris Sawyer (wikipedia reference).

    0 讨论(0)
  • 2021-02-14 16:05

    I know assembly is used for very heavily code for games. For example, pixel shaders have a really tight instruction budget; to get the effects you want, you pretty much have to code down to the metal.

    0 讨论(0)
  • 2021-02-14 16:07

    I wrote IBM 370 assembler back in the day, for a large application (vendor sold product, used by large companies) that collected info from hooks in the operating system. However, I was only doing plain jane programming: screens, reports, etc, in assembler. It ran amazingly fast, but was entirely in assembler. I'm sure it is still running and sold today for prices well above what is typical of software for Windows and Linux platforms.

    0 讨论(0)
  • 2021-02-14 16:10

    More or less obviously, assembly programming is needed for compiler back-ends and related technologies like dynamic recompiling CPU simulators.

    Assembly language programming is also used with some frequency for video game programming, to take advantage of new CPU features that are not yet well supported by current compilers. However, this is kind of rare, these days, especially since on PC's, there are so many different CPU's to support. I expect this is a bit more common on consoles with uniform hardware, though.

    Edit: These days games do most of their calculation in a GPU. Getting the most out of these compute resources is not always possible using just OpenGL or DirectX, and the vendors for these processors provide a host of tools for squeezing more out of their hardware. Although Cuda or OpenCL are well known terms, they are still at a relatively high level of abstraction over the GPU hardware, filling in a role that is very similar to the role of C on typical (Von Neuman) CPU's. A look at the developer pages for these products and you will find dozens of ways to use GPU compute resources optimally, and at every level of abstraction.

    0 讨论(0)
  • 2021-02-14 16:10

    Utility functions that the higher level language did not expect to support. An old example is from when I was attempting to get some of the niceties that C and Unix provided while working with Fortran on RSX-11M. I wanted to pass formatting strings around and use the simpler C style. The printf() needed to do some cast like operations. The Fortran did not have this concept so icast() and rcast() were written in assembler. Other functions implemented were move() and clone(). These were not done so much for efficiency as they were extending concepts outside Fortran's mindset.

    0 讨论(0)
  • 2021-02-14 16:13

    Someone used assembly for this code golf for changing numbers to words.

    0 讨论(0)
提交回复
热议问题