Add tests for MOV instruction
[emu8051.git] / tests / mov.asm
diff --git a/tests/mov.asm b/tests/mov.asm
new file mode 100644 (file)
index 0000000..aacafb3
--- /dev/null
@@ -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