⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 assyntax.h

📁 winNT技术操作系统,国外开放的原代码和LIUX一样
💻 H
📖 第 1 页 / 共 5 页
字号:
#define D_REGBID(b, i, d)	QWORD_PTR [b + i + d]
#define L_REGBID(b, i, d)	DWORD_PTR [b + i + d]
#define W_REGBID(b, i, d)	WORD_PTR [b + i + d]
#define B_REGBID(b, i, d)	BYTE_PTR [b + i + d]

/* Reg indirect Base + (Index * Scale) */
#define P_REGBIS(b, i, s)	[b + i * s]
#define X_REGBIS(b, i, s)	TBYTE_PTR [b + i * s]
#define D_REGBIS(b, i, s)	QWORD_PTR [b + i * s]
#define L_REGBIS(b, i, s)	DWORD_PTR [b + i * s]
#define W_REGBIS(b, i, s)	WORD_PTR [b + i * s]
#define B_REGBIS(b, i, s)	BYTE_PTR [b + i * s]

/* Reg indirect Base + (Index * Scale) + Displacement */
#define P_REGBISD(b, i, s, d)	[b + i * s + d]
#define X_REGBISD(b, i, s, d)	TBYTE_PTR [b + i * s + d]
#define D_REGBISD(b, i, s, d)	QWORD_PTR [b + i * s + d]
#define L_REGBISD(b, i, s, d)	DWORD_PTR [b + i * s + d]
#define W_REGBISD(b, i, s, d)	WORD_PTR [b + i * s + d]
#define B_REGBISD(b, i, s, d)	BYTE_PTR [b + i * s + d]

/* Displaced Scaled Index: */
#define P_REGDIS(d, i, s)	[i * s + d]
#define X_REGDIS(d, i, s)	TBYTE_PTR [i * s + d]
#define D_REGDIS(d, i, s)	QWORD_PTR [i * s + d]
#define L_REGDIS(d, i, s)	DWORD_PTR [i * s + d]
#define W_REGDIS(d, i, s)	WORD_PTR [i * s + d]
#define B_REGDIS(d, i, s)	BYTE_PTR [i * s + d]

/* Indexed Base: */
#define P_REGBI(b, i)		[b + i]
#define X_REGBI(b, i)		TBYTE_PTR [b + i]
#define D_REGBI(b, i)		QWORD_PTR [b + i]
#define L_REGBI(b, i)		DWORD_PTR [b + i]
#define W_REGBI(b, i)		WORD_PTR [b + i]
#define B_REGBI(b, i)		BYTE_PTR [b + i]

/* Displaced Base: */
#define P_REGDB(d, b)		[b + d]
#define X_REGDB(d, b)		TBYTE_PTR [b + d]
#define D_REGDB(d, b)		QWORD_PTR [b + d]
#define L_REGDB(d, b)		DWORD_PTR [b + d]
#define W_REGDB(d, b)		WORD_PTR [b + d]
#define B_REGDB(d, b)		BYTE_PTR [b + d]

/* Variable indirect: */
#define VARINDIRECT(var)	[var]

/* Use register contents as jump/call target: */
#define CODEPTR(reg)		P_(reg)

/*
 * Redefine assembler commands
 */

#define P_(a)			P_ ## a
#define X_(a)			X_ ## a
#define D_(a)			D_ ## a
#define SR_(a)			W_ ## a
#define S_(a)			L_ ## a
#define L_(a)			L_ ## a
#define W_(a)			W_ ## a
#define B_(a)			B_ ## a

#define AAA			aaa
#define AAD			aad
#define AAM			aam
#define AAS			aas
#define ADC_L(a, b)		adc L_(b), L_(a)
#define ADC_W(a, b)		adc W_(b), W_(a)
#define ADC_B(a, b)		adc B_(b), B_(a)
#define ADD_L(a, b)		add L_(b), L_(a)
#define ADD_W(a, b)		add W_(b), W_(a)
#define ADD_B(a, b)		add B_(b), B_(a)
#define AND_L(a, b)		and L_(b), L_(a)
#define AND_W(a, b)		and W_(b), W_(a)
#define AND_B(a, b)		and B_(b), B_(a)
#define ARPL(a,b)		arpl W_(b), a
#define BOUND_L(a, b)		bound L_(b), L_(a)
#define BOUND_W(a, b)		bound W_(b), W_(a)
#define BSF_L(a, b)		bsf L_(b), L_(a)
#define BSF_W(a, b)		bsf W_(b), W_(a)
#define BSR_L(a, b)		bsr L_(b), L_(a)
#define BSR_W(a, b)		bsr W_(b), W_(a)
#define BT_L(a, b)		bt L_(b), L_(a)
#define BT_W(a, b)		bt W_(b), W_(a)
#define BTC_L(a, b)		btc L_(b), L_(a)
#define BTC_W(a, b)		btc W_(b), W_(a)
#define BTR_L(a, b)		btr L_(b), L_(a)
#define BTR_W(a, b)		btr W_(b), W_(a)
#define BTS_L(a, b)		bts L_(b), L_(a)
#define BTS_W(a, b)		bts W_(b), W_(a)
#define CALL(a)			call a
#define CALLF(s,a)		call far s:a
#define CBW			cbw
#define CWDE			cwde
#define CLC			clc
#define CLD			cld
#define CLI			cli
#define CLTS			clts
#define CMC			cmc
#define CMP_L(a, b)		cmp L_(b), L_(a)
#define CMP_W(a, b)		cmp W_(b), W_(a)
#define CMP_B(a, b)		cmp B_(b), B_(a)
#define CMPS_L			cmpsd
#define CMPS_W			cmpsw
#define CMPS_B			cmpsb
#define CPUID			cpuid
#define CWD			cwd
#define CDQ			cdq
#define DAA			daa
#define DAS			das
#define DEC_L(a)		dec L_(a)
#define DEC_W(a)		dec W_(a)
#define DEC_B(a)		dec B_(a)
#define DIV_L(a)		div L_(a)
#define DIV_W(a)		div W_(a)
#define DIV_B(a)		div B_(a)
#define ENTER(a,b)		enter b, a
#define HLT			hlt
#define IDIV_L(a)		idiv L_(a)
#define IDIV_W(a)		idiv W_(a)
#define IDIV_B(a)		idiv B_(a)
#define IMUL_L(a, b)		imul L_(b), L_(a)
#define IMUL_W(a, b)		imul W_(b), W_(a)
#define IMUL_B(a)		imul B_(a)
#define IN_L			in EAX, DX
#define IN_W			in AX, DX
#define IN_B			in AL, DX
#define IN1_L(a)		in1 L_(a)
#define IN1_W(a)		in1 W_(a)
#define IN1_B(a)		in1 B_(a)
#define INC_L(a)		inc L_(a)
#define INC_W(a)		inc W_(a)
#define INC_B(a)		inc B_(a)
#define INS_L			ins
#define INS_W			ins
#define INS_B			ins
#define INT(a)			int B_(a)
#define INT3			int3
#define INTO			into
#define IRET			iret
#define IRETD			iretd
#define JA(a)			ja NEAR a
#define JAE(a)			jae NEAR a
#define JB(a)			jb NEAR a
#define JBE(a)			jbe NEAR a
#define JC(a)			jc NEAR a
#define JE(a)			je NEAR a
#define JG(a)			jg NEAR a
#define JGE(a)			jge NEAR a
#define JL(a)			jl NEAR a
#define JLE(a)			jle NEAR a
#define JNA(a)			jna NEAR a
#define JNAE(a)			jnae NEAR a
#define JNB(a)			jnb NEAR a
#define JNBE(a)			jnbe NEAR a
#define JNC(a)			jnc NEAR a
#define JNE(a)			jne NEAR a
#define JNG(a)			jng NEAR a
#define JNGE(a)			jnge NEAR a
#define JNL(a)			jnl NEAR a
#define JNLE(a)			jnle NEAR a
#define JNO(a)			jno NEAR a
#define JNP(a)			jnp NEAR a
#define JNS(a)			jns NEAR a
#define JNZ(a)			jnz NEAR a
#define JO(a)			jo NEAR a
#define JP(a)			jp NEAR a
#define JPE(a)			jpe NEAR a
#define JPO(a)			jpo NEAR a
#define JS(a)			js NEAR a
#define JZ(a)			jz NEAR a
#define JMP(a)			jmp a
#define JMPF(s,a)		jmp far s:a
#define LAHF			lahf
#define LAR(a, b)		lar b, a
#define LEA_L(a, b)		lea P_(b), P_(a)
#define LEA_W(a, b)		lea P_(b), P_(a)
#define LEAVE			leave
#define LGDT(a)			lgdt a
#define LIDT(a)			lidt a
#define LDS(a, b)		lds b, P_(a)
#define LES(a, b)		les b, P_(a)
#define LFS(a, b)		lfs b, P_(a)
#define LGS(a, b)		lgs b, P_(a)
#define LSS(a, b)		lss b, P_(a)
#define LLDT(a)			lldt a
#define LMSW(a)			lmsw a
#define LOCK			lock
#define LODS_L			lodsd
#define LODS_W			lodsw
#define LODS_B			lodsb
#define LOOP(a)			loop a
#define LOOPE(a)		loope a
#define LOOPZ(a)		loopz a
#define LOOPNE(a)		loopne a
#define LOOPNZ(a)		loopnz a
#define LSL(a, b)		lsl b, a
#define LTR(a)			ltr a
#define MOV_SR(a, b)		mov SR_(b), SR_(a)
#define MOV_L(a, b)		mov L_(b), L_(a)
#define MOV_W(a, b)		mov W_(b), W_(a)
#define MOV_B(a, b)		mov B_(b), B_(a)
#define MOVS_L			movsd
#define MOVS_W			movsw
#define MOVS_B			movsb
#define MOVSX_BL(a, b)		movsx B_(b), B_(a)
#define MOVSX_BW(a, b)		movsx B_(b), B_(a)
#define MOVSX_WL(a, b)		movsx W_(b), W_(a)
#define MOVZX_BL(a, b)		movzx B_(b), B_(a)
#define MOVZX_BW(a, b)		movzx B_(b), B_(a)
#define MOVZX_WL(a, b)		movzx W_(b), W_(a)
#define MUL_L(a)		mul L_(a)
#define MUL_W(a)		mul W_(a)
#define MUL_B(a)		mul B_(a)
#define NEG_L(a)		neg L_(a)
#define NEG_W(a)		neg W_(a)
#define NEG_B(a)		neg B_(a)
#define NOP			nop
#define NOT_L(a)		not L_(a)
#define NOT_W(a)		not W_(a)
#define NOT_B(a)		not B_(a)
#define OR_L(a,b)		or L_(b), L_(a)
#define OR_W(a,b)		or W_(b), W_(a)
#define OR_B(a,b)		or B_(b), B_(a)
#define OUT_L			out DX, EAX
#define OUT_W			out DX, AX
#define OUT_B			out DX, AL
#define OUT1_L(a)		out1 L_(a)
#define OUT1_W(a)		out1 W_(a)
#define OUT1_B(a)		out1 B_(a)
#define OUTS_L			outsd
#define OUTS_W			outsw
#define OUTS_B			outsb
#define POP_SR(a)		pop SR_(a)
#define POP_L(a)		pop L_(a)
#define POP_W(a)		pop W_(a)
#define POPA_L			popad
#define POPA_W			popa
#define POPF_L			popfd
#define POPF_W			popf
#define PUSH_SR(a)		push SR_(a)
#define PUSH_L(a)		push L_(a)
#define PUSH_W(a)		push W_(a)
#define PUSH_B(a)		push B_(a)
#define PUSHA_L			pushad
#define PUSHA_W			pusha
#define PUSHF_L			pushfd
#define PUSHF_W			pushf
#define RCL_L(a, b)		rcl L_(b), L_(a)
#define RCL_W(a, b)		rcl W_(b), W_(a)
#define RCL_B(a, b)		rcl B_(b), B_(a)
#define RCR_L(a, b)		rcr L_(b), L_(a)
#define RCR_W(a, b)		rcr W_(b), W_(a)
#define RCR_B(a, b)		rcr B_(b), B_(a)
#define RDTSC			rdtsc
#define ROL_L(a, b)		rol L_(b), L_(a)
#define ROL_W(a, b)		rol W_(b), W_(a)
#define ROL_B(a, b)		rol B_(b), B_(a)
#define ROR_L(a, b)		ror L_(b), L_(a)
#define ROR_W(a, b)		ror W_(b), W_(a)
#define ROR_B(a, b)		ror B_(b), B_(a)
#define REP			rep
#define REPE			repe
#define REPNE			repne
#define REPNZ			REPNE
#define REPZ			REPE
#define RET			ret
#define SAHF			sahf
#define SAL_L(a, b)		sal L_(b), B_(a)
#define SAL_W(a, b)		sal W_(b), B_(a)
#define SAL_B(a, b)		sal B_(b), B_(a)
#define SAR_L(a, b)		sar L_(b), B_(a)
#define SAR_W(a, b)		sar W_(b), B_(a)
#define SAR_B(a, b)		sar B_(b), B_(a)
#define SBB_L(a, b)		sbb L_(b), L_(a)
#define SBB_W(a, b)		sbb W_(b), W_(a)
#define SBB_B(a, b)		sbb B_(b), B_(a)
#define SCAS_L			scas
#define SCAS_W			scas
#define SCAS_B			scas
#define SETA(a)			seta a
#define SETAE(a)		setae a
#define SETB(a)			setb a
#define SETBE(a)		setbe a
#define SETC(a)			setc a
#define SETE(a)			sete a
#define SETG(a)			setg a
#define SETGE(a)		setge a
#define SETL(a)			setl a
#define SETLE(a)		setle a
#define SETNA(a)		setna a
#define SETNAE(a)		setnae a
#define SETNB(a)		setnb a
#define SETNBE(a)		setnbe a
#define SETNC(a)		setnc a
#define SETNE(a)		setne a
#define SETNG(a)		setng a
#define SETNGE(a)		setnge a
#define SETNL(a)		setnl a
#define SETNLE(a)		setnle a
#define SETNO(a)		setno a
#define SETNP(a)		setnp a
#define SETNS(a)		setns a
#define SETNZ(a)		setnz a
#define SETO(a)			seto a
#define SETP(a)			setp a
#define SETPE(a)		setpe a
#define SETPO(a)		setpo a
#define SETS(a)			sets a
#define SETZ(a)			setz a
#define SGDT(a)			sgdt a
#define SIDT(a)			sidt a
#define SHL_L(a, b)		shl L_(b), B_(a)
#define SHL_W(a, b)		shl W_(b), B_(a)
#define SHL_B(a, b)		shl B_(b), B_(a)
#define SHLD_L(a,b,c)		shld
#define SHLD2_L(a,b)		shld L_(b), L_(a)
#define SHLD_W(a,b,c)		shld
#define SHLD2_W(a,b)		shld W_(b), W_(a)
#define SHR_L(a, b)		shr L_(b), B_(a)
#define SHR_W(a, b)		shr W_(b), B_(a)
#define SHR_B(a, b)		shr B_(b), B_(a)
#define SHRD_L(a,b,c)		shrd
#define SHRD2_L(a,b)		shrd L_(b), L_(a)
#define SHRD_W(a,b,c)		shrd
#define SHRD2_W(a,b)		shrd W_(b), W_(a)
#define SLDT(a)			sldt a
#define SMSW(a)			smsw a
#define STC			stc
#define STD			std
#define STI			sti
#define STOS_L			stosd
#define STOS_W			stosw
#define STOS_B			stosb
#define STR(a)			str a
#define SUB_L(a, b)		sub L_(b), L_(a)
#define SUB_W(a, b)		sub W_(b), W_(a)
#define SUB_B(a, b)		sub B_(b), B_(a)
#define TEST_L(a, b)		test L_(b), L_(a)
#define TEST_W(a, b)		test W_(b), W_(a)
#define TEST_B(a, b)		test B_(b), B_(a)
#define VERR(a)			verr a
#define VERW(a)			verw a
#define WAIT			wait
#define XCHG_L(a, b)		xchg L_(b), L_(a)
#define XCHG_W(a, b)		xchg W_(b), W_(a)
#define XCHG_B(a, b)		xchg B_(b), B_(a)
#define XLAT			xlat

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -