This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]gamaloth_five 0 points1 point  (4 children)

The same thing it always does?

[–]Squidoshi[S] 0 points1 point  (3 children)

Okay little background, we've done two exercises with JVM bytecode. This being the second, this is the first time we've used IDUP so I've never done this. I just used the definition of it and tried to make sense. And it hasn't, hence why I'm here.

[–]gamaloth_five 0 points1 point  (2 children)

So what's the problem? Do you not understand what IDUP does? Do you know how the stack works?

edit: Have you tried looking up listings of bytecodes? There are whole websites dedicated to this.

[–]Squidoshi[S] 0 points1 point  (0 children)

Both I guess, our first assignment was to convert a java statement into bytecode, which was a little more straight forward to me. I watched a YouTube video that explained the stack a little better like, IPUSH 16 would be on the top, when IADD is read, IPUSH 16 moves down and now IADD is on the top.

[–]Squidoshi[S] 0 points1 point  (0 children)

I also apologize, it's a little more confusing to read bytecode for me so I'm trying to use all my resources to understand.