Example: confidence

Intel Assembler 80186 and higher CodeTable 1/2 V …

Intel Assembler 80186 and higherCodeTable 1/2 1996-2003 by Roger Jegerlehner, SwitzerlandV English. Also available in SpanishTRANSFERF lagsNameCommentCodeOperationODITSZAPCMOV Move (copy)MOV Dest,SourceDest:=SourceXCHGE xchangeXCHG Op1,Op2Op1:=Op2 , Op2:=Op1 STCSet CarrySTCCF:=11 CLCC lear CarryCLCCF:=00 CMCC omplement CarryCMCCF:= CF STDSet DirectionSTDDF:=1 (string op's downwards)1 CLDC lear DirectionCLDDF:=0 (string op's upwards)0 STISet InterruptSTIIF:=11 CLIC lear InterruptCLIIF:=00 PUSHPush onto stackPUSH SourceDEC SP, [SP]:=SourcePUSHFPush flagsPUSHFO, D, I, T, S, Z, A, P, C 286+: also NT, IOPLPUSHAPush all general registersPUSHAAX, CX, DX, BX, SP, BP, SI, DIPOPPop from stackPOP DestDest:=[SP], INC SPPOPFPop flagsPOPFO, D, I, T, S, Z, A, P, C 286+: also NT, IOPL POPAPop all general registersPOPADI, SI, BP, SP, BX, DX, CX, AXCBWC onvert byte to wordCBWAX:=AL (signed)CWDC onvert word to doubleCWDDX:AX.

Title: Intel Assembler CodeTable 80x86 - Overview of instructions Author: Roger Jegerlehner Subject: Programming Language Created Date: 9/22/2003 10:26:04 PM

Tags:

  Intel, Intel assembler 80186 and higher codetable, Assembler, 80186, Higher, Codetable

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Intel Assembler 80186 and higher CodeTable 1/2 V …

1 Intel Assembler 80186 and higherCodeTable 1/2 1996-2003 by Roger Jegerlehner, SwitzerlandV English. Also available in SpanishTRANSFERF lagsNameCommentCodeOperationODITSZAPCMOV Move (copy)MOV Dest,SourceDest:=SourceXCHGE xchangeXCHG Op1,Op2Op1:=Op2 , Op2:=Op1 STCSet CarrySTCCF:=11 CLCC lear CarryCLCCF:=00 CMCC omplement CarryCMCCF:= CF STDSet DirectionSTDDF:=1 (string op's downwards)1 CLDC lear DirectionCLDDF:=0 (string op's upwards)0 STISet InterruptSTIIF:=11 CLIC lear InterruptCLIIF:=00 PUSHPush onto stackPUSH SourceDEC SP, [SP]:=SourcePUSHFPush flagsPUSHFO, D, I, T, S, Z, A, P, C 286+: also NT, IOPLPUSHAPush all general registersPUSHAAX, CX, DX, BX, SP, BP, SI, DIPOPPop from stackPOP DestDest:=[SP], INC SPPOPFPop flagsPOPFO, D, I, T, S, Z, A, P, C 286+: also NT, IOPL POPAPop all general registersPOPADI, SI, BP, SP, BX, DX, CX, AXCBWC onvert byte to wordCBWAX:=AL (signed)CWDC onvert word to doubleCWDDX:AX.

2 =AX (signed) CWDEConv word extended doubleCWDE386 EAX:=AX (signed)IN iInputIN Dest, PortAL/AX/EAX := byte/word/double of specified portOUT iOutputOUT Port, SourceByte/word/double of specified port := AL/AX/EAXi for more information see instruction specificationsFlags: =affected by this instruction ?=undefined after this instructionARITHMETICF lagsNameCommentCodeOperationODITSZAPCADD AddADD Dest,SourceDest:=Dest+Source ADCAdd with CarryADC Dest,SourceDest:=Dest+Source+CF SUBS ubtractSUB Dest,SourceDest:=Dest-Source SBBS ubtract with borrowSBB Dest,SourceDest:=Dest-(Source+CF) DIVD ivide (unsigned)DIV OpOp=byte: AL:=AX / OpAH:=Rest??????DIVD ivide (unsigned)DIV OpOp=word: AX:=DX:AX / OpDX:=Rest??????DIV 386 Divide (unsigned)DIV OpOp=doublew.: EAX:=EDX:EAX / OpEDX:=Rest??????IDIVS igned Integer DivideIDIV OpOp=byte: AL:=AX / OpAH:=Rest?

3 ?????IDIVS igned Integer DivideIDIV OpOp=word: AX:=DX:AX / OpDX:=Rest??????IDIV 386 Signed Integer DivideIDIV OpOp=doublew.: EAX:=EDX:EAX / OpEDX:=Rest??????MULM ultiply (unsigned)MUL OpOp=byte: AX:=AL*Opif AH=0 ???? MULM ultiply (unsigned)MUL OpOp=word: DX:AX:=AX*Opif DX=0 ???? MUL 386 Multiply (unsigned)MUL OpOp=double: EDX:EAX:=EAX*Opif EDX=0 ???? IMUL iSigned Integer MultiplyIMUL OpOp=byte: AX:=AL*Opif AL sufficient ???? IMULS igned Integer MultiplyIMUL OpOp=word: DX:AX:=AX*Opif AX sufficient ???? IMUL 386 Signed Integer MultiplyIMUL OpOp=double: EDX:EAX:=EAX*Opif EAX sufficient ???? INCI ncrementINC OpOp:=Op+1 (Carry not affected !) DECD ecrementDEC OpOp:=Op-1 (Carry not affected !) CMPC ompareCMP Op1,Op2Op1-Op2 SALS hift arithmetic left( SHL)SAL Op,Quantityi ? SARS hift arithmetic rightSAR Op,Quantityi ? RCLR otate left through CarryRCL Op,Quantityi RCRR otate right through CarryRCR Op,Quantityi ROLR otate leftROL Op,Quantityi RORR otate rightROR Op,Quantityi i for more information see instruction specifications then CF:=0, OF:=0 else CF:=1, OF:=1 LOGICF lagsNameCommentCodeOperationODITSZAPCNEG N egate (two-complement)NEG OpOp:=0-Opif Op=0 then CF:=0 else CF:=1 NOTI nvert each bitNOT OpOp:= Op (invert each bit)ANDL ogical andAND Dest,SourceDest:=Dest Source0 ?

4 0 ORLogical orOR Dest,SourceDest:=Dest Source0 ? 0 XORL ogical exclusive orXOR Dest,SourceDest:=Dest (exor) Source0 ? 0 SHLS hift logical left( SAL)SHL Op,Quantityi ? SHRS hift logical rightSHR Op,Quantityi ? Download latest version free of charge from This page may be freely distributed without cost provided it is not changed. All rights reservedIntel Assembler 80186 and higherCodeTable 2/2 1996-2003 by Roger Jegerlehner, SwitzerlandV English. Also available in SpanishMISCF lagsNameCommentCodeOperationODITSZAPCNOP No operationNOPNo operationLEALoad effective addressLEA Dest,SourceDest := address of SourceINTI nterruptINT Nrinterrupts current program, runs spec. int-program00 JUMPS (flags remain unchanged)NameCommentCodeOperationNameCo mmentCodeOperationCALLCall subroutineCALL ProcRETR eturn from subroutineRETJMPJumpJMP DestJEJump if EqualJE Dest( JZ) JNEJump if not EqualJNE Dest( JNZ)JZJump if ZeroJZ Dest( JE)JNZJump if not ZeroJNZ Dest( JNE) JCXZJump if CX ZeroJCXZ DestJECXZJump if ECX ZeroJECXZ Dest386 JPJump if Parity (Parity Even)JP Dest( JPE) JNPJump if no Parity (Parity Odd)JNP Dest( JPO) JPEJump if Parity EvenJPE Dest( JP) JPOJump if Parity OddJPO Dest( JNP) JUMPS Unsigned (Cardinal)JUMPS Signed (Integer)JAJump if AboveJA Dest( JNBE) JGJump if GreaterJG Dest( JNLE) JAEJump if Above or EqualJAE Dest( JNB JNC) JGEJump if Greater or EqualJGE Dest( JNL)JBJump if BelowJB Dest( JNAE JC) JLJump if LessJL Dest( JNGE)JBEJump if Below or EqualJBE Dest( JNA) JLEJump if Less or EqualJLE Dest( JNG)

5 JNAJump if not AboveJNA Dest( JBE)JNGJump if not GreaterJNG Dest( JLE)JNAEJump if not Above or EqualJNAE Dest( JB JC)JNGEJump if not Greater or EqualJNGE Dest( JL)JNBJump if not BelowJNB Dest( JAE JNC)JNLJump if not LessJNL Dest( JGE)JNBEJump if not Below or EqualJNBE Dest( JA)JNLEJump if not Less or EqualJNLE Dest( JG)JCJump if CarryJC DestJOJump if OverflowJO DestJNCJump if no CarryJNC DestJNOJump if no OverflowJNO DestJSJump if Sign (= negative)JS DestGeneral Registers:JNSJump if no Sign (= positive)JNS DestEAX 386 ; Demo SMALL 1024 3124 2316 158 7 0 TwoEQU 2; 386 VarBDB ?; define Byte, any valueDXVarWDW 1010b; define Word, binaryDHDLVarW2DW 257; define Word, decimal Data mul, div, IOVarDDD 0 AFFFFh; define Doubleword, hex 3124 2316 158 7 0 SDB "Hello !",0; define 386main:MOV AX,DGROUP; resolved by linkerCXMOV DS,AX; init datasegment regCHCLMOV [VarB],42; init VarB Count loop, shiftMOV [VarD],-7; set VarD 3124 2316 158 7 0 MOV BX,Offset[S]; addr of "H" of "Hello !

6 "MOV AX,[VarW]; get value into accumulatorEBX 386 ADD AX,[VarW2]; add VarW2 to AXBXMOV [VarW2],AX; store AX in VarW2 BHBLMOV AX,4C00h; back to system BaseX data ptrINT 21h 3124 2316 158 7 0 END mainStatus Flags (result of operations):Flags:O----DITS-A-P-CControl Flags (how instructions are carried out):D: Direction1 = string op's process down from high to low addressI: Interruptwhether interrupts can occur. 1= enabledT: Trapsingle step for debuggingC: Carryresult of unsigned op. is too large or below zero. 1 = carry/borrowO: Overflowresult of signed op. is too large or small. 1 = overflow/underflowS: Signsign of result. Reasonable for Integer only. 1 = neg. / 0 = : Zeroresult of operation is zero. 1 = zeroA: Aux. carrysimilar to Carry but restricted to the low nibble onlyP: Parity1 = result has even number of set bitsDownload latest version free of charge from This page may be freely distributed without cost provided it is not changed.

7 All rights reserv


Related search queries