aboutsummaryrefslogtreecommitdiff
path: root/emu.c
diff options
context:
space:
mode:
Diffstat (limited to 'emu.c')
-rw-r--r--emu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/emu.c b/emu.c
index f7543e1..d6befff 100644
--- a/emu.c
+++ b/emu.c
@@ -247,11 +247,13 @@ void
asr(unsigned short *b, unsigned short *a)
{
int tmp = *b;
+ int top = *b | 0x8000;
/* TODO */
reg[EX] = ((tmp << 16) >> *a);
*b >>= *a;
+ *b |= top;
cycle += 2;
}