You are on page 1of 11

tulisnota.blogspot.

com

ASSEMBLY LANGUAGE
PROGRAMMING
Instruction Set

tulisnota.blogspot.com

DATA TRANSFER
Opcode MOV PUSH PUSHF LAHF SHAF POP POPF IN OUT Function Moves byte or word Pushes word onto stack Pushes flag onto stack Moves flags into AH Loads flags from AH Pops word from stack Pops flags from stack Inputs data to accumulator from I/O devices Outputs data from accumulator to I/O devices

tulisnota.blogspot.com

DATA TRANSFER (CONT.)


Opcode XCHG XLAT LEA LDS LES Function Exchange bytes or words Translate table lookup instruction Load effective address Loads DS and the operand with a 32-bit address Loads ES and the operand with a 32-bit address

tulisnota.blogspot.com

ARITHMETIC
Opcode ADD ADC AAA DAA INC SUB SBB NEG CMP AAS Function Adds bytes or words Adds bytes or words plus carry flag Adjust ASCII after addition Adjust BCD after addition Adds 1 to byte or word Subtracts bytes or words Subtract bytes or words minus carry flag Changes sign of byte or word (twos complement) Compares bytes or words Adjusts ASCII after subtraction

tulisnota.blogspot.com

ARITHMETIC (CONT.)
Opcode DAS DEC MUL IMUL AAM DIV IDIV CBW CWD AAD Function Adjust BCD after subtraction Subtracts 1 from byte or word Multiples unsigned byte or word Multiples signed byte or word Adjust ASCII after multiplication Divides unsigned byte or word Divides signed byte or word Converts byte to word Converts word to double word Adjust ASCII before division

tulisnota.blogspot.com

BIT MANIPULATION
Opcode AND OR XOR NOT TEST SHL/SAL SHR SAR ROL RCL ROR RCR Function ANDs bytes or word ORs bytes or word Exclusive-ORs bytes or words Inverts bytes or words Test bytes or words (AND) Shifts logical/arithmetic left Shifts logical right Shift arithmetic right Rotates byte or word left Rotates byte or word left through carry Rotates byte or word right Rotates byte or word right through carry

tulisnota.blogspot.com

STRING INSTRUCTIONS
Opcode MOVS CMPS SCAS LODS STOS Function Moves bytes or words Compares bytes or words Scans for byte or word Loads AL or AX with byte or word Stores AL or AX in byte or word

tulisnota.blogspot.com

PROGRAM TRANSFER
Opcode CALL RET JMP INT 3 INTO IRET JA/JNBE JAE/JNB JB/JNAE JBE/JNA JC Function Calls subroutine Returns from subroutine Jumps to another part of program Type 3 interrupt Interrupts on overflow Interrupt return Jumps above/jumps not below or equal to Jumps above or equal to/jumps not below Jumps below/jumps not above or equal to Jumps below or equal to/jumps not above Jumps carry set

tulisnota.blogspot.com

PROGRAM TRANSFER (CONT.)


Opcode JE/JZ JG/JNLE JGE/JNL JL/JNGE JLE/JNG JNC JNE/JNZ JNO Function Jumps equal/jumps zero Jumps greater/jumps not less than or equal to Jumps greater than or equal to/jumps not less than Jumps less than/jumps not greater than or equal to Jumps less than or equal to/jumps not greater than Jumps no carry Jumps not equal to/jumps not zero Jumps no overflow

tulisnota.blogspot.com

PROGRAM TRANSFER (CONT.)


Opcode JNP/JPO JNS JO JP/JPE JS LOOP LOOPE/LOOPZ LOOPNE/LOOPNZ JCXZ Function Jumps no parity/jumps parity odd Jumps no sign (positive) Jumps on overflow Jumps parity/jumps parity odd Jump sign (negative) Loops CX times Loops while equal to/loops while zero Loops while not equal to/loop while not zero Jumps if CX = 0

tulisnota.blogspot.com

PROCESSOR CONTROL
Opcode STC CLC CMC STD CLD STI CLI HLT WAIT ESC LOCK NOP Function Sets carry Clears carry Complements carry Selects auto-decrement mode Selects auto-increment mode Enables interrupts Disable interrupts Halts until a reset or an interrupt Waits for TEST pin = 0 Provides escape to coprocessor Locks the bus during the next instruction Performs no operation

You might also like