1. Defining Data
1.1. BYTE, SBYTE 8-bit unsigned integer; 8-bit signed integer
1.1.1. value1 BYTE 'A' ; character constant value2 BYTE 0 ; smallest unsigned byte value3 BYTE 255 ; largest unsigned byte value4 SBYTE -128 ; smallest signed byte value5 SBYTE +127 ; largest signed byte value6 BYTE ? ; uninitialized byte
1.2. WORD, SWORD 16-bit unsigned & signed integer
1.2.1. word1 WORD 65535 ; largest unsigned value word2 SWORD –32768 ; smallest signed value word3 WORD ? ; uninitialized, unsigned word4 WORD "AB" ; double characters myList WORD 1,2,3,4,5 ; array of words array WORD 5 DUP(?) ; uninitialized array
1.3. DWORD, SDWORD 32-bit unsigned & signed integer
1.3.1. val1 DWORD 12345678h ; unsigned val2 SDWORD –2147483648 ; signed val3 DWORD 20 DUP(?) ; unsigned array val4 SDWORD –3,–2,–1,0,1 ; signed array
1.4. QWORD 64-bit integer, TBYTE 80-bit integerr
1.4.1. quad1 QWORD 1234567812345678h val1 TBYTE 1000000000123456789Ah rVal1 REAL4 -2.1 rVal2 REAL8 3.2E-260 rVal3 REAL10 4.6E+4096 ShortArray REAL4 20 DUP(0.0)
2. symbolic constant
2.1. Equal-Sign Directive
2.1.1. name = expression expression is a 32-bit integer (expression or constant) may be redefined name is called a symbolic constant
2.2. Calculating the Size of a Byte Array
2.2.1. current location counter: $ subtract address of list difference is the number of bytes
2.2.2. Calculating the Size of a Word Array
2.3. Calculating the Size of a Doubleword Array
2.3.1. Divide total number of bytes by 4 (the size of a doubleword)
2.4. EQU Directive
2.4.1. Define a symbol as either an integer or text expression. Formats name EQU expression name EQU symbol name EQU <text> Cannot be redefined
2.5. TEXTEQU Directive
2.5.1. Define a symbol as either an integer or text expression. Called a text macro Can be redefined