SimpleFunction.cmp

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SimpleFunction.cmp

ngdrummer
Hey, so I'm trying to debug my code, but I've run into the error of my final RAM[310] showing 1197 instead of 1196.

After much research and isolating my problem, I've come to the conclusion that if arg0 = 1234, and arg1 = 37, and we are supposed to subtract them, how is the answer possibly 1196? This is the only memory in ram where my output file is incongruent with the .cmp file, and I'm wondering if I missed a decrement somewhere?

Every previous test has compared correctly, so I'm pretty positive my push/pop/arithmetic is working correctly.  Any help would be great, and I know I swarm these forums, but just wondering where my issue is.

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: SimpleFunction.cmp

cadet1620
Administrator
ngdrummer wrote
Hey, so I'm trying to debug my code, but I've run into the error of my final RAM[310] showing 1197 instead of 1196.

After much research and isolating my problem, I've come to the conclusion that if arg0 = 1234, and arg1 = 37, and we are supposed to subtract them, how is the answer possibly 1196? This is the only memory in ram where my output file is incongruent with the .cmp file, and I'm wondering if I missed a decrement somewhere?
The -1 in the test is the result of not(local 0 + local 1). Check your local segment initialization and your 'not' code.

--Mark