Assembly Language Notes 7

To read a memory cell CPU time must be given the address of the memory unit ;

In 8086PC, the memory address by a segment address and offset address components.

8086CPU DS has a register to be accessed normally used to store the segment address data .

 

mov al, [0] mov known functions:

1 directly into the data register

2 the contents of a register into another register.

3 the contents of a memory unit into a register.

 

8086CPU does not support the data directly into the segment register DS.

 

Writing data to the memory from the register unit:

mov bx,1000H

mov ds, bx the segment address provided in the address ds

mov [0], cx cx 16-bit data to 1000: 0

mov ax, [0] 1000: 0 font data fed ax

 

mov registers, segment registers are possible ...

 

Of the pair of length N (N <= 64K), addresses are consecutive, the start address is a multiple of the memory unit 16 as a dedicated memory space to store data, thereby defining a data segment

 

Simple example:

Simple program analysis:

 

When a word is stored in memory, to use two consecutive addresses of memory cells to store word is stored in the low byte address locations low, high byte stored in high address locations.

2 with the mov instruction to access the memory cells, can be given only in offset mov instruction unit, in which case, the address of the default segment register ds.

[3] indicates an offset address to address the address memory cell.

Reproduced in: https: //my.oschina.net/u/204616/blog/545352

Guess you like

Origin blog.csdn.net/weixin_34236869/article/details/91989313