The difference between ISA (e.g. MIPS) and assembly language

What is the difference between ISA (e.g. MIPS) and assembly language? I see some contexts where they seem to be used synonymously.

+6
source share
3 answers

An instruction set architecture (ISA) physically corresponds to machine operations in a particular processor. This means that the ISA lists all and all instructions, as well as the operation codes that can be performed by specific processors.

Assembly language is usually 1-1 related to ISA, but can be implemented in different ways. Sometimes assembly code can execute the entire set of ISA level instructions.

Assembly languages ​​are an abstracted set of ISA codes, logic, and instructions that allow the use of variables / macros / functions / methods / etc. They can be very basic (which means almost 1-1 matching), or they can support more complex operations, such as structural programming blocks.

+8
source

I doubt that there are any “authoritative” definitions of these terms, but there are some feelings in which they may not overlap with each other:

  • While "ISA" standardizes a public interface for a processor that should be used as the basis for writing programs that are binary compatible with several processors that implement ISA, the "assembly language" may also refer to what is implemented by a particular processor, not necessarily compatible with other implementations.
  • More generally, “ISA” is a standard document, while “assembly language” is a programming language.
  • ISA usually specifies not only instructions and their names, but also a binary encoding for them (for example, operation codes and argument encodings). The term "assembly language" refers only to the text form of instructions without reference to their encoding.

However, they obviously have many overlaps, so it would be quite understandable in non-normative texts if they are used interchangeably in some contexts.

+5
source

ISA stands for instruction set architecture. Because these words imply that it is an instruction-based architecture for which a particular processor has been developed. Someone somewhere knows what this architecture is doing, and instructions (machine code) to get it to do what it does.

Assembly language is a term for a programming language. Unlike Java or Python, there is no single standard authority that makes a definition for a single assembly language. Ideally, there is an assembly language for each ISA, but not all of it is unusual that there can be more than one or subtle variations between Assembly languages ​​for a particular ISA. Assembler language is essentially defined by Assembler, sometimes the word Assembler is also used to denote the language itself, I try to distinguish assembly language, programming language and assembler, a programmer utility that takes the assembler language and analyzes it and converts it into machine code.

Assembly language is a programming language in which you have a one-to-one relationship between Assembly language mnemonics and an instruction in an instruction set (ISA). But this is not always the case; there are things to make your life easier than shortcuts for branching. Often there are a number of directives in which you can, for example, insert some data (for example, the line you want to print). And there are macros that don't look like C macros, you can write code that you want to reuse once in one place, and then just use the macro.

MIPS is a company that manufactures processors and the ISA name, as well as the name of the assembly language, and all processors will be named MIPS. Just like Intel processors, the assembly language and instruction set can be called Intel (although we also see x86 and other options). ARM, the same thing, processor, architecture, instruction set, assembly language.

Typically, the inventor of the instruction set (as in a group of people working together is not necessarily the same individual chip engineer), creates documentation for this instruction set, usually including machine code. Along with this, there is the usual syntax of assembly language. Often, the syntax in a reference manual is the starting point for assembler. Not so often there are instructions that are defined here that are actually pseudo instructions, nop is common, some sets of instructions do not want to waste the operation code, and instead the assembler encodes the addition of r0 + 0 or or r0, r0 or some thing , which basically does nothing but the present alu instruction. There are some commonly used / mnemonics instructions for assembler in MIPS, which are pseudo instructions that assembler generates for you, you must remember not to use them in the shadow of the branch (put aside the slot, whatever term you use), or you will or should be warned.

+3
source

All Articles