Professional Documents
Culture Documents
- Each of these directives causes the assembler to generate the required SEGMENT statement and its
matching ENDS
- .stack sets up the stack
- The default stack size is 1024 bytes, which you may override
- If you want to change the default size, specify the size as its operand
- .data defines the beginning of a data segment
- All data definitions should be put after this directive
- .code ends a data segment and starts a code segment
- Place all executable statements for the procedure after this directive
mov instruction
- transfers data referenced by the address of the second operand to the address of the first operand
- the sending (2nd operand) field is unchanged
- the operands must agree in size
- valid operands are: between two registers, between a register and a memory, immediate data to a register
or memory
Initialize Address of the Data Segment in DS register
mov ax, @data
mov ds, ax
- the code above initializes the DS register with the address of the data segment