|
|
| version 1.2, 2004/03/05 04:40:40 | version 1.6, 2007/01/08 08:52:21 |
|---|---|
| Line 68 static char *set_hex(char *str, UINT32 v | Line 68 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 UINT8 *org; |
| const BYTE *term; | const UINT8 *term; |
| UINT flag; | UINT flag; |
| REG8 ope; | REG8 ope; |
| UINT32 ctl; | UINT32 ctl; |
| Line 412 opeana_ea: | Line 412 opeana_ea: |
| return(0); | return(0); |
| } | } |
| addr += (SINT32)(SINT8)(*ptr++); | addr += (SINT32)(SINT8)(*ptr++); |
| addr += (ptr - org); | addr += (int)(ptr - org); |
| p = set_hex(p, addr, (flag & (1 << UAFLAG_D))?32:16); | p = set_hex(p, addr, (flag & (1 << UAFLAG_D))?32:16); |
| break; | break; |
| Line 423 opeana_ea: | Line 423 opeana_ea: |
| return(0); | return(0); |
| } | } |
| addr += LOADINTELWORD(ptr - 2); | addr += LOADINTELWORD(ptr - 2); |
| addr += (ptr - org); | addr += (int)(ptr - org); |
| p = set_hex(p, addr, 16); | p = set_hex(p, addr, 16); |
| } | } |
| else { | else { |
| Line 432 opeana_ea: | Line 432 opeana_ea: |
| return(0); | return(0); |
| } | } |
| addr += LOADINTELDWORD(ptr - 4); | addr += LOADINTELDWORD(ptr - 4); |
| addr += (ptr - org); | addr += (int)(ptr - org); |
| p = set_hex(p, addr, 32); | p = set_hex(p, addr, 32); |
| } | } |
| break; | break; |
| case OP1_FAR: | case OP1_FAR: |
| ptr += 4; | if (!(flag & (1 << UAFLAG_D))) { |
| if (ptr > term) { | ptr += 4; |
| return(0); | if (ptr > term) { |
| return(0); | |
| } | |
| p = set_hex(p, LOADINTELWORD(ptr - 2), 16); | |
| *p++ = ':'; | |
| p = set_hex(p, LOADINTELWORD(ptr - 4), 16); | |
| } | |
| else { | |
| ptr += 6; | |
| if (ptr > term) { | |
| return(0); | |
| } | |
| p = set_hex(p, LOADINTELWORD(ptr - 2), 16); | |
| *p++ = ':'; | |
| p = set_hex(p, LOADINTELDWORD(ptr - 6), 32); | |
| } | } |
| p = set_hex(p, LOADINTELWORD(ptr - 2), 16); | |
| *p++ = ':'; | |
| p = set_hex(p, LOADINTELWORD(ptr - 4), 16); | |
| break; | break; |
| case OP1_I10: | case OP1_I10: |
| Line 476 opeana_ea: | Line 487 opeana_ea: |
| goto opeana_ea; | goto opeana_ea; |
| case OP1_REx: | case OP1_REx: |
| p = set_reg(p, RSTR_32 + (ope & 7)); | p = set_reg(p, (RSTR_32 << 3) + (ope & 7)); |
| p[0] = ','; | p[0] = ','; |
| p[1] = ' '; | p[1] = ' '; |
| p[2] = (char)mnemonic; | p[2] = (char)mnemonic; |
| Line 493 opeana_ea: | Line 504 opeana_ea: |
| p[3] = ','; | p[3] = ','; |
| p[4] = ' '; | p[4] = ' '; |
| p += 5; | p += 5; |
| p = set_reg(p, RSTR_32 + (ope & 7)); | p = set_reg(p, (RSTR_32 << 3) + (ope & 7)); |
| mnemonic = RSTR_MOV; | mnemonic = RSTR_MOV; |
| break; | break; |
| Line 573 opeana_ea: | Line 584 opeana_ea: |
| opeana_ed: | opeana_ed: |
| r->mnemonic = rstr.ope[mnemonic]; | r->mnemonic = rstr.ope[mnemonic]; |
| p[0] = '\0'; | p[0] = '\0'; |
| return(ptr - org); | return((UINT)(ptr - org)); |
| } | } |