用汇编 编一个 计数器 程序
DATASEGMENTSTOCKDB20H,20HDUP(0)KUOHAODB20HDUP(0)zhdb0MIDDW0LASTDW0COMPDW0firstdb0latterdb0LEFTDB0RIGHTDB0DATAENDSSTACKSEGMENTparastackDB20DUP(0)STACKENDSCODESEGMEN ,CS:CODE,SS:STACK,ES:DATAAX,DATAMOVDS,AXMOVES,AXMOVAH,0AHMOVDX,0INT21HCLDMOVSI,0MOVAL,'('CALLFINDMOVMID,SIsubmid,1MOVAL,')'CALLFINDMOV...全部
DATASEGMENTSTOCKDB20H,20HDUP(0)KUOHAODB20HDUP(0)zhdb0MIDDW0LASTDW0COMPDW0firstdb0latterdb0LEFTDB0RIGHTDB0DATAENDSSTACKSEGMENTparastackDB20DUP(0)STACKENDSCODESEGMEN ,CS:CODE,SS:STACK,ES:DATAAX,DATAMOVDS,AXMOVES,AXMOVAH,0AHMOVDX,0INT21HCLDMOVSI,0MOVAL,'('CALLFINDMOVMID,SIsubmid,1MOVAL,')'CALLFINDMOVLAST,SIsublast,1SUBSI,MIDsubsi,1MOVCOMP,SIMOVDI,2L1:cmpstock[DI],39hjaerrorcmpstock[DI],30hjbFUHAOANDstock[DI],0FHJMPL2 [DI],28HCMPstock[DI],2AHJZL2CMPstock[DI],2BHJZL2CMPstock[DI],2DHJZL2CMPstock[DI],2FHJZL2CMPstock[DI],'('JZL2CMPstock[DI],')'JZL2JMPERRORINCDIL2:LOOPL1MOVCX,MIDINCCXL7:PUSHCXMOVDX,MIDMOVFIRST,DXMOVBL,KUOHAO[DX]MOVLEFT,BLCALLJISUANSUBMID,1POPCXLOOPL7AH,4CHINT21HjisuanprocL4:movbl,LEFTINCBLmovCX,STOCK[1]SUBCX,LEFTL8:CMPSTOCK[BL],')'JZCAINCBLLOOPL8CA:MOVRIGHT,BLCMPCX,0JZERRORMOVBL,LEFTINCBLLLL9:MOVCX,RIGHTSUBCX,LEFTDECCXL9:CMPSTOCK[BL],'*'JZMUL0CMPSTOCK[BL],'/'JZDIV0JMPLL9MUL0:DECBLCMPSTOCK[BL],0JBERRORCMPSTOCK[BL],9JAERRORMOVAL,STOCK[BL]MOVAH,0ADDBL,2CMPSTOCK[BL],0JBERRORCMPSTOCK[BL],9JAERRORMULSTOCK[BL]JMPMOBDIV0:DECBLCMPSTOCK[BL],0JBERRORCMPSTOCK[BL],9JAERRORMOVAL,STOCK[BL]MOVAH,0MOVDX,0ADDBL,2CMPSTOCK[BL],0JBERRORCMPSTOCK[BL],9JAERRORDIVSTOCK[BL] ,2MOVSTOCK[BL],ALCALLYIWEI;此单元后向左移两位JMPLLL9LL9:INCBLLOOPL9RETJISUANENDPFINDPROCMOVDI,2MOVCL,STOCK[1]MOVCH,0;30L0:PUSHCXmovdx,dimovzh,dlsubzh,2MOVCL,STOCK[1]subcl,zhMOVCH,0REPNZSCASBPOPCXMOVBL,STOCK[1]MOVBH,0ADDBX,2CMPDI,BXJZSTOPmovbx,didecblMOVKUOHAO[SI],blINCSILOOPL0FINDENDPCODEENDSENDSTART。
收起