Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing a register value in an integer variable

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I want to know if I can do the following in java.

I've declared an integer variable i. I want to set
i to be equal to the value currently contained in some machine register, say $r1, whatever the value is:

int i= {value currently in register $r1}

Assuming that my machine has an x86 or mips architecture,
can this be done?

Bobs62
 
Not natively. This would hinder java's platform independence. If I had such a need in one of my apps, I'd use jni to call a native C/C++ function or class to do the job.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top