Do we have to use jump instructions to implement eq, lt and gt functions?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Do we have to use jump instructions to implement eq, lt and gt functions?

kraftwerk1611
Hi,

Is the only way to implement eq, lt instructions in Project 7 (VM-part 1) is to use jump instructions, if-else and labels?

Listening to lectures I got the impression that use of jump was deferred till chapter 8. Or may be I missed something.

Thanks.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Do we have to use jump instructions to implement eq, lt and gt functions?

ivant
You can (and for these instructions should) use the HACK jumps and any other thing you've already implemented. In chapter 8, you'll implement the VM-level jumps.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Do we have to use jump instructions to implement eq, lt and gt functions?

kraftwerk1611
Thank you.

So far things seem to be working with jump instructions.
Loading...