From: Hugo Villeneuve Date: Sat, 23 Nov 2013 18:58:37 +0000 (-0500) Subject: Add tests for MUL instructions X-Git-Tag: v2.0.0~54 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;ds=inline;h=97e852595503f054a20953c1a818be4b8ff0382e;p=emu8051.git Add tests for MUL instructions --- diff --git a/tests/mul1.asm b/tests/mul1.asm new file mode 100644 index 0000000..4e600a6 --- /dev/null +++ b/tests/mul1.asm @@ -0,0 +1,16 @@ +; Test program to verify correct emu8051 operation +; +; Test desc: MUL AB (no overflow) +; Test output1: ACC = 0xC2 +; Test output2: B = 0x00 +; Test output2: PSW = 0x01 + + CSEG + + ORG 0000h ; Reset vector + + MOV A, #061h + MOV B, #002h + MUL AB ; CY should be cleared, OV should be cleared + + END diff --git a/tests/mul2.asm b/tests/mul2.asm new file mode 100644 index 0000000..ec931d6 --- /dev/null +++ b/tests/mul2.asm @@ -0,0 +1,16 @@ +; Test program to verify correct emu8051 operation +; +; Test desc: MUL AB (overflow) +; Test output1: ACC = 0x5B +; Test output2: B = 0x0B +; Test output3: PSW = 0x05 + + CSEG + + ORG 0000h ; Reset vector + + MOV A, #099h + MOV B, #013h + MUL AB ; CY should be cleared, OV should be cleared + + END