Updated tests to use printsignednumber subroutine from debug.pvvs instead of stdio...
[vvhitespace] / tests / 6001_push_intmin.pvvs
CommitLineData
6b5e4b38
AT
1@ This tests the interpreters ability to push the
2@ most negative number directly to the stack.
3
4@ Construct the number -(2^63) on the stack indirectly.
5SSTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTN | -((2^63)-1)
6SSSTN | PUSH 1
7TSST | SUBTRACT
8
9@ Now push -(2^63) directly onto the stack.
10SSTTSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSN | -(2^63)
11
12@ See if the interpreter thinks -((2^63)-1) - 1 == -(2^63)
13@ Print 1 for true and 0 for false.
14TSST | SUBTRACT
15NTSTN | BRZ > 1
16SSSSN | PUSH 0
17TNST | PUTDIGIT
18NNN | DIE
19NSSVTN | Mark: 1
20SSSTN | PUSH 1
21TNST | PUTDIGIT
22NNN | DIE