4.1 Basic data in assembly language
• identifiers
• Constants
• A variable has three properties:
(1) Segment Address (SEG): The segment address of the segment where the variable is located
(2) Offset address: Offset address within the segment of the variable
(3) Type: The number of bytes occupied by each variable
• marking
It is a symbolic representation of the address of an executable instruction statement, that is, an identifier to represent an address.
It can be used as the purpose operand of the transfer instruction and the calling instruction to determine the destination address of the program transfer.
A label has 3 properties
(1) Paragraph address (SEG): The segment address of the first byte of the instruction corresponding to the label;
(2) Offset address: The offset address where the first byte of the instruction corresponding to the label is located;
(3) Type: The type attribute of the label has two types, near and far, of which close is nearly labeled and can only be used within this paragraph; Long is a distant label can be used between segments
4.2 Pseudo-directive statements
Data definition, identifier assignment and cancellation, segment definition, process definition, program start and end,
method definition, structure definition, grouping, and other nine kinds of pseudo-directive statements.
• Data definition pseudo-directive statements (total 5) also called mnemonics
(1) DB: Defines the byte data as well as the string, which specifies that each operand occupies one byte, and that each letter of the string occupies one byte;
(2) DW: Define the Word data, which specifies that each operand occupies 2 bytes;
(3) DD: Defines two-character data, which specifies that each operand occupies 4 bytes;
(4) DQ: Define 4-word data, which requires 8 bytes per operand;
(5) DT: Defines 10 bytes of data, which specifies that each operand occupies 10 bytes;
Instruction format:
Variable name mnemonic operand;
Variable name mnemonic n DUP (operand);
Note: #变量名是一个用标识符表示的符号地址. Its value equals the offset address value of the first byte of the first operand after a mnemonic;
#助记符有DB, DW, DD, DQ, dt Five kinds of pseudo-instructions;
#操作数可以是常数, variables, expressions, string data;
# N DUP () is used to define an array, and the number of operands in parentheses is repeated n times;
2017.10.18 assembly language syntax and DOS function calls