Chapter 3 & 4 Flashcards
Integer Operator Precedence
- ()
- +,- (unary)
- *,/
- MOD
- +,-
Directives
Commands that are recognized and acted upon by the assembler
- used to declare code, declare procedures
Instructions
Assembled into machine code by assembler, executed at runtime by CPU
Contains: label (optional)
Mnemonic operant comment
Labels
a) Data labels - ex: myArray
b) Code labels - ex: L1:
Mnemonics
MOV, ADD, SUB, etc.
Listing File
Shows how program is compiled. Contains:
- source code
- addresses
- object code (machine language)
- segment names
- symbols (variables, procedures, constants)
BYTE, SBYTE
8-bit unsigned integer, 8-bit signed integer
TBYTE
80-bit integer (10 bytes)
Data Definition
Syntax:
[name] directive initializer
value1 DWORD 2
CR/LF
Carriage return 0dh
Line feed 0ah
Ex: “hello”,0,dh,ah
DUP Operator
Syntax: counter DUP (argument)
Little Endian Order
All data types larger than a byte store their individual bytes in reverse order.
The least significant byte occurs at the first (lowest) memory address
Values read backwards
Declaring Uninitialized Data
.data?
MyEx BYTE ?
$
Current location counter
EQU
Count = 3
Count EQU 3
Equivalent