aboutsummaryrefslogtreecommitdiff
path: root/emu.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2012-04-27 13:15:13 +0000
committerDimitri Sokolyuk <demon@dim13.org>2012-04-27 13:15:13 +0000
commit2ca6dd65af01bae11b76707916701f9f0f37f40e (patch)
treeec1bcd045232bbb4ee4e5da340f106a1627eda1c /emu.c
parentdda0a740dba381909b81cc088778b98e6d3a1e92 (diff)
spec 1.7
Diffstat (limited to 'emu.c')
-rw-r--r--emu.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/emu.c b/emu.c
index 1dcbeb3..fbcf362 100644
--- a/emu.c
+++ b/emu.c
@@ -50,13 +50,6 @@ stop(unsigned short *a)
}
void
-hcf(unsigned short *a)
-{
- /* TODO */
- cycle += 9;
-}
-
-void
intr(unsigned short *a)
{
/* TODO */
@@ -78,12 +71,9 @@ ias(unsigned short *a)
}
void
-iap(unsigned short *a)
+rfi(unsigned short *a)
{
- if (reg[IA]) {
- mem[--reg[SP]] = reg[IA];
- reg[IA] = *a;
- }
+ /* TODO */
cycle += 3;
}
@@ -119,11 +109,10 @@ void (*extop[nExt])(unsigned short *) = {
[NOP] = nop,
[JSR] = jsr,
[BRK] = stop,
- [HCF] = hcf,
[INT] = intr,
[IAG] = iag,
[IAS] = ias,
- [IAP] = iap,
+ [RFI] = rfi,
[IAQ] = iaq,
[HWN] = hwn,
[HWQ] = hwq,
@@ -266,7 +255,7 @@ shr(unsigned short *b, unsigned short *a)
{
reg[EX] = (((unsigned int)*b << 16) >> *a);
*b >>= *a;
- cycle += 2;
+ cycle += 1;
}
void
@@ -274,7 +263,7 @@ asr(unsigned short *b, unsigned short *a)
{
reg[EX] = (((unsigned int)*b << 16) >> *a);
*b = (signed short)*b >> *a;
- cycle += 2;
+ cycle += 1;
}
void
@@ -282,7 +271,7 @@ shl(unsigned short *b, unsigned short *a)
{
reg[EX] = (((unsigned int)*b << *a) >> 16);
*b <<= *a;
- cycle += 2;
+ cycle += 1;
}
void