From: Hugo Villeneuve Date: Mon, 25 Nov 2013 04:20:18 +0000 (-0500) Subject: Add tests for MOV instruction X-Git-Tag: v2.0.0~48 X-Git-Url: http://gitweb.hugovil.com/?a=commitdiff_plain;h=28f33d3ca429287a60545f1680d5302ffbb8571d;p=emu8051.git Add tests for MOV instruction --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 1c8547f..9080692 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -7,13 +7,14 @@ SUFFIXES = .hex .asm TESTS = \ opcodes -check_PROGRAMS = mul1.hex mul2.hex div.hex orl.hex anl.hex +check_PROGRAMS = mul1.hex mul2.hex div.hex orl.hex anl.hex mov.hex mul1.hex: mul1.asm mul2.hex: mul2.asm div.hex: div.asm orl.hex: orl.asm anl.hex: anl.asm +mov.hex: mov.asm .asm.hex: $(AS51) $< diff --git a/tests/mov.asm b/tests/mov.asm new file mode 100644 index 0000000..aacafb3 --- /dev/null +++ b/tests/mov.asm @@ -0,0 +1,22 @@ +; Test program to verify correct emu8051 operation +; +; Test desc: MOV +; Test output1: A = $66 +; Test output2: B = $98 +; Test output3: PSW = $00 +; Test output4: DPTR = $9876 +; Test output5: R0 = $66 + + CSEG + + ORG 0000h ; Reset vector + + MOV A, #099h + MOV B, A + DEC B + MOV R0, #066h + MOV A, R0 + MOV DPTR,#9876h + + LJMP 0FFF0h + END