Chapter 4 Flashcards
What instruction is used to copy data between registers or memory?
MOV destination, source
What does the XCHG instruction do?
Exchange values
What are the two types of memory addressing?
Direct and indirect memory addressing
What instruction is used to add two values?
ADD destination, source
What instruction is used to subtract one value from another?
SUB destination, source
What does the INC instruction do?
Increment by 1
What does the DEC instruction do?
Decrement by 1
What is the purpose of the NEG instruction?
Negates value using two’s complement
What is immediate addressing in assembly language?
MOV AL, 5
What is register addressing?
MOV AX, BX
What is direct memory addressing?
MOV AX, [myVar]
What is indirect addressing?
MOV AX, [BX]
What does MOVZX do?
Zero-extend smaller values into larger registers
What does MOVSX do?
Sign-extend smaller values into larger registers
What does the JMP instruction do?
Unconditional jump
What does the LOOP instruction do?
Repeats block until CX reaches 0
What is the Carry Flag (CF)?
Set when unsigned arithmetic overflow occurs
What does the Overflow Flag (OF) indicate?
Set when signed arithmetic overflows
What does the Zero Flag (ZF) signify?
Set when result is zero
What does the Sign Flag (SF) indicate?
Set when result is negative
What is the purpose of the Parity Flag (PF)?
Set when even number of 1s in result