From 7a3b610e92156b1f66aa2cfead382d5a743bcb55 Mon Sep 17 00:00:00 2001 From: Ross Wilson Date: Mon, 15 Feb 2016 15:15:45 +0700 Subject: [PATCH] Cleanup and added ASCIIZ test --- pyasm/asm_tests/tests/aalpha | 6 +++--- pyasm/asm_tests/tests/aalpha.NEW | 7 ------- pyasm/asm_tests/tests/alpha | 6 +++--- pyasm/asm_tests/tests/alpha.NEW | 9 --------- pyasm/asm_tests/tests/asciiz | 21 +++++++++++++++++++++ pyasm/asm_tests/tests/beta | 8 ++++---- pyasm/asm_tests/tests/beta.NEW | 12 ------------ pyasm/asm_tests/tests/{delta.NEW => delta} | 0 pyasm/asm_tests/tests/kappa | 8 ++++---- pyasm/asm_tests/tests/kappa.NEW | 14 -------------- 10 files changed, 35 insertions(+), 56 deletions(-) delete mode 100644 pyasm/asm_tests/tests/aalpha.NEW delete mode 100644 pyasm/asm_tests/tests/alpha.NEW create mode 100644 pyasm/asm_tests/tests/asciiz delete mode 100644 pyasm/asm_tests/tests/beta.NEW rename pyasm/asm_tests/tests/{delta.NEW => delta} (100%) delete mode 100644 pyasm/asm_tests/tests/kappa.NEW diff --git a/pyasm/asm_tests/tests/aalpha b/pyasm/asm_tests/tests/aalpha index 3834eb2..dfacfad 100644 --- a/pyasm/asm_tests/tests/aalpha +++ b/pyasm/asm_tests/tests/aalpha @@ -1,7 +1,7 @@ -; test file, old syntax tests +; test file, new syntax org 0100 law 1 hlt end -;|0100 004001 -;|0101 000000 +;|$1 004000 + 1 +;| 000000 diff --git a/pyasm/asm_tests/tests/aalpha.NEW b/pyasm/asm_tests/tests/aalpha.NEW deleted file mode 100644 index dfacfad..0000000 --- a/pyasm/asm_tests/tests/aalpha.NEW +++ /dev/null @@ -1,7 +0,0 @@ -; test file, new syntax - org 0100 - law 1 - hlt - end -;|$1 004000 + 1 -;| 000000 diff --git a/pyasm/asm_tests/tests/alpha b/pyasm/asm_tests/tests/alpha index 45ac7e0..9850254 100644 --- a/pyasm/asm_tests/tests/alpha +++ b/pyasm/asm_tests/tests/alpha @@ -4,6 +4,6 @@ hlt end -;!0100 004002 ; is actually 004001 -;|0101 000000 -;!0102 000001 ; address outside block +;!$1 004000 + 2 ; is actually 004001 +;| 000000 +;! 000001 ; address outside block diff --git a/pyasm/asm_tests/tests/alpha.NEW b/pyasm/asm_tests/tests/alpha.NEW deleted file mode 100644 index 9850254..0000000 --- a/pyasm/asm_tests/tests/alpha.NEW +++ /dev/null @@ -1,9 +0,0 @@ -; deliberate errors at lines 7 and 9 - org 0100 - law 1 - hlt - end - -;!$1 004000 + 2 ; is actually 004001 -;| 000000 -;! 000001 ; address outside block diff --git a/pyasm/asm_tests/tests/asciiz b/pyasm/asm_tests/tests/asciiz new file mode 100644 index 0000000..abd0cc1 --- /dev/null +++ b/pyasm/asm_tests/tests/asciiz @@ -0,0 +1,21 @@ +; test ASCIIZ pseudo-op + org 0100 + +print equ 0200 + +start law str + jms print + hlt + +str asciiz 'str' +str2 asciiz 'str0' + + end start +;|$1 0004000+.+3 +;| 0034000+0200 +;| 0000000 +;| 0071564 ; 'st' +;| 0071000 ; 'r\0' +;| 0071564 ; 'st' +;| 0071060 ; 'r0' +;| 0000000 ; zero byte diff --git a/pyasm/asm_tests/tests/beta b/pyasm/asm_tests/tests/beta index 3788f12..64c52f8 100644 --- a/pyasm/asm_tests/tests/beta +++ b/pyasm/asm_tests/tests/beta @@ -6,7 +6,7 @@ law 2 hlt end -;|0100 004001 -;|0101 000000 -;|0200 004002 -;|0201 000000 +;|$1 004000 + 1 +;| 000000 +;|$2 004000 + 2 +;| 000000 diff --git a/pyasm/asm_tests/tests/beta.NEW b/pyasm/asm_tests/tests/beta.NEW deleted file mode 100644 index 64c52f8..0000000 --- a/pyasm/asm_tests/tests/beta.NEW +++ /dev/null @@ -1,12 +0,0 @@ -; test file with two ORG blocks - org 0100 - law 1 - hlt - org 0200 - law 2 - hlt - end -;|$1 004000 + 1 -;| 000000 -;|$2 004000 + 2 -;| 000000 diff --git a/pyasm/asm_tests/tests/delta.NEW b/pyasm/asm_tests/tests/delta similarity index 100% rename from pyasm/asm_tests/tests/delta.NEW rename to pyasm/asm_tests/tests/delta diff --git a/pyasm/asm_tests/tests/kappa b/pyasm/asm_tests/tests/kappa index c392c44..a306c3b 100644 --- a/pyasm/asm_tests/tests/kappa +++ b/pyasm/asm_tests/tests/kappa @@ -8,7 +8,7 @@ hlt end -;|0100 004001 -;|0101 000000 -;|0102 004002 -;|0103 000000 +;|$1 004000 + 1 +;| 000000 +;| 004000 + 2 +;| 000000 diff --git a/pyasm/asm_tests/tests/kappa.NEW b/pyasm/asm_tests/tests/kappa.NEW deleted file mode 100644 index a306c3b..0000000 --- a/pyasm/asm_tests/tests/kappa.NEW +++ /dev/null @@ -1,14 +0,0 @@ -; test file with two adjacent ORG blocks - org 0100 - law 1 - hlt - - org 0102 - law 2 - hlt - end - -;|$1 004000 + 1 -;| 000000 -;| 004000 + 2 -;| 000000