"Assembly language" - Wang Shuang first chapter Basics

2019-12-27

23:31:42

It is higher theoretical level computer courses for the general structure, function, performance in a study called "composition principle" of. Compilation of curriculum research focuses on how to use the hardware system architecture and instruction set of programming flexibility to effectively control the system works

1.1 Machine Language

Computer machine instructions is a binary number. The computer into a high and low, so that the electronic computer device is driven, is calculated.

After the computer we mentioned refers to a computer system by the CPU and other directly or indirectly controlled by the CPU chip, device, equipment components, such as our most common PC.

Each microprocessor, hardware design and due to the different internal structure, requires a different level of the pulse is controlled to make it work. Therefore, each machine has its own microprocessor instruction set, which is the machine language.

1.2 assembler language production

Assembly language is the main body of the assembly instructions. Machine instructions and assembler instructions difference is the representation of the instruction. Assembler instruction is a machine instruction mnemonic writing format.

However, the computer can understand only machine instructions, then how to make a computer to execute programmer assembly instructions written in it? At this time, there is a need to be able to convert the assembly instructions for the machine translation program instructions, which the program we call the compiler.

1.3 assembly language composition

Assembly language instructions into the following three categories:

1 assembler instructions: machine code mnemonic code with a corresponding machine code

2 directive: no corresponding machine code. Performed by the compiler, the computer does not perform

3 other symbols: as +, -, *, /, etc., recognized by the compiler, there is no corresponding machine code

The core assembly language is the assembly instructions, which determines the characteristics of the assembly language.

1.4 Memory

In memory of a PC in effect after the CPU. He left the memory, no matter how good the performance of the CPU can not work. It's like a wise brain, no memory can not think.

Be flexible use of assembly language programming, we must first understand how the CPU is to read information from memory, and write information to memory.

1.5 instructions and data

In memory and on disk, instructions and data without any distinction, are binary information. CPU work when I put some information regarded as instruction, some information regarded data, given a different meaning to the same information

1.6 The storage unit

Reading and writing to the memory 1.7CPU

CPU also indicates when reading and writing data, for which it is to be a device operation, which carried out the operation, is read data from or write data to the inside.

CPU in order to read and write data, the following three types must be interactive information and an external device (a chip is standard view):
the address of the memory cell (address information)

The selection device, read or write command (control information)

Read or write data (data)

Computer can process, the electrical signal transmission information is, of course, to use the electrical signal transmission wire. Specifically in the computer and other lead wire connected to CPU chips, commonly referred to as a bus. Physically, a bus is a root set of conductors. Depending on the information transmitted, the bus logically divided into 3 categories, an address bus, a control bus and a data bus

From the above we know how the CPU is reading and writing data. However, how to command the computer to read and write data to it?

To make a computer or microprocessor operates, it shall be possible to drive it to the input level information work (machine code) i.e. instructions.

1.8 Address Bus

It determines the width of the address bus addressing capability of the CPU

1.9 Data Bus

It determines the width of the data bus data transfer speed of the CPU and the outside world.

8088CPU data bus width is transmitted twice 8,8088CPU 89D8, the first transmission D8, 89. The second transfer (after the first, LSB)

1.10 Control Bus

Here is a general term for the control bus, the control bus is a collection of a number of different control lines. How many root control of the bus, it means how many CPU provides control of external devices. Therefore, control of the bus width of the CPU determines the control of external devices.

Stated before memory read or write command is issued by the few comprehensive line of control. Which is called a "read signal output" control line is responsible for transmitting a signal read out by the CPU, CPU outputs a low level to the control line represents the data to be read.

1-1 to Section 1.10:

(See the book)

1.11 memory address space (Overview)

1.12 Motherboard

On each PC, there is a motherboard, the motherboard of the core device and some major devices, these devices via a bus (address bus, data bus, a control bus) is connected. These devices have a CPU, a memory, a peripheral chipset, expansion slots and the like. Expansion slot on the general inserted RAM memory, and various interface cards.

1.13 Interface Card

Direct control of these devices work is inserted in the expansion slot of the interface card. Expansion slot and connected to the CPU via a bus, it is also connected via the same interface card CPU bus. CPU can directly control the interface cards, in order to achieve indirect control of the CPU peripherals. Simply put, the CPU sends a command to the interface card by a bus, peripheral interface card operates according to the control command of the CPU.

1.14 kinds of memory chips

In a PC, equipped with a plurality of memory chips, the memory chips which are viewed from separate physical connections, different devices. Property viewed from a reader into two categories: random access memory (RAM) and read only memory (ROM).

Random access memory: means for storing programs and data for the vast majority of CPU used, a main random access memory RAM by the general composition of the two positions, is mounted on the motherboard RAM and a RAM (memory) is inserted in the expansion slot

Containing the BIOS ROM:

BIOS is a software system provided by the board and various interface cards (graphics cards, network cards, etc.) manufacturers, can be the most basic input output by utilizing the hardware device. On the main board and a memory expansion card is inserted in a corresponding BIOS ROM. For example, ROM memory on the motherboard with the motherboard BIOS; ROM are stored on the graphics card of the BIOS;

A RAM card interface: most typically a RAM on a display card, generally referred to as memory. Card any time the data is output to the video memory on a display. In other words, we will need to display the contents of the written memory will appear on the display.

Guess you like

Origin www.cnblogs.com/JasonPeng1/p/12110064.html