Everything right in NestedCall but SP and TEMP 0

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

Everything right in NestedCall but SP and TEMP 0

A_Random_Person
For some reason, my NestedCall.asm is always producing this output:

When it's actually supposed to produce this:

Can someone help?
Reply | Threaded
Open this post in threaded view
|

Re: Everything right in NestedCall but SP and TEMP 0

WBahn
Administrator
It's pretty much impossible to figure out why code that we can't see is doing or not doing something.

Have you walked through what the code is supposed to do and agree with the contents of the comparison file?

Have you walked through what your code does and agree that it results in the values you see in the output file?

One possibility is that your code is taking too many clock cycles to execute and so the test script isn't letting it run long enough before doing the comparison. If that's the case, increase the number of clock cycles in the test script to see if it works. But keep in mind that, even if it does, the test script was written with the knowledge that the number of clock cycles it allows is more than sufficient to complete the task.
Reply | Threaded
Open this post in threaded view
|

Re: Everything right in NestedCall but SP and TEMP 0

A_Random_Person
I'm currently walking through the code ang comparing with the VM code. But the .asm file (without symbols) is 603 lines long so I'll be doing this for a long time. 🤮💻
Reply | Threaded
Open this post in threaded view
|

Re: Everything right in NestedCall but SP and TEMP 0

WBahn
Administrator
This post was updated on .
Your time is probably better spent making small test cases that verify the pieces parts of your VM translator.