Assembly Language Basics 1

Source: Internet
Author: User

Assembly Language Basics 1

Because in the future should be to see the kernel-related things, kernel 20% is written in assembly language, will not be compiled obviously not, to learn things or really much, the assembly is just the beginning of the road to the core, all the beginning of difficult, it is difficult, the afternoon downloaded 2.6 and 4.04 of the code is obviously still not understand, that from the basis of , I at least understand what the kernel is, I chose the "Linux kernel design and Practice," The book Biased theory, but at this stage I just look at what the kernel is, and then go to see why this is to read the source (and a challenge) finally to achieve some of the relevant things is how to do, Eventually regenerating into a network programming skill. Basic University 4 years is enough, really a lot, I see need to take out high school that the momentum, this is not fast college entrance examination, recalled a year ago I, still struggling for the college entrance examination, now I am in order to my dream and struggle, I want to write a belongs to their own operating system is not for other, for fun. It's far away ...

Today the book just got the hand to read the first chapter is very basic but I still learned a lot of knowledge.

The development of language:

The first is the machine language, all 0 and 1 composition, very troublesome is easy to make mistakes, and then people invented the assembly language or not to buy simple, and then there are now many languages.

Assembly:

assembly language directly through the compiler to become machine languages, and other languages to be converted into assembly language before compiling into machine languages

Assembly language has the following 3 types of instruction set composition:

1. Assembly Instructions

2. Position order (no corresponding machine code)

3. Other symbols +-*/(no corresponding machine code)

The core of assembly language is the assembly instruction, which determines the character of assembly language.

Storage unit:

The capacity of the microcomputer memory is calculated in bytes as the smallest unit, and for a memory with 128 storage units, it can be said that its capacity is 128 bytes.

CPU to read and write to memory:

1. Specify the address of the storage unit

2. Select whether to write or read

3. Read or write the data

Address bus

The CPU is address bus to specify the storage unit, assuming a CPU has 10 address bus then the CPU can look for 2 10 memory units, 16 bits--"64KB 32 bit--" 4GB 64 bit--"2EB

At this stage of the 64-bit majority, such a large address space for temporary use is not finished.

Data bus

Its width determines the speed of the CPU and the outside world, 8 data bus can be passed a 8-bit binary data (1KB), the same 16-bit (2KB)

Control bus:

The control of the external device by the CPU is carried out by the control bus. Here the control bus is a general term, the width of the control bus determines the CPU to the external device processing capacity.


Summary:

Storage unit numbered starting from 0 each CPU chip has a number of pins that are connected to the bus, or they can be said to lead to the bus. A CPU can lead to 3 types of bus widths that mark the performance of this CPU in different aspects.

Address bus: The ability to determine addressing

Data bus: Determines the amount of data to be transmitted once with other data

Control bus: Determines the CPU's ability to control other devices in the system



Assembly Language Basics 1

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.