#define _TOKB_#include"tok.h"charbadadr[]="Bad outrm value in outaddress();";charCXandDX[]="CX and DX";charECXandEDX[]="ECX and EDX";charBXandFS[]="BX and FS";intdivexpand=FALSE;intoptnumber=FALSE;ITOKitok,itok2,ptok;char*pbuf;SINFOpstr;LISTFLOAT*floatnum=NULL;//ᯨ᮪ float <20><><EFBFBD><EFBFBD>⠭<EFBFBD>unsignedintnumfloatconst=0;unsignedintmaxnumfloatconst;#define STEPFLOATCONST 16unsignedintofsfloatlist=0;unsignedcharidxregs[5]={ESI,EDI,EBX,EDX,255};intexpandvar();intspeedmul(unsignedlongnum,intrazr);intleamul32(unsignedlongnum,intreg,intrazr);voidFloat2reg32(intreg,intaddop=0,intreg1=idxregs[0],intreg2=idxregs[1]);voidNegReg(intrazr,intreg);intRshiftReg(intrazr,intreg,intsign);voiddo_e_axmath2(intsign,intrazr,intexpand);intMulReg(intreg,intrazr);voidDivMod(intvop,intsign,intrazr,intexpand);voidDivNum2(unsignedlongnum,intrazr,intsign);voidDivNum(unsignedlongnum,intrazr,intsign);voidClearDX(intrazr,intsign);voiddoalmath2(intsign);voidnum2bits(ITOK*gtok,unsignedlongnum,intrazr);voidreg2bits(ITOK*gtok,intrazr);voidcwpointr(ITOK*wtok,char*&wbuf,SINFO*wstr,int*otok,intnpointr,intureg);intCheckAddOnly();voidoptnumadd64(unsignedlonglongnum,intr1,intr2,intvop);voidCallExternProc(char*name);voidgetinto_reg(intgtok,ITOK*gstok,char*&gbuf,SINFO*gstr,intrazr,intreg);voidintinstack(intaddop);externvoidwarningoptnum();externvoidsegoperror();externvoidsegbyteerror();externvoidregmathoperror();externvoidbegmathoperror();externvoidnegregerror();externvoidregbyteerror();externvoidbegworderror();externvoidregshifterror();externvoidregmatherror();externvoidDevideZero();externvoidwordnotoper();unsignedlonglongli[]={0x1,0x2,0x4,0x8,0x10,0x20,0x40,0x80,0x100,0x200,0x400,0x800,0x1000,0x2000,0x4000,0x8000,0x10000,0x20000,0x40000,0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0x10000000,0x20000000,0x40000000,0x80000000,0x100000000LL,0x200000000LL,0x400000000LL,0x800000000LL,0x1000000000LL,0x2000000000LL,0x4000000000LL,0x8000000000LL,0x10000000000LL,0x20000000000LL,0x40000000000LL,0x80000000000LL,0x100000000000LL,0x200000000000LL,0x400000000000LL,0x800000000000LL,0x1000000000000LL,0x2000000000000LL,0x4000000000000LL,0x8000000000000LL,0x10000000000000LL,0x20000000000000LL,0x40000000000000LL,0x80000000000000LL,0x100000000000000LL,0x200000000000000LL,0x400000000000000LL,0x800000000000000LL,0x1000000000000000LL,0x2000000000000000LL,0x4000000000000000LL,0x8000000000000000LL};unsignedlongleanum[24]={3,5,9,15,25,27,45,81,75,125,135,225,243,405,729,375,675,1215,2187,625,1125,2025,3645,6561};unsignedintnumleamul[24][4]={{3,0,0,0},{5,0,0,0},{9,0,0,0},{3,5,0,0},{5,5,0,0},{3,9,0,0},{5,9,0,0},{9,9,0,0},{5,5,3,0},{5,5,5,0},{9,5,3,0},{9,5,5,0},{9,9,3,0},{9,9,5,0},{9,9,9,0},{5,5,5,3},{5,5,9,3},{9,9,5,3},{9,9,9,3},{5,5,5,5},{9,5,5,5},{9,9,5,5},{9,9,9,5},{9,9,9,9}};intRmEqualReg(intreg,intrm,intsib){intrm0;intreg1=-1,reg2=-1;rm0=rm&0x7;if(sib==CODE16){switch(rm0){case0:reg1=BX;reg2=SI;break;case1:reg1=BX;reg2=DI;break;case2:reg1=BP;reg2=SI;break;case3:reg1=BP;reg2=DI;break;case4:reg1=SI;break;case5:reg1=DI;break;case6:if((rm&0xC0)!=0)reg1=BP;break;case7:reg1=BX;break;}}else{if(rm0==4){reg1=sib&7;reg2=(sib>>3)&7;if(reg1==5&&(rm&0xc0)==0)reg1=-1;if(reg2==4)reg2=-1;}else{reg1=rm0;if(reg1==5&&(rm&0xc0)==0)reg1=-1;}}if(reg==reg1||reg==reg2)returnTRUE;returnFALSE;}voidstartmul(intrazr){if(razr==r8)outword(0xE08A);//mov ah,al
else{op66(razr);outword(0xD08B);//mov dx,ax
warningreg(regs[razr/2-1][2]);}}voidlshiftmul(intnum,intrazr,intreg=AX){if(razr==r8){if(num==1)ou