Professional Documents
Culture Documents
Directive
Instruction format
Name/label mnemonic operand(s) ;comment
Must be required
Not must be required
MOV
START : MOV MOV AL,X
START ADDAL,X
AL,X : MOV ; Take the first number
X DB 12H ADD AL,Y
START : MOV AL,X ; Take the first number
MOV [2400H],AL
Spaces are required
Either uppercase or lowercase letters is ok.
PUSH AX
DATA SEGMENT
X DB 12H ; Definition of numbers
Y DB 24H DATA SEGMENT
Z DB 00H
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
MAIN: MOV AX,DATA CODE SEGMENT
MOV DS,AX
MOV AL,X ; Take the first number
ADD AL,Y ; Adding the second number
MOV Z,AL ; Storage of calculation results
STOP: JMP STOP
CODE ENDS
END MAIN
Editing the source
file
Typing the source
file
Assembling(Compilating)
the source file
Suffix
Binary numer 00100110B
Suffix
Hexdecimal numer 26H
None
Decimal numer 38
Constants are written the same way
in directives and in instructions.
X DB 00100110B
X DB 26H Directives
X DB 38
3.5 Instruction operands