mymac.inc

来自「一个背单词源码」· INC 代码 · 共 61 行

INC
61
字号
HIWORD	MACRO bigword  		;; Retrieves the high word from double word 

	mov	eax,bigword
	shr	eax,16		;; Shift 16 for high word to set to high word
	ENDM
	
$invoke MACRO Fun:REQ, A:VARARG
  IFB <A>
    invoke Fun
  else
    invoke Fun, A
  endif
  exitm <eax>
ENDM

LOWORD	MACRO 	bigword	;; Retrieves the low word from double word argument

	mov	eax,bigword
	and	eax,0FFFFh	;; Set to low word 
	ENDM

m2m MACRO M1, M2
	push M2
	pop  M1
ENDM

MyDebug	macro msg
	LOCAL @msg
	.data
	@msg	db	msg,0
	.code
	invoke MessageBox,NULL,addr @msg,addr AppName,MB_ICONINFORMATION
endm


MyText	macro msg
	LOCAL @msg
	.data
		@msg	db	msg,0
	.code
		lea eax,@msg	
endm


literal MACRO quoted_text:VARARG
        ;辅助函数,支持SADD
        LOCAL local_text
        .data
          local_text db quoted_text,0
        .code
        EXITM <local_text>
      ENDM

SADD MACRO quoted_text:VARARG
        EXITM <ADDR literal(quoted_text)>
      ENDM
sadd textequ <SADD>
			
Msg		macro	mm
		invoke MessageBox,NULL,addr mm,addr AppName,MB_ICONINFORMATION
endm

⌨️ 快捷键说明

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