Example #1
0
static void print_word_parm_1s_comp(std::ostream &stream)
{
	uint16_t w;

	PARAM_WORD(w);
	w = ~w;
	util::stream_format(stream, "%Xh", w);
}
Example #2
0
static void print_word_parm_1s_comp(void)
{
	UINT16 w;

	PARAM_WORD(w);
	w = ~w;
	sprintf(temp, "%Xh", w);
	strcat(buffer, temp);
}
Example #3
0
static void print_word_parm(void)
{
	uint16_t w;

	PARAM_WORD(w);

	sprintf(temp, "%Xh", w);
	strcat(buffer, temp);
}
Example #4
0
static unsigned MakeEA (char *ea, int lo, unsigned pc, int width)
{
	int reg, pm;

	assert (width == 2 || width == 4);

    reg = lo & 7;

	switch ((lo >> 3) & 7)
	{
		case 0:
			sprintf (ea, "%s", regs[reg]);
			break;
		case 1:
			sprintf (ea, "(%s)", regs[reg]);
			break;
		case 2:
			if (reg == 7)
            {
				PARAM_WORD (pm);
				sprintf (ea, "#$%0*X", width, pm & ((width == 2) ? 0xff : 0xffff));
            }
			else
            {
                sprintf (ea, "(%s)+", regs[reg]);
            }
            break;
		case 3:
			if (reg == 7)
			{
                PARAM_WORD (pm);
                sprintf (ea,  "$%04X", pm &= 0xffff);
			}
			else
			{
                sprintf (ea, "@(%s)+", regs[reg]);
			}
            break;
		case 4:
            sprintf (ea, "-(%s)", regs[reg]);
			break;
		case 5:
			sprintf (ea, "@-(%s)", regs[reg]);
			break;
		case 6:
			PARAM_WORD (pm);
			sprintf(ea, "%s$%X(%s)",
				(pm&0x8000)?"-":"",
				(pm&0x8000)?-(signed short)pm:pm,
				regs[reg]);
			break;
		case 7:
			PARAM_WORD (pm);
			sprintf(ea, "@%s$%X(%s)",
				(pm&0x8000)?"-":"",
				(pm&0x8000)?-(signed short)pm:pm,
				regs[reg]);
			break;
	}

    return pc;
}