Prologue
I am trying to learn about DalvikVM instructions using the Smali/Baksmali assembler/disassembler for dex files.
Problem
From this java file
package gd;
class Hello {
public static void main(String[] args)
{
System.out.println("Hello!");
}
}
I have generated the following smali assembly file:
.class Lgd/Hello;
.super Ljava/lang/Object;
.source "Hello.java"
# direct methods
.method constructor <init>()V
.registers 1
.prologue
.line 3
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static main([Ljava/lang/String;)V
.registers 3
.parameter
.prologue
.line 6
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
const-string v1, "Hello!"
invoke-virtual {v0, v1}, Ljava/io/PrintStream;->println(Ljava/lang/String;)V
.line 7
return-void
.end method
My question is about the following line.
sget-object v0, Ljava/lang/System;->out:Ljava/io/PrintStream;
As I understand this loads the static object PrintStream
of the java.lang.System
class into the v0
register. Now, what does this out:
mean?