Example #1
0
char *disasmx86(unsigned char *opcode1,int codeoff1,int *len)
{
	char *res;
	codepnt=opcode1;
	codeseg=0;
	codeoff=codeoff1;
	res=unasm(32);
	*len=codeoff-codeoff1;
	return(res);
}
Example #2
0
static UINT viewasm_unasm_next(UNASM una, UINT8* hexbuf, NP2VIEW_T *view, UINT16 off)
{
	UINT8	*p;

	off &= CPU_ADRSMASK;
	if (view->lock) {
		p = (BYTE *)view->buf1.ptr;
		p += off;
		if (off > 0xfff0) {
			UINT32 pos = 0x10000 - off;
			CopyMemory(hexbuf, p, pos);
			CopyMemory(hexbuf + pos, view->buf1.ptr, 16 - pos);
			p = hexbuf;
		}
		else	{
			CopyMemory(hexbuf, p, 16);
		}
	}
	else {
		p = hexbuf;
		viewmem_read(&(view->dmem), seg_to_real(view->seg) + off, hexbuf, 16);
	}
	return unasm(una, p, 16, FALSE, off);
}