Professional Documents
Culture Documents
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
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
tulisnota.blogspot.com
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