|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmoka.lang.Object
moka.lang.System
The System
class contains several useful class fields
and methods. It cannot be instantiated.
Among the facilities provided by the System
class
are input and output functions and most of the calc-dependent and AMS-dependent constants.
Field Summary | |
static short |
AMS
The AMS version (AMS_1xx or AMS_2xx) |
static short |
AMS_1
Indicate that the AMS version is AMS_1xx. |
static short |
AMS_2
Indicate that the AMS version is AMS_2xx. |
static short |
argCount
The number of arguments passed to the program. |
static short |
CALCULATOR
The calculator model (TI-89, TI-92 or V200) |
static short |
CALCULATOR_TI89
Indicate that the calculator model is TI89. |
static short |
CALCULATOR_TI92PLUS
Indicate that the calculator model is TI92PLUS. |
static short |
CALCULATOR_V200
Indicate that the calculator model is V200. |
static short |
ENTRIES
Number of entries in TIOS jump table: may be used for determining actual AMS version (for example, it is 972 on AMS 1.05 and 1463 on AMS 2.03). |
static short |
KEY_DIAMOND
The number added to the key code if the Diamond key is pressed with it. |
static short |
KEY_DOWN
Key code for the down arrow key. |
static short |
KEY_DOWNLEFT
Key code for simultaneous pressing of the down and left arrow keys. |
static short |
KEY_DOWNRIGHT
Key code for simultaneous pressing on up and right arrow keys. |
static short |
KEY_LEFT
Key code for the left arrow key. |
static short |
KEY_RIGHT
Key code for the right arrow key. |
static short |
KEY_SHIFT
The number added to the key code if the Shift key is pressed with it. |
static short |
KEY_UP
Key code for the up arrow key. |
static short |
KEY_UPLEFT
Key code for simultaneous pressing of the up and left arrow keys. |
static short |
KEY_UPRIGHT
Key code for simultaneous pressing on up and right arrow keys. |
static void_p |
ROM_BASE
Base address of the ROM (0x200000 on TI-89 or V200, 0x400000 on TI-92 Plus). |
Method Summary | |
static void |
clearEstack()
Clears the expression stack. |
static void |
clrscr()
Clears the screen and moves the print position to the first character of the first line. |
static void |
contrastDn()
Decreases the display contrast. |
static void |
contrastUp()
Increases the display contrast. |
static void |
exec(String command)
Executes the specified string command. |
static void |
exit()
Terminates the current program returning 0 as return value. |
static void |
exit(double ret)
Terminates the current program returning a double as return value. |
static void |
exit(int ret)
Terminates the current program returning an int as return value. |
static void |
exit(long ret)
Terminates the current program returning a long as return value. |
static void |
exit(short ret)
Terminates the current program returning a short as return value. |
static void |
exit(String ret)
Terminates the current program returning a String as return value. |
static void |
free(void_p ptr)
Deallocates a memory block previously allocated by a call of System.malloc. |
static void |
gcRAM()
Calls the garbage collection of the RAM memory. |
static int |
getAvailRAM()
Returns the availlable RAM memory in bytes. |
static double |
getDouble()
Returns the next argument as a double. |
static int |
getInt()
Returns the next argument as a int. |
static long |
getLong()
Returns the next argument as a long. |
static short |
getShort()
Returns the next argument as a short. |
static String |
getString()
Returns the next argument as a String. |
static void |
idle()
Turns the calculator in "low-power" state until the next interrupt occurs then returns. |
static void_p |
malloc(int size)
Allocate a block of memory from the memory heap. |
static void |
off()
Turns off the calculator. |
static void |
print(byte b)
Prints a byte. |
static void |
print(char c)
Prints a char. |
static void |
print(char[] s)
Prints an ANSI string. |
static void |
print(double d)
Prints a double. |
static void |
print(int i)
Prints an int. |
static void |
print(long l)
Prints a long. |
static void |
print(Object obj)
Prints an object. |
static void |
print(short s)
Prints a short. |
static void |
print(String s)
Prints a String then finalize the String. |
static void |
println()
Terminates the line. |
static void |
println(byte b)
Prints a byte and then terminates the line. |
static void |
println(char c)
Prints a char and then terminates the line. |
static void |
println(char[] s)
Prints an ANSI string and then terminates the line. |
static void |
println(double d)
Prints a double and then terminates the line. |
static void |
println(int i)
Prints an int and then terminates the line. |
static void |
println(long l)
Prints a long and then terminates the line. |
static void |
println(Object obj)
Prints an object and then terminates the line. |
static void |
println(short s)
Prints a short and then terminates the line. |
static void |
println(String s)
Prints a String and then terminates the line and finalize the String. |
static char |
read()
Read a character from the keyboard. |
static String |
readLine()
Read a line of text. |
static String |
readLine(boolean echo)
Read a line of text. |
static void |
reset()
Resets the calculator. |
static int |
setAPD(int time)
Sets the device's "APD" time. |
static void |
setStHelpMsg(String msg)
Displays a message in the status line then finalizes the String argument. |
static boolean |
stEraseHelp()
If the status flags indicate that a help message is being displayed, this function redraws the status line, effectively removing the message. |
Methods inherited from class moka.lang.Object |
equals, finalize, getClassName, toString |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final short AMS_1
public static final short AMS_2
public static final short CALCULATOR_TI89
public static final short CALCULATOR_TI92PLUS
public static final short CALCULATOR_V200
public static short AMS
public static short CALCULATOR
public static void_p ROM_BASE
public static short ENTRIES
public static short KEY_DIAMOND
public static short KEY_DOWN
public static short KEY_UPLEFT
public static short KEY_DOWNLEFT
public static short KEY_LEFT
public static short KEY_RIGHT
public static short KEY_SHIFT
public static short KEY_UP
public static short KEY_UPRIGHT
public static short KEY_DOWNRIGHT
public static short argCount
Method Detail |
public static boolean stEraseHelp()
public static void setStHelpMsg(String msg)
msg
- The message to display in the status linepublic static int getAvailRAM()
public static void gcRAM()
public static void reset()
public static void contrastUp()
public static void contrastDn()
public static void idle()
public static void off()
public static void clearEstack()
public static void exit()
public static void exit(short ret)
ret
- The value to returnpublic static void exit(int ret)
ret
- The value to returnpublic static void exit(long ret)
ret
- The value to returnpublic static void exit(double ret)
ret
- The value to returnpublic static void exit(String ret)
ret
- The value to returnpublic static short getShort()
public static int getInt()
public static long getLong()
public static double getDouble()
public static String getString()
public static void clrscr()
public static void println()
public static void print(Object obj)
toString
method.
obj
- The Object
to be printedpublic static void println(Object obj)
toString
method.
obj
- The Object
to be printedpublic static void print(String s)
s
- The String
to be printedpublic static void println(String s)
s
- The String
to be printedpublic static void print(char[] s)
s
- The ANSI string
to be printedpublic static void println(char[] s)
s
- The ANSI string
to be printedpublic static void print(char c)
c
- The char
to be printedpublic static void println(char c)
c
- The char
to be printedpublic static void print(byte b)
b
- The byte
to be printedpublic static void println(byte b)
public static void print(short s)
s
- The short
to be printedpublic static void println(short s)
s
- The short
to be printedpublic static void print(int i)
i
- The int
to be printedpublic static void println(int i)
i
- The int
to be printedpublic static void print(long l)
l
- The long
to be printedpublic static void println(long l)
l
- The long
to be printedpublic static void print(double d)
d
- The double
to be printedpublic static void println(double d)
d
- The double
to be printedpublic static char read()
public static String readLine()
public static String readLine(boolean echo)
echo
- if true, echos the keys pressed on the screen.
public static void exec(String command)
command
- a specified system command.public static int setAPD(int time)
time
- the time in 1/20th seconds where, if no user interaction occurs with the device, it turns off.
public static void_p malloc(int size)
size
- the size (in bytes) of the block.
public static void free(void_p ptr)
ptr
- pointer to the memory block.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |