|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ridgesoft.vm.VM
public class VM
Virtual Machine support class.
Field Summary | |
---|---|
static boolean |
mTraceBreak
Controls whether a breakpoint should be executed when an exception occurs. |
Method Summary | |
---|---|
static void |
breakpoint()
Executes a breakpoint to stop execution of the application. |
static void |
clearBit(int address,
int bit)
Clears a bit in the byte at the specified address. |
static OutputStream |
getDebugOutputStream()
Gets the output stream for the debug output display. |
static boolean |
isSet(int address,
int bit)
Tests to see if the bit in the byte at the specified address is set. |
static byte |
readByte(int address)
Reads one byte directly from memory. |
static int |
readInt(int address)
Reads an int value directly from memory. |
static byte |
readProgramByte(int address)
Reads one byte directly from program memory. |
static short |
readShort(int address)
Reads a short value directly from memory. |
static boolean |
sendMessage(byte[] message)
Send a message to the host PC. |
static void |
setBit(int address,
int bit)
Sets a bit in the byte at the specified address. |
static void |
setDebug(boolean debug)
Enables or disables virtual machine debug checks. |
static void |
setStackSize(Thread thread,
int stackSize)
Sets the stack size for the specified thread. |
static void |
setTraceBreak(boolean traceBreak)
Sets the trace break flag. |
static void |
setWatch(int address)
Sets the debug watch point to the specified address. |
static void |
setWatch(Object object)
Sets the debug watch point to the specified object. |
static void |
writeByte(int address,
byte value)
Writes one byte directly to memory. |
static void |
writeInt(int address,
int value)
Writes an int value directly to memory. |
static void |
writeShort(int address,
short value)
Writes a short value directly to memory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
---|
public static boolean mTraceBreak
Use the setTraceBreak method to set this variable rather than referencing it directly.
setTraceBreak(boolean)
Method Detail |
---|
public static void breakpoint()
public static void clearBit(int address, int bit)
Note: Extreme care should be taken to avoid corrupting memory used by the virtual machine or the application when using this method.
address
- address of byte to modifybit
- number of bit to clear (0-7, 0 = least significant)public static OutputStream getDebugOutputStream()
public static boolean isSet(int address, int bit)
address
- address of byte to testbit
- number of bit to test (0-7, 0 = least significant)
public static byte readByte(int address)
address
- address to read
public static int readInt(int address)
address
- address to read
public static byte readProgramByte(int address)
address
- address to read
public static short readShort(int address)
address
- address to read
public static boolean sendMessage(byte[] message)
This method is for internal use only. End users should not attempt to use this method.
message
- message to sendpublic static void setBit(int address, int bit)
Note: Extreme care should be taken to avoid corrupting memory used by the virtual machine or the application when using this method.
address
- address of byte to modifybit
- number of bit to set (0-7, 0 = least significant)public static void setDebug(boolean debug)
Enabling debug slows execution but may be useful in isolating problems with the virtual machine.
debug
- true to enable debug checks, false to disable debug checkspublic static void setStackSize(Thread thread, int stackSize)
This method can be used to reduce or enlarge the size of the stack allocated for a particular thread. This method is only effective if invoked before invoking the thread's start method.
thread
- threadstackSize
- size of the stack in bytespublic static void setTraceBreak(boolean traceBreak)
When set to true, calls to printStackTrace will result in a virtual machine breakpoint before and after the stack trace is printed. This is intended to help debugging by providing a means to view the an exception message before it scrolls off of a small display.
traceBreak
- true to enable breakpoints in printStackTrace, false to
disablepublic static void setWatch(int address)
address
- address to watchpublic static void setWatch(Object object)
object
- object to watch.public static void writeByte(int address, byte value)
Note: Extreme care should be taken to avoid corrupting memory used by the virtual machine or the application when using this method.
address
- address to write tovalue
- value to writepublic static void writeInt(int address, int value)
Note: Extreme care should be taken to avoid corrupting memory used by the virtual machine or the application when using this method.
address
- address to write tovalue
- value to writepublic static void writeShort(int address, short value)
Note: Extreme care should be taken to avoid corrupting memory used by the virtual machine or the application when using this method.
address
- address to write tovalue
- value to write
|
RoboJDETM v2.0 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |