Package mars
Class Globals
java.lang.Object
mars.Globals
Collection of globally-available data structures.
- Version:
- August 2003
- Author:
- Pete Sanderson
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
Placeholder for non-printable ASCII codesstatic String[]
Array of strings to display for ASCII codes in ASCII display of data segment.static String
MARS copyright holdersstatic String
MARS copyright yearsstatic boolean
Flag to determine whether or not to produce internal debugging information.static int
MARS exit code -- useful with SYSCALL 17 when running from command line (not GUI)List of accepted file extensions for MIPS assembly source files.static String
Path to folder that contains help textstatic String
Path to folder that contains imagesstatic InstructionSet
The set of implemented MIPS instructions.static int
Maximum number of back-step operations to bufferstatic int
Maximum number of assembler errors produced by one assemble operationstatic int
Maximum length of scrolled message window (MARS Messages and Run I/O)static Memory
Simulated MIPS memory component.static Object
Lock variable used at head of synchronized block to guard MIPS memory and registersstatic MIPSprogram
the program currently being worked with.static boolean
static SymbolTable
Symbol table for file currently being assembled.static String
String to GUI's RunI/O text area when echoing user input from pop-up dialog.static String
The current MARS version number. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
static String[]
Get list of MarsTools that reside outside the MARS distribution.static VenusUI
getGui()
static String
getPropertyEntry(String propertiesFile, String propertyName)
Read and return property file value (if any) for requested property.static Settings
Read any syscall number assignment overrides from config file.static void
initialize(boolean gui)
Method called once upon system initialization to create the global data structures.static void
-
Field Details
-
instructionSet
The set of implemented MIPS instructions. -
program
the program currently being worked with. Used by GUI only, not command line. -
symbolTable
Symbol table for file currently being assembled. -
memory
Simulated MIPS memory component. -
memoryAndRegistersLock
Lock variable used at head of synchronized block to guard MIPS memory and registers -
debug
public static boolean debugFlag to determine whether or not to produce internal debugging information. -
userInputAlert
String to GUI's RunI/O text area when echoing user input from pop-up dialog. -
imagesPath
Path to folder that contains images- See Also:
- Constant Field Values
-
helpPath
Path to folder that contains help text- See Also:
- Constant Field Values
-
version
The current MARS version number. Can't wait for "initialize()" call to get it.- See Also:
- Constant Field Values
-
fileExtensions
List of accepted file extensions for MIPS assembly source files. -
maximumMessageCharacters
public static final int maximumMessageCharactersMaximum length of scrolled message window (MARS Messages and Run I/O) -
maximumErrorMessages
public static final int maximumErrorMessagesMaximum number of assembler errors produced by one assemble operation -
maximumBacksteps
public static final int maximumBackstepsMaximum number of back-step operations to buffer -
copyrightYears
MARS copyright years -
copyrightHolders
MARS copyright holders -
ASCII_NON_PRINT
Placeholder for non-printable ASCII codes -
ASCII_TABLE
Array of strings to display for ASCII codes in ASCII display of data segment. ASCII code 0-255 is array index. -
exitCode
public static int exitCodeMARS exit code -- useful with SYSCALL 17 when running from command line (not GUI) -
runSpeedPanelExists
public static boolean runSpeedPanelExists
-
-
Constructor Details
-
Globals
public Globals()
-
-
Method Details
-
setGui
-
getGui
-
getSettings
-
initialize
public static void initialize(boolean gui)Method called once upon system initialization to create the global data structures. -
getAsciiNonPrint
-
getAsciiStrings
-
getExternalTools
Get list of MarsTools that reside outside the MARS distribution. Currently this is done by adding the tool's path name to the list of values for the external_tools property. Use ";" as delimiter!- Returns:
- ArrayList. Each item is file path to .class file of a class that implements MarsTool. If none, returns empty list.
-
getPropertyEntry
Read and return property file value (if any) for requested property.- Parameters:
propertiesFile
- name of properties file (do NOT include filename extension, which is assumed to be ".properties")propertyName
- String containing desired property name- Returns:
- String containing associated value; null if property not found
-
getSyscallOverrides
Read any syscall number assignment overrides from config file.- Returns:
- ArrayList of SyscallNumberOverride objects
-