Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## mars
Class Globals

    java.lang.Object
      mars.Globals

    public class Globals

extends Object

Collection of globally-available data structures.

Author:
  Pete Sanderson

Field Summary
`static String` | `ASCII_NON_PRINT` Placeholder for non-printable ASCII codes
`static String[]` | `ASCII_TABLE` Array of strings to display for ASCII codes in ASCII display of data segment.
`static String` | `copyrightHolders` MARS copyright holders
`static String` | `copyrightYears` MARS copyright years
`static boolean` | `debug` Flag to determine whether or not to produce internal debugging information.
`static int` | `exitCode` MARS exit code -- useful with SYSCALL 17 when running from command line (not GUI)
`static ArrayList` | `fileExtensions` List of accepted file extensions for MIPS assembly source files.
`static String` | `helpPath` Path to folder that contains help text
`static String` | `imagesPath` Path to folder that contains images
`static InstructionSet` | `instructionSet` The set of implemented MIPS instructions.
`static int` | `maximumBacksteps` Maximum number of back-step operations to buffer
`static int` | `maximumErrorMessages` Maximum number of assembler errors produced by one assemble operation
`static int` | `maximumMessageCharacters` Maximum length of scrolled message window (MARS Messages and Run I/O)
`static Memory` | `memory` Simulated MIPS memory component.
`static Object` | `memoryAndRegistersLock` Lock variable used at head of synchronized block to guard MIPS memory and registers
`static MIPSprogram` | `program` the program currently being worked with.
`static boolean` | `runSpeedPanelExists`
`static SymbolTable` | `symbolTable` Symbol table for file currently being assembled.
`static String` | `userInputAlert` String to GUI's RunI/O text area when echoing user input from pop-up dialog.
`static String` | `version` The current MARS version number.

Constructor Summary
`Globals()`

Method Summary
`static String` | `getAsciiNonPrint()`
`static String[]` | `getAsciiStrings()`
`static ArrayList` | `getExternalTools()` 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` | `getSettings()`
`ArrayList` | `getSyscallOverrides()` 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` | `setGui(VenusUI g)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### instructionSet

    public static InstructionSet instructionSet

  The set of implemented MIPS instructions.

### program

    public static MIPSprogram program

  the program currently being worked with. Used by GUI only, not command line.

### symbolTable

    public static SymbolTable symbolTable

  Symbol table for file currently being assembled.

### memory

    public static Memory memory

  Simulated MIPS memory component.

### memoryAndRegistersLock

    public static Object memoryAndRegistersLock

  Lock variable used at head of synchronized block to guard MIPS memory and registers

### debug

    public static boolean debug

  Flag to determine whether or not to produce internal debugging information.

### userInputAlert

    public static String userInputAlert

  String to GUI's RunI/O text area when echoing user input from pop-up dialog.

### imagesPath

    public static final String imagesPath

  Path to folder that contains images

  See Also:
    Constant Field Values

### helpPath

    public static final String helpPath

  Path to folder that contains help text

  See Also:
    Constant Field Values

### version

    public static final String version

  The current MARS version number. Can't wait for "initialize()" call to get it.

  See Also:
    Constant Field Values

### fileExtensions

    public static final ArrayList fileExtensions

  List of accepted file extensions for MIPS assembly source files.

### maximumMessageCharacters

    public static final int maximumMessageCharacters

  Maximum length of scrolled message window (MARS Messages and Run I/O)

### maximumErrorMessages

    public static final int maximumErrorMessages

  Maximum number of assembler errors produced by one assemble operation

### maximumBacksteps

    public static final int maximumBacksteps

  Maximum number of back-step operations to buffer

### copyrightYears

    public static final String copyrightYears

  MARS copyright years

### copyrightHolders

    public static final String copyrightHolders

  MARS copyright holders

### ASCII_NON_PRINT

    public static final String ASCII_NON_PRINT

  Placeholder for non-printable ASCII codes

### ASCII_TABLE

    public static final String[] 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 exitCode

  MARS exit code -- useful with SYSCALL 17 when running from command line (not GUI)

### runSpeedPanelExists

    public static boolean runSpeedPanelExists

Constructor Detail

### Globals

    public Globals()

Method Detail

### setGui

    public static void setGui(VenusUI g)

### getGui

    public static VenusUI getGui()

### getSettings

    public static Settings getSettings()

### initialize

    public static void initialize(boolean gui)

  Method called once upon system initialization to create the global data structures.

### getAsciiNonPrint

    public static String getAsciiNonPrint()

### getAsciiStrings

    public static String[] getAsciiStrings()

### getExternalTools

    public static ArrayList 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

    public static String getPropertyEntry(String propertiesFile,
                                          String propertyName)

  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

    public ArrayList getSyscallOverrides()

  Read any syscall number assignment overrides from config file.

  Returns:
    ArrayList of SyscallNumberOverride objects

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD