1.基本语法
2. 常用汇编指令
2.1 数据交换指令
2.1.1 通用数据传送指令
MOV----> moveMOVSX---->extended move with sign dataMOVZX---->extended move with zero dataPUSH---->pushPOP---->popPUSHA---->push allPOPA---->pop allPUSHAD---->push all dataPOPAD---->pop all dataBSWAP---->byte swapXCHG---->exchangeCMPXCHG---->compare and changeXADD---->exchange and addXLAT---->translate
2.1.2 输入输出端口传送指令
IN---->inputOUT---->output
2.1.3 目的地址传送指令.
LEA---->load effective addressLDS---->load DSLES---->load ESLFS---->load FSLGS---->load GSLSS---->load SS
2.1.4 标志传送指令.
LAHF---->load AH from flagSAHF---->save AH to flagPUSHF---->push flagPOPF---->pop flagPUSHD---->push dflagPOPD---->pop dflag
2.2 算术运算指令
ADD---->addADC---->add with carryINC---->increase 1AAA---->ascii add with adjustDAA---->decimal add with adjustSUB---->substractSBB---->substract with borrowDEC---->decrease 1NEC---->negativeCMP---->compareAAS---->ascii adjust on substractDAS---->decimal adjust on substractMUL---->multiplicationIMUL---->integer multiplicationAAM---->ascii adjust on multiplicationDIV---->divideIDIV---->integer divideAAD---->ascii adjust on divideCBW---->change byte to wordCWD---->change word to double wordCWDE---->change word to double word with sign to EAXCDQ---->change double word to quadrate word
2.3 逻辑运算指令
AND---->andOR---->orXOR---->xorNOT---->notTEST---->testSHL---->shift leftSAL---->arithmatic shift leftSHR---->shift rightSAR---->arithmatic shift rightROL---->rotate leftROR---->rotate rightRCL---->rotate left with carryRCR---->rotate right with carry
2.4 串指令
MOVS---->move stringCMPS---->compare stringSCAS---->scan stringLODS---->load stringSTOS---->store stringREP---->repeatREPE---->repeat when equalREPZ---->repeat when zero flagREPNE---->repeat when not equalREPNZ---->repeat when zero flagREPC---->repeat when carry flagREPNC---->repeat when not carry flag
2.5 程序转移指令
//1>无条件转移指令(长转移)JMP---->jumpCALL---->callRET---->returnRETF---->return far//2>条件转移指令(短转移,-128到+127的距离内)JAE---->jump when above or equalJNB---->jump when not belowJB---->jump when belowJNAE---->jump when not above or equalJBE---->jump when below or equalJNA---->jump when not aboveJG---->jump when greaterJNLE---->jump when not less or equalJGE---->jump when greater or equalJNL---->jump when not lessJL---->jump when lessJNGE---->jump when not greater or equalJLE---->jump when less or equalJNG---->jump when not greaterJE----> 跳转到某个地址JZ---->jump when has zero flagJNE---->jump when not equalJNZ---->jump when not has zero flagJC---->jump when has carry flagJNC---->jump when not has carry flagJNO---->jump when not has overflow flagJNP---->jump when not has parity flagJPO---->jump when parity flag is oddJNS---->jump when not has sign flagJO---->jump when has overflow flagJP---->jump when has parity flagJPE---->jump when parity flag is evenJS---->jump when has sign flag//3>循环控制指令(短转移)LOOP---->loopLOOPE---->loop equalLOOPZ---->loop zeroLOOPNE---->loop not equalLOOPNZ---->loop not zeroJCXZ---->jump when CX is zeroJECXZ---->jump when ECX is zero//4>中断指令INT---->interruptINTO---->overflow interruptIRET---->interrupt return//5>处理器控制指令HLT---->haltWAIT---->waitESC---->escapeLOCK---->lockNOP---->no operationSTC---->set carryCLC---->clear carryCMC---->carry make changeSTD---->set directionCLD---->clear directionSTI---->set interruptCLI---->clear interrupt
2.6 伪指令
DW---->definw wordPROC---->procedureENDP---->end of procedureSEGMENT---->segmentASSUME---->assumeENDS---->end segmentEND---->end