about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorelioat <elioat@tilde.institute>2025-01-19 10:34:05 -0500
committerelioat <elioat@tilde.institute>2025-01-19 10:34:05 -0500
commit966e29f871e9bf91390346ac982fc0fe41cc4197 (patch)
treee5ac29d8004ab6cf7cd817b486329b38b04b50da
parent2ff0f0f3a02cc6d921dcb2cc278679306b316a13 (diff)
downloadtour-966e29f871e9bf91390346ac982fc0fe41cc4197.tar.gz
*
-rwxr-xr-xawk/vm/vm_tests.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/awk/vm/vm_tests.sh b/awk/vm/vm_tests.sh
index 8180de9..6244c51 100755
--- a/awk/vm/vm_tests.sh
+++ b/awk/vm/vm_tests.sh
@@ -8,12 +8,12 @@ echo "42 A! A A     # Store 42 in A, then read A twice" | awk -f vm.awk
 echo
 
 echo "Test 2: Register A and B with memory operations"
-echo "100 A! 200 B! 42 B !B @B     # Store 100 in A, 200 in B, store 42 at B's address" | awk -f vm.awk
+echo "100 A! 200 B! 42 @B     # Store 100 in A, 200 in B, read from B's address" | awk -f vm.awk
 echo
 
 echo "Test 3: Sequential memory operations using P register"
-echo "0 P! 1 !+ 2 !+ 3 !+ 4 !+ 5 !+     # Store 1-5 sequentially using P" | awk -f vm.awk
-echo "0 P! @+ @+ @+ @+ @+     # Read back values using P" | awk -f vm.awk
+echo "0 !P 1 !+ 2 !+ 3 !+ 4 !+ 5 !+     # Store 1-5 sequentially using P" | awk -f vm.awk
+echo "0 !P @+ @+ @+ @+ @+     # Read back values using P" | awk -f vm.awk
 echo
 
 echo "Test 4: Complex register manipulation"
@@ -21,16 +21,16 @@ echo "42 A! A DUP B! @B     # Store 42 in A, copy to B, read via B" | awk -f vm.
 echo
 
 echo "Test 5: Register arithmetic"
-echo "5 A! 3 B! A B! @B A +     # Store 5 in A, 3 in B, add A + mem[B]" | awk -f vm.awk
+echo "5 A! 3 B! A @B +     # Store 5 in A, 3 in B, add A + mem[B]" | awk -f vm.awk
 echo
 
 echo "Test 6: Memory pointer operations"
-echo "42 0 ! 1 P! @P     # Store 42 at addr 0, point P to 1, read P" | awk -f vm.awk
+echo "42 0 ! 1 !P @P     # Store 42 at addr 0, point P to 1, read P" | awk -f vm.awk
 echo
 
 echo "Test 7: Register and memory interaction"
-echo "10 A! 20 B! A B !     # Store A's value at B's address" | awk -f vm.awk
-echo "B @     # Read value at B's address" | awk -f vm.awk
+echo "10 A! 20 B! A @B !     # Store A's value at B's address" | awk -f vm.awk
+echo "@B     # Read from memory at B's address" | awk -f vm.awk
 echo
 
 echo "Test 8: Demonstrating B! vs !B"