Mercurial > hg > ede
diff emu/iset.c @ 42:792da050d8c4 tip
more dox
author | james <jb302@eecs.qmul.ac.uk> |
---|---|
date | Tue, 22 Apr 2014 14:25:14 +0100 |
parents | 2e35be400012 |
children |
line wrap: on
line diff
--- a/emu/iset.c Tue Apr 22 00:57:06 2014 +0100 +++ b/emu/iset.c Tue Apr 22 14:25:14 2014 +0100 @@ -898,19 +898,28 @@ /* 0xF8 - MUL R0, R1 */ void MUL(void) { - /* implement me */ + tmpw = regs[R0] * regs[R1]; + regs[R0] = GHIGH(tmpw); + regs[R1] = GLOW(tmpw); } /* 0xF9 - DIV R0, R1 */ void DIV(void) { - /* implement me */ + tmpw = regs[R0] / regs[R1]; + regs[R0] = GHIGH(tmpw); + regs[R1] = GLOW(tmpw); } /* 0xFA - DA A */ void DA(void) { - /* implement me */ + if (((A & 0xF) > 9) | get_flag(AC) == 1) { + A = A + 6; + } + if (((A & 0xF0) > 9) | get_flag(C) == 1) { + A = A + 0x60; + } } /* 0xFC - IN port_addr */ @@ -934,5 +943,5 @@ /* 0xFF - HLT */ void HLT(void) { - /* implement me */ + exit(0); }