Language learning Note (c) register (memory Access)

Source: Internet
Author: User
3.1 Storage of in-memory words
Font data with byte type data (the former is a byte, two 16-bit number)
Any two contiguous memory units, N and n+1, can be viewed as two memory units or as high-order byte units and low-bit byte units in a word cell with n

3.2DS and Address
DS Register: The segment address that is typically used to store the data to be accessed
MOV bx,1000h
MOV ds,bx
MOV al,[0]
The above three instructions will be in 10000H (1000:0) of the data unique in AL
MOV two kinds of functions:
Sending data between registers
To feed the contents of one register into another register

MOV register name, memory unit address
[...] :... Represents an offset address
The DS above gives the segment address, so [0] gives the offset address is enough

The data of the register is fed into the internal deposit cell.
MOV bx,1000h
MOV ds,bx
mov [0],al

3.3-word transfer

3.4mov, add, Sub
MOV (ADD/SUB) registers, data
MOV (ADD/SUB) registers, registers
MOV (ADD/SUB) registers, memory units
MOV (add/sub) internal deposit element, register
MOV segment register, register

3.5 Data Segments

3.6 Stacks
Last in, first out (8086 operations in words)
Push in stack: Push ax (put AX data on the stack) sp=sp-2
Pop out of stack: Pop ax (store top data in ax)
Segment register: SS put the top segment address of the stack
Register: SP put on top of stack offset address
Push Ds/ax/[0]
Pop es/ax/[2]

The segment address of the code is obtained from: CS
Segment address of the data from: DS get
The segment address of the stack from: SS obtains

3.10 Stack Segment

Related Article

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.