# Last modified on Wed Feb 8 14:50:45 PST 1995 by heydon # # This program tests that the equality test between run-time values # works correctly. V0 "Hello world" V1 "Not hello world" V2 "Hello world" V3 "Error: Equal strings found to be different\n" V4 "Error: Different strings found to be equal\n" V5 3.1416 V6 3.14159 V7 3.1416 V8 "Error: Equal numbers found to be different\n" V9 "Error: Different numbers found to be equal\n" V10 NIL V11 "Text" V12 1.2 V13 NIL V14 "Error: NIL found to equal a text\n" V15 "Error: NIL found to equal a number\n" V16 "Error: NIL found to equal a pair\n" V17 "Error: two NIL values found to be different\n" V50 "No errors found!\n" # Install in code slot 1 C1 # Test string inequality .PUSHG c0 .PUSHG c1 .EQUAL .FJUMP s11 .PUSHG c3 .CALLEXT c0 .RET # Test string equality .PUSHG c0 .PUSHG c2 .EQUAL .TJUMP s11 .PUSHG c4 .CALLEXT c0 .RET # Test number inequality .PUSHG c5 .PUSHG c6 .EQUAL .FJUMP s11 .PUSHG c8 .CALLEXT c0 .RET # Test string equality .PUSHG c5 .PUSHG c7 .EQUAL .TJUMP s11 .PUSHG c9 .CALLEXT c0 .RET # Test NIL inequality with text .PUSHG c10 .PUSHG c11 .EQUAL .FJUMP s11 .PUSHG c14 .CALLEXT c0 .RET # Test NIL inequality with number .PUSHG c10 .PUSHG c12 .EQUAL .FJUMP s11 .PUSHG c15 .CALLEXT c0 .RET # Test NIL inequality with pair (NIL, NIL) .PUSHG c10 .PUSHG c10 .PUSHG c10 .CONS .EQUAL .FJUMP s11 .PUSHG c16 .CALLEXT c0 .RET # Test NIL equality .PUSHG c10 .PUSHG c13 .EQUAL .TJUMP s11 .PUSHG c17 .CALLEXT c0 .RET # Test pair structure inequality .PUSHG c10 .PUSHG c10 .CONS .PUSHG c10 .CONS .PUSHG c10 .PUSHG c10 .PUSHG c10 .CONS .CONS .EQUAL .FJUMP s11 .PUSHG c3 .CALLEXT c0 .RET # Test pair structure equality .PUSHG c10 .PUSHG c10 .CONS .PUSHG c10 .CONS .PUSHG c10 .PUSHG c10 .CONS .PUSHG c10 .CONS .EQUAL .TJUMP s11 .PUSHG c4 .CALLEXT c0 .RET # Success! .PUSHG c50 .CALLEXT c0 .RET END