lodm	MACRO	p
	mov	dx,word ptr p+2
	mov	ax,word ptr p
	ENDM

stom	MACRO	p
	mov	word ptr p+2,dx
	mov	word ptr p,ax
	ENDM

movm	MACRO	des,src
	lodm	src
	stom	des
	ENDM

movw	macro	des, src
	mov	ax,word ptr src
	mov	word ptr des,ax
	endm

movmx	macro	des, src
	mov	ax,word ptr src+2
	mov	word ptr des+2,ax
	mov	ax,word ptr src
	mov	word ptr des,ax
	endm

pushm   MACRO	p
	push    word ptr p+2
	push    word ptr p
	ENDM

cmprm	macro	src
local	@@
	cmp	dx,word ptr src+2
	jne	@@
	cmp	ax,word ptr src
	@@:
	endm

cmpmr	macro	src
local	@@
	cmp	word ptr src+2,dx
	jne	@@
	cmp	word ptr src,ax
	@@:
	endm

cmpmm	macro	des,src
	lodm	des
	cmprm	src
	endm

cmpmi	macro	src,val
local	@@
	cmp	word ptr src+2,0
	jne	@@
	cmp	word ptr src,val
	@@:
	endm

CStr	MACRO text
	local xxx
	.data
	xxx db text,0
	.code
	exitm <offset xxx>
	ENDM

CString MACRO text
	local xxx
	.data
	xxx db text,0
	.code
	exitm <cs:xxx>
	ENDM

