工欲善其事, its prerequisite. Assembly language is our learning, interface principle, the principle of microcomputer composition, such as the basis of a number of interesting courses. Unfortunately, however, people who have just come into contact with the Assembly always feel that it is difficult, good trouble, a lot, a good abuse of heart, a good brain abuse. So, Beholder!!! In fact, the assembly is not as difficult and interesting as it is imagined. Of course, it's not as simple as it might seem.
Recommend a textbook first! Wang Shuang's "assembly language". This book is more suitable for getting started, because the book tries to block a lot of esoteric content. (Even so, it's not easy!) )。 And then the book that our teacher recommended for us.
: "80x86 assembly Language Programming Program" (Yang Ziwen), "Ibmpchb assembly language", there is a book called "from the assembly language to the computer core" books. In fact, I have not read these books, but the plan is to read at least one.
All right! Let's learn the compilation together happily! (In fact, it is a compilation of quick exams, I put things to try to review and tidy up a bit, but the road to learn the assembly is still very long oh!) )。
C1: basic knowledge (clock comprehension complement various hardware)
C2: Register (Physical address segment)
C3: Register (Memory Access)
C4: First Program
C5: "BX" and Loop command
C6: A program with multiple segments
C7: A more flexible approach to locating addresses//not studying well
Ah&al=ax (ACCUMULATOR): Cumulative register
BH&BL=BX (Base): Base Address Register
CH&CL=CX (count): Count Register
DH&DL=DX (data): Information register
SP (Stack Pointer): Stack pointer register
BP (base Pointer): Base point pointer Register
SI (source Index): Source Variable address register
DI (Destination Index): Destination variable address register
IP (instruction Pointer): instruction Pointer register
CS (code Segment) Snippet Register
DS (Data Segment): segment Register
SS (Stack Segment): Stack segment Register
ES (Extra Segment): Additional segment Register
FLAG 寄存器中存储的信息通常又被称作程序状态字(PSW)
The number of overflow flag overflow flag operands exceeds the range indicated by the machine to indicate overflow, which is 1 when overflow. The SF sign flag symbol marks the sign of the result of the operation and results in a negative 1. The ZF zero flag 0 operation result equals 0 o'clock to 1, otherwise 0. CF carry flag carry flag the most significant bit yields a rounding of 1, otherwise 0. AF auxiliary carry flag auxiliary carry flag operation, the 3rd bit to the 4th bit when the rounding is 1, otherwise 0. PF parity flag Parity flag operation results The number of operands is 1 for an even number of 1, otherwise 0. The DF direcion flag direction flag is used for string processing. Df=1, the SI and di are reduced after each operation. The df=0 increases. The IF interrupt flag interrupt flag is if=1, allowing the CPU to respond to a masked interrupt, otherwise shutting down the interrupt. The TF trap flag trap flags are used to debug a single step operation.
Other
Psw:program status word tcon:timer controlie:interrupt enablescon:serial Control
EA --effective Address: An address that is valid, that is, an offset.
Sa--segment Address
Introduction to assembly language