Who calls test function on the SimpleTest

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

Who calls test function on the SimpleTest

cyboman
I have just looked at the test code for the SimpleTest and I can't find a call to it. All I could see was a setup code. Can you please explain how the test function is called for the SimpleTest?
Reply | Threaded
Open this post in threaded view
|

Re: Who calls test function on the SimpleTest

cadet1620
Administrator
cyboman wrote
I have just looked at the test code for the SimpleTest and I can't find a call to it. All I could see was a setup code. Can you please explain how the test function is called for the SimpleTest?
I'm assuming that you are asking about FunctionCalls/SimpleFunction.

At this point you should not be writing bootstrap code at the beginning of your .asm output, so the (SimpleFunction.test) label should be the first thing in your .asm.

If you look at SimpleFunction.tst, you will see that it sets up a stack frame so that when the processor starts running it appears that SimpleFunction.test has been called.

The return IP in this frame is 1000, so when SimpleFunction.test returns the processor executes NOPs starting at 1000 until the requisite number of instructions have been executed, 300 in this case.

--Mark