.data // Tell the assmbler to put the lines that follows .data in the data segment // I.e.: treat these lines as variable definitions |
The data section of the computer program contains the permanent program constants and variables:
public class JavaProg { public static int age; ... // other stuff omitted because it's not relevant to the discussion } |
In order to store an integer value into the program variable age, we need to:
|
In addition to reserving the memory cells to store the value, we need to do one more thing:
|
So when you define a variable in Java, such as:
public class JavaProg { public static int age; ... // other stuff omitted because it's not relevant to the discussion } |
The Java compiler will do 2 things:
|