Learn

Before we dive too deep into Assembly language, let’s take a step back and learn where Assembly language fits into the everyday process of software engineering.

When we push Run in our code editor, the computer is performing a number of tasks in the background before the computer hardware even gets to see its first bit of binary code.

In general, there are four steps, known as the Compilation Process, that make up the journey high-level code goes on before reaching the hardware:

  • Preprocessing is the first step of compilation and is used to prepare the user’s code for machine code by removing comments, expanding included macros, and performing any code maintenance prior to handing the file to the compiler.
  • Compiling is the process of taking the expanded file from the preprocessor and translating the program into an optimized Assembly language.
  • Assembling is the process of taking an assembly language program and using an assembler to generate machine code.
  • Linking is the process of filling in function calls, including additional objects, libraries, and source code from other locations into the main source code.

While the compilation process is tailored to each language and architecture, the overall procedure is fairly standard. It is in the compiling and assembling stages where Assembly is generated and used to create machine code.

Instructions

1.

Click Run to see the translation of the Python function in the code editor into the MIPS Assembly language. This is step two of the compilation process, compiling.

Sign up to start coding

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?