Human resource machine year 38

broken image

(When these solutions are typed out, the JUMP command will include a label, and the program will jump to that label.

broken image

This creates a loop, and the worker will continuously execute those instructions until the IN conveyor is empty. After executing an INBOX and then an OUTBOX, we must JUMP back to the start of the program. To do this, we must use the JUMP command. A program will always stop if the worker hits an INBOX instruction, but there is nothing left on the IN conveyor belt. Since you don't know how many items you need to transfer, you'll want to write a program that continuously grabs from the IN conveyor belt, and drops to the OUT conveyor belt until you run out of items. The first time you try this program, you have an unspecified number of items on the IN conveyor.

broken image

You can have the worker jump to a previous instruction in the program, or skip ahead to other instructions further below.

broken image

JUMP When your worker encounters the jump command, he will 'jump' to the instruction that follows after the blue box which you can drag to another point in your program. This year you are introduced to your third instruction: JUMP.

broken image