mirror of
https://github.com/ksherlock/mpw.git
synced 2024-11-25 04:31:52 +00:00
disassembler - calculate pc relative addresses
This commit is contained in:
parent
a35fa69cf1
commit
ef168abf26
@ -373,9 +373,11 @@ static ULO cpuDis71(ULO pcp, STR *sdata, STR *soperands)
|
|||||||
static ULO cpuDis72(ULO pcp, STR *sdata, STR *soperands)
|
static ULO cpuDis72(ULO pcp, STR *sdata, STR *soperands)
|
||||||
{
|
{
|
||||||
ULO disp = memoryReadWord(pcp);
|
ULO disp = memoryReadWord(pcp);
|
||||||
|
ULO ea = pcp + disp;
|
||||||
|
if (disp & 0x8000) ea += 0xffff0000;
|
||||||
|
|
||||||
cpuDisWordAppend(disp, sdata);
|
cpuDisWordAppend(disp, sdata);
|
||||||
sprintf(cpuDisEoS(soperands), "$%.4X(PC)", disp);
|
sprintf(cpuDisEoS(soperands), "$%.4X ; $%.4X(PC)", ea, disp);
|
||||||
return pcp + 2;
|
return pcp + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user