"Assembly language" learning Note 2--Register

Source: Internet
Author: User
Tags arithmetic operators

8086 Registers

CPU has 14 registers: AX, BX, CX, DX, SI, DI, SP, BP, IP, CS, SS, DS, ES, PSW

1. Universal register (Data Register): AX, BX, CX, DX. For storing general data

AX: Used as an accumulator, is the primary register of arithmetic operators

BX: Base Register

CX: Counters

DX: Used to store a double-byte operand with ax when doing double-precision operations

2. Address register: Pointer, variable address register. (SI, DI, SP, BP)

SI: Source address register, which holds the offset address of the source buffer

DI: The destination register, which holds the offset address of the destination buffer

SP: Stack pointer register to indicate the offset address of the stack area

BP: Base point pointer Register to indicate the offset address of the stack to a cell

3. Segment register: CS, DS, ES, SS

CS: Code segment register, which indicates the segment address of the code snippet that holds the program

DS: Data segment register, which indicates the segment address of the data segment where the data is stored

ES: Additional segment registers that indicate the segment address of additional segments that hold additional data

SS: Stack register, which indicates the segment address of the stack segment to which the stack is going

4. Control register: IP, FLAGS (PSW program status word). Implementation of control procedures

IP: Instruction register, which holds the offset address of the code snippet, indicates the offset address of the unit where the next instruction is currently executing the instruction

A 16-bit register can store a 16-bit data (that is, the data maximum value is 2 of 16 square minus 1,65535)

These can be divided into two 8-bit registers: H, L. The suffix h is a high 8-bit register (AH) and L is a low 8-bit register (AL)

A 8-bit register data with a maximum of 2 8-time minus 1,255

8086CPU can handle two sizes of data at once:

Byte (byte): A byte consists of 8 bits (bit) (that is, bits), which can exist in a 8-bit register

Word: One word consists of two bytes, two bytes for the word's high and low bytes, respectively

CPU features for 16-bit architectures:

1. The operator handles up to 16 bits of data at a time

2. The maximum width of the register is 16 bits

3. The path between the register and the operator is 16 bits

"Assembly language" learning Note 2--Register

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.