Homework 1: Intermediate Languages

Lab Assigned Due
(in class)
30 Aug 4 Sep
Take a look at the JVM instruction set under Resources.
  1. Write down as many sequences of JVM instructions that have the cummulative effect of leaving a single 0 on the top of the JVM arithmetic stack.

    Example: iconst_0

  2. Show all single JVM instructions that can push the value 4 on top of stack. Each instruction could be of any length (1, 2, 3, or 4 bytes). Discuss why there are so many.


Last modified 15:04:33 CDT 30 August 2007 by Ron K. Cytron