The purpose of a symbolic Definition Statement is to use a symbol instead of a constant or numeric expression that is frequently used. Code You only need to modify the symbolic Definition Statement.
Symbol definition statements are divided
1 equivalent statement equ
2 equal sign Statement =
1. equivalent statement
For example, you can use Symbolic equivalent statements to represent constants or expressions.
Number equ 100
Buff_len equ number + 2
You can also use Symbolic equivalent statements to define a long string constant.
MSG equ "Hallo world"
You can also use Symbolic equivalent statements to define an instruction or register.
Move equ mov
Counter equ CX
You can also use Symbolic equivalent statements to create an alias for another data type in one memory area.
Word1 equ this word
Byte1 dB 12 h, 21 h
At this time, word1 is 2112 H.
2 equal sign statement
The assembly language provides a method for defining symbolic Constants by equal signs, that is, a constant can be represented by a symbolic name. Format:
Symbol name = numeric expression
Def = ABC * 5
3. symbolic name Definition Statement
The label function of the symbolic name Definition Statement is similar to that of this statement. This statement has a specified symbolic name. The segment address and offset of the symbolic name are the same as the corresponding attributes of the storage unit that follow below, however, the type of the symbol is newly specified. The general format of the label statement is:
Symbol name label type
Common types include byte word DWORD near far
Wbuffer label word
Buffer dB DUP (0)
Wbuffer and buffer have the same segment address and offset, but their data types are different.
Next1 label far
Next: mov BX, ax
Next1 and next have the same segment address and offset, but next1 is the far mark, and next is the near label. In the same module, you can use next to transfer data between different modules, and use next1.