Assembly Language Learning Notes (i): Assembly language Basics

Source: Internet
Author: User
Programming languages that work directly on the hardware

Assembly instructions are mnemonic mnemonics for machine instructions that are easy to remember; machine instructions are all 01.
Assembly instructions: MOV AX,BX to move BX to AX

Register: The device in the CPU that can store the data (AX, BX are the Register code)

Programmer-"Assembly instructions-" compiler--"machine code--" Computer
Other languages need to be compiled into assembly instructions first: So if you write well, the assembly instructions are the fastest language.

Assembly Language Composition:
1. Assembly Instructions (machine code mnemonic)
2. Pseudo-directive (executed by compiler)
3. Other symbols (with compiler recognition)

"The Secret of coding"--explaining the realization of CPU internal logic

Memory:

Assembly Language: Understanding how the CPU calls data in memory

Directives and data are the concept of application, in memory or on disk, instructions and data are not different, are binary information.
1000100111011000-->89d8h (Data 16 binary)
1000100111011000-->mov ax,bx (instruction)

1.6 Storage Units
The memory is divided into a number of storage units, each of which is numbered sequentially from 0 onwards.
A unit is 8bit,8 bit
1024=2 10-Time Square

1.7CPU read and write to memory
There are three types of information interaction required for reading and writing:
The address of the storage unit (address information),
Device selection, read or write commands (control information),
Read or write data (data information)

A wire that is specifically linked to a CPU and other chips in a computer, usually called a bus
Address bus, data bus, control bus

8086CPU Comparison of classic CPUs
How many different information can be transmitted on the address bus, and how many storage units can be addressed by a CPU.

64 bits: CPU64 bit, system 64 bit, software 64 bit; The real 64-bit
The book of habit, above the position below is the high

1.8 Address Bus
The width determines the CPU's addressing capability
A CPU has n root address bus, it can be said that the address bus width of the CPU is n.
Such a CPU can find up to 2 of the n-th (1byte=8bit)

1.9 Data Bus
The width of the data bus determines the speed of data transfer between the CPU and the outside world

1.10 Control Bus
Width determines the CPU's ability to control other devices in the system
The number of root control buses means that the CPU provides more control over the external devices.
Example: A line can be used to read and write 1/0, respectively

1.11 Memory address Space
If the address bus width is 10, the addressing unit can be 1024
Motherboard, interface card
All kinds of memory chips:
Read-only memory (ROM) and random memory (RAM)
BIOS-equipped Rom:basic input/output system, basic input and output systems (virus's ultimate goal)
All the memory is connected to the CPU, and all the instructions are sent from the bus
8086: Address space allocation
00000--9FFFF: Primary memory address space (RAM)
AFFFF--BFFFF: Memory address space
C0000--FFFFF: All types of ROM address space

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.