Pseudo-op names start with a dot to distinguish them from machine instructions. Common use of pseudo-ops is to reserve storage areas for data and optionally initialize their contents to known values.
.data
The data pseudo op changes the current section to .data.
Defining Data
BYTE, SBYTE
8-bit unsigned integer; 8-bit signed integer
WORD, SWORD
16-bit unsigned & signed integer
DWORD, SDWORD
32-bit unsigned & signed integer
QWORD
64-bit integer
Example:
• Defining BYTE and SBYTE Data
Value1 BYTE 10
Value2 SBYTE -10
Defining Strings:
str1 BYTE "Enter your name", 0
var1 BYTE 20 DUP(0) ; 20 bytes, all equal to zero
Equal-Sign Directive
COUNT = 500
EQU Directive
counter EQU 10
Comments
Leave a comment