--- np2/generic/unasm.c 2004/03/07 01:23:14 1.3 +++ np2/generic/unasm.c 2007/01/08 08:52:21 1.6 @@ -68,10 +68,10 @@ static char *set_hex(char *str, UINT32 v // ---- -UINT unasm(UNASM r, const BYTE *ptr, UINT leng, BOOL d, UINT32 addr) { +UINT unasm(UNASM r, const UINT8 *ptr, UINT leng, BOOL d, UINT32 addr) { -const BYTE *org; -const BYTE *term; +const UINT8 *org; +const UINT8 *term; UINT flag; REG8 ope; UINT32 ctl; @@ -412,7 +412,7 @@ opeana_ea: return(0); } addr += (SINT32)(SINT8)(*ptr++); - addr += (ptr - org); + addr += (int)(ptr - org); p = set_hex(p, addr, (flag & (1 << UAFLAG_D))?32:16); break; @@ -423,7 +423,7 @@ opeana_ea: return(0); } addr += LOADINTELWORD(ptr - 2); - addr += (ptr - org); + addr += (int)(ptr - org); p = set_hex(p, addr, 16); } else { @@ -432,7 +432,7 @@ opeana_ea: return(0); } addr += LOADINTELDWORD(ptr - 4); - addr += (ptr - org); + addr += (int)(ptr - org); p = set_hex(p, addr, 32); } break; @@ -487,7 +487,7 @@ opeana_ea: goto opeana_ea; case OP1_REx: - p = set_reg(p, RSTR_32 + (ope & 7)); + p = set_reg(p, (RSTR_32 << 3) + (ope & 7)); p[0] = ','; p[1] = ' '; p[2] = (char)mnemonic; @@ -504,7 +504,7 @@ opeana_ea: p[3] = ','; p[4] = ' '; p += 5; - p = set_reg(p, RSTR_32 + (ope & 7)); + p = set_reg(p, (RSTR_32 << 3) + (ope & 7)); mnemonic = RSTR_MOV; break; @@ -584,6 +584,6 @@ opeana_ea: opeana_ed: r->mnemonic = rstr.ope[mnemonic]; p[0] = '\0'; - return(ptr - org); + return((UINT)(ptr - org)); }