Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p><strong>Machine code</strong> is binary (1's and 0's) code that can be executed directly by the CPU. If you were to open a machine code file in a text editor you would see garbage, including unprintable characters (no, not <em>those</em> unprintable characters ;) ).</p> <p><strong>Object code</strong> is a portion of machine code that hasn't yet been linked into a complete program. It's the machine code for one particular library or module that will make up the completed product. It may also contain placeholders or offsets not found in the machine code of a completed program. The <strong>linker</strong> will use these placeholders and offsets to connect everything together.</p> <p><strong>Assembly code</strong> is plain-text and (somewhat) human read-able source code that mostly has a direct 1:1 analog with machine instructions. This is accomplished using mnemonics for the actual instructions, registers, or other resources. Examples include <code>JMP</code> and <code>MULT</code> for the CPU's jump and multiplication instructions. Unlike machine code, the CPU does not understand assembly code. You convert assembly code to machine with the use of an <strong>assembler</strong> or a <strong>compiler</strong>, though we usually think of compilers in association with high-level programming language that are abstracted further from the CPU instructions.</p> <p>Building a complete program involves writing <strong>source code</strong> for the program in either assembly or a higher level language like C++. The source code is assembled (for assembly code) or compiled (for higher level languages) to object code, and individual modules are linked together to become the machine code for the final program. In the case of very simple programs the linking step may not be needed. In other cases, such as with an IDE (integrated development environment) the linker and compiler may be invoked together. In other cases, a complicated <strong>make</strong> script or <strong>solution</strong> file may be used to tell the environment how to build the final application.</p> <p>There are also <strong>interpreted languages</strong> that behave differently. Interpreted languages rely on the machine code of a special interpreter program. At the basic level, an interpreter parses the source code and immediately converts the commands to new machine code and executes them. Modern interpreters, sometimes also called a <strong>runtime-environment</strong> or <strong>virtual machine</strong>, are much more complicated: evaluating whole sections of source code at a time, caching and optimizing where possible, and handling complex memory management tasks. An interpreted language may also be pre-compiled to a lower-level intermediate language or bytecode, similar to assembly code.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload