5.1 [BX]
MOV ax,[bx] function: BX stored in the data as an offset address EA, the segment address SA by default in the DS, the data at Sa:ea is fed into Microsoft Dynamics AX.
5.2 Loop Command
The format of the directive is: loop designator, when the CPU executes the Loop command, two steps are taken:
1. (CX) = (CX)-1;
2. Determine the value in CX, not zero to go to the label to execute the program, if zero is executed down.
Usually we use loop instruction to realize the loop function, the number of cycles stored in CX.
5.3 Tracking Loop program implemented with loop instruction in debug
5.4 Debug and Assembler compiler MASM different handling of instructions
In the assembler meta-Program, the instruction "mov ax,[0]" is treated as a directive "MOV ax,0" by the compiler.
1.mov al, [0]
2.mov al, Ds:[0]
3.mov al, [BX]
4.mov al, Ds:[bx]
Combined application of 5.5 loop and [BX]
5.6 Segment Prefix
Instruction "mov ax,[bx]", the offset address of the memory unit is given by BX, and the segment address by default in the DS, we can access the memory unit in the instruction to explicitly give the memory unit segment address of the segment register.
The "DS:", "CS:", "SS:", or "es:" that are used to explicitly indicate the segment address of a memory unit, called a segment prefix in assembly language.
5.7 A safe space
In 8086 mode, it is dangerous to write to a memory space at will, as this space may contain important system data or code.
In a typical PC, DOS and other legitimate programs do not generally use the 256-byte space of 0:200~0:2FF (0:200H~0:2FFH) in a DOS mode. So, we use this space to be safe.
Use of 5.8-segment prefixes
Reference: "Small Turtle Collection 0 Basic Primer"
The third edition of Assembly language
Wang Shuang "assembly language" the third edition of the fifth chapter [BX] and loop instructions