I bought a Wang Shuang with assembly language textbook, through this book I realized the basis of the assembly, please give advice or comments don't know whether understand without deviating from the direction!
Summarized as follows:
Only have 1, computer binary, that is, 0/1, CPU each address line/cable/line of control signals that give memory, CPU first according to your own address how to allocate conductor for memory, for eight commonly/16/32-bit/64, corresponding to the biggest address assignment is 256/the total number of 64 KB/16 g/4 g, CPU through find a memory address, find the memory, transmit data, the data bus can be eight, also can be 16, equivalent to transmit a byte or two bytes, both the address bus and data bus, about 8421 yards, because it can increase people's ability to recognize, control bus means CPU control ability of external equipment, namely how many kind of instruction set,
CPU through the bus and connect all kinds of memory, the memory read and write operations, in order to make the external equipment can have high speed read memory, CPU u corresponding to each memory allocation, a fixed address assigned to memory, for example, the display will read continuously in the memory, keep the monitor data update,
Computer to execute a program, must be performed by a CPU an instruction, arithmetic unit is responsible for the logic operation and arithmetic operation, the controller is responsible for all sorts of equipment, control registers are in charge of the other memory to execute a program unit, after data to reach x 86 architecture has 14 register, register each work has the division of labor, is as follows:
1, general purpose registers AX CX DX BOX is used to retrieve or write data in memory
2, the code segment register code segment CS and supporting the use of pointer register IP, tie-in segment address + offset, such as physical address 21 f60h equivalent to 2000:1 the f60 units, CS) and IP means change the CPU to perform different instructions, need to take care can change the order of CS and IP, not every instruction can change the contents of the CS register and IP, the CPU will only according to CS: IP is pointing to the first address of the first instruction of running,
3 DS register, is used to store to allow access to data segment address, the address input into the DS, general-purpose registers can directly obtain the data segment address of migration, such as move alarm [0], the DS segment address: 0
To transfer data between memory and register must determine the data type is what, is to make sure a single-byte or double byte, word is double byte data!
4, SS and SP registers are used to address of the concept of the stack, if involves the push/pop control instruction, the CPU even with CS: IP position, also can't know the direction of stack must be used in a push/pop SS/SP first to the specified address, according to the advanced mechanism to run the program, after it is CPU special stack operation mechanism.
First program real understanding of the edit source program is the main link/compile/execute the executable exe file!
Need to pay attention to load the program in memory by the command, the command is loaded by default in the DOS exe file to the default CPU instructions, the program runs and then return to the command,
To the left is to understand the various instructions, too many of these instructions, need to slowly digest!
Please the teacher give directions, such understanding is accurate, I'm going to look after a little, understand, in other to learn, do not know what is C/C + +/JAVA based on assembly, I had learned C + + and JAVA, but forget, get up and don't know if I can understand