From 2ca6dd65af01bae11b76707916701f9f0f37f40e Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Fri, 27 Apr 2012 13:15:13 +0000 Subject: spec 1.7 --- emu.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) (limited to 'emu.c') diff --git a/emu.c b/emu.c index 1dcbeb3..fbcf362 100644 --- a/emu.c +++ b/emu.c @@ -49,13 +49,6 @@ stop(unsigned short *a) cycle += 1; } -void -hcf(unsigned short *a) -{ - /* TODO */ - cycle += 9; -} - void intr(unsigned short *a) { @@ -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 -- cgit v1.2.3