Assembly Language

Programming in machine language can be very tedious and error prone. Instead of using ones and zeros, an assembly language has an advantage, because it uses mnemonics (abbreviations) for the instructions and variable names for memory locations, instead of ones and zeros. There is also a one-to-one correspondence between the instructions in assembly language and in machine language. Programs can be written more easily in assembly lan-guage and do not have many of the disadvantages of programming in machine language.The advantage of programming in assembly language over a high-level language is that one can gain a very detailed look at the architecture of a computer system and write very efficient programs, in terms of both increasing speed and saving memory.

Unlike programs in high-level languages, the operands of arithmetic instructions are restricted; they must be from a limited number of special locations built directly in hardware called registers. Registers are primitives used in hardware design that are also visible to the programmer when the computer is completed, so you can think of registers as the bricks of computer construction. A bus is a collection of data lines that is treated together as a single logical signal.

CPU's major structural components

• Control unit: Controls the operation of the CPU and hence the computer

• Arithmetic and logic unit (ALU): Performs the computer’s data processing functions

• Registers: Provides storage internal to the CPU

• CPU interconnection: Some mechanism that provides for communication among the control unit,ALU, and registers

原文地址:https://www.cnblogs.com/007beta/p/3848837.html