Where do the compiler and assembler reside on a computer?

前端 未结 2 360
悲哀的现实
悲哀的现实 2021-01-13 05:06

So I know the very basics, that a compiler turns source code into assembly code and an assembler turns assembly code into machine code. What I haven\'t been able to google p

2条回答
  •  无人共我
    2021-01-13 05:57

    Let's avoid the details and assume that the excution process is so easy (compilation=>assmbly=>CPU) to answer your main question : a compiler and an assembler are both programs (depending on your CPU architecture) so you could install them or choose the buit in with the system

    For exemple in Gnu/linux systems : gcc is a compiler Nasm is an assembler

    they are located on your hard drive for exemple under : /usr/bin/

    an assembler can use CPU interuption and syscalls so he coud use the kernell to talk to the cpu to perform much complex actions.

    you could use any compiler or assembler from this list (https://en.wikipedia.org/wiki/Comparison_of_assemblers) but keep in mind you should respect which architecture are you using ARM X86 X64 AMD..

提交回复
热议问题