META-INF/MANIFEST.MF
PseudoOps.txt
Config.properties
Syscall.properties
Settings.properties
MARSlicense.txt
mainclass.txt
CreateMarsJar.bat
Mars.java
Mars.class
docs/constant-values.html
docs/overview-tree.html
docs/index.html
docs/.DS_Store
docs/Mars.html
docs/overview-frame.html
docs/allclasses-noframe.html
docs/serialized-form.html
docs/index-all.html
docs/resources/inherit.gif
docs/deprecated-list.html
docs/package-frame.html
docs/stylesheet.css
docs/overview-summary.html
docs/help-doc.html
docs/package-summary.html
docs/allclasses-frame.html
docs/package-list
docs/package-tree.html
docs/mars/tools/IntroToTools.html
docs/mars/tools/DigitalLabSim.html
docs/mars/tools/FloatRepresentation.html
docs/mars/tools/BHTSimulator.html
docs/mars/tools/KeyboardAndDisplaySimulator.html
docs/mars/tools/InstructionStatistics.html
docs/mars/tools/DigitalLabSim.SevenSegmentPanel.html
docs/mars/tools/InstructionCounter.html
docs/mars/tools/MarsBot.html
docs/mars/tools/CacheSimulator.html
docs/mars/tools/DigitalLabSim.HexaKeyboard.EcouteurClick.html
docs/mars/tools/ScreenMagnifier.html
docs/mars/tools/AbstractMarsToolAndApplication.ConnectButton.html
docs/mars/tools/DigitalLabSim.SevenSegmentDisplay.html
docs/mars/tools/MemoryReferenceVisualization.html
docs/mars/tools/MarsTool.html
docs/mars/tools/package-frame.html
docs/mars/tools/BHTSimGUI.html
docs/mars/tools/BHTableModel.html
docs/mars/tools/package-summary.html
docs/mars/tools/AbstractMarsToolAndApplication.html
docs/mars/tools/package-tree.html
docs/mars/tools/ScavengerHunt.html
docs/mars/tools/DigitalLabSim.OneSecondCounter.html
docs/mars/tools/BHTEntry.html
docs/mars/tools/AbstractMarsToolAndApplication.EnterKeyListener.html
docs/mars/tools/BitmapDisplay.html
docs/mars/tools/DigitalLabSim.HexaKeyboard.html
docs/mars/assembler/MacroPool.html
docs/mars/assembler/Directives.html
docs/mars/assembler/SourceLine.html
docs/mars/assembler/SymbolTable.html
docs/mars/assembler/TokenTypes.html
docs/mars/assembler/OperandFormat.html
docs/mars/assembler/TokenList.html
docs/mars/assembler/TranslationCode.html
docs/mars/assembler/package-frame.html
docs/mars/assembler/Assembler.html
docs/mars/assembler/Tokenizer.html
docs/mars/assembler/Symbol.html
docs/mars/assembler/package-summary.html
docs/mars/assembler/Macro.html
docs/mars/assembler/DataTypes.html
docs/mars/assembler/package-tree.html
docs/mars/assembler/Token.html
docs/mars/util/PropertiesFile.html
docs/mars/util/Binary.html
docs/mars/util/FilenameFinder.html
docs/mars/util/package-frame.html
docs/mars/util/EditorFont.html
docs/mars/util/package-summary.html
docs/mars/util/package-tree.html
docs/mars/util/SystemIO.html
docs/mars/util/MemoryDump.html
docs/mars/MarsSplashScreen.html
docs/mars/venus/FileStatus.html
docs/mars/venus/SettingsAssembleAllAction.html
docs/mars/venus/FilePrintAction.html
docs/mars/venus/FileExitAction.html
docs/mars/venus/EditSelectAllAction.html
docs/mars/venus/RunToggleBreakpointsAction.html
docs/mars/venus/HelpAboutAction.html
docs/mars/venus/TextSegmentWindow.html
docs/mars/venus/RunGoAction.html
docs/mars/venus/ToolAction.html
docs/mars/venus/Coprocessor1Window.html
docs/mars/venus/DataSegmentWindow.html
docs/mars/venus/FileNewAction.html
docs/mars/venus/RunAssembleAction.html
docs/mars/venus/EditRedoAction.html
docs/mars/venus/SettingsStartAtMainAction.html
docs/mars/venus/EditTabbedPane.html
docs/mars/venus/HardcopyWriter.html
docs/mars/venus/SettingsEditorAction.html
docs/mars/venus/SettingsMemoryConfigurationAction.html
docs/mars/venus/SettingsAddressDisplayBaseAction.html
docs/mars/venus/RunResetAction.html
docs/mars/venus/EditPasteAction.html
docs/mars/venus/FileOpenAction.html
docs/mars/venus/RunPauseAction.html
docs/mars/venus/editors/package-frame.html
docs/mars/venus/editors/jeditsyntax/TextAreaPainter.html
docs/mars/venus/editors/jeditsyntax/InputHandler.next_line.html
docs/mars/venus/editors/jeditsyntax/InputHandler.overwrite.html
docs/mars/venus/editors/jeditsyntax/SyntaxDocument.html
docs/mars/venus/editors/jeditsyntax/InputHandler.backspace_word.html
docs/mars/venus/editors/jeditsyntax/KeywordMap.html
docs/mars/venus/editors/jeditsyntax/InputHandler.prev_page.html
docs/mars/venus/editors/jeditsyntax/InputHandler.insert_tab.html
docs/mars/venus/editors/jeditsyntax/JEditTextArea.html
docs/mars/venus/editors/jeditsyntax/InputHandler.repeat.html
docs/mars/venus/editors/jeditsyntax/InputHandler.end.html
docs/mars/venus/editors/jeditsyntax/InputHandler.prev_word.html
docs/mars/venus/editors/jeditsyntax/TextAreaPainter.Highlight.html
docs/mars/venus/editors/jeditsyntax/InputHandler.backspace.html
docs/mars/venus/editors/jeditsyntax/JEditBasedTextArea.html
docs/mars/venus/editors/jeditsyntax/PopupHelpItem.html
docs/mars/venus/editors/jeditsyntax/DefaultInputHandler.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/TokenMarker.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/MIPSTokenMarker.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/package-frame.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/package-summary.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/TokenMarker.LineInfo.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/package-tree.html
docs/mars/venus/editors/jeditsyntax/tokenmarker/Token.html
docs/mars/venus/editors/jeditsyntax/InputHandler.NonRepeatable.html
docs/mars/venus/editors/jeditsyntax/InputHandler.next_char.html
docs/mars/venus/editors/jeditsyntax/InputHandler.prev_char.html
docs/mars/venus/editors/jeditsyntax/InputHandler.clip_paste.html
docs/mars/venus/editors/jeditsyntax/InputHandler.html
docs/mars/venus/editors/jeditsyntax/InputHandler.clip_copy.html
docs/mars/venus/editors/jeditsyntax/TextAreaDefaults.html
docs/mars/venus/editors/jeditsyntax/package-frame.html
docs/mars/venus/editors/jeditsyntax/SyntaxStyle.html
docs/mars/venus/editors/jeditsyntax/InputHandler.insert_break.html
docs/mars/venus/editors/jeditsyntax/package-summary.html
docs/mars/venus/editors/jeditsyntax/InputHandler.select_all.html
docs/mars/venus/editors/jeditsyntax/InputHandler.delete_word.html
docs/mars/venus/editors/jeditsyntax/TextUtilities.html
docs/mars/venus/editors/jeditsyntax/InputHandler.next_word.html
docs/mars/venus/editors/jeditsyntax/package-tree.html
docs/mars/venus/editors/jeditsyntax/SyntaxUtilities.html
docs/mars/venus/editors/jeditsyntax/InputHandler.Wrapper.html
docs/mars/venus/editors/jeditsyntax/InputHandler.next_page.html
docs/mars/venus/editors/jeditsyntax/InputHandler.prev_line.html
docs/mars/venus/editors/jeditsyntax/InputHandler.MacroRecorder.html
docs/mars/venus/editors/jeditsyntax/InputHandler.document_home.html
docs/mars/venus/editors/jeditsyntax/InputHandler.delete.html
docs/mars/venus/editors/jeditsyntax/InputHandler.home.html
docs/mars/venus/editors/jeditsyntax/InputHandler.insert_char.html
docs/mars/venus/editors/jeditsyntax/InputHandler.clip_cut.html
docs/mars/venus/editors/jeditsyntax/InputHandler.NonRecordable.html
docs/mars/venus/editors/jeditsyntax/InputHandler.toggle_rect.html
docs/mars/venus/editors/jeditsyntax/InputHandler.document_end.html
docs/mars/venus/editors/package-summary.html
docs/mars/venus/editors/generic/package-frame.html
docs/mars/venus/editors/generic/package-summary.html
docs/mars/venus/editors/generic/package-tree.html
docs/mars/venus/editors/generic/GenericTextArea.html
docs/mars/venus/editors/package-tree.html
docs/mars/venus/editors/MARSTextEditingArea.html
docs/mars/venus/RegistersWindow.html
docs/mars/venus/EditUndoAction.html
docs/mars/venus/FileSaveAction.html
docs/mars/venus/PopupListener.html
docs/mars/venus/SettingsExtendedAction.html
docs/mars/venus/EditFindReplaceAction.html
docs/mars/venus/Editor.html
docs/mars/venus/FileCloseAllAction.html
docs/mars/venus/SettingsLabelAction.html
docs/mars/venus/SettingsDelayedBranchingAction.html
docs/mars/venus/HardcopyWriter.PrintCanceledException.html
docs/mars/venus/ExecutePane.html
docs/mars/venus/RunClearBreakpointsAction.html
docs/mars/venus/Coprocessor0Window.html
docs/mars/venus/RegistersPane.html
docs/mars/venus/package-frame.html
docs/mars/venus/HelpHelpAction.html
docs/mars/venus/EditCutAction.html
docs/mars/venus/FileDumpMemoryAction.html
docs/mars/venus/package-summary.html
docs/mars/venus/RepeatButton.html
docs/mars/venus/EditCopyAction.html
docs/mars/venus/FileSaveAllAction.html
docs/mars/venus/MessagesPane.html
docs/mars/venus/SettingsWarningsAreErrorsAction.html
docs/mars/venus/NumberDisplayBaseChooser.html
docs/mars/venus/RunStepAction.html
docs/mars/venus/SettingsHighlightingAction.html
docs/mars/venus/EditPane.html
docs/mars/venus/ToolLoader.html
docs/mars/venus/SettingsProgramArgumentsAction.html
docs/mars/venus/package-tree.html
docs/mars/venus/RunSpeedPanel.html
docs/mars/venus/GuiAction.html
docs/mars/venus/FileSaveAsAction.html
docs/mars/venus/VenusUI.html
docs/mars/venus/MainPane.html
docs/mars/venus/RunBackstepAction.html
docs/mars/venus/FileCloseAction.html
docs/mars/venus/SettingsPopupInputAction.html
docs/mars/venus/RunStopAction.html
docs/mars/venus/SettingsAssembleOnOpenAction.html
docs/mars/venus/SettingsExceptionHandlerAction.html
docs/mars/venus/SettingsValueDisplayBaseAction.html
docs/mars/venus/AbstractFontSettingDialog.html
docs/mars/venus/LabelsWindow.html
docs/mars/ProcessingException.html
docs/mars/ErrorList.html
docs/mars/mips/instructions/SimulationCode.html
docs/mars/mips/instructions/ExtendedInstruction.html
docs/mars/mips/instructions/package-frame.html
docs/mars/mips/instructions/BasicInstructionFormat.html
docs/mars/mips/instructions/package-summary.html
docs/mars/mips/instructions/package-tree.html
docs/mars/mips/instructions/Instruction.html
docs/mars/mips/instructions/InstructionSet.html
docs/mars/mips/instructions/syscalls/SyscallPrintString.html
docs/mars/mips/instructions/syscalls/SyscallPrintIntBinary.html
docs/mars/mips/instructions/syscalls/SyscallMidiOut.html
docs/mars/mips/instructions/syscalls/SyscallMessageDialogInt.html
docs/mars/mips/instructions/syscalls/SyscallExit.html
docs/mars/mips/instructions/syscalls/SyscallInputDialogInt.html
docs/mars/mips/instructions/syscalls/SyscallReadFloat.html
docs/mars/mips/instructions/syscalls/SyscallOpen.html
docs/mars/mips/instructions/syscalls/SyscallReadChar.html
docs/mars/mips/instructions/syscalls/SyscallMessageDialog.html
docs/mars/mips/instructions/syscalls/SyscallPrintFloat.html
docs/mars/mips/instructions/syscalls/SyscallSbrk.html
docs/mars/mips/instructions/syscalls/SyscallRandDouble.html
docs/mars/mips/instructions/syscalls/SyscallPrintIntUnsigned.html
docs/mars/mips/instructions/syscalls/SyscallMessageDialogString.html
docs/mars/mips/instructions/syscalls/AbstractSyscall.html
docs/mars/mips/instructions/syscalls/SyscallInputDialogFloat.html
docs/mars/mips/instructions/syscalls/RandomStreams.html
docs/mars/mips/instructions/syscalls/SyscallInputDialogString.html
docs/mars/mips/instructions/syscalls/SyscallReadString.html
docs/mars/mips/instructions/syscalls/SyscallPrintChar.html
docs/mars/mips/instructions/syscalls/SyscallRandIntRange.html
docs/mars/mips/instructions/syscalls/Syscall.html
docs/mars/mips/instructions/syscalls/SyscallTime.html
docs/mars/mips/instructions/syscalls/SyscallRandSeed.html
docs/mars/mips/instructions/syscalls/SyscallPrintIntHex.html
docs/mars/mips/instructions/syscalls/package-frame.html
docs/mars/mips/instructions/syscalls/SyscallPrintInt.html
docs/mars/mips/instructions/syscalls/SyscallMessageDialogDouble.html
docs/mars/mips/instructions/syscalls/SyscallConfirmDialog.html
docs/mars/mips/instructions/syscalls/package-summary.html
docs/mars/mips/instructions/syscalls/SyscallReadInt.html
docs/mars/mips/instructions/syscalls/SyscallExit2.html
docs/mars/mips/instructions/syscalls/SyscallReadDouble.html
docs/mars/mips/instructions/syscalls/SyscallInputDialogDouble.html
docs/mars/mips/instructions/syscalls/SyscallMessageDialogFloat.html
docs/mars/mips/instructions/syscalls/SyscallWrite.html
docs/mars/mips/instructions/syscalls/package-tree.html
docs/mars/mips/instructions/syscalls/SyscallSleep.html
docs/mars/mips/instructions/syscalls/SyscallClose.html
docs/mars/mips/instructions/syscalls/SyscallRandInt.html
docs/mars/mips/instructions/syscalls/SyscallPrintDouble.html
docs/mars/mips/instructions/syscalls/SyscallRead.html
docs/mars/mips/instructions/syscalls/SyscallRandFloat.html
docs/mars/mips/instructions/syscalls/SyscallNumberOverride.html
docs/mars/mips/instructions/syscalls/SyscallMidiOutSync.html
docs/mars/mips/instructions/BasicInstruction.html
docs/mars/mips/hardware/Coprocessor0.html
docs/mars/mips/hardware/Coprocessor1.html
docs/mars/mips/hardware/AccessNotice.html
docs/mars/mips/hardware/MemoryConfiguration.html
docs/mars/mips/hardware/Register.html
docs/mars/mips/hardware/MemoryAccessNotice.html
docs/mars/mips/hardware/MemoryConfigurations.html
docs/mars/mips/hardware/AddressErrorException.html
docs/mars/mips/hardware/package-frame.html
docs/mars/mips/hardware/InvalidRegisterAccessException.html
docs/mars/mips/hardware/package-summary.html
docs/mars/mips/hardware/Memory.html
docs/mars/mips/hardware/RegisterAccessNotice.html
docs/mars/mips/hardware/package-tree.html
docs/mars/mips/hardware/RegisterFile.html
docs/mars/mips/dump/AsciiTextDumpFormat.html
docs/mars/mips/dump/BinaryTextDumpFormat.html
docs/mars/mips/dump/MIFDumpFormat.html
docs/mars/mips/dump/DumpFormat.html
docs/mars/mips/dump/package-frame.html
docs/mars/mips/dump/SegmentWindowDumpFormat.html
docs/mars/mips/dump/DumpFormatLoader.html
docs/mars/mips/dump/package-summary.html
docs/mars/mips/dump/package-tree.html
docs/mars/mips/dump/AbstractDumpFormat.html
docs/mars/mips/dump/BinaryDumpFormat.html
docs/mars/mips/dump/HexTextDumpFormat.html
docs/mars/mips/dump/IntelHexDumpFormat.html
docs/mars/package-frame.html
docs/mars/ErrorMessage.html
docs/mars/simulator/BackStepper.html
docs/mars/simulator/Exceptions.html
docs/mars/simulator/package-frame.html
docs/mars/simulator/Simulator.StopListener.html
docs/mars/simulator/Simulator.html
docs/mars/simulator/SimulatorNotice.html
docs/mars/simulator/package-summary.html
docs/mars/simulator/SwingWorker.html
docs/mars/simulator/ProgramArgumentList.html
docs/mars/simulator/package-tree.html
docs/mars/simulator/DelayedBranch.html
docs/mars/package-summary.html
docs/mars/ProgramStatement.html
docs/mars/MarsLaunch.html
docs/mars/package-tree.html
docs/mars/MIPSprogram.html
docs/mars/Settings.html
docs/mars/Globals.html
help/SyscallMessageDialogQuestion.gif
help/MacrosHelp.html
help/SyscallMessageDialogInformation.gif
help/MarsHelpLimits.html
help/MarsHelpSettings.html
help/ExceptionsHelp.html
help/SyscallMessageDialogError.gif
help/MarsHelpIDE.html
help/MarsHelpIntro.html
help/MarsHelpDebugging.html
help/BugReportingHelp.html
help/MarsHelpCommand.html
help/MarsHelpTools.html
help/MarsHelpHistory.html
help/MIPSInstructionSetSong.html
help/SyscallMessageDialogWarning.gif
help/mipsref.pdf
help/SyscallHelp.html
help/Acknowledgements.html
images/Copy22.png
images/game_gold.png
images/StepBack16.png
images/Cut22.gif
images/mars32.ico
images/Find22.png
images/Undo22.png
images/Redo22.png
images/Paste16.png
images/.DS_Store
images/Play16.png
images/Cut24.gif
images/Stop22.png
images/MyBlank16.gif
images/StepForward16.png
images/game_dynamite.png
images/Pause16.png
images/Reset16.png
images/Open22.png
images/Save22.png
images/Print24.gif
images/SaveAs22.png
images/RedMars16.gif
images/Assemble16.png
images/Help16.png
images/Dump16.png
images/New22.png
images/Print22.gif
images/Pause22.png
images/Previous22.png
images/game_rock.png
images/Save16.png
images/RedMars32.GIF
images/Reset22.png
images/Open16.png
images/game_gem.png
images/Help22.png
images/mars.ico
images/Assemble22.png
images/Edit_tab.jpg
images/SaveAs16.png
images/Print16.gif
images/New16.png
images/Dump22.png
images/game_hook.png
images/MarsSurfacePathfinder.jpg
images/Undo16.png
images/Find16.png
images/game_bg.png
images/MyBlank24.gif
images/Cut16.gif
images/StepBack22.png
images/Copy16.png
images/Redo16.png
images/RedMars50.gif
images/MarsThumbnail.gif
images/StepForward22.png
images/Stop16.png
images/Play22.png
images/Paste22.png
images/Next22.png
images/Execute_tab.jpg
mars/tools/DigitalLabSim.java
mars/tools/AbstractMarsToolAndApplication$MessageField.class
mars/tools/IntroToTools.java
mars/tools/MemoryReferenceVisualization$8.class
mars/tools/CacheSimulator$5.class
mars/tools/MemoryReferenceVisualization$ColorChooserControls$1.class
mars/tools/AbstractMarsToolAndApplication$CreateAssembleRunMIPSprogram.class
mars/tools/BitmapDisplay$4.class
mars/tools/FloatRepresentation$InstructionsPane.class
mars/tools/AbstractMarsToolAndApplication$1.class
mars/tools/FloatRepresentation.java
mars/tools/AbstractMarsToolAndApplication$3.class
mars/tools/BitmapDisplay$6.class
mars/tools/FloatRepresentation$1.class
mars/tools/ScavengerHunt$ScavengerHuntDisplay.class
mars/tools/AbstractMarsToolAndApplication$MessageField$MessageWriter.class
mars/tools/KeyboardAndDisplaySimulator.class
mars/tools/AbstractMarsToolAndApplication.class
mars/tools/MarsBot$BotRunnable.class
mars/tools/BHTSimulator.java
mars/tools/AbstractMarsToolAndApplication$EnterKeyListener.class
mars/tools/KeyboardAndDisplaySimulator.java
mars/tools/CacheSimulator$3.class
mars/tools/KeyboardAndDisplaySimulator$2.class
mars/tools/ScribblerSettings.class
mars/tools/CacheSimulator.class
mars/tools/InstructionStatistics.java
mars/tools/BitmapDisplay$2.class
mars/tools/AbstractMarsToolAndApplication$7.class
mars/tools/CacheSimulator$CacheAccessResult.class
mars/tools/ScavengerHunt$PlayerData.class
mars/tools/AbstractMarsToolAndApplication$5.class
mars/tools/CacheSimulator$AbstractCache.class
mars/tools/CacheSimulator$Animation.class
mars/tools/CacheSimulator$1.class
mars/tools/CacheSimulator$AnyCache.class
mars/tools/FloatRepresentation$HexToBinaryGraphicPanel.class
mars/tools/MagnifierImage$Scribbler.class
mars/tools/KeyboardAndDisplaySimulator$FontChanger.class
mars/tools/AbstractMarsToolAndApplication$2.class
mars/tools/BitmapDisplay.class
mars/tools/AbstractMarsToolAndApplication$10.class
mars/tools/AbstractMarsToolAndApplication$GUIUpdater.class
mars/tools/CacheSimulator$CacheBlock.class
mars/tools/CacheSimulator$4.class
mars/tools/InstructionCounter.java
mars/tools/IntroToTools.class
mars/tools/FloatRepresentation$BinaryFractionDisplayTextField.class
mars/tools/KeyboardAndDisplaySimulator$TransmitterDelayTechnique.class
mars/tools/BitmapDisplay$5.class
mars/tools/CacheSimulator.java
mars/tools/MarsBot.java
mars/tools/MarsTool.class
mars/tools/AbstractMarsToolAndApplication$4.class
mars/tools/BitmapDisplay$1.class
mars/tools/CaptureDisplayAlignmentStrategy.class
mars/tools/InstructionStatistics.class
mars/tools/FloatRepresentation$DecimalDisplayKeystokeListenter.class
mars/tools/DigitalLabSim$SevenSegmentPanel.class
mars/tools/KeyboardAndDisplaySimulator$1.class
mars/tools/FloatRepresentation$BinaryDisplayKeystrokeListener.class
mars/tools/KeyboardAndDisplaySimulator$NormallyDistributedDelay.class
mars/tools/KeyboardAndDisplaySimulator$DelayLengthPanel$DelayLengthListener.class
mars/tools/SettingsDialog.class
mars/tools/ScreenMagnifier.java
mars/tools/ScreenMagnifier$1.class
mars/tools/CacheSimulator$2.class
mars/tools/KeyboardAndDisplaySimulator$3.class
mars/tools/KeyboardAndDisplaySimulator$FontSettingDialog.class
mars/tools/MemoryReferenceVisualization.java
mars/tools/ScavengerHunt.class
mars/tools/KeyboardAndDisplaySimulator$UniformlyDistributedDelay.class
mars/tools/ScavengerHunt$ScavengerHuntRunnable.class
mars/tools/BitmapDisplay$3.class
mars/tools/AbstractMarsToolAndApplication$6.class
mars/tools/MemoryReferenceVisualization$GraphicsPanel.class
mars/tools/MarsBot.class
mars/tools/ScreenMagnifier.class
mars/tools/MemoryReferenceVisualization$3.class
mars/tools/MarsTool.java
mars/tools/Magnifier.class
mars/tools/BitmapDisplay$Grid.class
mars/tools/KeyboardAndDisplaySimulator$FontSettingDialog$3.class
mars/tools/ScavengerHunt$ScavengerHuntRunnable$1.class
mars/tools/Magnifier$4.class
mars/tools/CaptureMagnifierRectangle.class
mars/tools/BHTSimGUI$1.class
mars/tools/KeyboardAndDisplaySimulator$FontSettingDialog$1.class
mars/tools/MemoryReferenceVisualization$1.class
mars/tools/BHTSimGUI.java
mars/tools/BHTableModel.java
mars/tools/SettingsDialog$2.class
mars/tools/BHTSimGUI.class
mars/tools/CaptureDisplayCentered.class
mars/tools/AbstractMarsToolAndApplication$8.class
mars/tools/InstructionCounter.class
mars/tools/MarsBot$MarsBotDisplay.class
mars/tools/KeyboardAndDisplaySimulator$KeyboardKeyListener.class
mars/tools/DigitalLabSim.class
mars/tools/MemoryReferenceVisualization$ColorChooserControls$ColorChooserListener.class
mars/tools/Magnifier$2.class
mars/tools/CaptureModel.class
mars/tools/BHTSimulator.class
mars/tools/AbstractMarsToolAndApplication.java
mars/tools/MemoryReferenceVisualization$5.class
mars/tools/BHTEntry.class
mars/tools/MemoryReferenceVisualization$7.class
mars/tools/BitmapDisplay$GraphicsPanel.class
mars/tools/MarsBot$BotRunnable$2.class
mars/tools/DigitalLabSim$SevenSegmentDisplay.class
mars/tools/AbstractMarsToolAndApplication$ConnectButton.class
mars/tools/MagnifierImage$1.class
mars/tools/DigitalLabSim$1.class
mars/tools/MemoryReferenceVisualization$Grid.class
mars/tools/DigitalLabSim$HexaKeyboard.class
mars/tools/SettingsDialog$3.class
mars/tools/DigitalLabSim$HexaKeyboard$EcouteurClick.class
mars/tools/ScavengerHunt$ScavengerHuntRunnable$2.class
mars/tools/DigitalLabSim$OneSecondCounter.class
mars/tools/AbstractMarsToolAndApplication$9.class
mars/tools/ScavengerHunt.java
mars/tools/BHTEntry.java
mars/tools/FloatRepresentation$BinaryToDecimalFormulaGraphic.class
mars/tools/BHTableModel.class
mars/tools/Magnifier$5.class
mars/tools/CaptureRectangleStrategy.class
mars/tools/SettingsDialog$1.class
mars/tools/MemoryReferenceVisualization$2.class
mars/tools/KeyboardAndDisplaySimulator$FontSettingDialog$2.class
mars/tools/KeyboardAndDisplaySimulator$DelayLengthPanel.class
mars/tools/FloatRepresentation$FlavorsOfFloat.class
mars/tools/BitmapDisplay.java
mars/tools/MagnifierImage.class
mars/tools/Magnifier$1.class
mars/tools/MemoryReferenceVisualization$ColorChooserControls.class
mars/tools/MemoryReferenceVisualization$6.class
mars/tools/CaptureScaledRectangle.class
mars/tools/CaptureDisplayUpperleft.class
mars/tools/MemoryReferenceVisualization$CounterColorScale.class
mars/tools/KeyboardAndDisplaySimulator$FixedLengthDelay.class
mars/tools/MemoryReferenceVisualization.class
mars/tools/MagnifierImage$2.class
mars/tools/MemoryReferenceVisualization$CounterColor.class
mars/tools/MemoryReferenceVisualization$4.class
mars/tools/FloatRepresentation$HexDisplayKeystrokeListener.class
mars/tools/MarsBot$BotRunnable$1.class
mars/tools/ScavengerHunt$Location.class
mars/tools/FloatRepresentation.class
mars/tools/Magnifier$3.class
mars/.DS_Store
mars/assembler/TokenList.class
mars/assembler/MacroPool.java
mars/assembler/Directives.java
mars/assembler/SymbolTable.java
mars/assembler/SourceLine.java
mars/assembler/Directives.class
mars/assembler/TokenTypes.java
mars/assembler/TokenTypes.class
mars/assembler/TranslationCode.class
mars/assembler/Tokenizer.class
mars/assembler/MacroPool.class
mars/assembler/TokenList.java
mars/assembler/OperandFormat.java
mars/assembler/Macro.class
mars/assembler/TranslationCode.java
mars/assembler/Assembler$DataSegmentForwardReferences.class
mars/assembler/Assembler.java
mars/assembler/SourceLine.class
mars/assembler/Tokenizer.java
mars/assembler/Symbol.java
mars/assembler/DataTypes.java
mars/assembler/Assembler$ProgramStatementComparator.class
mars/assembler/SymbolTable.class
mars/assembler/Macro.java
mars/assembler/DataTypes.class
mars/assembler/Token.class
mars/assembler/Assembler$UserKernelAddressSpace.class
mars/assembler/Token.java
mars/assembler/Assembler.class
mars/assembler/OperandFormat.class
mars/assembler/Symbol.class
mars/assembler/Assembler$DataSegmentForwardReferences$DataSegmentForwardReference.class
mars/MarsSplashScreen.java
mars/util/Binary.java
mars/util/PropertiesFile.java
mars/util/FilenameFinder.java
mars/util/PropertiesFile.class
mars/util/EditorFont.class
mars/util/MemoryDump.class
mars/util/EditorFont.java
mars/util/Binary.class
mars/util/SystemIO.class
mars/util/SystemIO$FileIOData.class
mars/util/FilenameFinder.class
mars/util/SystemIO.java
mars/util/FilenameFinder$MarsFileFilter.class
mars/util/MemoryDump.java
mars/MarsSplashScreen.class
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog.class
mars/venus/FileStatus.java
mars/venus/HelpHelpAction$1.class
mars/venus/EditFindReplaceAction$FindReplaceDialog$2.class
mars/venus/FilePrintAction.java
mars/venus/SettingsHighlightingAction$BackgroundChanger.class
mars/venus/SettingsAssembleAllAction.java
mars/venus/RunToggleBreakpointsAction.java
mars/venus/MessagesPane$Asker$1$1.class
mars/venus/SettingsHighlightingAction$2.class
mars/venus/EditPane$2.class
mars/venus/SettingsEditorAction$EditorFontDialog$8.class
mars/venus/SettingsWarningsAreErrorsAction.class
mars/venus/MessagesPane$Asker.class
mars/venus/MonoRightCellRenderer.class
mars/venus/GuiAction.class
mars/venus/FileExitAction.class
mars/venus/FileExitAction.java
mars/venus/EditSelectAllAction.java
mars/venus/SettingsAssembleAllAction.class
mars/venus/Coprocessor1Window$MyTippedJTable$1.class
mars/venus/FileDumpMemoryAction$DumpFormatComboBoxRenderer.class
mars/venus/HelpAboutAction.java
mars/venus/FileStatus.class
mars/venus/SettingsHighlightingAction$ForegroundChanger.class
mars/venus/Coprocessor1Window.java
mars/venus/ToolAction.java
mars/venus/RunGoAction.java
mars/venus/NumberDisplayBaseChooser.class
mars/venus/EditFindReplaceAction.class
mars/venus/TextSegmentWindow.java
mars/venus/DataSegmentWindow$NextButton.class
mars/venus/SettingsAssembleOnOpenAction.class
mars/venus/SettingsHighlightingAction$6.class
mars/venus/DataSegmentWindow.java
mars/venus/SettingsHighlightingAction$DefaultChanger.class
mars/venus/RunAssembleAction.java
mars/venus/Coprocessor1Window$MyTippedJTable.class
mars/venus/FileNewAction.java
mars/venus/EditFindReplaceAction$FindReplaceDialog$4.class
mars/venus/FileCloseAction.class
mars/venus/AbstractFontSettingDialog$ComboBoxRenderer.class
mars/venus/SettingsStartAtMainAction.java
mars/venus/SettingsEditorAction$EditorFontDialog$ForegroundChanger.class
mars/venus/RunStepAction.class
mars/venus/SettingsEditorAction$EditorFontDialog$BoldItalicChanger.class
mars/venus/EditRedoAction.java
mars/venus/VenusUI$2.class
mars/venus/SettingsHighlightingAction$4.class
mars/venus/PopupListener.class
mars/venus/DataSegmentWindow$8.class
mars/venus/EditTabbedPane.java
mars/venus/EditPasteAction.class
mars/venus/FilePrintAction.class
mars/venus/SettingsEditorAction.class
mars/venus/EditFindReplaceAction$FindReplaceDialog$1.class
mars/venus/LabelsWindow$LabelsForSymbolTable.class
mars/venus/TextSegmentWindow$MyTableColumnMovingListener.class
mars/venus/SettingsEditorAction.java
mars/venus/ToolLoader.class
mars/venus/SettingsEditorAction$EditorFontDialog$9.class
mars/venus/SettingsHighlightingAction$3.class
mars/venus/HardcopyWriter.java
mars/venus/LabelsWindow$LabelDisplayMouseListener.class
mars/venus/DataSegmentWindow$MyTippedJTable$1.class
mars/venus/FileOpenAction.java
mars/venus/RunStopAction.class
mars/venus/MonoRightCellRenderer.java
mars/venus/SettingsAddressDisplayBaseAction.java
mars/venus/HelpHelpAction$2.class
mars/venus/RunResetAction.java
mars/venus/Coprocessor0Window$RegisterCellRenderer.class
mars/venus/SettingsMemoryConfigurationAction.java
mars/venus/RunAssembleAction.class
mars/venus/EditCopyAction.class
mars/venus/Coprocessor0Window$MyTippedJTable.class
mars/venus/EditPasteAction.java
mars/venus/RunToggleBreakpointsAction.class
mars/venus/LabelsWindow$LabelItemListener.class
mars/venus/SettingsProgramArgumentsAction.class
mars/venus/ColorSelectButton.class
mars/venus/RunPauseAction.java
mars/venus/FileNewAction.class
mars/venus/EditCutAction.class
mars/venus/editors/jeditsyntax/InputHandler$insert_tab.class
mars/venus/editors/jeditsyntax/TextAreaPainter.java
mars/venus/editors/jeditsyntax/KeywordMap.class
mars/venus/editors/jeditsyntax/InputHandler$backspace_word.class
mars/venus/editors/jeditsyntax/InputHandler$MacroRecorder.class
mars/venus/editors/jeditsyntax/InputHandler.class
mars/venus/editors/jeditsyntax/InputHandler$repeat.class
mars/venus/editors/jeditsyntax/InputHandler$delete_word.class
mars/venus/editors/jeditsyntax/InputHandler$insert_break.class
mars/venus/editors/jeditsyntax/InputHandler$prev_word.class
mars/venus/editors/jeditsyntax/InputHandler$backspace.class
mars/venus/editors/jeditsyntax/InputHandler$insert_char.class
mars/venus/editors/jeditsyntax/SyntaxDocument.java
mars/venus/editors/jeditsyntax/PopupHelpItem.class
mars/venus/editors/jeditsyntax/JEditTextArea$AdjustHandler.class
mars/venus/editors/jeditsyntax/JEditTextArea$ScrollLayout.class
mars/venus/editors/jeditsyntax/SyntaxUtilities.class
mars/venus/editors/jeditsyntax/InputHandler$clip_copy.class
mars/venus/editors/jeditsyntax/InputHandler$NonRepeatable.class
mars/venus/editors/jeditsyntax/InputHandler$end.class
mars/venus/editors/jeditsyntax/InputHandler$prev_page.class
mars/venus/editors/jeditsyntax/JEditTextArea.class
mars/venus/editors/jeditsyntax/JEditTextArea.java
mars/venus/editors/jeditsyntax/SyntaxDocument.class
mars/venus/editors/jeditsyntax/InputHandler$home.class
mars/venus/editors/jeditsyntax/KeywordMap.java
mars/venus/editors/jeditsyntax/KeywordMap$Keyword.class
mars/venus/editors/jeditsyntax/JEditTextArea$FocusHandler.class
mars/venus/editors/jeditsyntax/InputHandler$next_char.class
mars/venus/editors/jeditsyntax/PopupHelpItem.java
mars/venus/editors/jeditsyntax/InputHandler$clip_cut.class
mars/venus/editors/jeditsyntax/DefaultInputHandler.java
mars/venus/editors/jeditsyntax/JEditBasedTextArea.java
mars/venus/editors/jeditsyntax/InputHandler$Wrapper.class
mars/venus/editors/jeditsyntax/tokenmarker/TokenMarker.java
mars/venus/editors/jeditsyntax/tokenmarker/MIPSTokenMarker.java
mars/venus/editors/jeditsyntax/tokenmarker/MIPSTokenMarker.class
mars/venus/editors/jeditsyntax/tokenmarker/TokenMarker.class
mars/venus/editors/jeditsyntax/tokenmarker/Token.class
mars/venus/editors/jeditsyntax/tokenmarker/Token.java
mars/venus/editors/jeditsyntax/tokenmarker/TokenMarker$LineInfo.class
mars/venus/editors/jeditsyntax/InputHandler$prev_line.class
mars/venus/editors/jeditsyntax/SyntaxStyle.class
mars/venus/editors/jeditsyntax/InputHandler$overwrite.class
mars/venus/editors/jeditsyntax/InputHandler$select_all.class
mars/venus/editors/jeditsyntax/InputHandler.java
mars/venus/editors/jeditsyntax/TextAreaDefaults.java
mars/venus/editors/jeditsyntax/JEditTextArea$2.class
mars/venus/editors/jeditsyntax/InputHandler$document_end.class
mars/venus/editors/jeditsyntax/TextAreaDefaults.class
mars/venus/editors/jeditsyntax/JEditTextArea$PopupHelpActionListener.class
mars/venus/editors/jeditsyntax/SyntaxStyle.java
mars/venus/editors/jeditsyntax/TextAreaPainter.class
mars/venus/editors/jeditsyntax/InputHandler$next_word.class
mars/venus/editors/jeditsyntax/JEditBasedTextArea$1.class
mars/venus/editors/jeditsyntax/JEditBasedTextArea.class
mars/venus/editors/jeditsyntax/JEditTextArea$MouseHandler.class
mars/venus/editors/jeditsyntax/InputHandler$next_page.class
mars/venus/editors/jeditsyntax/JEditTextArea$CaretBlinker.class
mars/venus/editors/jeditsyntax/JEditTextArea$ComponentHandler.class
mars/venus/editors/jeditsyntax/JEditTextArea$MutableCaretEvent.class
mars/venus/editors/jeditsyntax/InputHandler$document_home.class
mars/venus/editors/jeditsyntax/TextUtilities.java
mars/venus/editors/jeditsyntax/SyntaxUtilities.java
mars/venus/editors/jeditsyntax/JEditTextArea$CaretUndo.class
mars/venus/editors/jeditsyntax/JEditTextArea$1.class
mars/venus/editors/jeditsyntax/TextAreaPainter$Highlight.class
mars/venus/editors/jeditsyntax/InputHandler$prev_char.class
mars/venus/editors/jeditsyntax/JEditTextArea$AdjustHandler$1.class
mars/venus/editors/jeditsyntax/TextUtilities.class
mars/venus/editors/jeditsyntax/InputHandler$clip_paste.class
mars/venus/editors/jeditsyntax/DefaultInputHandler.class
mars/venus/editors/jeditsyntax/JEditTextArea$DragHandler.class
mars/venus/editors/jeditsyntax/InputHandler$NonRecordable.class
mars/venus/editors/jeditsyntax/InputHandler$next_line.class
mars/venus/editors/jeditsyntax/InputHandler$toggle_rect.class
mars/venus/editors/jeditsyntax/JEditTextArea$MouseWheelHandler.class
mars/venus/editors/jeditsyntax/InstructionMouseEvent.class
mars/venus/editors/jeditsyntax/JEditTextArea$DocumentHandler.class
mars/venus/editors/jeditsyntax/InputHandler$delete.class
mars/venus/editors/generic/GenericTextArea$1.class
mars/venus/editors/generic/GenericTextArea.class
mars/venus/editors/generic/GenericTextArea$2.class
mars/venus/editors/generic/GenericTextArea.java
mars/venus/editors/MARSTextEditingArea.java
mars/venus/editors/MARSTextEditingArea.class
mars/venus/EditPane$1.class
mars/venus/SettingsHighlightingAction$1.class
mars/venus/SettingsValueDisplayBaseAction.class
mars/venus/MessagesPane$Asker$1$2.class
mars/venus/LabelsWindow$MyTippedJTable.class
mars/venus/SettingsPopupInputAction.class
mars/venus/FileSaveAction.java
mars/venus/EditSelectAllAction.class
mars/venus/PopupListener.java
mars/venus/EditUndoAction.java
mars/venus/EditFindReplaceAction$FindReplaceDialog$3.class
mars/venus/DataSegmentWindow$PrevButton.class
mars/venus/RegistersWindow.java
mars/venus/VenusUI.class
mars/venus/Coprocessor1Window$RegTableModel.class
mars/venus/DataSegmentWindow$9.class
mars/venus/SettingsStartAtMainAction.class
mars/venus/FileDumpMemoryAction.class
mars/venus/EditFindReplaceAction.java
mars/venus/SettingsHighlightingAction$5.class
mars/venus/Coprocessor0Window.class
mars/venus/RepeatButton.class
mars/venus/SettingsExtendedAction.java
mars/venus/SettingsLabelAction.class
mars/venus/SettingsLabelAction.java
mars/venus/LabelsWindow$MyTippedJTable$SymbolTableHeader$SymbolTableHeaderMouseListener.class
mars/venus/SettingsDelayedBranchingAction.java
mars/venus/Editor.java
mars/venus/FileCloseAllAction.java
mars/venus/RegistersPane.class
mars/venus/SettingsHighlightingAction.class
mars/venus/TextSegmentWindow$CheckBoxTableCellRenderer.class
mars/venus/EditTabbedPane.class
mars/venus/HelpHelpAction$MyCellRenderer.class
mars/venus/EditFindReplaceAction$FindReplaceDialog$5.class
mars/venus/HelpHelpAction.class
mars/venus/EditUndoAction.class
mars/venus/ExecutePane.java
mars/venus/SettingsExceptionHandlerAction$ExceptionHandlerSettingAction.class
mars/venus/FileSaveAllAction.class
mars/venus/SettingsHighlightingAction$7.class
mars/venus/ExecutePane.class
mars/venus/VenusUI$1.class
mars/venus/DataSegmentWindow$7.class
mars/venus/TextSegmentWindow$MachineCodeCellRenderer.class
mars/venus/RunClearBreakpointsAction.java
mars/venus/AbstractFontSettingDialog.class
mars/venus/SettingsEditorAction$EditorFontDialog$1.class
mars/venus/RegistersWindow$RegTableModel.class
mars/venus/MessagesPane$Asker$3.class
mars/venus/DataSegmentWindow$DataTableModel.class
mars/venus/Coprocessor0Window.java
mars/venus/RegistersPane.java
mars/venus/LabelsWindow.class
mars/venus/LabelsWindow$MyTippedJTable$SymbolTableHeader.class
mars/venus/TextSegmentWindow$CodeCellRenderer.class
mars/venus/MainPane$1.class
mars/venus/SettingsHighlightingAction$FontSettingDialog$2.class
mars/venus/TextSegmentWindow$MyTippedJTable.class
mars/venus/EditFindReplaceAction$FindReplaceDialog.class
mars/venus/HardcopyWriter.class
mars/venus/NumberDisplayBaseChooser$1.class
mars/venus/MessagesPane$4.class
mars/venus/SettingsExceptionHandlerAction.class
mars/venus/SettingsAddressDisplayBaseAction.class
mars/venus/DataSegmentWindow$AddressCellRenderer.class
mars/venus/HelpHelpAction.java
mars/venus/DataSegmentWindow$MyTippedJTable.class
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog$4.class
mars/venus/AbstractFontSettingDialog$2.class
mars/venus/SettingsExceptionHandlerAction$2.class
mars/venus/SettingsEditorAction$EditorFontDialog$3.class
mars/venus/Coprocessor0Window$RegTableModel.class
mars/venus/EditCutAction.java
mars/venus/MessagesPane$Asker$1.class
mars/venus/RunClearBreakpointsAction.class
mars/venus/DataSegmentWindow$5.class
mars/venus/RepeatButton.java
mars/venus/HelpHelpAction$HelpHyperlinkListener$2.class
mars/venus/SettingsEditorAction$EditorFontDialog$7.class
mars/venus/FileOpenAction.class
mars/venus/FileDumpMemoryAction.java
mars/venus/RegistersWindow$RegisterCellRenderer.class
mars/venus/SettingsHighlightingAction$FontSettingDialog.class
mars/venus/DataSegmentWindow$1.class
mars/venus/FileDumpMemoryAction$1.class
mars/venus/SettingsMemoryConfigurationAction.class
mars/venus/SettingsDelayedBranchingAction.class
mars/venus/MessagesPane.class
mars/venus/SettingsEditorAction$EditorFontDialog$DefaultChanger.class
mars/venus/FileSaveAllAction.java
mars/venus/RunBackstepAction.class
mars/venus/EditTabbedPane$FileOpener.class
mars/venus/RunSpeedPanel$RunSpeedListener.class
mars/venus/EditCopyAction.java
mars/venus/TextSegmentWindow.class
mars/venus/NumberDisplayBaseChooser.java
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog$2.class
mars/venus/SettingsHighlightingAction.java
mars/venus/RunStepAction.java
mars/venus/AbstractFontSettingDialog$4.class
mars/venus/MessagesPane.java
mars/venus/LabelsWindow$LabelAddressAscendingComparator.class
mars/venus/FileDumpMemoryAction$3.class
mars/venus/MessagesPane$2.class
mars/venus/RegistersWindow$MyTippedJTable.class
mars/venus/SettingsWarningsAreErrorsAction.java
mars/venus/SettingsEditorAction$EditorFontDialog.class
mars/venus/LabelsWindow$LabelNameAscendingComparator.class
mars/venus/RunSpeedPanel.class
mars/venus/DataSegmentWindow$3.class
mars/venus/EditPane.java
mars/venus/RunGoAction.class
mars/venus/EditTabbedPane$1.class
mars/venus/SettingsProgramArgumentsAction.java
mars/venus/SettingsEditorAction$EditorFontDialog$5.class
mars/venus/TextSegmentWindow$MyTippedJTable$TextTableHeader.class
mars/venus/SettingsExtendedAction.class
mars/venus/ToolLoader.java
mars/venus/HelpAboutAction.class
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog$5.class
mars/venus/AbstractFontSettingDialog$3.class
mars/venus/SettingsExceptionHandlerAction$3.class
mars/venus/TextSegmentWindow$TextTableModel.class
mars/venus/LabelsWindow$LabelTableModel.class
mars/venus/FileDumpMemoryAction$4.class
mars/venus/RunSpeedPanel.java
mars/venus/RegistersWindow$MyTippedJTable$1.class
mars/venus/SettingsHighlightingAction$FontSettingDialog$1.class
mars/venus/FileSaveAsAction.java
mars/venus/SettingsHighlightingAction$8.class
mars/venus/RunBackstepAction.java
mars/venus/VenusUI.java
mars/venus/MainPane.class
mars/venus/MainPane.java
mars/venus/DataSegmentWindow$4.class
mars/venus/RegistersWindow.class
mars/venus/GuiAction.java
mars/venus/SettingsEditorAction$EditorFontDialog$2.class
mars/venus/HelpHelpAction$HelpHyperlinkListener.class
mars/venus/DataSegmentWindow.class
mars/venus/MessagesPane$Asker$2.class
mars/venus/FileCloseAction.java
mars/venus/SettingsPopupInputAction.java
mars/venus/AbstractFontSettingDialog$BlockComboListener.class
mars/venus/Editor.class
mars/venus/DataSegmentWindow$6.class
mars/venus/LabelsWindow$DescendingComparator.class
mars/venus/FileSaveAction.class
mars/venus/SettingsAssembleOnOpenAction.java
mars/venus/SettingsHighlightingAction$FontSettingDialog$3.class
mars/venus/SettingsExceptionHandlerAction.java
mars/venus/RunStopAction.java
mars/venus/ToolAction.class
mars/venus/TextSegmentWindow$MyTippedJTable$TextTableHeader$TextTableHeaderMouseListener.class
mars/venus/AbstractFontSettingDialog$1.class
mars/venus/SettingsExceptionHandlerAction$1.class
mars/venus/Coprocessor1Window.class
mars/venus/SettingsHighlightingAction$FontChanger.class
mars/venus/MessagesPane$3.class
mars/venus/SettingsExceptionHandlerAction$ExceptionHandlerSelectionAction.class
mars/venus/EditTabbedPane$FileOpener$ChoosableFileFilterChangeListener.class
mars/venus/DataSegmentWindow$CustomComboBoxModel.class
mars/venus/FileDumpMemoryAction$2.class
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog$3.class
mars/venus/FileSaveAsAction.class
mars/venus/FileCloseAllAction.class
mars/venus/SettingsValueDisplayBaseAction.java
mars/venus/SettingsEditorAction$EditorFontDialog$4.class
mars/venus/HelpHelpAction$HelpHyperlinkListener$1.class
mars/venus/SettingsMemoryConfigurationAction$ConfigurationButton.class
mars/venus/DataSegmentWindow$2.class
mars/venus/RunPauseAction.class
mars/venus/Coprocessor0Window$MyTippedJTable$1.class
mars/venus/EditPane.class
mars/venus/SettingsEditorAction$EditorFontDialog$6.class
mars/venus/MessagesPane$Asker$4.class
mars/venus/AbstractFontSettingDialog.java
mars/venus/SettingsMemoryConfigurationAction$MemoryConfigurationDialog$1.class
mars/venus/RunResetAction.class
mars/venus/EditRedoAction.class
mars/venus/HardcopyWriter$PrintCanceledException.class
mars/venus/ToolLoader$MarsToolClassAndInstance.class
mars/venus/LabelsWindow.java
mars/venus/MessagesPane$1.class
mars/venus/Coprocessor1Window$RegisterCellRenderer.class
mars/ext/game/GameScreen.java
mars/ext/game/GameImage.java
mars/ext/game/GameConfigFile.java
mars/ext/game/MMIOInput.java
mars/ext/game/GameObjectDynamite.class
mars/ext/game/GameObjectText.java
mars/ext/game/SoundPlayer.class
mars/ext/game/GameObjectHook.class
mars/ext/game/MMIOThread.class
mars/ext/game/ActiveElementInterface.class
mars/ext/game/GameScreen$1.class
mars/ext/game/GameScreen$ScreenPanel.class
mars/ext/game/GameObjectText.class
mars/ext/game/GameException.java
mars/ext/game/GameObject.class
mars/ext/game/MMIOInput.class
mars/ext/game/GameObjectMineral.class
mars/ext/game/GameObject.java
mars/ext/game/GameObjectMineral.java
mars/ext/game/GameImage.class
mars/ext/game/MMIOThread.java
mars/ext/game/ActiveElementInterface.java
mars/ext/game/GameObjectHook.java
mars/ext/game/GameObjectDynamite.java
mars/ext/game/GameScreen.class
mars/ext/game/GameException.class
mars/ext/game/GameConfigFile.class
mars/ext/game/SoundPlayer.java
mars/ProcessingException.java
mars/ProgramStatement$BasicStatementList$ListElement.class
mars/ErrorList.class
mars/ErrorList.java
mars/mips/instructions/InstructionSet$62.class
mars/mips/instructions/InstructionSet$27.class
mars/mips/instructions/InstructionSet$143.class
mars/mips/instructions/InstructionSet$106.class
mars/mips/instructions/InstructionSet$46.class
mars/mips/instructions/InstructionSet$122.class
mars/mips/instructions/InstructionSet$86.class
mars/mips/instructions/InstructionSet$84.class
mars/mips/instructions/InstructionSet$79.class
mars/mips/instructions/InstructionSet$44.class
mars/mips/instructions/InstructionSet$120.class
mars/mips/instructions/InstructionSet$60.class
mars/mips/instructions/InstructionSet$25.class
mars/mips/instructions/InstructionSet$141.class
mars/mips/instructions/InstructionSet$104.class
mars/mips/instructions/InstructionSet$139.class
mars/mips/instructions/InstructionSet$18.class
mars/mips/instructions/InstructionSet$145.class
mars/mips/instructions/InstructionSet$100.class
mars/mips/instructions/InstructionSet$64.class
mars/mips/instructions/InstructionSet$21.class
mars/mips/instructions/InstructionSet$99.class
mars/mips/instructions/InstructionSet$59.class
mars/mips/instructions/InstructionSet$38.class
mars/mips/instructions/InstructionSet$80.class
mars/mips/instructions/InstructionSet$119.class
mars/mips/instructions/InstructionSet$124.class
mars/mips/instructions/InstructionSet$40.class
mars/mips/instructions/SyscallLoader.class
mars/mips/instructions/ExtendedInstruction.class
mars/mips/instructions/InstructionSet$126.class
mars/mips/instructions/InstructionSet$42.class
mars/mips/instructions/InstructionSet$82.class
mars/mips/instructions/InstructionSet$147.class
mars/mips/instructions/InstructionSet$102.class
mars/mips/instructions/BasicInstructionFormat.class
mars/mips/instructions/InstructionSet$9.class
mars/mips/instructions/InstructionSet$66.class
mars/mips/instructions/InstructionSet$23.class
mars/mips/instructions/InstructionSet$121.class
mars/mips/instructions/InstructionSet$45.class
mars/mips/instructions/InstructionSet$85.class
mars/mips/instructions/InstructionSet$78.class
mars/mips/instructions/InstructionSet$19.class
mars/mips/instructions/InstructionSet$138.class
mars/mips/instructions/InstructionSet$105.class
mars/mips/instructions/InstructionSet$140.class
mars/mips/instructions/InstructionSet$24.class
mars/mips/instructions/InstructionSet$61.class
mars/mips/instructions/InstructionSet$107.class
mars/mips/instructions/InstructionSet$142.class
mars/mips/instructions/InstructionSet$26.class
mars/mips/instructions/InstructionSet$63.class
mars/mips/instructions/InstructionSet$87.class
mars/mips/instructions/SimulationCode.class
mars/mips/instructions/SimulationCode.java
mars/mips/instructions/InstructionSet$123.class
mars/mips/instructions/InstructionSet$47.class
mars/mips/instructions/InstructionSet$83.class
mars/mips/instructions/InstructionSet$43.class
mars/mips/instructions/InstructionSet$127.class
mars/mips/instructions/InstructionSet$22.class
mars/mips/instructions/InstructionSet$67.class
mars/mips/instructions/InstructionSet$103.class
mars/mips/instructions/InstructionSet$146.class
mars/mips/instructions/InstructionSet$8.class
mars/mips/instructions/BasicInstruction.class
mars/mips/instructions/InstructionSet$58.class
mars/mips/instructions/Instruction.class
mars/mips/instructions/InstructionSet$20.class
mars/mips/instructions/InstructionSet$65.class
mars/mips/instructions/InstructionSet$98.class
mars/mips/instructions/InstructionSet$101.class
mars/mips/instructions/InstructionSet$144.class
mars/mips/instructions/InstructionSet$41.class
mars/mips/instructions/InstructionSet$125.class
mars/mips/instructions/InstructionSet$118.class
mars/mips/instructions/InstructionSet$39.class
mars/mips/instructions/ExtendedInstruction.java
mars/mips/instructions/InstructionSet$81.class
mars/mips/instructions/InstructionSet$151.class
mars/mips/instructions/InstructionSet$114.class
mars/mips/instructions/InstructionSet$70.class
mars/mips/instructions/InstructionSet$35.class
mars/mips/instructions/InstructionSet$129.class
mars/mips/instructions/InstructionSet$69.class
mars/mips/instructions/InstructionSet$94.class
mars/mips/instructions/InstructionSet$6.class
mars/mips/instructions/InstructionSet$148.class
mars/mips/instructions/InstructionSet$130.class
mars/mips/instructions/InstructionSet$54.class
mars/mips/instructions/InstructionSet$11.class
mars/mips/instructions/InstructionSet$132.class
mars/mips/instructions/InstructionSet$56.class
mars/mips/instructions/InstructionSet$13.class
mars/mips/instructions/InstructionSet$96.class
mars/mips/instructions/InstructionSet$4.class
mars/mips/instructions/InstructionSet$153.class
mars/mips/instructions/InstructionSet$116.class
mars/mips/instructions/BasicInstructionFormat.java
mars/mips/instructions/InstructionSet$72.class
mars/mips/instructions/InstructionSet$37.class
mars/mips/instructions/InstructionSet$76.class
mars/mips/instructions/InstructionSet$33.class
mars/mips/instructions/InstructionSet$112.class
mars/mips/instructions/InstructionSet$52.class
mars/mips/instructions/InstructionSet$17.class
mars/mips/instructions/InstructionSet$136.class
mars/mips/instructions/InstructionSet$92.class
mars/mips/instructions/InstructionSet$109.class
mars/mips/instructions/InstructionSet$2.class
mars/mips/instructions/InstructionSet$90.class
mars/mips/instructions/InstructionSet$28.class
mars/mips/instructions/InstructionSet$50.class
mars/mips/instructions/InstructionSet$15.class
mars/mips/instructions/InstructionSet$134.class
mars/mips/instructions/InstructionSet.class
mars/mips/instructions/InstructionSet$89.class
mars/mips/instructions/InstructionSet$74.class
mars/mips/instructions/InstructionSet$31.class
mars/mips/instructions/InstructionSet$155.class
mars/mips/instructions/InstructionSet$110.class
mars/mips/instructions/InstructionSet$49.class
mars/mips/instructions/InstructionSet$5.class
mars/mips/instructions/InstructionSet$97.class
mars/mips/instructions/InstructionSet$12.class
mars/mips/instructions/InstructionSet$57.class
mars/mips/instructions/InstructionSet$133.class
mars/mips/instructions/InstructionSet$36.class
mars/mips/instructions/InstructionSet$73.class
mars/mips/instructions/InstructionSet$117.class
mars/mips/instructions/InstructionSet$152.class
mars/mips/instructions/InstructionSet$128.class
mars/mips/instructions/Instruction.java
mars/mips/instructions/SyscallLoader.java
mars/mips/instructions/InstructionSet$34.class
mars/mips/instructions/InstructionSet$71.class
mars/mips/instructions/InstructionSet$115.class
mars/mips/instructions/InstructionSet$150.class
mars/mips/instructions/InstructionSet$10.class
mars/mips/instructions/InstructionSet$55.class
mars/mips/instructions/InstructionSet$131.class
mars/mips/instructions/InstructionSet$7.class
mars/mips/instructions/InstructionSet$149.class
mars/mips/instructions/InstructionSet$68.class
mars/mips/instructions/InstructionSet$95.class
mars/mips/instructions/InstructionSet$135.class
mars/mips/instructions/InstructionSet$14.class
mars/mips/instructions/InstructionSet$51.class
mars/mips/instructions/InstructionSet$91.class
mars/mips/instructions/InstructionSet$29.class
mars/mips/instructions/InstructionSet$108.class
mars/mips/instructions/InstructionSet$3.class
mars/mips/instructions/InstructionSet$48.class
mars/mips/instructions/InstructionSet.java
mars/mips/instructions/InstructionSet$111.class
mars/mips/instructions/InstructionSet$154.class
mars/mips/instructions/InstructionSet$88.class
mars/mips/instructions/InstructionSet$30.class
mars/mips/instructions/InstructionSet$75.class
mars/mips/instructions/InstructionSet$113.class
mars/mips/instructions/InstructionSet$32.class
mars/mips/instructions/InstructionSet$77.class
mars/mips/instructions/syscalls/SyscallInputDialogDouble.class
mars/mips/instructions/syscalls/SyscallClose.class
mars/mips/instructions/syscalls/SyscallGameIsShoot.java
mars/mips/instructions/syscalls/SyscallGameCreateObject.class
mars/mips/instructions/syscalls/SyscallGameUpdateObjLocation.java
mars/mips/instructions/syscalls/SyscallGameUpdateObjDirection.java
mars/mips/instructions/syscalls/SyscallPrintString.java
mars/mips/instructions/syscalls/SyscallPrintIntBinary.java
mars/mips/instructions/syscalls/SyscallMidiOut.java
mars/mips/instructions/syscalls/SyscallRandInt.class
mars/mips/instructions/syscalls/SyscallGameGetObjDirection.java
mars/mips/instructions/syscalls/SyscallMidiOutSync.class
mars/mips/instructions/syscalls/SyscallGameSetObjSpeed.class
mars/mips/instructions/syscalls/SyscallReadInt.class
mars/mips/instructions/syscalls/SyscallSbrk.class
mars/mips/instructions/syscalls/SyscallPrintString.class
mars/mips/instructions/syscalls/SyscallGameCreateObject.java
mars/mips/instructions/syscalls/Syscall.class
mars/mips/instructions/syscalls/SyscallGameSetObjSpeed.java
mars/mips/instructions/syscalls/SyscallCreateGame.java
mars/mips/instructions/syscalls/SyscallMessageDialogString.class
mars/mips/instructions/syscalls/SyscallExit.java
mars/mips/instructions/syscalls/SyscallWrite.class
mars/mips/instructions/syscalls/SyscallInputDialogInt.java
mars/mips/instructions/syscalls/SyscallGameUpdateObjDirection.class
mars/mips/instructions/syscalls/SyscallMessageDialogInt.java
mars/mips/instructions/syscalls/SyscallConfirmDialog.class
mars/mips/instructions/syscalls/SyscallOpen.java
mars/mips/instructions/syscalls/SyscallReadChar.java
mars/mips/instructions/syscalls/SyscallGameSetLevelInfo.class
mars/mips/instructions/syscalls/SyscallReadFloat.java
mars/mips/instructions/syscalls/SyscallGameGetObjPrice.java
mars/mips/instructions/syscalls/SyscallMidiOut.class
mars/mips/instructions/syscalls/SyscallGameCreateObjectText.class
mars/mips/instructions/syscalls/SyscallMessageDialog.java
mars/mips/instructions/syscalls/SyscallTime.class
mars/mips/instructions/syscalls/SyscallReadString.class
mars/mips/instructions/syscalls/SyscallGameSetObjDirection.java
mars/mips/instructions/syscalls/SyscallRandDouble.java
mars/mips/instructions/syscalls/SyscallGameToggleIsHooked.class
mars/mips/instructions/syscalls/SyscallPrintIntUnsigned.java
mars/mips/instructions/syscalls/SyscallPrintFloat.java
mars/mips/instructions/syscalls/SyscallGameToggleIsShoot.java
mars/mips/instructions/syscalls/SyscallSbrk.java
mars/mips/instructions/syscalls/AbstractSyscall.class
mars/mips/instructions/syscalls/SyscallMessageDialogString.java
mars/mips/instructions/syscalls/SyscallInputDialogFloat.java
mars/mips/instructions/syscalls/SyscallGameGetObjDirection.class
mars/mips/instructions/syscalls/AbstractSyscall.java
mars/mips/instructions/syscalls/SyscallGameToggleIsClockwise.java
mars/mips/instructions/syscalls/RandomStreams.java
mars/mips/instructions/syscalls/SyscallRandFloat.class
mars/mips/instructions/syscalls/SyscallReadChar.class
mars/mips/instructions/syscalls/SyscallReadString.java
mars/mips/instructions/syscalls/SyscallInputDialogString.java
mars/mips/instructions/syscalls/SyscallGameHelper.java
mars/mips/instructions/syscalls/EndOfTrackListener.class
mars/mips/instructions/syscalls/Tone.class
mars/mips/instructions/syscalls/SyscallPrintChar.class
mars/mips/instructions/syscalls/SyscallReadDouble.class
mars/mips/instructions/syscalls/SyscallGameCreateObjectText.java
mars/mips/instructions/syscalls/SyscallPrintChar.java
mars/mips/instructions/syscalls/SyscallGameToggleIsShoot.class
mars/mips/instructions/syscalls/SyscallGameSetLevelInfo.java
mars/mips/instructions/syscalls/SyscallMessageDialog.class
mars/mips/instructions/syscalls/SyscallGameSetObjLocation.java
mars/mips/instructions/syscalls/SyscallInputDialogString.class
mars/mips/instructions/syscalls/SyscallRandIntRange.java
mars/mips/instructions/syscalls/SyscallGameGetObjSpeed.class
mars/mips/instructions/syscalls/SyscallGameSetObjDirection.class
mars/mips/instructions/syscalls/SyscallRandIntRange.class
mars/mips/instructions/syscalls/SyscallSleep.class
mars/mips/instructions/syscalls/SyscallGameIsClockwise.class
mars/mips/instructions/syscalls/SyscallGameToggleIsHooked.java
mars/mips/instructions/syscalls/Syscall.java
mars/mips/instructions/syscalls/SyscallPrintIntUnsigned.class
mars/mips/instructions/syscalls/SyscallPrintDouble.class
mars/mips/instructions/syscalls/SyscallGameRefreshScreen.java
mars/mips/instructions/syscalls/SyscallPrintInt.class
mars/mips/instructions/syscalls/SyscallRandSeed.class
mars/mips/instructions/syscalls/SyscallGameHelper.class
mars/mips/instructions/syscalls/SyscallMessageDialogDouble.class
mars/mips/instructions/syscalls/ToneGenerator.java
mars/mips/instructions/syscalls/SyscallTime.java
mars/mips/instructions/syscalls/SyscallPrintIntHex.java
mars/mips/instructions/syscalls/SyscallRandSeed.java
mars/mips/instructions/syscalls/SyscallPrintFloat.class
mars/mips/instructions/syscalls/SyscallGameSetObjPrice.class
mars/mips/instructions/syscalls/SyscallPrintInt.java
mars/mips/instructions/syscalls/ToneGenerator.class
mars/mips/instructions/syscalls/SyscallGameDestroyObject.class
mars/mips/instructions/syscalls/RandomStreams.class
mars/mips/instructions/syscalls/SyscallMessageDialogDouble.java
mars/mips/instructions/syscalls/SyscallGameSoundControl.class
mars/mips/instructions/syscalls/SyscallConfirmDialog.java
mars/mips/instructions/syscalls/SyscallExit.class
mars/mips/instructions/syscalls/SyscallMessageDialogFloat.java
mars/mips/instructions/syscalls/SyscallExit2.class
mars/mips/instructions/syscalls/SyscallReadInt.java
mars/mips/instructions/syscalls/SyscallGameIsHooked.class
mars/mips/instructions/syscalls/SyscallInputDialogDouble.java
mars/mips/instructions/syscalls/SyscallGameGetLevelObjLocation.class
mars/mips/instructions/syscalls/SyscallExit2.java
mars/mips/instructions/syscalls/SyscallReadDouble.java
mars/mips/instructions/syscalls/SyscallPrintIntHex.class
mars/mips/instructions/syscalls/SyscallWrite.java
mars/mips/instructions/syscalls/SyscallMessageDialogInt.class
mars/mips/instructions/syscalls/SyscallGameToggleIsClockwise.class
mars/mips/instructions/syscalls/SyscallGameSoundControl.java
mars/mips/instructions/syscalls/SyscallRandDouble.class
mars/mips/instructions/syscalls/SyscallClose.java
mars/mips/instructions/syscalls/SyscallGameRefreshScreen.class
mars/mips/instructions/syscalls/SyscallSleep.java
mars/mips/instructions/syscalls/SyscallGameSetObjLocation.class
mars/mips/instructions/syscalls/SyscallOpen.class
mars/mips/instructions/syscalls/SyscallRandInt.java
mars/mips/instructions/syscalls/SyscallGameGetLevelObjLocation.java
mars/mips/instructions/syscalls/SyscallMessageDialogFloat.class
mars/mips/instructions/syscalls/SyscallPrintIntBinary.class
mars/mips/instructions/syscalls/SyscallGameIsShoot.class
mars/mips/instructions/syscalls/SyscallGameSetObjPrice.java
mars/mips/instructions/syscalls/SyscallReadFloat.class
mars/mips/instructions/syscalls/SyscallInputDialogInt.class
mars/mips/instructions/syscalls/SyscallInputDialogFloat.class
mars/mips/instructions/syscalls/SyscallGameGetObjSpeed.java
mars/mips/instructions/syscalls/SyscallPrintDouble.java
mars/mips/instructions/syscalls/SyscallRead.java
mars/mips/instructions/syscalls/SyscallGameIsClockwise.java
mars/mips/instructions/syscalls/SyscallNumberOverride.java
mars/mips/instructions/syscalls/SyscallRead.class
mars/mips/instructions/syscalls/SyscallCreateGame.class
mars/mips/instructions/syscalls/SyscallGameDestroyObject.java
mars/mips/instructions/syscalls/SyscallNumberOverride.class
mars/mips/instructions/syscalls/SyscallGameGetObjLocation.class
mars/mips/instructions/syscalls/SyscallRandFloat.java
mars/mips/instructions/syscalls/SyscallMidiOutSync.java
mars/mips/instructions/syscalls/SyscallGameGetObjLocation.java
mars/mips/instructions/syscalls/SyscallGameGetObjPrice.class
mars/mips/instructions/syscalls/SyscallGameUpdateObjLocation.class
mars/mips/instructions/syscalls/SyscallGameIsHooked.java
mars/mips/instructions/BasicInstruction.java
mars/mips/instructions/InstructionSet$93.class
mars/mips/instructions/InstructionSet$1.class
mars/mips/instructions/InstructionSet$137.class
mars/mips/instructions/InstructionSet$16.class
mars/mips/instructions/InstructionSet$53.class
mars/mips/hardware/Coprocessor0.java
mars/mips/hardware/AccessNotice.class
mars/mips/hardware/Coprocessor1.java
mars/mips/hardware/MemoryAccessNotice.class
mars/mips/hardware/Coprocessor0.class
mars/mips/hardware/AccessNotice.java
mars/mips/hardware/RegisterFile.class
mars/mips/hardware/Register.class
mars/mips/hardware/MemoryConfigurations.class
mars/mips/hardware/MemoryConfiguration.java
mars/mips/hardware/Register.java
mars/mips/hardware/Coprocessor1.class
mars/mips/hardware/MemoryAccessNotice.java
mars/mips/hardware/MemoryConfigurations.java
mars/mips/hardware/InvalidRegisterAccessException.class
mars/mips/hardware/AddressErrorException.java
mars/mips/hardware/MemoryConfiguration.class
mars/mips/hardware/InvalidRegisterAccessException.java
mars/mips/hardware/Memory.class
mars/mips/hardware/Memory.java
mars/mips/hardware/Memory$MemoryObservable.class
mars/mips/hardware/RegisterAccessNotice.java
mars/mips/hardware/AddressErrorException.class
mars/mips/hardware/RegisterAccessNotice.class
mars/mips/hardware/RegisterFile.java
mars/mips/dump/BinaryDumpFormat.class
mars/mips/dump/AsciiTextDumpFormat.java
mars/mips/dump/AbstractDumpFormat.class
mars/mips/dump/BinaryTextDumpFormat.java
mars/mips/dump/SegmentWindowDumpFormat.class
mars/mips/dump/AsciiTextDumpFormat.class
mars/mips/dump/MIFDumpFormat.java
mars/mips/dump/HexTextDumpFormat.class
mars/mips/dump/DumpFormat.java
mars/mips/dump/DumpFormat.class
mars/mips/dump/BinaryTextDumpFormat.class
mars/mips/dump/SegmentWindowDumpFormat.java
mars/mips/dump/DumpFormatLoader.java
mars/mips/dump/AbstractDumpFormat.java
mars/mips/dump/DumpFormatLoader.class
mars/mips/dump/MIFDumpFormat.class
mars/mips/dump/IntelHexDumpFormat.class
mars/mips/dump/BinaryDumpFormat.java
mars/mips/dump/HexTextDumpFormat.java
mars/mips/dump/IntelHexDumpFormat.java
mars/Globals.class
mars/MarsSplashScreen$ImageBackgroundPanel.class
mars/MIPSprogram.class
mars/ErrorMessage.java
mars/simulator/BackStepper.class
mars/simulator/Simulator.class
mars/simulator/BackStepper.java
mars/simulator/Simulator$SimThread.class
mars/simulator/Simulator$StopListener.class
mars/simulator/SwingWorker$2.class
mars/simulator/Exceptions.java
mars/simulator/Exceptions.class
mars/simulator/DelayedBranch.class
mars/simulator/BackStepper$BackstepStack.class
mars/simulator/SwingWorker$ThreadVar.class
mars/simulator/Simulator.java
mars/simulator/SimulatorNotice.java
mars/simulator/SwingWorker.java
mars/simulator/ProgramArgumentList.java
mars/simulator/DelayedBranch.java
mars/simulator/SwingWorker$1.class
mars/simulator/BackStepper$BackStep.class
mars/simulator/ProgramArgumentList.class
mars/simulator/SwingWorker.class
mars/simulator/Simulator$UpdateGUI.class
mars/simulator/SimulatorNotice.class
mars/ErrorMessage.class
mars/ProgramStatement.java
mars/ProcessingException.class
mars/Settings.class
mars/MarsLaunch$2.class
mars/MarsLaunch.java
mars/ProgramStatement.class
mars/MIPSprogram.java
mars/Settings.java
mars/ProgramStatement$BasicStatementList.class
mars/Globals.java
mars/MarsLaunch.class
mars/MarsLaunch$1.class
sounds/emit.wav
sounds/win.wav
sounds/lose.wav
sounds/.DS_Store
sounds/hit.au
sounds/background.mid
sounds/hit.wav
Manifest-Version: 1.0
Main-Class: Mars
Class-Path: .
Created-By: 11.0.12 (Eclipse Foundation)
# Copyright (c) 2003-2010, Pete Sanderson and Kenneth Vollmar
#
# Developed by Pete Sanderson ( )
# and Kenneth Vollmar ( )
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# “Software”), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject
# to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
# ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# (MIT license, http://www.opensource.org/licenses/mit-license.html)
# File containing definitions of MIPS pseudo-ops
# File format:
# Each line contains specification for one pseudo-op, including optional description.
# First item is source statement syntax, specified in same “example” parser format used for regular instructions.
# Source statement specification ends with a tab. It is followed by a tab-separated list of basic instruction
# templates to complete and substitute for the pseudo-op.
# Format for specifying syntax of templates is different from specifying syntax of source statement:
# (n=0,1,2,3,…) is token position in source statement (operator is token 0, parentheses are tokens but commas aren’t)
# RGn means substitute register found in n’th token of source statement
# NRn means substitute next higher register than the one in n’th token of source code
# OPn means substitute n’th token of source code as is
# LLn means substitute low order 16-bits from label address in source token n.
# LLnU means substitute low order 16-bits (unsigned) from label address in source token n.
# LLnPm (m=1,2,3,4) means substitute low order 16-bits from label address in source token n, after adding m.
# LHn means substitute high order 16-bits from label address in source token n. Must add 1 if address bit 15 is 1.
# LHnPm (m=1,2,3,4) means substitute high order 16-bits from label address in source token n, after adding m. Must then add 1 if bit 15 is 1.
# VLn means substitute low order 16-bits from 32-bit value in source token n.
# VLnU means substitute low order 16-bits (unsigned) from 32-bit value in source token n.
# VLnPm (m=1,2,3,4) means substitute low order 16-bits from 32-bit value in source token n, after adding m to value.
# VLnPmU (m=1,2,3,4) means substitute low order 16-bits(unsigned) from 32-bit value in source token n, after adding m to value.
# VHLn means substitute high order 16-bits from 32-bit value in source token n. Use this if later combined with low order 16-bits using “ori $1,$1,VLnU”. See logical and branch operations.
# VHn means substitute high order 16-bits from 32-bit value in source token n, then add 1 if value’s bit 15 is 1. Use this only if later instruction uses VLn($1) to calculate 32-bit address. See loads and stores.
# VHLnPm (m=1,2,3,4) means substitute high order 16-bits from 32-bit value in source token n, after adding m. See VHLn.
# VHnPm (m=1,2,3,4) means substitute high order 16-bits from 32-bit value in source token n, after adding m. Must then add 1 if bit 15 is 1. See VHn.
# LLP is similar to LLn, but is needed for “label+100000” address offset. Immediate is added before taking low order 16.
# LLPU is similar to LLn, but is needed for “label+100000” address offset. Immediate is added before taking low order 16 (unsigned).
# LLPPm (m=1,2,3,4) is similar to LLP except m is added along with immediate before taking low order 16.
# LHPA is similar to LHn, but is needed for “label+100000” address offset. Immediate is added before taking high order 16.
# LHPN is similar to LHPA, used only by “la” instruction. Address resolved by “ori” so do not add 1 if bit 15 is 1.
# LHPAPm (m=1,2,3,4) is similar to LHPA except value m is added along with immediate before taking high order 16.
# LHL means substitute high order 16-bits from label address in token 2 of “la” (load address) source statement.
# LAB means substitute textual label from last token of source statement. Used for various branches.
# S32 means substitute the result of subtracting the constant value in last token from 32. Used by “ror”, “rol”.
# DBNOP means Delayed Branching NOP – generate a “nop” instruction but only if delayed branching is enabled. Added in 3.4.1 release.
# BROFFnm means substitute n if delayed branching is NOT enabled otherwise substitute m. n and m are single digit numbers indicating constant branch offset (in words). Added in 3.4.1 release.
# COMPACT is a marker to separate the default template from a second template optimized for 16-bit addresses. See loads and stores having (data) label operands.
# Everything else is copied as is into the generated statement (you must use register numbers not mnemonics)
# The list of basic instruction templates is optionally followed a description of the instruction for help purposes.
# To add optional description, append a tab then the ‘#’ character followed immediately (no spaces) by the description.
#
# See documentation for ExtendedInstruction.makeTemplateSubstitutions() for more details.
#
# Matching for a given instruction mnemonic is first-fit not best-fit. If an instruction has both 16 and 32-bit
# immediate operand options, they should be listed in that order (16-bit version first). Otherwise the 16-bit
# version will never be matched since the 32-bit version fits small immediate values first.
#
# The pseudo-op specification must start in the first column. If first column is blank, the line will be skipped!
#
# When specifying the example instruction (first item on line), the conventions I follow are:
# – for a register operand, specify a numbered register (e.g. $t1 or $f1) to represent any register in the set.
# The numerical value is not significant. This is NOT the case when writing the templates that follow!
# In the templates, numbered registers are parsed as is (use only $0 and $1, which are $zero and $at).
# – for an immediate operand, specify a positive value indicative of the expected range. I use 10 to represent
# a 5 bit value, 100 to represent a 16-bit value, and 100000 to represent a 32-bit value.
# – for a label operand, I use the string “label” (without the quotes).
# The idea is to give the parser an example that will be parsed into the desired token sequence. Syntax checking
# is done by comparing the source token sequence to list of token sequences generated from the examples.
# IMPORTANT NOTE: The use of $t1,$t2, etc in the instruction sample means that any CPU register reference
# can be used in that position. It is simply a placeholder. By contrast, when
# $1 is used in the template specification, $1 ($at) is literally placed into the generated
# instruction! If you want the generated code to echo the source register, use RG1,RG2, etc.
####################### arithmetic and branch pseudo-ops #####################
not $t1,$t2 nor RG1, RG2, $0 #Bitwise NOT (bit inversion)
# Here are some “convenience” arithmetic pseduo-ops. But do they encourage sloppy programming?
add $t1,$t2,-100 addi RG1, RG2, VL3 #ADDition : set $t1 to ($t2 plus 16-bit immediate)
add $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U add RG1, RG2, $1 #ADDition : set $t1 to ($t2 plus 32-bit immediate)
addu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U addu RG1, RG2, $1 #ADDition Unsigned : set $t1 to ($t2 plus 32-bit immediate), no overflow
addi $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U add RG1, RG2, $1 #ADDition Immediate : set $t1 to ($t2 plus 32-bit immediate)
addiu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U addu RG1, RG2, $1 #ADDition Immediate Unsigned: set $t1 to ($t2 plus 32-bit immediate), no overflow
sub $t1,$t2,-100 addi $1, $0, VL3 sub RG1, RG2, $1 #SUBtraction : set $t1 to ($t2 minus 16-bit immediate)
sub $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U sub RG1, RG2, $1 #SUBtraction : set $t1 to ($t2 minus 32-bit immediate)
subu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U subu RG1, RG2, $1 #SUBtraction Unsigned : set $t1 to ($t2 minus 32-bit immediate), no overflow
subi $t1,$t2,-100 addi $1, $0, VL3 sub RG1, RG2, $1 #SUBtraction Immediate : set $t1 to ($t2 minus 16-bit immediate)
subi $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U sub RG1, RG2, $1 #SUBtraction Immediate : set $t1 to ($t2 minus 32-bit immediate)
subiu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U subu RG1, RG2, $1 #SUBtraction Immediate Unsigned : set $t1 to ($t2 minus 32-bit immediate), no overflow
# feel free to add more convenience arithmetic pseduo-ops.
# convenience logical operations can be added too,
andi $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U and RG1, RG2, $1 #AND Immediate : set $t1 to ($t2 bitwise-AND 32-bit immediate)
ori $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U or RG1, RG2, $1 #OR Immediate : set $t1 to ($t2 bitwise-OR 32-bit immediate)
xori $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U xor RG1, RG2, $1 #XOR Immediate : set $t1 to ($t2 bitwise-exclusive-OR 32-bit immediate)
and $t1,$t2,100 andi RG1, RG2, VL3U #AND : set $t1 to ($t2 bitwise-AND 16-bit unsigned immediate)
or $t1,$t2,100 ori RG1, RG2, VL3U #OR : set $t1 to ($t2 bitwise-OR 16-bit unsigned immediate)
xor $t1,$t2,100 xori RG1, RG2, VL3U #XOR : set $t1 to ($t2 bitwise-exclusive-OR 16-bit unsigned immediate)
and $t1,100 andi RG1, RG1, VL2U #AND : set $t1 to ($t1 bitwise-AND 16-bit unsigned immediate)
or $t1,100 ori RG1, RG1, VL2U #OR : set $t1 to ($t1 bitwise-OR 16-bit unsigned immediate)
xor $t1,100 xori RG1, RG1, VL2U #XOR : set $t1 to ($t1 bitwise-exclusive-OR 16-bit unsigned immediate)
andi $t1,100 andi RG1, RG1, VL2U #AND Immediate : set $t1 to ($t1 bitwise-AND 16-bit unsigned immediate)
ori $t1,100 ori RG1, RG1, VL2U #OR Immediate : set $t1 to ($t1 bitwise-OR 16-bit unsigned immediate)
xori $t1,100 xori RG1, RG1, VL2U #XOR Immediate : set $t1 to ($t1 bitwise-exclusive-OR 16-bit unsigned immediate)
andi $t1,100000 lui $1, VHL2 ori $1, $1, VL2U and RG1, RG1, $1 #AND Immediate : set $t1 to ($t1 bitwise-AND 32-bit immediate)
ori $t1,100000 lui $1, VHL2 ori $1, $1, VL2U or RG1, RG1, $1 #OR Immediate : set $t1 to ($t1 bitwise-OR 32-bit immediate)
xori $t1,100000 lui $1, VHL2 ori $1, $1, VL2U xor RG1, RG1, $1 #XOR Immediate : set $t1 to ($t1 bitwise-exclusive-OR 32-bit immediate)
# Note: most of the expansions in this group were rewritten for Release 3.4.1 to remove internal branching.
seq $t1,$t2,$t3 subu RG1, RG2, RG3 ori $1, $0, 1 sltu RG1, RG1, $1 #Set EQual : if $t2 equal to $t3 then set $t1 to 1 else 0
seq $t1,$t2,-100 addi $1, $0, VL3 subu RG1, RG2, $1 ori $1, $0, 1 sltu RG1, RG1, $1 #Set EQual : if $t2 equal to 16-bit immediate then set $t1 to 1 else 0
seq $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U subu RG1, RG2, $1 ori $1, $0, 1 sltu RG1, RG1, $1 #Set EQual : if $t2 equal to 32-bit immediate then set $t1 to 1 else 0
sne $t1,$t2,$t3 subu RG1, RG2, RG3 sltu RG1, $0, RG1 #Set Not Equal : if $t2 not equal to $t3 then set $t1 to 1 else 0
sne $t1,$t2,-100 addi $1, $0, VL3 subu RG1, RG2, $1 sltu RG1, $0, RG1 #Set Not Equal : if $t2 not equal to 16-bit immediate then set $t1 to 1 else 0
sne $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U subu RG1, RG2, $1 sltu RG1, $0, RG1 #Set Not Equal : if $t2 not equal to 32-bit immediate then set $t1 to 1 else 0
sge $t1,$t2,$t3 slt RG1, RG2, RG3 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal : if $t2 greater or equal to $t3 then set $t1 to 1 else 0
sge $t1,$t2,-100 addi $1, $0, VL3 slt RG1, RG2, $1 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal : if $t2 greater or equal to 16-bit immediate then set $t1 to 1 else 0
sge $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U slt RG1, RG2, $1 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal : if $t2 greater or equal to 32-bit immediate then set $t1 to 1 else 0
sgeu $t1,$t2,$t3 sltu RG1, RG2, RG3 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal Unsigned : if $t2 greater or equal to $t3 (unsigned compare) then set $t1 to 1 else 0
sgeu $t1,$t2,-100 addi $1, $0, VL3 sltu RG1, RG2, $1 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal Unsigned : if $t2 greater or equal to 16-bit immediate (unsigned compare) then set $t1 to 1 else 0
sgeu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U sltu RG1, RG2, $1 ori $1, $0, 1 subu RG1, $1, RG1 #Set Greater or Equal Unsigned : if $t2 greater or equal to 32-bit immediate (unsigned compare) then set $t1 to 1 else 0
sgt $t1,$t2,$t3 slt RG1, RG3, RG2 #Set Greater Than : if $t2 greater than $t3 then set $t1 to 1 else 0
sgt $t1,$t2,-100 addi $1, $0, VL3 slt RG1, $1, RG2 #Set Greater Than : if $t2 greater than 16-bit immediate then set $t1 to 1 else 0
sgt $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U slt RG1, $1, RG2 #Set Greater Than : if $t2 greater than 32-bit immediate then set $t1 to 1 else 0
sgtu $t1,$t2,$t3 sltu RG1, RG3, RG2 #Set Greater Than Unsigned : if $t2 greater than $t3 (unsigned compare) then set $t1 to 1 else 0
sgtu $t1,$t2,-100 addi $1, $0, VL3 sltu RG1, $1, RG2 #Set Greater Than Unsigned : if $t2 greater than 16-bit immediate (unsigned compare) then set $t1 to 1 else 0
sgtu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U sltu RG1, $1, RG2 #Set Greater Than Unsigned : if $t2 greater than 32-bit immediate (unsigned compare) then set $t1 to 1 else 0
sle $t1,$t2,$t3 slt RG1, RG3, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal : if $t2 less or equal to $t3 then set $t1 to 1 else 0
sle $t1,$t2,-100 addi $1, $0, VL3 slt RG1, $1, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal : if $t2 less or equal to 16-bit immediate then set $t1 to 1 else 0
sle $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U slt RG1, $1, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal : if $t2 less or equal to 32-bit immediate then set $t1 to 1 else 0
sleu $t1,$t2,$t3 sltu RG1, RG3, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal Unsigned: if $t2 less or equal to $t3 (unsigned compare) then set $t1 to 1 else 0
sleu $t1,$t2,-100 addi $1, $0, VL3 sltu RG1, $1, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal Unsigned: if $t2 less or equal to 16-bit immediate (unsigned compare) then set $t1 to 1 else 0
sleu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U sltu RG1, $1, RG2 ori $1, $0, 1 subu RG1, $1, RG1 #Set Less or Equal Unsigned: if $t2 less or equal to 32-bit immediate (unsigned compare) then set $t1 to 1 else 0
move $t1,$t2 addu RG1, $0, RG2 #MOVE : Set $t1 to contents of $t2
abs $t1,$t2 sra $1, RG2, 31 xor RG1, $1, RG2 subu RG1, RG1, $1 #ABSolute value : Set $t1 to absolute value of $t2 (algorithm from Hacker’s Delight)
neg $t1,$t2 sub RG1, $0, RG2 #NEGate : Set $t1 to negation of $t2
negu $t1,$t2 subu RG1, $0, RG2 #NEGate Unsigned : Set $t1 to negation of $t2, no overflow
b label bgez $0, LAB #Branch : Branch to statement at label unconditionally
beqz $t1,label beq RG1, $0, LAB #Branch if EQual Zero : Branch to statement at label if $t1 is equal to zero
bnez $t1,label bne RG1, $0, LAB #Branch if Not Equal Zero : Branch to statement at label if $t1 is not equal to zero
beq $t1,-100,label addi $1, $0, VL2 beq $1, RG1, LAB #Branch if EQual : Branch to statement at label if $t1 is equal to 16-bit immediate
beq $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U beq $1, RG1, LAB #Branch if EQual : Branch to statement at label if $t1 is equal to 32-bit immediate
bne $t1,-100,label addi $1, $0, VL2 bne $1, RG1, LAB #Branch if Not Equal : Branch to statement at label if $t1 is not equal to 16-bit immediate
bne $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U bne $1, RG1, LAB #Branch if Not Equal : Branch to statement at label if $t1 is not equal to 32-bit immediate
bge $t1,$t2,label slt $1, RG1, RG2 beq $1, $0, LAB #Branch if Greater or Equal : Branch to statement at label if $t1 is greater or equal to $t2
bge $t1,-100,label slti $1, RG1, VL2 beq $1, $0, LAB #Branch if Greater or Equal : Branch to statement at label if $t1 is greater or equal to 16-bit immediate
bge $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U slt $1, RG1, $1 beq $1, $0, LAB #Branch if Greater or Equal : Branch to statement at label if $t1 is greater or equal to 32-bit immediate
bgeu $t1,$t2,label sltu $1, RG1, RG2 beq $1, $0, LAB #Branch if Greater or Equal Unsigned : Branch to statement at label if $t1 is greater or equal to $t2 (unsigned compare)
bgeu $t1,-100,label sltiu $1, RG1, VL2 beq $1, $0, LAB #Branch if Greater or Equal Unsigned : Branch to statement at label if $t1 is greater or equal to 16-bit immediate (unsigned compare)
bgeu $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U sltu $1, RG1, $1 beq $1, $0, LAB #Branch if Greater or Equal Unsigned : Branch to statement at label if $t1 is greater or equal to 32-bit immediate (unsigned compare)
bgt $t1,$t2,label slt $1, RG2, RG1 bne $1, $0, LAB #Branch if Greater Than : Branch to statement at label if $t1 is greater than $t2
bgt $t1,-100,label addi $1, $0, VL2 slt $1, $1, RG1 bne $1, $0, LAB #Branch if Greater Than : Branch to statement at label if $t1 is greater than 16-bit immediate
bgt $t1,100000,label lui $1, VHL2P1 ori $1, $1, VL2P1U slt $1, RG1, $1 beq $1, $0, LAB #Branch if Greater Than : Branch to statement at label if $t1 is greater than 32-bit immediate
bgtu $t1,$t2,label sltu $1, RG2, RG1 bne $1, $0, LAB #Branch if Greater Than Unsigned: Branch to statement at label if $t1 is greater than $t2 (unsigned compare)
bgtu $t1,-100,label addi $1, $0, VL2 sltu $1, $1, RG1 bne $1, $0, LAB #Branch if Greater Than Unsigned: Branch to statement at label if $t1 is greater than 16-bit immediate (unsigned compare)
bgtu $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U sltu $1, $1, RG1 bne $1, $0, LAB #Branch if Greater Than Unsigned: Branch to statement at label if $t1 is greater than 16-bit immediate (unsigned compare)
ble $t1,$t2,label slt $1, RG2, RG1 beq $1, $0, LAB #Branch if Less or Equal : Branch to statement at label if $t1 is less than or equal to $t2
ble $t1,-100,label addi $1, RG1, -1 slti $1, $1, VL2 bne $1, $0, LAB #Branch if Less or Equal : Branch to statement at label if $t1 is less than or equal to 16-bit immediate
ble $t1,100000,label lui $1, VHL2P1 ori $1, $1, VL2P1U slt $1, RG1, $1 bne $1, $0, LAB #Branch if Less or Equal : Branch to statement at label if $t1 is less than or equal to 32-bit immediate
bleu $t1,$t2,label sltu $1, RG2, RG1 beq $1, $0, LAB #Branch if Less or Equal Unsigned : Branch to statement at label if $t1 is less than or equal to $t2 (unsigned compare)
bleu $t1,-100,label addi $1, $0, VL2 sltu $1, $1, RG1 beq $1, $0, LAB #Branch if Less or Equal Unsigned : Branch to statement at label if $t1 is less than or equal to 16-bit immediate (unsigned compare)
bleu $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U sltu $1, $1, RG1 beq $1, $0, LAB #Branch if Less or Equal Unsigned : Branch to statement at label if $t1 is less than or equal to 32-bit immediate (unsigned compare)
blt $t1,$t2,label slt $1, RG1, RG2 bne $1, $0, LAB #Branch if Less Than : Branch to statement at label if $t1 is less than $t2
blt $t1,-100,label slti $1, RG1, VL2 bne $1, $0, LAB #Branch if Less Than : Branch to statement at label if $t1 is less than 16-bit immediate
blt $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U slt $1, RG1, $1 bne $1, $0, LAB #Branch if Less Than : Branch to statement at label if $t1 is less than 32-bit immediate
bltu $t1,$t2,label sltu $1, RG1, RG2 bne $1, $0, LAB #Branch if Less Than Unsigned : Branch to statement at label if $t1 is less than $t2
bltu $t1,-100,label sltiu $1, RG1, VL2 bne $1, $0, LAB #Branch if Less Than Unsigned : Branch to statement at label if $t1 is less than 16-bit immediate
bltu $t1,100000,label lui $1, VHL2 ori $1, $1, VL2U sltu $1, RG1, $1 bne $1, $0, LAB #Branch if Less Than Unsigned : Branch to statement at label if $t1 is less than 32-bit immediate
rol $t1,$t2,$t3 subu $1, $0, RG3 srlv $1, RG2, $1 sllv RG1, RG2, RG3 or RG1, RG1, $1 #ROtate Left : Set $t1 to ($t2 rotated left by number of bit positions specified in $t3)
rol $t1,$t2,10 srl $1, RG2, S32 sll RG1, RG2, OP3 or RG1, RG1, $1 #ROtate Left : Set $t1 to ($t2 rotated left by number of bit positions specified in 5-bit immediate)
ror $t1,$t2,$t3 subu $1, $0, RG3 sllv $1, RG2, $1 srlv RG1, RG2, RG3 or RG1, RG1, $1 #ROtate Right : Set $t1 to ($t2 rotated right by number of bit positions specified in $t3)
ror $t1,$t2,10 sll $1, RG2, S32 srl RG1, RG2, OP3 or RG1, RG1, $1 #ROtate Right : Set $t1 to ($t2 rotated right by number of bit positions specified in 5-bit immediate)
mfc1.d $t1,$f2 mfc1 RG1, RG2 mfc1 NR1, NR2 #Move From Coprocessor 1 Double : Set $t1 to contents of $f2, set next higher register from $t1 to contents of next higher register from $f2
mtc1.d $t1,$f2 mtc1 RG1, RG2 mtc1 NR1, NR2 #Move To Coprocessor 1 Double : Set $f2 to contents of $t1, set next higher register from $f2 to contents of next higher register from $t1
mul $t1,$t2,-100 addi $1, $0, VL3 mul RG1, RG2, $1 #MULtiplication : Set HI to high-order 32 bits, LO and $t1 to low-order 32 bits of the product of $t2 and 16-bit signed immediate (use mfhi to access HI, mflo to access LO)
mul $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U mul RG1, RG2, $1 #MULtiplication : Set HI to high-order 32 bits, LO and $t1 to low-order 32 bits of the product of $t2 and 32-bit immediate (use mfhi to access HI, mflo to access LO)
mulu $t1,$t2,$t3 multu RG2, RG3 mflo RG1 #MULtiplication Unsigned : Set HI to high-order 32 bits, LO and $t1 to low-order 32 bits of ($t2 multiplied by $t3, unsigned multiplication)
mulu $t1,$t2,-100 addi $1, $0, VL3 multu RG2, $1 mflo RG1 #MULtiplication Unsigned : Set HI to high-order 32 bits, LO and $t1 to low-order 32 bits of ($t2 multiplied by 16-bit immediate, unsigned multiplication)
mulu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U multu RG2, $1 mflo RG1 #MULtiplication Unsigned : Set HI to high-order 32 bits, LO and $t1 to low-order 32 bits of ($t2 multiplied by 32-bit immediate, unsigned multiplication)
mulo $t1,$t2,$t3 mult RG2, RG3 mfhi $1 mflo RG1 sra RG1, RG1, 31 beq $1, RG1, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow : Set $t1 to low-order 32 bits of the product of $t2 and $t3
mulo $t1,$t2,-100 addi $1, $0, VL3 mult RG2, $1 mfhi $1 mflo RG1 sra RG1, RG1, 31 beq $1, RG1, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow : Set $t1 to low-order 32 bits of the product of $t2 and signed 16-bit immediate
mulo $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U mult RG2, $1 mfhi $1 mflo RG1 sra RG1, RG1, 31 beq $1, RG1, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow : Set $t1 to low-order 32 bits of the product of $t2 and 32-bit immediate
mulou $t1,$t2,$t3 multu RG2, RG3 mfhi $1 beq $1,$0, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow Unsigned : Set $t1 to low-order 32 bits of the product of $t2 and $t3
mulou $t1,$t2,-100 addi $1, $0, VL3 multu RG2, $1 mfhi $1 beq $1,$0, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow Unsigned : Set $t1 to low-order 32 bits of the product of $t2 and signed 16-bit immediate
mulou $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U multu RG2, $1 mfhi $1 beq $1,$0, BROFF12 DBNOP break mflo RG1 #MULtiplication with Overflow Unsigned : Set $t1 to low-order 32 bits of the product of $t2 and 32-bit immediate
div $t1,$t2,$t3 bne RG3, $0, BROFF12 DBNOP break div RG2, RG3 mflo RG1 #DIVision : Set $t1 to ($t2 divided by $t3, integer division)
div $t1,$t2,-100 addi $1, $0, VL3 div RG2, $1 mflo RG1 #DIVision : Set $t1 to ($t2 divided by 16-bit immediate, integer division)
div $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U div RG2, $1 mflo RG1 #DIVision : Set $t1 to ($t2 divided by 32-bit immediate, integer division)
divu $t1,$t2,$t3 bne RG3, $0, BROFF12 DBNOP break divu RG2, RG3 mflo RG1 #DIVision Unsigned : Set $t1 to ($t2 divided by $t3, unsigned integer division)
divu $t1,$t2,-100 addi $1, $0, VL3 divu RG2, $1 mflo RG1 #DIVision Unsigned : Set $t1 to ($t2 divided by 16-bit immediate, unsigned integer division)
divu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U divu RG2, $1 mflo RG1 #DIVision Unsigned : Set $t1 to ($t2 divided by 32-bit immediate, unsigned integer division)
rem $t1,$t2,$t3 bne RG3, $0, BROFF12 DBNOP break div RG2, RG3 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by $t3)
rem $t1,$t2,-100 addi $1, $0, VL3 div RG2, $1 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by 16-bit immediate)
rem $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U div RG2, $1 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by 32-bit immediate)
remu $t1,$t2,$t3 bne RG3, $0, BROFF12 DBNOP break divu RG2, RG3 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by $t3, unsigned division)
remu $t1,$t2,-100 addi $1, $0, VL3 divu RG2, $1 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by 16-bit immediate, unsigned division)
remu $t1,$t2,100000 lui $1, VHL3 ori $1, $1, VL3U divu RG2, $1 mfhi RG1 #REMainder : Set $t1 to (remainder of $t2 divided by 32-bit immediate, unsigned division)
######################### load/store pseudo-ops start here ##########################
#
# Most of these simply provide a variety of convenient memory addressing modes for
# specifying load/store address.
#
li $t1,-100 addiu RG1, $0, VL2 #Load Immediate : Set $t1 to 16-bit immediate (sign-extended)
li $t1,100 ori RG1, $0, VL2U #Load Immediate : Set $t1 to unsigned 16-bit immediate (zero-extended)
li $t1,100000 lui $1, VHL2 ori RG1, $1, VL2U #Load Immediate : Set $t1 to 32-bit immediate
la $t1,($t2) addi RG1, RG3, 0 #Load Address : Set $t1 to contents of $t2
la $t1,-100 addiu RG1, $0, VL2 #Load Address : Set $t1 to 16-bit immediate (sign-extended)
la $t1,100 ori RG1, $0, VL2U #Load Address : Set $t1 to 16-bit immediate (zero-extended)
la $t1,100000 lui $1, VHL2 ori RG1, $1, VL2U #Load Address : Set $t1 to 32-bit immediate
la $t1,100($t2) ori $1, $0, VL2U add RG1, RG4, $1 #Load Address : Set $t1 to sum (of $t2 and 16-bit immediate)
la $t1,100000($t2) lui $1, VHL2 ori $1, $1, VL2U add RG1, RG4, $1 #Load Address : Set $t1 to sum (of $t2 and 32-bit immediate)
la $t1,label lui $1, LHL ori RG1, $1, LL2U COMPACT addi RG1, $0, LL2 #Load Address : Set $t1 to label’s address
la $t1,label($t2) lui $1, LHL ori $1, $1, LL2U add RG1, RG4, $1 COMPACT addi RG1, RG4, LL2 #Load Address : Set $t1 to sum (of $t2 and label’s address)
la $t1,label+100000 lui $1, LHPN ori RG1, $1, LLPU #Load Address : Set $t1 to sum (of label’s address and 32-bit immediate)
la $t1,label+100000($t2) lui $1, LHPN ori $1, $1, LLPU add RG1, RG6, $1 #Load Address : Set $t1 to sum (of label’s address, 32-bit immediate, and $t2)
lw $t1,($t2) lw RG1,0(RG3) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,-100 lw RG1, VL2($0) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,100 ori $1, $0, VL2U lw RG1, 0($1) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,100000 lui $1, VH2 lw RG1,VL2($1) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lw RG1, 0($1) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lw RG1, VL2($1) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,label lui $1, LH2 lw RG1, LL2($1) COMPACT lw RG1, LL2($0) #Load Word : Set $t1 to contents of memory word at label’s address
lw $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lw RG1, LL2($1) COMPACT lw RG1, LL2(RG4) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,label+100000 lui $1, LHPA lw RG1, LLP($1) #Load Word : Set $t1 to contents of effective memory word address
lw $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lw RG1, LLP($1) #Load Word : Set $t1 to contents of effective memory word address
sw $t1,($t2) sw RG1,0(RG3) #Store Word : Store $t1 contents into effective memory word address
sw $t1,-100 sw RG1, VL2($0) #Store Word : Store $t1 contents into effective memory word address
sw $t1,100 ori $1, $0, VL2U sw RG1, 0($1) #Store Word : Store $t1 contents into effective memory word address
sw $t1,100000 lui $1, VH2 sw RG1,VL2($1) #Store Word : Store $t1 contents into effective memory word address
sw $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 sw RG1, 0($1) #Store Word : Store $t1 contents into effective memory word address
sw $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sw RG1, VL2($1) #Store Word : Store $t1 contents into effective memory word address
sw $t1,label lui $1, LH2 sw RG1, LL2($1) COMPACT sw RG1, LL2($0) #Store Word : Store $t1 contents into memory word at label’s address
sw $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sw RG1, LL2($1) COMPACT sw RG1, LL2(RG4) #Store Word : Store $t1 contents into effective memory word address
sw $t1,label+100000 lui $1, LHPA sw RG1, LLP($1) #Store Word : Store $t1 contents into effective memory word address
sw $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sw RG1, LLP($1) #Store Word : Store $t1 contents into effective memory word address
lh $t1,($t2) lh RG1,0(RG3) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,-100 lh RG1, VL2($0) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,100 ori $1, $0, VL2U lh RG1, 0($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,100000 lui $1, VH2 lh RG1,VL2($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lh RG1, 0($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lh RG1, VL2($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,label lui $1, LH2 lh RG1, LL2($1) COMPACT lh RG1, LL2($0) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lh RG1, LL2($1) COMPACT lh RG1, LL2(RG4) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,label+100000 lui $1, LHPA lh RG1, LLP($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
lh $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lh RG1, LLP($1) #Load Halfword : Set $t1 to sign-extended 16-bit value from effective memory halfword address
sh $t1,($t2) sh RG1,0(RG3) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,-100 sh RG1, VL2($0) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,100 ori $1, $0, VL2U sh RG1, 0($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,100000 lui $1, VH2 sh RG1,VL2($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 sh RG1, 0($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sh RG1, VL2($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,label lui $1, LH2 sh RG1, LL2($1) COMPACT sh RG1, LL2($0) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sh RG1, LL2($1) COMPACT sh RG1, LL2(RG4) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,label+100000 lui $1, LHPA sh RG1, LLP($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
sh $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sh RG1, LLP($1) #Store Halfword : Store the low-order 16 bits of $t1 into the effective memory halfword address
lb $t1,($t2) lb RG1,0(RG3) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,-100 lb RG1, VL2($0) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,100 ori $1, $0, VL2U lb RG1, 0($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,100000 lui $1, VH2 lb RG1,VL2($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lb RG1, 0($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lb RG1, VL2($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,label lui $1, LH2 lb RG1, LL2($1) COMPACT lb RG1, LL2($0) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lb RG1, LL2($1) COMPACT lb RG1, LL2(RG4) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,label+100000 lui $1, LHPA lb RG1, LLP($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
lb $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lb RG1, LLP($1) #Load Byte : Set $t1 to sign-extended 8-bit value from effective memory byte address
sb $t1,($t2) sb RG1,0(RG3) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,-100 sb RG1, VL2($0) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,100 ori $1, $0, VL2U sb RG1, 0($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,100000 lui $1, VH2 sb RG1,VL2($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 sb RG1, 0($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sb RG1, VL2($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,label lui $1, LH2 sb RG1, LL2($1) COMPACT sb RG1, LL2($0) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sb RG1, LL2($1) COMPACT sb RG1, LL2(RG4) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,label+100000 lui $1, LHPA sb RG1, LLP($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
sb $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sb RG1, LLP($1) #Store Byte : Store the low-order 8 bits of $t1 into the effective memory byte address
lhu $t1,($t2) lhu RG1,0(RG3) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,-100 lhu RG1,VL2($0) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,100 ori $1, $0, VL2U lhu RG1, 0($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,100000 lui $1, VH2 lhu RG1,VL2($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lhu RG1, 0($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lhu RG1, VL2($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,label lui $1, LH2 lhu RG1, LL2($1) COMPACT lhu RG1, LL2($0) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lhu RG1, LL2($1) COMPACT lhu RG1, LL2(RG4) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,label+100000 lui $1, LHPA lhu RG1, LLP($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lhu $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lhu RG1, LLP($1) #Load Halfword Unsigned : Set $t1 to zero-extended 16-bit value from effective memory halfword address
lbu $t1,($t2) lbu RG1,0(RG3) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,-100 lbu RG1,VL2($0) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,100 ori $1, $0, VL2U lbu RG1, 0($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,100000 lui $1, VH2 lbu RG1,VL2($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lbu RG1, 0($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lbu RG1, VL2($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,label lui $1, LH2 lbu RG1, LL2($1) COMPACT lbu RG1, LL2($0) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lbu RG1, LL2($1) COMPACT lbu RG1, LL2(RG4) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,label+100000 lui $1, LHPA lbu RG1, LLP($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lbu $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lbu RG1, LLP($1) #Load Byte Unsigned : Set $t1 to zero-extended 8-bit value from effective memory byte address
lwl $t1,($t2) lwl RG1,0(RG3) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,-100 lwl RG1,VL2($0) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,100 ori $1, $0, VL2U lwl RG1, 0($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,100000 lui $1, VH2 lwl RG1,VL2($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lwl RG1, 0($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lwl RG1, VL2($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,label lui $1, LH2 lwl RG1, LL2($1) COMPACT lwl RG1, LL2($0) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lwl RG1, LL2($1) COMPACT lwl RG1, LL2(RG4) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,label+100000 lui $1, LHPA lwl RG1, LLP($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
lwl $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lwl RG1, LLP($1) #Load Word Left : Load from 1 to 4 bytes left-justified into $t1, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,($t2) swl RG1,0(RG3) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,-100 swl RG1,VL2($0) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,100 ori $1, $0, VL2U swl RG1, 0($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,100000 lui $1, VH2 swl RG1,VL2($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 swl RG1, 0($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 swl RG1, VL2($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,label lui $1, LH2 swl RG1, LL2($1) COMPACT swl RG1, LL2($0) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 swl RG1, LL2($1) COMPACT swl RG1, LL2(RG4) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,label+100000 lui $1, LHPA swl RG1, LLP($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
swl $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 swl RG1, LLP($1) #Store Word Left : Store high-order 1 to 4 bytes of $t1 into memory, starting with effective memory byte address and continuing through the low-order byte of its word
lwr $t1,($t2) lwr RG1,0(RG3) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,-100 lwr RG1,VL2($0) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,100 ori $1, $0, VL2U lwr RG1, 0($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,100000 lui $1, VH2 lwr RG1,VL2($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 lwr RG1, 0($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lwr RG1, VL2($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,label lui $1, LH2 lwr RG1, LL2($1) COMPACT lwr RG1, LL2($0) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lwr RG1, LL2($1) COMPACT lwr RG1, LL2(RG4) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,label+100000 lui $1, LHPA lwr RG1, LLP($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
lwr $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lwr RG1, LLP($1) #Load Word Right : Load from 1 to 4 bytes right-justified into $t1, starting with effective memory byte address and continuing through the high-order byte of its word
swr $t1,($t2) swr RG1,0(RG3) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,-100 swr RG1,VL2($0) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,100 ori $1, $0, VL2U swr RG1, 0 #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,100000 lui $1, VH2 swr RG1,VL2($1) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 swr RG1, 0($1) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 swr RG1, VL2($1) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,label lui $1, LH2 swr RG1, LL2($1) COMPACT swr RG1, LL2($0) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 swr RG1, LL2($1) COMPACT swr RG1, LL2(RG4) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,label+100000 lui $1, LHPA swr RG1, LLP($1) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
swr $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 swr RG1, LLP($1) #Store Word Right : Store low-order 1 to 4 bytes of $t1 into memory, starting with high-order byte of word containing effective memory byte address and continuing through that byte address
ll $t1,($t2) ll RG1,0(RG3) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,-100 ll RG1,VL2($0) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,100 ori $1, $0, VL2U ll RG1, 0($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,100000 lui $1, VH2 ll RG1,VL2($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 ll RG1, 0($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 ll RG1, VL2($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,label lui $1, LH2 ll RG1, LL2($1) COMPACT ll RG1, LL2($0) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 ll RG1, LL2($1) COMPACT ll RG1, LL2(RG4) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,label+100000 lui $1, LHPA ll RG1, LLP($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
ll $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 ll RG1, LLP($1) #Load Linked : Paired with Store Conditional (sc) to perform atomic read-modify-write. Treated as equivalent to Load Word (lw) because MARS does not simulate multiple processors.
sc $t1,($t2) sc RG1,0(RG3) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,-100 sc RG1,VL2($0) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,100 ori $1, $0, VL2U sc RG1, 0($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,100000 lui $1, VH2 sc RG1,VL2($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,100($t2) ori $1, $0, VL2U addu $1, $1, RG4 sc RG1, 0($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sc RG1, VL2($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,label lui $1, LH2 sc RG1, LL2($1) COMPACT sc RG1, LL2($0) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sc RG1, LL2($1) COMPACT sc RG1, LL2(RG4) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,label+100000 lui $1, LHPA sc RG1, LLP($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
sc $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sc RG1, LLP($1) #Store Conditional : Paired with Load Linked (ll) to perform atomic read-modify-write. Treated as equivalent to Store Word (sw) because MARS does not simulate multiple processors.
# Unaligned and double loads and stores. All the them require assembler to add a constant
# byte offset (from 1 to 4 bytes) to the given or calculated address.
# NOTE: I have abandoned the “accepted” expansion of immed16($reg) addressing form for the
# unaligned and double load/store pseudo-instructions because they produce what I consider
# incorrect results for immediate values at the upper edge of the signed 16-bit range
# (32765 through 32767). The expansion of these pseudo’s requires adding an additional
# byte offset (from 1 to 4 bytes) to the immediate value, which overflows the signed 16
# bit range and results in a large negative offset with no counterbalancing increment
# to the high order 16-bits. Thus if the two pieces of unaligned data end up in different
# words, they are stored 64K bytes apart! For example, the normal expansion of
# “usw $8,32767($9)” would be “swl $8,-32766($9)”, “swr $8, 32767($9)” Both SPIM and
# Britten’s text do this but I consider it incorrect. My compromise is the following:
# since each of the expansion calls for two calculated offsets, one of which can possibly
# overflow due to the addition but the other will not (because there is no addition),
# I’ll code the expansion to treat the at-risk calculated offset as 32-bits (it will generate
# the lui and addu, which is unnecessary in almost every case but is always correct)
# and the second as 16-bits. I’ll group all instructions for this addressing mode together.
# ulw $t1,-100($t2) lwl RG1, VL2P3(RG4) lwr RG1, VL2(RG4) — used by SPIM but not me.
# usw $t1,-100($t2) swl RG1, VL2P3(RG4) swr RG1, VL2(RG4) — used by SPIM but not me.
ulw $t1,-100($t2) lui $1, VH2P3 addu $1, $1, RG4 lwl RG1, VL2P3($1) lwr RG1, VL2(RG4) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulh $t1,-100($t2) lui $1, VH2P1 addu $1, $1, RG4 lb RG1, VL2P1($1) lbu $1, VL2(RG4) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulhu $t1,-100($t2) lui $1, VH2P1 addu $1, $1, RG4 lbu RG1, VL2P1($1) lbu $1, VL2(RG4) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ld $t1,-100($t2) lw RG1, VL2(RG4) lui $1, VH2P4 addu $1, $1, RG4 lw NR1, VL2P4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory byte address
usw $t1,-100($t2) lui $1, VH2P3 addu $1, $1, RG4 swl RG1, VL2P3($1) swr RG1, VL2(RG4) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
ush $t1,-100($t2) sb RG1, VL2(RG4) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, VH2P1 addu $1, $1, RG4 sb RG1, VL2P1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
sd $t1,-100($t2) sw RG1, VL2(RG4) lui $1, VH2P4 addu $1, $1, RG4 sw NR1, VL2P4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory byte address
# here are the remaining addressing modes, grouped by instruction.
ulw $t1,100000 lui $1, VH2P3 lwl RG1, VL2P3($1) lui $1, VH2 lwr RG1, VL2($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,label lui $1, LH2P3 lwl RG1, LL2P3($1) lui $1, LH2 lwr RG1, LL2($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,label+100000 lui $1, LHPAP3 lwl RG1, LLPP3($1) lui $1, LHPA lwr RG1, LLP($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,($t2) lwl RG1, 3(RG3) lwr RG1, 0(RG3) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,100000($t2) lui $1, VH2P3 addu $1, $1, RG4 lwl RG1, VL2P3($1) lui $1, VH2 addu $1, $1, RG4 lwr RG1, VL2($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,label($t2) lui $1, LH2P3 addu $1, $1, RG4 lwl RG1, LL2P3($1) lui $1, LH2 addu $1, $1, RG4 lwr RG1, LL2($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulw $t1,label+100000($t2) lui $1, LHPAP3 addu $1, $1, RG6 lwl RG1, LLPP3($1) lui $1, LHPA addu $1, $1, RG6 lwr RG1, LLP($1) #Unaligned Load Word : Set $t1 to the 32 bits starting at effective memory byte address
ulh $t1,100000 lui $1, VH2P1 lb RG1, VL2P1($1) lui $1, VH2 lbu $1, VL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,label lui $1, LH2P1 lb RG1, LL2P1($1) lui $1, LH2 lbu $1, LL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,label+100000 lui $1, LHPAP1 lb RG1, LLPP1($1) lui $1, LHPA lbu $1, LLP($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,($t2) lb RG1, 1(RG3) lbu $1, 0(RG3) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,100000($t2) lui $1, VH2P1 addu $1, $1, RG4 lb RG1, VL2P1($1) lui $1, VH2 addu $1, $1, RG4 lbu $1, VL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,label($t2) lui $1, LH2P1 addu $1, $1, RG4 lb RG1, LL2P1($1) lui $1, LH2 addu $1, $1, RG4 lbu $1, LL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulh $t1,label+100000($t2) lui $1, LHPAP1 addu $1, $1, RG6 lb RG1, LLPP1($1) lui $1, LHPA addu $1, $1, RG6 lbu $1, LLP($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, sign-extended, starting at effective memory byte address
ulhu $t1,100000 lui $1, VH2P1 lbu RG1, VL2P1($1) lui $1, VH2 lbu $1, VL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,label lui $1, LH2P1 lbu RG1, LL2P1($1) lui $1, LH2 lbu $1, LL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,label+100000 lui $1, LHPAP1 lbu RG1, LLPP1($1) lui $1, LHPA lbu $1, LLP($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,($t2) lbu RG1, 1(RG3) lbu $1, 0(RG3) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,100000($t2) lui $1, VH2P1 addu $1, $1, RG4 lbu RG1, VL2P1($1) lui $1, VH2 addu $1, $1, RG4 lbu $1, VL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,label($t2) lui $1, LH2P1 addu $1, $1, RG4 lbu RG1, LL2P1($1) lui $1, LH2 addu $1, $1, RG4 lbu $1, LL2($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ulhu $t1,label+100000($t2) lui $1, LHPAP1 addu $1, $1, RG6 lbu RG1, LLPP1($1) lui $1, LHPA addu $1, $1, RG6 lbu $1, LLP($1) sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Load Halfword : Set $t1 to the 16 bits, zero-extended, starting at effective memory byte address
ld $t1,100000 lui $1, VH2 lw RG1, VL2($1) lui $1, VH2P4 lw NR1, VL2P4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,label lui $1, LH2 lw RG1, LL2($1) lui $1, LH2P4 lw NR1, LL2P4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,label+100000 lui $1, LHPA lw RG1, LLP($1) lui $1, LHPAP4 lw NR1, LLPP4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,($t2) lw RG1, 0(RG3) lw NR1, 4(RG3) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lw RG1, VL2($1) lui $1, VH2P4 addu $1, $1, RG4 lw NR1, VL2P4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 lw RG1, LL2($1) lui $1, LH2P4 addu $1, $1, RG4 lw NR1, LL2P4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
ld $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lw RG1, LLP($1) lui $1, LHPAP4 addu $1, $1, RG6 lw NR1, LLPP4($1) #Load Doubleword : Set $t1 and the next register to the 64 bits starting at effective memory word address
usw $t1,100000 lui $1, VH2P3 swl RG1, VL2P3($1) lui $1, VH2 swr RG1, VL2($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,label lui $1, LH2P3 swl RG1, LL2P3($1) lui $1, LH2 swr RG1, LL2($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,label+100000 lui $1, LHPAP3 swl RG1, LLPP3($1) lui $1, LHPA swr RG1, LLP($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,($t2) swl RG1, 3(RG3) swr RG1, 0(RG3) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,100000($t2) lui $1, VH2P3 addu $1, $1, RG4 swl RG1, VL2P3($1) lui $1, VH2 addu $1, $1, RG4 swr RG1, VL2($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,label($t2) lui $1, LH2P3 addu $1, $1, RG4 swl RG1, LL2P3($1) lui $1, LH2 addu $1, $1, RG4 swr RG1, LL2($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
usw $t1,label+100000($t2) lui $1, LHPAP3 addu $1, $1, RG6 swl RG1, LLPP3($1) lui $1, LHPA addu $1, $1, RG6 swr RG1, LLP($1) #Unaligned Store Word : Store $t1 contents into the 32 bits starting at effective memory byte address
ush $t1,100000 lui $1, VH2 sb RG1, VL2($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, VH2P1 sb RG1, VL2P1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,label lui $1, LH2 sb RG1, LL2($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, LH2P1 sb RG1, LL2P1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,label+100000 lui $1, LHPA sb RG1, LLP($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, LHPAP1 sb RG1, LLPP1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,($t2) sb RG1, 0(RG3) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 sb RG1, 1(RG3) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sb RG1, VL2($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, VH2P1 addu $1, $1, RG4 sb RG1, VL2P1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sb RG1, LL2($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, LH2P1 addu $1, $1, RG4 sb RG1, LL2P1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
ush $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sb RG1, LLP($1) sll $1, RG1, 24 srl RG1, RG1, 8 or RG1, RG1, $1 lui $1, LHPAP1 addu $1, $1, RG6 sb RG1, LLPP1($1) srl $1, RG1, 24 sll RG1, RG1, 8 or RG1, RG1, $1 #Unaligned Store Halfword: Store low-order halfword $t1 contents into the 16 bits starting at effective memory byte address
sd $t1,100000 lui $1, VH2 sw RG1, VL2($1) lui $1, VH2P4 sw NR1, VL2P4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,label lui $1, LH2 sw RG1, LL2($1) lui $1, LH2P4 sw NR1, LL2P4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,label+100000 lui $1, LHPA sw RG1, LLP($1) lui $1, LHPAP4 sw NR1, LLPP4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,($t2) sw RG1, 0(RG3) sw NR1, 4(RG3) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,100000($t2) lui $1, VH2 addu $1, $1, RG4 sw RG1, VL2($1) lui $1, VH2P4 addu $1, $1, RG4 sw NR1, VL2P4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,label($t2) lui $1, LH2 addu $1, $1, RG4 sw RG1, LL2($1) lui $1, LH2P4 addu $1, $1, RG4 sw NR1, LL2P4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
sd $t1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sw RG1, LLP($1) lui $1, LHPAP4 addu $1, $1, RG6 sw NR1, LLPP4($1) #Store Doubleword : Store contents of $t1 and the next register to the 64 bits starting at effective memory word address
# load and store pseudo-instructions for floating point (coprocessor 1) registers
lwc1 $f1,($t2) lwc1 RG1,0(RG3) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,-100 lwc1 RG1,VL2($0) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,100000 lui $1, VH2 lwc1 RG1,VL2($1) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lwc1 RG1, VL2($1) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,label lui $1, LH2 lwc1 RG1, LL2($1) COMPACT lwc1 RG1, LL2($0) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,label($t2) lui $1, LH2 addu $1, $1, RG4 lwc1 RG1, LL2($1) COMPACT lwc1 RG1, LL2(RG4) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,label+100000 lui $1, LHPA lwc1 RG1, LLP($1) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
lwc1 $f1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lwc1 RG1, LLP($1) #Load Word Coprocessor 1 : Set $f1 to 32-bit value from effective memory word address
ldc1 $f2,($t2) ldc1 RG1,0(RG3) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,-100 ldc1 RG1,VL2($0) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,100000 lui $1, VH2 ldc1 RG1,VL2($1) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,100000($t2) lui $1, VH2 addu $1, $1, RG4 ldc1 RG1, VL2($1) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,label lui $1, LH2 ldc1 RG1, LL2($1) COMPACT ldc1 RG1, LL2($0) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,label($t2) lui $1, LH2 addu $1, $1, RG4 ldc1 RG1, LL2($1) COMPACT ldc1 RG1, LL2(RG4) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,label+100000 lui $1, LHPA ldc1 RG1, LLP($1) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
ldc1 $f2,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 ldc1 RG1, LLP($1) #Load Doubleword Coprocessor 1 : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
swc1 $f1,($t2) swc1 RG1,0(RG3) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,-100 swc1 RG1,VL2($0) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,100000 lui $1, VH2 swc1 RG1,VL2($1) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,100000($t2) lui $1, VH2 addu $1, $1, RG4 swc1 RG1, VL2($1) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,label lui $1, LH2 swc1 RG1, LL2($1) COMPACT swc1 RG1, LL2($0) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,label($t2) lui $1, LH2 addu $1, $1, RG4 swc1 RG1, LL2($1) COMPACT swc1 RG1, LL2(RG4) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,label+100000 lui $1, LHPA swc1 RG1, LLP($1) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
swc1 $f1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 swc1 RG1, LLP($1) #Store Word Coprocessor 1 : Store 32-bit value from $f1 to effective memory word address
sdc1 $f2,($t2) sdc1 RG1,0(RG3) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,-100 sdc1 RG1,VL2($0) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,100000 lui $1, VH2 sdc1 RG1,VL2($1) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,100000($t2) lui $1, VH2 addu $1, $1, RG4 sdc1 RG1, VL2($1) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,label lui $1, LH2 sdc1 RG1, LL2($1) COMPACT sdc1 RG1, LL2($0) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,label($t2) lui $1, LH2 addu $1, $1, RG4 sdc1 RG1, LL2($1) COMPACT sdc1 RG1, LL2(RG4) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,label+100000 lui $1, LHPA sdc1 RG1, LLP($1) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
sdc1 $f2,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sdc1 RG1, LLP($1) #Store Doubleword Coprocessor 1 : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
l.s $f1,($t2) lwc1 RG1,0(RG3) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,-100 lwc1 RG1,VL2($0) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,100000 lui $1, VH2 lwc1 RG1,VL2($1) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,100000($t2) lui $1, VH2 addu $1, $1, RG4 lwc1 RG1, VL2($1) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,label lui $1, LH2 lwc1 RG1, LL2($1) COMPACT lwc1 RG1, LL2($0) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,label($t2) lui $1, LH2 addu $1, $1, RG4 lwc1 RG1, LL2($1) COMPACT lwc1 RG1, LL2(RG4) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,label+100000 lui $1, LHPA lwc1 RG1, LLP($1) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
l.s $f1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 lwc1 RG1, LLP($1) #Load floating point Single precision : Set $f1 to 32-bit value at effective memory word address
s.s $f1,($t2) swc1 RG1,0(RG3) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,-100 swc1 RG1,VL2($0) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,100000 lui $1, VH2 swc1 RG1,VL2($1) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,100000($t2) lui $1, VH2 addu $1, $1, RG4 swc1 RG1, VL2($1) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,label lui $1, LH2 swc1 RG1, LL2($1) COMPACT swc1 RG1, LL2($0) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,label($t2) lui $1, LH2 addu $1, $1, RG4 swc1 RG1, LL2($1) COMPACT swc1 RG1, LL2(RG4) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,label+100000 lui $1, LHPA swc1 RG1, LLP($1) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
s.s $f1,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 swc1 RG1, LLP($1) #Store floating point Single precision : Store 32-bit value from $f1 to effective memory word address
l.d $f2,($t2) ldc1 RG1,0(RG3) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,-100 ldc1 RG1,VL2($0) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,100000 lui $1, VH2 ldc1 RG1,VL2($1) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,100000($t2) lui $1, VH2 addu $1, $1, RG4 ldc1 RG1, VL2($1) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,label lui $1, LH2 ldc1 RG1, LL2($1) COMPACT ldc1 RG1, LL2($0) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,label($t2) lui $1, LH2 addu $1, $1, RG4 ldc1 RG1, LL2($1) COMPACT ldc1 RG1, LL2(RG4) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,label+100000 lui $1, LHPA ldc1 RG1, LLP($1) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
l.d $f2,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 ldc1 RG1, LLP($1) #Load floating point Double precision : Set $f2 and $f3 register pair to 64-bit value at effective memory doubleword address
s.d $f2,($t2) sdc1 RG1,0(RG3) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,-100 sdc1 RG1,VL2($0) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,100000 lui $1, VH2 sdc1 RG1,VL2($1) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,100000($t2) lui $1, VH2 addu $1, $1, RG4 sdc1 RG1, VL2($1) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,label lui $1, LH2 sdc1 RG1, LL2($1) COMPACT sdc1 RG1, LL2($0) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,label($t2) lui $1, LH2 addu $1, $1, RG4 sdc1 RG1, LL2($1) COMPACT sdc1 RG1, LL2(RG4) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,label+100000 lui $1, LHPA sdc1 RG1, LLP($1) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
s.d $f2,label+100000($t2) lui $1, LHPA addu $1, $1, RG6 sdc1 RG1, LLP($1) #Store floating point Double precision : Store 64 bits from $f2 and $f3 register pair to effective memory doubleword address
# maximum length of scrolled text in Mars Message and Run I/O tabs, in bytes.
MessageLimit = 1000000
# Maximum number of errors that can be recorded in one assemble operation.
ErrorLimit = 200
# Maximum number of “backstep” operations that can be taken. An instruction
# may produce more than one (e.g. trap instruction may set several registers)
BackstepLimit = 2000
# Acceptable file extensions for MIPS assembly files. Separate with spaces.
Extensions = asm s
# The set of ASCII strings to use for ASCII display or print
# of data segment contents. This covers 8-bit ASCII codes 0-255.
# The space character (decimal 32, hex 20) is encoded here as
# “space” without the quotes. It will be converted upon reading.
# All non-printable codes are encoded here as “null” without
# the quotes. They will be converted upon reading, to the value
# of variable AsciiNonPrint. If you wish to have non-printing
# codes be displayed as their octal value (see unix od) then
# replace all these null with the codes.
# 0 1 2 3 4 5 6 7 8 9
AsciiTable = \
\\0 null null null null null null null \\b \\t \
\\n \\v \\f \\r null null null null null null \
null null null null null null null null null null \
null null space ! ” # $ % & ‘ \
( ) * + , – . / 0 1 \
2 3 4 5 6 7 8 9 : ; \
< = > ? @ A B C D E \
F G H I J K L M N O \
P Q R S T U V W X Y \
Z [ \\ ] ^ _ ` a b c \
d e f g h i j k l m \
n o p q r s t u v w \
x y z { | } ~ null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null null null null null \
null null null null null null
# Use AsciiNonPrint as placeholder for non-printing ASCII codes.
# To use space character, specify AsciiNonPrint = space.
# The value of this variable will be substituted for the
# string “null” for any element in the Ascii list (above)
# having “null” as its value.
AsciiNonPrint = .
# Example of re-assign syscall number. Remove leading “#” to activate.
# I re-assign to same number since I don’t really want to change them.
# None are necessary here since number is assigned as constructor arg.
# Re-assignment here will override constructor arg though.
# The syscall names must match constructor arg exactly, case-sensitive.
# Re-assignment useful if numbering conflict should someday occur.
PrintInt = 1
PrintFloat = 2
PrintDouble = 3
PrintString = 4
ReadInt = 5
ReadFloat = 6
ReadDouble = 7
ReadString = 8
Sbrk = 9
Exit = 10
PrintChar = 11
ReadChar = 12
Open = 13
Read = 14
Write = 15
Close = 16
Exit2 = 17
Time = 30
MidiOut = 31
Sleep = 32
MidiOutSync = 33
PrintIntHex = 34
PrintIntBinary = 35
PrintIntUnsigned = 36
RandSeed = 40
RandInt = 41
RandIntRange = 42
RandFloat = 43
RandDouble = 44
ConfirmDialog = 50
InputDialogInt = 51
InputDialogFloat = 52
InputDialogDouble = 53
InputDialogString = 54
MessageDialog = 55
MessageDialogInt = 56
MessageDialogFloat = 57
MessageDialogDouble = 58
MessageDialogString = 59
# NOTE: These are defaults only. The values of these keys are maintained by Java Preferences
# objects, which store key-value pairs in a system-dependent way (Windows uses Registry).
AssembleAll = false
AssembleOnOpen = false
BareMachine = false
DataSegmentHighlighting = true
DelayedBranching = false
DisplayAddressesInHex = true
DisplayValuesInHex = true
EditorCurrentLineHighlighting = true
EditorLineNumbersDisplayed = true
ExtendedAssembler = true
LabelWindowVisibility = false
LoadExceptionHandler = false
ProgramArguments = false
RegistersHighlighting = true
StartAtMain = false
WarningsAreErrors = false
PopupInstructionGuidance = true
EditorPopupPrefixLength = 2
EvenRowBackground = 0x00e0e0e0
EvenRowForeground = 0
OddRowBackground = 0x00ffffff
OddRowForeground = 0
TextSegmentHighlightBackground = 0x00ffff99
TextSegmentHighlightForeground = 0
TextSegmentDelaySlotHighlightBackground = 0x33ff00
TextSegmentDelaySlotHighlightForeground = 0
DataSegmentHighlightBackground = 0x0099ccff
DataSegmentHighlightForeground = 0
RegisterHighlightBackground = 0x0099cc55
RegisterHighlightForeground = 0
Copyright (c) 2003-2013, Pete Sanderson and Kenneth Vollmar
Developed by Pete Sanderson ( )
and Kenneth Vollmar ( )
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(MIT license, http://www.opensource.org/licenses/mit-license.html)
Main-Class: Mars
Class-Path: .
jar cfm Mars.jar mainclass.txt PseudoOps.txt Config.properties Syscall.properties Settings.properties MARSlicense.txt mainclass.txt CreateMarsJar.bat Mars.java Mars.class docs help images mars sounds
Mars.java
Mars.java/*
Copyright (c) 2003-2006, Pete Sanderson and Kenneth Vollmar
Developed by Pete Sanderson ( )
and Kenneth Vollmar ( )
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
“Software”), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(MIT license, http://www.opensource.org/licenses/mit-license.html)
*/
/**
* Portal to Mars
*
* @author Pete Sanderson
* @version March 2006
**/
public class Mars
{
public static void main(String[] args)
{
new mars.MarsLaunch(args);
}
}
Mars
public synchronized class Mars {
public void Mars();
public static void main(String[]);
}
Constant Field Values
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Constant Field Values
Contents mars.*
mars.*
mars.ErrorList
public static final java.lang.String ERROR_MESSAGE_PREFIX “Error”
public static final java.lang.String FILENAME_PREFIX ” in ”
public static final java.lang.String LINE_PREFIX ” line ”
public static final java.lang.String MESSAGE_SEPARATOR “: ”
public static final java.lang.String POSITION_PREFIX ” column ”
public static final java.lang.String WARNING_MESSAGE_PREFIX “Warning”
mars.ErrorMessage
public static final boolean ERROR false
public static final boolean WARNING true
mars.Globals
public static final java.lang.String helpPath “/help/”
public static final java.lang.String imagesPath “/images/”
public static final java.lang.String version “4.3”
mars.Settings
public static final int ASSEMBLE_ALL_ENABLED 3
public static final int ASSEMBLE_ON_OPEN_ENABLED 2
public static final int AUTO_INDENT 19
public static final int BARE_MACHINE_ENABLED 1
public static final int CARET_BLINK_RATE 4
public static final int DATA_SEGMENT_HIGHLIGHTING 12
public static final int DATASEGMENT_HIGHLIGHT_BACKGROUND 8
public static final int DATASEGMENT_HIGHLIGHT_FONT 5
public static final int DATASEGMENT_HIGHLIGHT_FOREGROUND 9
public static final int DELAYED_BRANCHING_ENABLED 8
public static final int DISPLAY_ADDRESSES_IN_HEX 5
public static final int DISPLAY_VALUES_IN_HEX 6
public static final int EDITOR_CURRENT_LINE_HIGHLIGHTING 15
public static final int EDITOR_FONT 0
public static final int EDITOR_LINE_NUMBERS_DISPLAYED 9
public static final int EDITOR_POPUP_PREFIX_LENGTH 6
public static final int EDITOR_TAB_SIZE 5
public static final int EVEN_ROW_BACKGROUND 0
public static final int EVEN_ROW_FONT 1
public static final int EVEN_ROW_FOREGROUND 1
public static final int EXCEPTION_HANDLER 0
public static final int EXCEPTION_HANDLER_ENABLED 7
public static final int EXTENDED_ASSEMBLER_ENABLED 0
public static final int GENERIC_TEXT_EDITOR 18
public static final int LABEL_SORT_STATE 2
public static final int LABEL_WINDOW_VISIBILITY 4
public static final int MEMORY_CONFIGURATION 3
public static final int ODD_ROW_BACKGROUND 2
public static final int ODD_ROW_FONT 2
public static final int ODD_ROW_FOREGROUND 3
public static final int POPUP_INSTRUCTION_GUIDANCE 16
public static final int POPUP_SYSCALL_INPUT 17
public static final int PROGRAM_ARGUMENTS 11
public static final int REGISTER_HIGHLIGHT_BACKGROUND 10
public static final int REGISTER_HIGHLIGHT_FONT 6
public static final int REGISTER_HIGHLIGHT_FOREGROUND 11
public static final int REGISTERS_HIGHLIGHTING 13
public static final int START_AT_MAIN 14
public static final int TEXT_COLUMN_ORDER 1
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND 6
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT 4
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND 7
public static final int TEXTSEGMENT_HIGHLIGHT_BACKGROUND 4
public static final int TEXTSEGMENT_HIGHLIGHT_FONT 3
public static final int TEXTSEGMENT_HIGHLIGHT_FOREGROUND 5
public static final int WARNINGS_ARE_ERRORS 10
mars.assembler.*
mars.assembler.DataTypes
public static final int BYTE_SIZE 1
public static final int CHAR_SIZE 1
public static final int DOUBLE_SIZE 8
public static final int FLOAT_SIZE 4
public static final int HALF_SIZE 2
public static final double LOW_DOUBLE_VALUE -1.7976931348623157E308
public static final double LOW_FLOAT_VALUE -3.4028234663852886E38
public static final int MAX_BYTE_VALUE 127
public static final double MAX_DOUBLE_VALUE 1.7976931348623157E308
public static final double MAX_FLOAT_VALUE 3.4028234663852886E38
public static final int MAX_HALF_VALUE 32767
public static final int MAX_UHALF_VALUE 65535
public static final int MAX_WORD_VALUE 2147483647
public static final int MIN_BYTE_VALUE -128
public static final int MIN_HALF_VALUE -32768
public static final int MIN_UHALF_VALUE 0
public static final int MIN_WORD_VALUE -2147483648
public static final int WORD_SIZE 4
mars.assembler.Symbol
public static final boolean DATA_SYMBOL true
public static final boolean TEXT_SYMBOL false
mars.assembler.SymbolTable
public static final int NOT_FOUND -1
mars.assembler.TokenTypes
public static final java.lang.String TOKEN_DELIMITERS “\t ,()”
mars.mips.*
mars.mips.hardware.AccessNotice
public static final int READ 0
public static final int WRITE 1
mars.mips.hardware.Coprocessor0
public static final int CAUSE 13
public static final int DEFAULT_STATUS_VALUE 65297
public static final int EPC 14
public static final int EXCEPTION_LEVEL 1
public static final int STATUS 12
public static final int VADDR 8
mars.mips.hardware.Memory
public static final boolean BIG_ENDIAN false
public static final boolean LITTLE_ENDIAN true
public static final int WORD_LENGTH_BYTES 4
mars.mips.hardware.RegisterFile
public static final int GLOBAL_POINTER_REGISTER 28
public static final int STACK_POINTER_REGISTER 29
mars.mips.instructions.Instruction
public static final int INSTRUCTION_LENGTH 4
public static final int INSTRUCTION_LENGTH_BITS 32
mars.simulator.*
mars.simulator.Exceptions
public static final int ADDRESS_EXCEPTION_LOAD 4
public static final int ADDRESS_EXCEPTION_STORE 5
public static final int ARITHMETIC_OVERFLOW_EXCEPTION 12
public static final int BREAKPOINT_EXCEPTION 9
public static final int DIVIDE_BY_ZERO_EXCEPTION 15
public static final int EXTERNAL_INTERRUPT_DISPLAY 128
public static final int EXTERNAL_INTERRUPT_KEYBOARD 64
public static final int FLOATING_POINT_OVERFLOW 16
public static final int FLOATING_POINT_UNDERFLOW 17
public static final int RESERVED_INSTRUCTION_EXCEPTION 10
public static final int SYSCALL_EXCEPTION 8
public static final int TRAP_EXCEPTION 13
mars.simulator.Simulator
public static final int BREAKPOINT 1
public static final int CLIFF_TERMINATION 5
public static final int EXCEPTION 2
public static final int MAX_STEPS 3
public static final int NO_DEVICE 0
public static final int NORMAL_TERMINATION 4
public static final int PAUSE_OR_STOP 6
mars.simulator.SimulatorNotice
public static final int SIMULATOR_START 0
public static final int SIMULATOR_STOP 1
mars.tools.*
mars.tools.BHTSimGUI
public static final java.lang.String BHT_DO_NOT_TAKE_BRANCH “NOT TAKE”
public static final java.lang.String BHT_TAKE_BRANCH “TAKE”
mars.tools.BHTSimulator
public static final int BHT_DEFAULT_HISTORY 1
public static final boolean BHT_DEFAULT_INITVAL false
public static final int BHT_DEFAULT_SIZE 16
public static final java.lang.String BHT_HEADING “Branch History Table Simulator”
public static final java.lang.String BHT_NAME “BHT Simulator”
public static final java.lang.String BHT_VERSION “Version 1.0 (Ingo Kofler)”
mars.tools.DigitalLabSim
public static final int EXTERNAL_INTERRUPT_HEXA_KEYBOARD 512
public static final int EXTERNAL_INTERRUPT_TIMER 256
mars.util.*
mars.util.EditorFont
public static final int DEFAULT_SIZE 12
public static final int MAX_SIZE 72
public static final int MIN_SIZE 6
mars.util.SystemIO
public static final int SYSCALL_BUFSIZE 128
public static final int SYSCALL_MAXFILES 32
mars.venus.*
mars.venus.Editor
public static final int MAX_BLINK_RATE 1000
public static final int MAX_TAB_SIZE 32
public static final int MIN_BLINK_RATE 0
public static final int MIN_TAB_SIZE 1
mars.venus.FileStatus
public static final int EDITED 4
public static final int NEW_EDITED 2
public static final int NEW_NOT_EDITED 1
public static final int NO_FILE 0
public static final int NOT_EDITED 3
public static final int OPENING 8
public static final int RUNNABLE 5
public static final int RUNNING 6
public static final int TERMINATED 7
mars.venus.HelpHelpAction
public static final java.lang.String descriptionDetailSeparator “:”
mars.venus.NumberDisplayBaseChooser
public static final int ASCII 0
public static final int DECIMAL 10
public static final int HEXADECIMAL 16
mars.venus.RunSpeedPanel
public static final double UNLIMITED_SPEED 40.0
mars.venus.SettingsHighlightingAction
public static final java.lang.String APPLY_TOOL_TIP_TEXT “Apply current settings now and leave dialog open”
public static final java.lang.String CANCEL_TOOL_TIP_TEXT “Close dialog without applying current settings”
public static final java.lang.String CLOSE_TOOL_TIP_TEXT “Apply current settings and close dialog”
public static final java.lang.String RESET_TOOL_TIP_TEXT “Reset to initial settings without applying”
mars.venus.editors.MARSTextEditingArea
public static final int TEXT_FOUND 1
public static final int TEXT_NOT_FOUND 0
public static final int TEXT_REPLACED_FOUND_NEXT 2
public static final int TEXT_REPLACED_NOT_FOUND_NEXT 3
mars.venus.editors.jeditsyntax.InputHandler
public static final java.lang.String SMART_HOME_END_PROPERTY “InputHandler.homeEnd”
mars.venus.editors.jeditsyntax.tokenmarker.Token
public static final byte COMMENT1 1
public static final byte COMMENT2 2
public static final byte END 127
public static final byte ID_COUNT 12
public static final byte INTERNAL_FIRST 100
public static final byte INTERNAL_LAST 126
public static final byte INVALID 10
public static final byte KEYWORD1 6
public static final byte KEYWORD2 7
public static final byte KEYWORD3 8
public static final byte LABEL 5
public static final byte LITERAL1 3
public static final byte LITERAL2 4
public static final byte MACRO_ARG 11
public static final byte NULL 0
public static final byte OPERATOR 9
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For All Packages
Package Hierarchies:
mars, mars.assembler, mars.mips.dump, mars.mips.hardware, mars.mips.instructions, mars.mips.instructions.syscalls, mars.simulator, mars.tools, mars.util, mars.venus, mars.venus.editors, mars.venus.editors.generic, mars.venus.editors.jeditsyntax, mars.venus.editors.jeditsyntax.tokenmarker
Class Hierarchy
java.lang.Object javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
mars.venus.GuiAction mars.venus.EditCopyAction
mars.venus.EditCutAction
mars.venus.EditFindReplaceAction
mars.venus.EditPasteAction
mars.venus.EditRedoAction
mars.venus.EditSelectAllAction
mars.venus.EditUndoAction
mars.venus.FileCloseAction
mars.venus.FileCloseAllAction
mars.venus.FileDumpMemoryAction
mars.venus.FileExitAction
mars.venus.FileNewAction
mars.venus.FileOpenAction
mars.venus.FilePrintAction
mars.venus.FileSaveAction
mars.venus.FileSaveAllAction
mars.venus.FileSaveAsAction
mars.venus.HelpAboutAction
mars.venus.HelpHelpAction
mars.venus.RunAssembleAction
mars.venus.RunBackstepAction
mars.venus.RunClearBreakpointsAction (implements javax.swing.event.TableModelListener)
mars.venus.RunGoAction
mars.venus.RunPauseAction
mars.venus.RunResetAction
mars.venus.RunStepAction
mars.venus.RunStopAction
mars.venus.RunToggleBreakpointsAction
mars.venus.SettingsAddressDisplayBaseAction
mars.venus.SettingsAssembleAllAction
mars.venus.SettingsAssembleOnOpenAction
mars.venus.SettingsDelayedBranchingAction
mars.venus.SettingsEditorAction
mars.venus.SettingsExceptionHandlerAction
mars.venus.SettingsExtendedAction
mars.venus.SettingsHighlightingAction
mars.venus.SettingsLabelAction
mars.venus.SettingsMemoryConfigurationAction
mars.venus.SettingsPopupInputAction
mars.venus.SettingsProgramArgumentsAction
mars.venus.SettingsStartAtMainAction
mars.venus.SettingsValueDisplayBaseAction
mars.venus.SettingsWarningsAreErrorsAction
mars.venus.ToolAction
javax.swing.text.AbstractDocument (implements javax.swing.text.Document, java.io.Serializable)
javax.swing.text.PlainDocument mars.venus.editors.jeditsyntax.SyntaxDocument
mars.mips.dump.AbstractDumpFormat (implements mars.mips.dump.DumpFormat)
mars.mips.dump.AsciiTextDumpFormat
mars.mips.dump.BinaryDumpFormat
mars.mips.dump.BinaryTextDumpFormat
mars.mips.dump.HexTextDumpFormat
mars.mips.dump.IntelHexDumpFormat
mars.mips.dump.SegmentWindowDumpFormat
mars.mips.instructions.syscalls.AbstractSyscall (implements mars.mips.instructions.syscalls.Syscall)
mars.mips.instructions.syscalls.SyscallClose
mars.mips.instructions.syscalls.SyscallConfirmDialog
mars.mips.instructions.syscalls.SyscallExit
mars.mips.instructions.syscalls.SyscallExit2
mars.mips.instructions.syscalls.SyscallInputDialogDouble
mars.mips.instructions.syscalls.SyscallInputDialogFloat
mars.mips.instructions.syscalls.SyscallInputDialogInt
mars.mips.instructions.syscalls.SyscallInputDialogString
mars.mips.instructions.syscalls.SyscallMessageDialog
mars.mips.instructions.syscalls.SyscallMessageDialogDouble
mars.mips.instructions.syscalls.SyscallMessageDialogFloat
mars.mips.instructions.syscalls.SyscallMessageDialogInt
mars.mips.instructions.syscalls.SyscallMessageDialogString
mars.mips.instructions.syscalls.SyscallMidiOut
mars.mips.instructions.syscalls.SyscallMidiOutSync
mars.mips.instructions.syscalls.SyscallOpen
mars.mips.instructions.syscalls.SyscallPrintChar
mars.mips.instructions.syscalls.SyscallPrintDouble
mars.mips.instructions.syscalls.SyscallPrintFloat
mars.mips.instructions.syscalls.SyscallPrintInt
mars.mips.instructions.syscalls.SyscallPrintIntBinary
mars.mips.instructions.syscalls.SyscallPrintIntHex
mars.mips.instructions.syscalls.SyscallPrintIntUnsigned
mars.mips.instructions.syscalls.SyscallPrintString
mars.mips.instructions.syscalls.SyscallRandDouble
mars.mips.instructions.syscalls.SyscallRandFloat
mars.mips.instructions.syscalls.SyscallRandInt
mars.mips.instructions.syscalls.SyscallRandIntRange
mars.mips.instructions.syscalls.SyscallRandSeed
mars.mips.instructions.syscalls.SyscallRead
mars.mips.instructions.syscalls.SyscallReadChar
mars.mips.instructions.syscalls.SyscallReadDouble
mars.mips.instructions.syscalls.SyscallReadFloat
mars.mips.instructions.syscalls.SyscallReadInt
mars.mips.instructions.syscalls.SyscallReadString
mars.mips.instructions.syscalls.SyscallSbrk
mars.mips.instructions.syscalls.SyscallSleep
mars.mips.instructions.syscalls.SyscallTime
mars.mips.instructions.syscalls.SyscallWrite
javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)
mars.tools.BHTableModel
mars.mips.hardware.AccessNotice mars.mips.hardware.MemoryAccessNotice
mars.mips.hardware.RegisterAccessNotice
mars.assembler.Assembler
mars.simulator.BackStepper
mars.mips.instructions.BasicInstructionFormat
mars.tools.BHTEntry
mars.util.Binary
java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container javax.swing.JComponent (implements java.io.Serializable)
javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
javax.swing.JButton (implements javax.accessibility.Accessible)
mars.tools.AbstractMarsToolAndApplication.ConnectButton
mars.venus.RepeatButton (implements java.awt.event.ActionListener, java.awt.event.MouseListener)
javax.swing.JToggleButton (implements javax.accessibility.Accessible)
javax.swing.JCheckBox (implements javax.accessibility.Accessible)
mars.venus.NumberDisplayBaseChooser
mars.tools.DigitalLabSim.SevenSegmentDisplay
mars.venus.editors.jeditsyntax.JEditTextArea mars.venus.editors.jeditsyntax.JEditBasedTextArea (implements javax.swing.event.CaretListener, mars.venus.editors.MARSTextEditingArea)
javax.swing.JInternalFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.venus.DataSegmentWindow (implements java.util.Observer)
mars.venus.LabelsWindow
mars.venus.TextSegmentWindow
javax.swing.JLayeredPane (implements javax.accessibility.Accessible)
javax.swing.JDesktopPane (implements javax.accessibility.Accessible)
mars.venus.ExecutePane
javax.swing.JPanel (implements javax.accessibility.Accessible)
mars.tools.BHTSimGUI
mars.venus.Coprocessor0Window (implements java.util.Observer)
mars.venus.Coprocessor1Window (implements java.awt.event.ActionListener, java.util.Observer)
mars.tools.DigitalLabSim.HexaKeyboard
mars.tools.DigitalLabSim.SevenSegmentPanel
mars.venus.EditPane (implements java.util.Observer)
mars.venus.RegistersWindow (implements java.util.Observer)
mars.venus.RunSpeedPanel
javax.swing.JTabbedPane (implements javax.accessibility.Accessible, java.io.Serializable, javax.swing.SwingConstants)
mars.venus.EditTabbedPane
mars.venus.MainPane
mars.venus.MessagesPane
mars.venus.RegistersPane
javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
javax.swing.JTextArea mars.venus.editors.generic.GenericTextArea (implements mars.venus.editors.MARSTextEditingArea)
mars.venus.editors.jeditsyntax.TextAreaPainter (implements javax.swing.text.TabExpander)
java.awt.Window (implements javax.accessibility.Accessible)
java.awt.Dialog javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.venus.AbstractFontSettingDialog
java.awt.Frame (implements java.awt.MenuContainer)
javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.tools.AbstractMarsToolAndApplication (implements mars.tools.MarsTool, java.util.Observer)
mars.tools.BHTSimulator (implements java.awt.event.ActionListener)
mars.tools.BitmapDisplay
mars.tools.CacheSimulator
mars.tools.DigitalLabSim
mars.tools.FloatRepresentation
mars.tools.InstructionCounter
mars.tools.InstructionStatistics
mars.tools.IntroToTools
mars.tools.KeyboardAndDisplaySimulator
mars.tools.MemoryReferenceVisualization
mars.venus.VenusUI
javax.swing.JWindow (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
mars.MarsSplashScreen
mars.mips.hardware.Coprocessor0
mars.mips.hardware.Coprocessor1
mars.assembler.DataTypes
mars.simulator.DelayedBranch
mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick (implements java.awt.event.MouseListener)
mars.tools.DigitalLabSim.OneSecondCounter
mars.assembler.Directives
mars.mips.dump.DumpFormatLoader
mars.venus.Editor
mars.util.EditorFont
mars.ErrorList
mars.ErrorMessage
mars.simulator.Exceptions
mars.util.FilenameFinder
mars.venus.FileStatus
mars.Globals
mars.venus.editors.jeditsyntax.InputHandler.backspace (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.backspace_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_copy (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_cut (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_paste (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.delete (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.delete_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.document_end (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.document_home (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.end (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.home (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.insert_break (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.insert_char (implements java.awt.event.ActionListener, mars.venus.editors.jeditsyntax.InputHandler.NonRepeatable)
mars.venus.editors.jeditsyntax.InputHandler.insert_tab (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_char (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_line (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_page (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.overwrite (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_char (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_line (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_page (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.repeat (implements java.awt.event.ActionListener, mars.venus.editors.jeditsyntax.InputHandler.NonRecordable)
mars.venus.editors.jeditsyntax.InputHandler.select_all (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.toggle_rect (implements java.awt.event.ActionListener)
mars.mips.instructions.Instruction mars.mips.instructions.BasicInstruction
mars.mips.instructions.ExtendedInstruction
mars.mips.instructions.InstructionSet
java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
mars.tools.AbstractMarsToolAndApplication.EnterKeyListener
mars.venus.editors.jeditsyntax.InputHandler mars.venus.editors.jeditsyntax.DefaultInputHandler
mars.venus.editors.jeditsyntax.KeywordMap
mars.assembler.Macro
mars.assembler.MacroPool
Mars
mars.tools.MarsBot (implements mars.tools.MarsTool, java.util.Observer)
mars.MarsLaunch
mars.mips.hardware.MemoryConfiguration
mars.mips.hardware.MemoryConfigurations
mars.util.MemoryDump
mars.mips.dump.MIFDumpFormat
mars.MIPSprogram
java.awt.event.MouseAdapter (implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener)
mars.venus.PopupListener
java.util.Observable mars.mips.hardware.Memory
mars.mips.hardware.Register
mars.Settings
mars.simulator.Simulator
mars.assembler.OperandFormat
mars.venus.editors.jeditsyntax.PopupHelpItem
mars.simulator.ProgramArgumentList
mars.ProgramStatement
mars.util.PropertiesFile
mars.mips.instructions.syscalls.RandomStreams
mars.mips.hardware.RegisterFile
mars.tools.ScavengerHunt (implements mars.tools.MarsTool, java.util.Observer)
mars.tools.ScreenMagnifier (implements mars.tools.MarsTool)
mars.simulator.SimulatorNotice
mars.assembler.SourceLine
mars.simulator.SwingWorker
mars.assembler.Symbol
mars.assembler.SymbolTable
mars.venus.editors.jeditsyntax.SyntaxStyle
mars.venus.editors.jeditsyntax.SyntaxUtilities
mars.mips.instructions.syscalls.SyscallNumberOverride
mars.util.SystemIO
mars.venus.editors.jeditsyntax.TextAreaDefaults
mars.venus.editors.jeditsyntax.TextUtilities
java.lang.Throwable (implements java.io.Serializable)
java.lang.Exception mars.mips.hardware.AddressErrorException
mars.venus.HardcopyWriter.PrintCanceledException
mars.mips.hardware.InvalidRegisterAccessException
mars.ProcessingException
mars.venus.editors.jeditsyntax.tokenmarker.Token
mars.assembler.Token
mars.assembler.Tokenizer
mars.assembler.TokenList (implements java.lang.Cloneable)
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
mars.assembler.TokenTypes
mars.venus.ToolLoader
java.io.Writer (implements java.lang.Appendable, java.io.Closeable, java.io.Flushable)
mars.venus.HardcopyWriter
Interface Hierarchy
mars.mips.dump.DumpFormat
mars.venus.editors.jeditsyntax.InputHandler.MacroRecorder
mars.venus.editors.jeditsyntax.InputHandler.NonRecordable
mars.venus.editors.jeditsyntax.InputHandler.NonRepeatable
mars.venus.editors.jeditsyntax.InputHandler.Wrapper
mars.venus.editors.MARSTextEditingArea
mars.tools.MarsTool
mars.mips.instructions.SimulationCode
mars.simulator.Simulator.StopListener
mars.mips.instructions.syscalls.Syscall
mars.venus.editors.jeditsyntax.TextAreaPainter.Highlight
mars.assembler.TranslationCode
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Generated Documentation (Untitled)
Frame Alert
This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client.
Link toNon-frame version.
Mars
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Class Mars
java.lang.Object
Mars
public class Mars
extends java.lang.Object
Portal to Mars
Author:
Pete Sanderson
Constructor Summary
Mars()
Method Summary
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Mars
public Mars()
Method Detail
main
public static void main(java.lang.String[] args)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Overview List
All Classes
Packages
mars
mars.assembler
mars.mips.dump
mars.mips.hardware
mars.mips.instructions
mars.mips.instructions.syscalls
mars.simulator
mars.tools
mars.util
mars.venus
mars.venus.editors
mars.venus.editors.generic
mars.venus.editors.jeditsyntax
mars.venus.editors.jeditsyntax.tokenmarker
All Classes
All Classes
AbstractDumpFormat
AbstractFontSettingDialog
AbstractMarsToolAndApplication
AbstractSyscall
AccessNotice
AddressErrorException
AsciiTextDumpFormat
Assembler
BackStepper
BasicInstruction
BasicInstructionFormat
BHTableModel
BHTEntry
BHTSimGUI
BHTSimulator
Binary
BinaryDumpFormat
BinaryTextDumpFormat
BitmapDisplay
CacheSimulator
Coprocessor0
Coprocessor0Window
Coprocessor1
Coprocessor1Window
DataSegmentWindow
DataTypes
DefaultInputHandler
DelayedBranch
DigitalLabSim
Directives
DumpFormat
DumpFormatLoader
EditCopyAction
EditCutAction
EditFindReplaceAction
Editor
EditorFont
EditPane
EditPasteAction
EditRedoAction
EditSelectAllAction
EditTabbedPane
EditUndoAction
ErrorList
ErrorMessage
Exceptions
ExecutePane
ExtendedInstruction
FileCloseAction
FileCloseAllAction
FileDumpMemoryAction
FileExitAction
FilenameFinder
FileNewAction
FileOpenAction
FilePrintAction
FileSaveAction
FileSaveAllAction
FileSaveAsAction
FileStatus
FloatRepresentation
GenericTextArea
Globals
GuiAction
HardcopyWriter
HardcopyWriter.PrintCanceledException
HelpAboutAction
HelpHelpAction
HexTextDumpFormat
InputHandler
InputHandler.backspace
InputHandler.backspace_word
InputHandler.clip_copy
InputHandler.clip_cut
InputHandler.clip_paste
InputHandler.delete
InputHandler.delete_word
InputHandler.document_end
InputHandler.document_home
InputHandler.end
InputHandler.home
InputHandler.insert_break
InputHandler.insert_char
InputHandler.insert_tab
InputHandler.MacroRecorder
InputHandler.next_char
InputHandler.next_line
InputHandler.next_page
InputHandler.next_word
InputHandler.NonRecordable
InputHandler.NonRepeatable
InputHandler.overwrite
InputHandler.prev_char
InputHandler.prev_line
InputHandler.prev_page
InputHandler.prev_word
InputHandler.repeat
InputHandler.select_all
InputHandler.toggle_rect
InputHandler.Wrapper
Instruction
InstructionCounter
InstructionSet
InstructionStatistics
IntelHexDumpFormat
IntroToTools
InvalidRegisterAccessException
JEditBasedTextArea
JEditTextArea
KeyboardAndDisplaySimulator
KeywordMap
LabelsWindow
Macro
MacroPool
MainPane
Mars
MarsBot
MarsLaunch
MarsSplashScreen
MARSTextEditingArea
MarsTool
Memory
MemoryAccessNotice
MemoryConfiguration
MemoryConfigurations
MemoryDump
MemoryReferenceVisualization
MessagesPane
MIFDumpFormat
MIPSprogram
MIPSTokenMarker
NumberDisplayBaseChooser
OperandFormat
PopupHelpItem
PopupListener
ProcessingException
ProgramArgumentList
ProgramStatement
PropertiesFile
RandomStreams
Register
RegisterAccessNotice
RegisterFile
RegistersPane
RegistersWindow
RepeatButton
RunAssembleAction
RunBackstepAction
RunClearBreakpointsAction
RunGoAction
RunPauseAction
RunResetAction
RunSpeedPanel
RunStepAction
RunStopAction
RunToggleBreakpointsAction
ScavengerHunt
ScreenMagnifier
SegmentWindowDumpFormat
Settings
SettingsAddressDisplayBaseAction
SettingsAssembleAllAction
SettingsAssembleOnOpenAction
SettingsDelayedBranchingAction
SettingsEditorAction
SettingsExceptionHandlerAction
SettingsExtendedAction
SettingsHighlightingAction
SettingsLabelAction
SettingsMemoryConfigurationAction
SettingsPopupInputAction
SettingsProgramArgumentsAction
SettingsStartAtMainAction
SettingsValueDisplayBaseAction
SettingsWarningsAreErrorsAction
SimulationCode
Simulator
Simulator.StopListener
SimulatorNotice
SourceLine
SwingWorker
Symbol
SymbolTable
SyntaxDocument
SyntaxStyle
SyntaxUtilities
Syscall
SyscallClose
SyscallConfirmDialog
SyscallExit
SyscallExit2
SyscallInputDialogDouble
SyscallInputDialogFloat
SyscallInputDialogInt
SyscallInputDialogString
SyscallMessageDialog
SyscallMessageDialogDouble
SyscallMessageDialogFloat
SyscallMessageDialogInt
SyscallMessageDialogString
SyscallMidiOut
SyscallMidiOutSync
SyscallNumberOverride
SyscallOpen
SyscallPrintChar
SyscallPrintDouble
SyscallPrintFloat
SyscallPrintInt
SyscallPrintIntBinary
SyscallPrintIntHex
SyscallPrintIntUnsigned
SyscallPrintString
SyscallRandDouble
SyscallRandFloat
SyscallRandInt
SyscallRandIntRange
SyscallRandSeed
SyscallRead
SyscallReadChar
SyscallReadDouble
SyscallReadFloat
SyscallReadInt
SyscallReadString
SyscallSbrk
SyscallSleep
SyscallTime
SyscallWrite
SystemIO
TextAreaDefaults
TextAreaPainter
TextAreaPainter.Highlight
TextSegmentWindow
TextUtilities
Token
Token
Tokenizer
TokenList
TokenMarker
TokenTypes
ToolAction
ToolLoader
TranslationCode
VenusUI
Serialized Form
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Serialized Form
Package mars
Class mars.MarsSplashScreen extends javax.swing.JWindow implements Serializable
Serialized Fields
duration
int duration
Class mars.ProcessingException extends java.lang.Exception implements Serializable
Serialized Fields
errs
ErrorList errs
Package mars.mips.hardware
Class mars.mips.hardware.AddressErrorException extends java.lang.Exception implements Serializable
Serialized Fields
address
int address
type
int type
Class mars.mips.hardware.InvalidRegisterAccessException extends java.lang.Exception implements Serializable
Serialized Fields
errs
ErrorList errs
Package mars.tools
Class mars.tools.AbstractMarsToolAndApplication extends javax.swing.JFrame implements Serializable
Serialized Fields
isBeingUsedAsAMarsTool
boolean isBeingUsedAsAMarsTool
thisMarsApp
AbstractMarsToolAndApplication thisMarsApp
dialog
javax.swing.JDialog dialog
theWindow
java.awt.Window theWindow
headingLabel
javax.swing.JLabel headingLabel
title
java.lang.String title
heading
java.lang.String heading
emptyBorder
javax.swing.border.EmptyBorder emptyBorder
backgroundColor
java.awt.Color backgroundColor
lowMemoryAddress
int lowMemoryAddress
highMemoryAddress
int highMemoryAddress
observing
boolean observing
mostRecentlyOpenedFile
java.io.File mostRecentlyOpenedFile
interactiveGUIUpdater
java.lang.Runnable interactiveGUIUpdater
operationStatusMessages
mars.tools.AbstractMarsToolAndApplication.MessageField operationStatusMessages
openFileButton
javax.swing.JButton openFileButton
assembleRunButton
javax.swing.JButton assembleRunButton
stopButton
javax.swing.JButton stopButton
multiFileAssemble
boolean multiFileAssemble
connectButton
AbstractMarsToolAndApplication.ConnectButton connectButton
Class mars.tools.AbstractMarsToolAndApplication.ConnectButton extends javax.swing.JButton implements Serializable
Class mars.tools.BHTableModel extends javax.swing.table.AbstractTableModel implements Serializable
Serialized Fields
m_entries
java.util.Vector
vector holding the entries of the BHT
m_entryCnt
int m_entryCnt
number of entries in the BHT
m_historySize
int m_historySize
number of past branch events to remember
m_columnNames
java.lang.String[] m_columnNames
name of the table columns
m_columnClasses
java.lang.Class
type of the table columns
Class mars.tools.BHTSimGUI extends javax.swing.JPanel implements Serializable
Serialized Fields
m_tfInstruction
javax.swing.JTextField m_tfInstruction
text field presenting the most recent branch instruction
m_tfAddress
javax.swing.JTextField m_tfAddress
text field representing the address of the most recent branch instruction
m_tfIndex
javax.swing.JTextField m_tfIndex
text field representing the resulting BHT index of the branch instruction
m_cbBHTentries
javax.swing.JComboBox m_cbBHTentries
combo box for selecting the number of BHT entries
m_cbBHThistory
javax.swing.JComboBox m_cbBHThistory
combo box for selecting the history size
m_cbBHTinitVal
javax.swing.JComboBox m_cbBHTinitVal
combo box for selecting the initial value
m_tabBHT
javax.swing.JTable m_tabBHT
the table representing the BHT
m_taLog
javax.swing.JTextArea m_taLog
text field for log output
Class mars.tools.BHTSimulator extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
m_gui
BHTSimGUI m_gui
the GUI of the BHT simulator
m_bhtModel
BHTableModel m_bhtModel
the model of the BHT
m_pendingBranchInstAddress
int m_pendingBranchInstAddress
state variable that indicates that the last instruction was a branch instruction (if address != 0) or not (address == 0)
m_lastBranchTaken
boolean m_lastBranchTaken
state variable that signals if the last branch was taken
Class mars.tools.BitmapDisplay extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
visualizationUnitPixelWidthSelector
javax.swing.JComboBox visualizationUnitPixelWidthSelector
visualizationUnitPixelHeightSelector
javax.swing.JComboBox visualizationUnitPixelHeightSelector
visualizationPixelWidthSelector
javax.swing.JComboBox visualizationPixelWidthSelector
visualizationPixelHeightSelector
javax.swing.JComboBox visualizationPixelHeightSelector
displayBaseAddressSelector
javax.swing.JComboBox displayBaseAddressSelector
drawingArea
java.awt.Graphics drawingArea
canvas
javax.swing.JPanel canvas
results
javax.swing.JPanel results
emptyBorder
javax.swing.border.EmptyBorder emptyBorder
countFonts
java.awt.Font countFonts
backgroundColor
java.awt.Color backgroundColor
visualizationUnitPixelWidthChoices
java.lang.String[] visualizationUnitPixelWidthChoices
defaultVisualizationUnitPixelWidthIndex
int defaultVisualizationUnitPixelWidthIndex
visualizationUnitPixelHeightChoices
java.lang.String[] visualizationUnitPixelHeightChoices
defaultVisualizationUnitPixelHeightIndex
int defaultVisualizationUnitPixelHeightIndex
displayAreaPixelWidthChoices
java.lang.String[] displayAreaPixelWidthChoices
defaultDisplayWidthIndex
int defaultDisplayWidthIndex
displayAreaPixelHeightChoices
java.lang.String[] displayAreaPixelHeightChoices
defaultDisplayHeightIndex
int defaultDisplayHeightIndex
unitPixelWidth
int unitPixelWidth
unitPixelHeight
int unitPixelHeight
displayAreaWidthInPixels
int displayAreaWidthInPixels
displayAreaHeightInPixels
int displayAreaHeightInPixels
displayBaseAddressChoices
java.lang.String[] displayBaseAddressChoices
displayBaseAddresses
int[] displayBaseAddresses
defaultBaseAddressIndex
int defaultBaseAddressIndex
baseAddress
int baseAddress
theGrid
mars.tools.BitmapDisplay.Grid theGrid
Class mars.tools.CacheSimulator extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
cacheBlockSizeSelector
javax.swing.JComboBox cacheBlockSizeSelector
cacheBlockCountSelector
javax.swing.JComboBox cacheBlockCountSelector
cachePlacementSelector
javax.swing.JComboBox cachePlacementSelector
cacheReplacementSelector
javax.swing.JComboBox cacheReplacementSelector
cacheSetSizeSelector
javax.swing.JComboBox cacheSetSizeSelector
memoryAccessCountDisplay
javax.swing.JTextField memoryAccessCountDisplay
cacheHitCountDisplay
javax.swing.JTextField cacheHitCountDisplay
cacheMissCountDisplay
javax.swing.JTextField cacheMissCountDisplay
replacementPolicyDisplay
javax.swing.JTextField replacementPolicyDisplay
cachableAddressesDisplay
javax.swing.JTextField cachableAddressesDisplay
cacheSizeDisplay
javax.swing.JTextField cacheSizeDisplay
cacheHitRateDisplay
javax.swing.JProgressBar cacheHitRateDisplay
animations
mars.tools.CacheSimulator.Animation animations
logPanel
javax.swing.JPanel logPanel
logScroll
javax.swing.JScrollPane logScroll
logText
javax.swing.JTextArea logText
logShow
javax.swing.JCheckBox logShow
emptyBorder
javax.swing.border.EmptyBorder emptyBorder
countFonts
java.awt.Font countFonts
backgroundColor
java.awt.Color backgroundColor
cacheBlockSizeChoicesInt
int[] cacheBlockSizeChoicesInt
cacheBlockCountChoicesInt
int[] cacheBlockCountChoicesInt
cacheBlockSizeChoices
java.lang.String[] cacheBlockSizeChoices
cacheBlockCountChoices
java.lang.String[] cacheBlockCountChoices
placementPolicyChoices
java.lang.String[] placementPolicyChoices
DIRECT
int DIRECT
FULL
int FULL
SET
int SET
replacementPolicyChoices
java.lang.String[] replacementPolicyChoices
LRU
int LRU
RANDOM
int RANDOM
cacheSetSizeChoices
java.lang.String[] cacheSetSizeChoices
defaultCacheBlockSizeIndex
int defaultCacheBlockSizeIndex
defaultCacheBlockCountIndex
int defaultCacheBlockCountIndex
defaultPlacementPolicyIndex
int defaultPlacementPolicyIndex
defaultReplacementPolicyIndex
int defaultReplacementPolicyIndex
defaultCacheSetSizeIndex
int defaultCacheSetSizeIndex
theCache
mars.tools.CacheSimulator.AbstractCache theCache
memoryAccessCount
int memoryAccessCount
cacheHitCount
int cacheHitCount
cacheMissCount
int cacheMissCount
cacheHitRate
double cacheHitRate
randu
java.util.Random randu
Class mars.tools.DigitalLabSim extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
sevenSegPanel
DigitalLabSim.SevenSegmentPanel sevenSegPanel
hexaKeyPanel
DigitalLabSim.HexaKeyboard hexaKeyPanel
Class mars.tools.DigitalLabSim.HexaKeyboard extends javax.swing.JPanel implements Serializable
Serialized Fields
button
javax.swing.JButton[] button
Class mars.tools.DigitalLabSim.SevenSegmentDisplay extends javax.swing.JComponent implements Serializable
Serialized Fields
aff
char aff
Class mars.tools.DigitalLabSim.SevenSegmentPanel extends javax.swing.JPanel implements Serializable
Serialized Fields
display
DigitalLabSim.SevenSegmentDisplay[] display
Class mars.tools.FloatRepresentation extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
attachedRegister
Register attachedRegister
fpRegisters
Register[] fpRegisters
thisFloatTool
FloatRepresentation thisFloatTool
binarySignDecoratedDisplay
javax.swing.JPanel binarySignDecoratedDisplay
binaryExponentDecoratedDisplay
javax.swing.JPanel binaryExponentDecoratedDisplay
binaryFractionDecoratedDisplay
javax.swing.JPanel binaryFractionDecoratedDisplay
hexDisplay
javax.swing.JTextField hexDisplay
decimalDisplay
javax.swing.JTextField decimalDisplay
binarySignDisplay
javax.swing.JTextField binarySignDisplay
binaryExponentDisplay
javax.swing.JTextField binaryExponentDisplay
binaryFractionDisplay
javax.swing.JTextField binaryFractionDisplay
expansionDisplay
javax.swing.JLabel expansionDisplay
significandLabel
javax.swing.JLabel significandLabel
binaryToDecimalFormulaGraphic
mars.tools.FloatRepresentation.BinaryToDecimalFormulaGraphic binaryToDecimalFormulaGraphic
instructions
mars.tools.FloatRepresentation.InstructionsPane instructions
defaultInstructions
java.lang.String defaultInstructions
Class mars.tools.InstructionCounter extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
counter
int counter
Number of instructions executed until now.
counterField
javax.swing.JTextField counterField
counterR
int counterR
Number of instructions of type R.
counterRField
javax.swing.JTextField counterRField
progressbarR
javax.swing.JProgressBar progressbarR
counterI
int counterI
Number of instructions of type I.
counterIField
javax.swing.JTextField counterIField
progressbarI
javax.swing.JProgressBar progressbarI
counterJ
int counterJ
Number of instructions of type J.
counterJField
javax.swing.JTextField counterJField
progressbarJ
javax.swing.JProgressBar progressbarJ
lastAddress
int lastAddress
The last address we saw. We ignore it because the only way for a
program to execute twice the same instruction is to enter an infinite
loop, which is not insteresting in the POV of counting instructions.
Class mars.tools.InstructionStatistics extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
m_tfTotalCounter
javax.swing.JTextField m_tfTotalCounter
text field for visualizing the total number of instructions processed
m_tfCounters
javax.swing.JTextField[] m_tfCounters
array of text field – one for each instruction category
m_pbCounters
javax.swing.JProgressBar[] m_pbCounters
array of progress pars – one for each instruction category
m_totalCounter
int m_totalCounter
counter for the total number of instructions processed
m_counters
int[] m_counters
array of counter variables – one for each instruction category
m_categoryLabels
java.lang.String[] m_categoryLabels
names of the instruction categories as array
lastAddress
int lastAddress
The last address we saw. We ignore it because the only way for a
program to execute twice the same instruction is to enter an infinite
loop, which is not insteresting in the POV of counting instructions.
Class mars.tools.IntroToTools extends AbstractMarsToolAndApplication implements Serializable
Class mars.tools.KeyboardAndDisplaySimulator extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
delayTechniques
mars.tools.KeyboardAndDisplaySimulator.TransmitterDelayTechnique[] delayTechniques
countingInstructions
boolean countingInstructions
instructionCount
int instructionCount
transmitDelayInstructionCountLimit
int transmitDelayInstructionCountLimit
currentDelayInstructionLimit
int currentDelayInstructionLimit
characterToDisplay
char characterToDisplay
displayAfterDelay
boolean displayAfterDelay
keyboardAndDisplay
javax.swing.JPanel keyboardAndDisplay
displayScrollPane
javax.swing.JScrollPane displayScrollPane
display
javax.swing.JTextArea display
displayPanel
javax.swing.JPanel displayPanel
displayOptions
javax.swing.JPanel displayOptions
delayTechniqueChooser
javax.swing.JComboBox delayTechniqueChooser
delayLengthPanel
mars.tools.KeyboardAndDisplaySimulator.DelayLengthPanel delayLengthPanel
delayLengthSlider
javax.swing.JSlider delayLengthSlider
displayAfterDelayCheckBox
javax.swing.JCheckBox displayAfterDelayCheckBox
keyboardPanel
javax.swing.JPanel keyboardPanel
keyAccepterScrollPane
javax.swing.JScrollPane keyAccepterScrollPane
keyEventAccepter
javax.swing.JTextArea keyEventAccepter
fontButton
javax.swing.JButton fontButton
defaultFont
java.awt.Font defaultFont
Class mars.tools.MemoryReferenceVisualization extends AbstractMarsToolAndApplication implements Serializable
Serialized Fields
wordsPerUnitSelector
javax.swing.JComboBox wordsPerUnitSelector
visualizationUnitPixelWidthSelector
javax.swing.JComboBox visualizationUnitPixelWidthSelector
visualizationUnitPixelHeightSelector
javax.swing.JComboBox visualizationUnitPixelHeightSelector
visualizationPixelWidthSelector
javax.swing.JComboBox visualizationPixelWidthSelector
visualizationPixelHeightSelector
javax.swing.JComboBox visualizationPixelHeightSelector
displayBaseAddressSelector
javax.swing.JComboBox displayBaseAddressSelector
drawHashMarksSelector
javax.swing.JCheckBox drawHashMarksSelector
drawingArea
java.awt.Graphics drawingArea
canvas
javax.swing.JPanel canvas
results
javax.swing.JPanel results
emptyBorder
javax.swing.border.EmptyBorder emptyBorder
countFonts
java.awt.Font countFonts
backgroundColor
java.awt.Color backgroundColor
wordsPerUnitChoices
java.lang.String[] wordsPerUnitChoices
defaultWordsPerUnitIndex
int defaultWordsPerUnitIndex
visualizationUnitPixelWidthChoices
java.lang.String[] visualizationUnitPixelWidthChoices
defaultVisualizationUnitPixelWidthIndex
int defaultVisualizationUnitPixelWidthIndex
visualizationUnitPixelHeightChoices
java.lang.String[] visualizationUnitPixelHeightChoices
defaultVisualizationUnitPixelHeightIndex
int defaultVisualizationUnitPixelHeightIndex
displayAreaPixelWidthChoices
java.lang.String[] displayAreaPixelWidthChoices
defaultDisplayWidthIndex
int defaultDisplayWidthIndex
displayAreaPixelHeightChoices
java.lang.String[] displayAreaPixelHeightChoices
defaultDisplayHeightIndex
int defaultDisplayHeightIndex
defaultDrawHashMarks
boolean defaultDrawHashMarks
unitPixelWidth
int unitPixelWidth
unitPixelHeight
int unitPixelHeight
wordsPerUnit
int wordsPerUnit
visualizationAreaWidthInPixels
int visualizationAreaWidthInPixels
visualizationAreaHeightInPixels
int visualizationAreaHeightInPixels
defaultCounterColors
mars.tools.MemoryReferenceVisualization.CounterColor[] defaultCounterColors
countTable
int[] countTable
COUNT_INDEX_INIT
int COUNT_INDEX_INIT
displayBaseAddressChoices
java.lang.String[] displayBaseAddressChoices
displayBaseAddresses
int[] displayBaseAddresses
defaultBaseAddressIndex
int defaultBaseAddressIndex
baseAddress
int baseAddress
theGrid
mars.tools.MemoryReferenceVisualization.Grid theGrid
counterColorScale
mars.tools.MemoryReferenceVisualization.CounterColorScale counterColorScale
Package mars.venus
Class mars.venus.AbstractFontSettingDialog extends javax.swing.JDialog implements Serializable
Serialized Fields
editorDialog
javax.swing.JDialog editorDialog
fontFamilySelector
javax.swing.JComboBox fontFamilySelector
fontStyleSelector
javax.swing.JComboBox fontStyleSelector
fontSizeSelector
javax.swing.JSlider fontSizeSelector
fontSizeSpinSelector
javax.swing.JSpinner fontSizeSpinSelector
fontSample
javax.swing.JLabel fontSample
currentFont
java.awt.Font currentFont
initialFontFamily
java.lang.String initialFontFamily
initialFontStyle
java.lang.String initialFontStyle
initialFontSize
java.lang.String initialFontSize
Class mars.venus.Coprocessor0Window extends javax.swing.JPanel implements Serializable
Serialized Fields
tableData
java.lang.Object[][] tableData
highlighting
boolean highlighting
highlightRow
int highlightRow
executePane
ExecutePane executePane
rowGivenRegNumber
int[] rowGivenRegNumber
Class mars.venus.Coprocessor1Window extends javax.swing.JPanel implements Serializable
Serialized Fields
tableData
java.lang.Object[][] tableData
highlighting
boolean highlighting
highlightRow
int highlightRow
executePane
ExecutePane executePane
conditionFlagCheckBox
javax.swing.JCheckBox[] conditionFlagCheckBox
Class mars.venus.DataSegmentWindow extends javax.swing.JInternalFrame implements Serializable
Serialized Fields
dataTableScroller
javax.swing.JScrollPane dataTableScroller
contentPane
java.awt.Container contentPane
tablePanel
javax.swing.JPanel tablePanel
dataButton
javax.swing.JButton dataButton
nextButton
javax.swing.JButton nextButton
prevButton
javax.swing.JButton prevButton
stakButton
javax.swing.JButton stakButton
globButton
javax.swing.JButton globButton
heapButton
javax.swing.JButton heapButton
kernButton
javax.swing.JButton kernButton
extnButton
javax.swing.JButton extnButton
mmioButton
javax.swing.JButton mmioButton
asciiDisplayCheckBox
javax.swing.JCheckBox asciiDisplayCheckBox
addressHighlighting
boolean addressHighlighting
asciiDisplay
boolean asciiDisplay
addressRow
int addressRow
addressColumn
int addressColumn
addressRowFirstAddress
int addressRowFirstAddress
settings
Settings settings
firstAddress
int firstAddress
homeAddress
int homeAddress
userOrKernelMode
boolean userOrKernelMode
baseAddressSelector
javax.swing.JComboBox baseAddressSelector
displayBaseAddressChoices
java.lang.String[] displayBaseAddressChoices
displayBaseAddresses
int[] displayBaseAddresses
defaultBaseAddressIndex
int defaultBaseAddressIndex
baseAddressButtons
javax.swing.JButton[] baseAddressButtons
displayBaseAddressArray
int[] displayBaseAddressArray
descriptions
java.lang.String[] descriptions
Class mars.venus.EditCopyAction extends GuiAction implements Serializable
Class mars.venus.EditCutAction extends GuiAction implements Serializable
Class mars.venus.EditFindReplaceAction extends GuiAction implements Serializable
Serialized Fields
findReplaceDialog
javax.swing.JDialog findReplaceDialog
Class mars.venus.EditPane extends javax.swing.JPanel implements Serializable
Serialized Fields
sourceCode
MARSTextEditingArea sourceCode
mainUI
VenusUI mainUI
currentDirectoryPath
java.lang.String currentDirectoryPath
caretPositionLabel
javax.swing.JLabel caretPositionLabel
showLineNumbers
javax.swing.JCheckBox showLineNumbers
lineNumbers
javax.swing.JLabel lineNumbers
isCompoundEdit
boolean isCompoundEdit
compoundEdit
javax.swing.undo.CompoundEdit compoundEdit
fileStatus
FileStatus fileStatus
Class mars.venus.EditPasteAction extends GuiAction implements Serializable
Class mars.venus.EditRedoAction extends GuiAction implements Serializable
Class mars.venus.EditSelectAllAction extends GuiAction implements Serializable
Class mars.venus.EditTabbedPane extends javax.swing.JTabbedPane implements Serializable
Serialized Fields
editTab
EditPane editTab
mainPane
MainPane mainPane
mainUI
VenusUI mainUI
editor
Editor editor
fileOpener
mars.venus.EditTabbedPane.FileOpener fileOpener
Class mars.venus.EditUndoAction extends GuiAction implements Serializable
Class mars.venus.ExecutePane extends javax.swing.JDesktopPane implements Serializable
Serialized Fields
registerValues
RegistersWindow registerValues
coprocessor1Values
Coprocessor1Window coprocessor1Values
coprocessor0Values
Coprocessor0Window coprocessor0Values
dataSegment
DataSegmentWindow dataSegment
textSegment
TextSegmentWindow textSegment
labelValues
LabelsWindow labelValues
mainUI
VenusUI mainUI
valueDisplayBase
NumberDisplayBaseChooser valueDisplayBase
addressDisplayBase
NumberDisplayBaseChooser addressDisplayBase
labelWindowVisible
boolean labelWindowVisible
Class mars.venus.FileCloseAction extends GuiAction implements Serializable
Class mars.venus.FileCloseAllAction extends GuiAction implements Serializable
Class mars.venus.FileDumpMemoryAction extends GuiAction implements Serializable
Serialized Fields
dumpDialog
javax.swing.JDialog dumpDialog
segmentArray
java.lang.String[] segmentArray
baseAddressArray
int[] baseAddressArray
limitAddressArray
int[] limitAddressArray
highAddressArray
int[] highAddressArray
segmentListArray
java.lang.String[] segmentListArray
segmentListBaseArray
int[] segmentListBaseArray
segmentListHighArray
int[] segmentListHighArray
segmentListSelector
javax.swing.JComboBox segmentListSelector
formatListSelector
javax.swing.JComboBox formatListSelector
Class mars.venus.FileExitAction extends GuiAction implements Serializable
Class mars.venus.FileNewAction extends GuiAction implements Serializable
Class mars.venus.FileOpenAction extends GuiAction implements Serializable
Serialized Fields
mostRecentlyOpenedFile
java.io.File mostRecentlyOpenedFile
fileChooser
javax.swing.JFileChooser fileChooser
fileFilterCount
int fileFilterCount
fileFilterList
java.util.ArrayList
listenForUserAddedFileFilter
java.beans.PropertyChangeListener listenForUserAddedFileFilter
Class mars.venus.FilePrintAction extends GuiAction implements Serializable
Class mars.venus.FileSaveAction extends GuiAction implements Serializable
Class mars.venus.FileSaveAllAction extends GuiAction implements Serializable
Class mars.venus.FileSaveAsAction extends GuiAction implements Serializable
Class mars.venus.GuiAction extends javax.swing.AbstractAction implements Serializable
Serialized Fields
mainUI
VenusUI mainUI
Class mars.venus.HardcopyWriter.PrintCanceledException extends java.lang.Exception implements Serializable
Class mars.venus.HelpAboutAction extends GuiAction implements Serializable
Class mars.venus.HelpHelpAction extends GuiAction implements Serializable
Class mars.venus.LabelsWindow extends javax.swing.JInternalFrame implements Serializable
Serialized Fields
contentPane
java.awt.Container contentPane
labelPanel
javax.swing.JPanel labelPanel
dataLabels
javax.swing.JCheckBox dataLabels
textLabels
javax.swing.JCheckBox textLabels
listOfLabelsForSymbolTable
java.util.ArrayList
labelsWindow
LabelsWindow labelsWindow
tableSortComparator
java.util.Comparator
tableSortingComparators
java.util.Comparator
sortState
int sortState
Class mars.venus.MainPane extends javax.swing.JTabbedPane implements Serializable
Serialized Fields
editTab
EditPane editTab
executeTab
ExecutePane executeTab
editTabbedPane
EditTabbedPane editTabbedPane
mainUI
VenusUI mainUI
Class mars.venus.MessagesPane extends javax.swing.JTabbedPane implements Serializable
Serialized Fields
assemble
javax.swing.JTextArea assemble
run
javax.swing.JTextArea run
assembleTab
javax.swing.JPanel assembleTab
runTab
javax.swing.JPanel runTab
Class mars.venus.NumberDisplayBaseChooser extends javax.swing.JCheckBox implements Serializable
Serialized Fields
base
int base
settingMenuItem
javax.swing.JCheckBoxMenuItem settingMenuItem
Class mars.venus.RegistersPane extends javax.swing.JTabbedPane implements Serializable
Serialized Fields
regsTab
RegistersWindow regsTab
cop1Tab
Coprocessor1Window cop1Tab
cop0Tab
Coprocessor0Window cop0Tab
mainUI
VenusUI mainUI
Class mars.venus.RegistersWindow extends javax.swing.JPanel implements Serializable
Serialized Fields
tableData
java.lang.Object[][] tableData
highlighting
boolean highlighting
highlightRow
int highlightRow
executePane
ExecutePane executePane
Class mars.venus.RepeatButton extends javax.swing.JButton implements Serializable
Serialized Fields
pressed
boolean pressed
The pressed state for this button.
repeatEnabled
boolean repeatEnabled
Flag to indicate that the button should fire events when held.
If false, the button is effectively a plain old JButton, but
there may be times when this feature might wish to be disabled.
timer
javax.swing.Timer timer
The hold-down timer for this button.
initialDelay
int initialDelay
The initial delay for this button. Hold-down time before first
timer firing. In milliseconds.
delay
int delay
The delay between timer firings for this button once the delay
period is past. In milliseconds.
modifiers
int modifiers
Holder of the modifiers used when the mouse pressed the button.
This is used for subsequently fired action events. This may change
after mouse pressed if the user moves the mouse out, releases a key
and then moves the mouse back in.
Class mars.venus.RunAssembleAction extends GuiAction implements Serializable
Class mars.venus.RunBackstepAction extends GuiAction implements Serializable
Serialized Fields
name
java.lang.String name
executePane
ExecutePane executePane
Class mars.venus.RunClearBreakpointsAction extends GuiAction implements Serializable
Class mars.venus.RunGoAction extends GuiAction implements Serializable
Serialized Fields
name
java.lang.String name
executePane
ExecutePane executePane
Class mars.venus.RunPauseAction extends GuiAction implements Serializable
Class mars.venus.RunResetAction extends GuiAction implements Serializable
Class mars.venus.RunSpeedPanel extends javax.swing.JPanel implements Serializable
Serialized Fields
speedTable
double[] speedTable
sliderLabel
javax.swing.JLabel sliderLabel
runSpeedSlider
javax.swing.JSlider runSpeedSlider
runSpeedIndex
int runSpeedIndex
Class mars.venus.RunStepAction extends GuiAction implements Serializable
Serialized Fields
name
java.lang.String name
executePane
ExecutePane executePane
Class mars.venus.RunStopAction extends GuiAction implements Serializable
Class mars.venus.RunToggleBreakpointsAction extends GuiAction implements Serializable
Class mars.venus.SettingsAddressDisplayBaseAction extends GuiAction implements Serializable
Class mars.venus.SettingsAssembleAllAction extends GuiAction implements Serializable
Class mars.venus.SettingsAssembleOnOpenAction extends GuiAction implements Serializable
Class mars.venus.SettingsDelayedBranchingAction extends GuiAction implements Serializable
Class mars.venus.SettingsEditorAction extends GuiAction implements Serializable
Serialized Fields
editorDialog
javax.swing.JDialog editorDialog
fontFamilySelector
javax.swing.JComboBox fontFamilySelector
fontStyleSelector
javax.swing.JComboBox fontStyleSelector
tabSizeSelector
javax.swing.JSlider tabSizeSelector
fontSizeDisplay
javax.swing.JTextField fontSizeDisplay
initialFontFamily
java.lang.String initialFontFamily
initialFontStyle
java.lang.String initialFontStyle
initialFontSize
java.lang.String initialFontSize
Class mars.venus.SettingsExceptionHandlerAction extends GuiAction implements Serializable
Serialized Fields
exceptionHandlerDialog
javax.swing.JDialog exceptionHandlerDialog
exceptionHandlerSetting
javax.swing.JCheckBox exceptionHandlerSetting
exceptionHandlerSelectionButton
javax.swing.JButton exceptionHandlerSelectionButton
exceptionHandlerDisplay
javax.swing.JTextField exceptionHandlerDisplay
initialSelected
boolean initialSelected
initialPathname
java.lang.String initialPathname
Class mars.venus.SettingsExtendedAction extends GuiAction implements Serializable
Class mars.venus.SettingsHighlightingAction extends GuiAction implements Serializable
Serialized Fields
highlightDialog
javax.swing.JDialog highlightDialog
backgroundButtons
javax.swing.JButton[] backgroundButtons
foregroundButtons
javax.swing.JButton[] foregroundButtons
fontButtons
javax.swing.JButton[] fontButtons
defaultCheckBoxes
javax.swing.JCheckBox[] defaultCheckBoxes
samples
javax.swing.JLabel[] samples
currentNondefaultBackground
java.awt.Color[] currentNondefaultBackground
currentNondefaultForeground
java.awt.Color[] currentNondefaultForeground
initialSettingsBackground
java.awt.Color[] initialSettingsBackground
initialSettingsForeground
java.awt.Color[] initialSettingsForeground
initialFont
java.awt.Font[] initialFont
currentFont
java.awt.Font[] currentFont
currentNondefaultFont
java.awt.Font[] currentNondefaultFont
dataHighlightButton
javax.swing.JButton dataHighlightButton
registerHighlightButton
javax.swing.JButton registerHighlightButton
currentDataHighlightSetting
boolean currentDataHighlightSetting
initialDataHighlightSetting
boolean initialDataHighlightSetting
currentRegisterHighlightSetting
boolean currentRegisterHighlightSetting
initialRegisterHighlightSetting
boolean initialRegisterHighlightSetting
Class mars.venus.SettingsLabelAction extends GuiAction implements Serializable
Class mars.venus.SettingsMemoryConfigurationAction extends GuiAction implements Serializable
Serialized Fields
configDialog
javax.swing.JDialog configDialog
fontFamilySelector
javax.swing.JComboBox fontFamilySelector
fontStyleSelector
javax.swing.JComboBox fontStyleSelector
fontSizeSelector
javax.swing.JSlider fontSizeSelector
fontSizeDisplay
javax.swing.JTextField fontSizeDisplay
thisAction
SettingsMemoryConfigurationAction thisAction
initialFontFamily
java.lang.String initialFontFamily
initialFontStyle
java.lang.String initialFontStyle
initialFontSize
java.lang.String initialFontSize
Class mars.venus.SettingsPopupInputAction extends GuiAction implements Serializable
Class mars.venus.SettingsProgramArgumentsAction extends GuiAction implements Serializable
Class mars.venus.SettingsStartAtMainAction extends GuiAction implements Serializable
Class mars.venus.SettingsValueDisplayBaseAction extends GuiAction implements Serializable
Class mars.venus.SettingsWarningsAreErrorsAction extends GuiAction implements Serializable
Class mars.venus.TextSegmentWindow extends javax.swing.JInternalFrame implements Serializable
Serialized Fields
programArgumentsPanel
javax.swing.JPanel programArgumentsPanel
programArgumentsTextField
javax.swing.JTextField programArgumentsTextField
table
javax.swing.JTable table
tableScroller
javax.swing.JScrollPane tableScroller
data
java.lang.Object[][] data
intAddresses
int[] intAddresses
addressRows
java.util.Hashtable
contentPane
java.awt.Container contentPane
tableModel
mars.venus.TextSegmentWindow.TextTableModel tableModel
tableCellFont
java.awt.Font tableCellFont
codeHighlighting
boolean codeHighlighting
breakpointsEnabled
boolean breakpointsEnabled
highlightAddress
int highlightAddress
tableModelListener
javax.swing.event.TableModelListener tableModelListener
inDelaySlot
boolean inDelaySlot
Class mars.venus.ToolAction extends javax.swing.AbstractAction implements Serializable
Serialized Fields
toolClass
java.lang.Class
Class mars.venus.VenusUI extends javax.swing.JFrame implements Serializable
Serialized Fields
mainUI
VenusUI mainUI
menu
javax.swing.JMenuBar menu
toolbar
javax.swing.JToolBar toolbar
mainPane
MainPane mainPane
registersPane
RegistersPane registersPane
registersTab
RegistersWindow registersTab
coprocessor1Tab
Coprocessor1Window coprocessor1Tab
coprocessor0Tab
Coprocessor0Window coprocessor0Tab
messagesPane
MessagesPane messagesPane
splitter
javax.swing.JSplitPane splitter
horizonSplitter
javax.swing.JSplitPane horizonSplitter
north
javax.swing.JPanel north
frameState
int frameState
editor
Editor editor
file
javax.swing.JMenu file
run
javax.swing.JMenu run
window
javax.swing.JMenu window
help
javax.swing.JMenu help
edit
javax.swing.JMenu edit
settings
javax.swing.JMenu settings
fileNew
javax.swing.JMenuItem fileNew
fileOpen
javax.swing.JMenuItem fileOpen
fileClose
javax.swing.JMenuItem fileClose
fileCloseAll
javax.swing.JMenuItem fileCloseAll
fileSave
javax.swing.JMenuItem fileSave
fileSaveAs
javax.swing.JMenuItem fileSaveAs
fileSaveAll
javax.swing.JMenuItem fileSaveAll
fileDumpMemory
javax.swing.JMenuItem fileDumpMemory
filePrint
javax.swing.JMenuItem filePrint
fileExit
javax.swing.JMenuItem fileExit
editUndo
javax.swing.JMenuItem editUndo
editRedo
javax.swing.JMenuItem editRedo
editCut
javax.swing.JMenuItem editCut
editCopy
javax.swing.JMenuItem editCopy
editPaste
javax.swing.JMenuItem editPaste
editFindReplace
javax.swing.JMenuItem editFindReplace
editSelectAll
javax.swing.JMenuItem editSelectAll
runGo
javax.swing.JMenuItem runGo
runStep
javax.swing.JMenuItem runStep
runBackstep
javax.swing.JMenuItem runBackstep
runReset
javax.swing.JMenuItem runReset
runAssemble
javax.swing.JMenuItem runAssemble
runStop
javax.swing.JMenuItem runStop
runPause
javax.swing.JMenuItem runPause
runClearBreakpoints
javax.swing.JMenuItem runClearBreakpoints
runToggleBreakpoints
javax.swing.JMenuItem runToggleBreakpoints
settingsLabel
javax.swing.JCheckBoxMenuItem settingsLabel
settingsPopupInput
javax.swing.JCheckBoxMenuItem settingsPopupInput
settingsValueDisplayBase
javax.swing.JCheckBoxMenuItem settingsValueDisplayBase
settingsAddressDisplayBase
javax.swing.JCheckBoxMenuItem settingsAddressDisplayBase
settingsExtended
javax.swing.JCheckBoxMenuItem settingsExtended
settingsAssembleOnOpen
javax.swing.JCheckBoxMenuItem settingsAssembleOnOpen
settingsAssembleAll
javax.swing.JCheckBoxMenuItem settingsAssembleAll
settingsWarningsAreErrors
javax.swing.JCheckBoxMenuItem settingsWarningsAreErrors
settingsStartAtMain
javax.swing.JCheckBoxMenuItem settingsStartAtMain
settingsDelayedBranching
javax.swing.JCheckBoxMenuItem settingsDelayedBranching
settingsProgramArguments
javax.swing.JCheckBoxMenuItem settingsProgramArguments
settingsExceptionHandler
javax.swing.JMenuItem settingsExceptionHandler
settingsEditor
javax.swing.JMenuItem settingsEditor
settingsHighlighting
javax.swing.JMenuItem settingsHighlighting
settingsMemoryConfiguration
javax.swing.JMenuItem settingsMemoryConfiguration
helpHelp
javax.swing.JMenuItem helpHelp
helpAbout
javax.swing.JMenuItem helpAbout
Undo
javax.swing.JButton Undo
Redo
javax.swing.JButton Redo
Cut
javax.swing.JButton Cut
Copy
javax.swing.JButton Copy
Paste
javax.swing.JButton Paste
FindReplace
javax.swing.JButton FindReplace
SelectAll
javax.swing.JButton SelectAll
New
javax.swing.JButton New
Open
javax.swing.JButton Open
Save
javax.swing.JButton Save
SaveAs
javax.swing.JButton SaveAs
SaveAll
javax.swing.JButton SaveAll
DumpMemory
javax.swing.JButton DumpMemory
javax.swing.JButton Print
Run
javax.swing.JButton Run
Assemble
javax.swing.JButton Assemble
Reset
javax.swing.JButton Reset
Step
javax.swing.JButton Step
Backstep
javax.swing.JButton Backstep
Stop
javax.swing.JButton Stop
Pause
javax.swing.JButton Pause
Help
javax.swing.JButton Help
fileNewAction
javax.swing.Action fileNewAction
fileOpenAction
javax.swing.Action fileOpenAction
fileCloseAction
javax.swing.Action fileCloseAction
fileCloseAllAction
javax.swing.Action fileCloseAllAction
fileSaveAction
javax.swing.Action fileSaveAction
fileSaveAsAction
javax.swing.Action fileSaveAsAction
fileSaveAllAction
javax.swing.Action fileSaveAllAction
fileDumpMemoryAction
javax.swing.Action fileDumpMemoryAction
filePrintAction
javax.swing.Action filePrintAction
fileExitAction
javax.swing.Action fileExitAction
editUndoAction
EditUndoAction editUndoAction
editRedoAction
EditRedoAction editRedoAction
editCutAction
javax.swing.Action editCutAction
editCopyAction
javax.swing.Action editCopyAction
editPasteAction
javax.swing.Action editPasteAction
editFindReplaceAction
javax.swing.Action editFindReplaceAction
editSelectAllAction
javax.swing.Action editSelectAllAction
runAssembleAction
javax.swing.Action runAssembleAction
runGoAction
javax.swing.Action runGoAction
runStepAction
javax.swing.Action runStepAction
runBackstepAction
javax.swing.Action runBackstepAction
runResetAction
javax.swing.Action runResetAction
runStopAction
javax.swing.Action runStopAction
runPauseAction
javax.swing.Action runPauseAction
runClearBreakpointsAction
javax.swing.Action runClearBreakpointsAction
runToggleBreakpointsAction
javax.swing.Action runToggleBreakpointsAction
settingsLabelAction
javax.swing.Action settingsLabelAction
settingsPopupInputAction
javax.swing.Action settingsPopupInputAction
settingsValueDisplayBaseAction
javax.swing.Action settingsValueDisplayBaseAction
settingsAddressDisplayBaseAction
javax.swing.Action settingsAddressDisplayBaseAction
settingsExtendedAction
javax.swing.Action settingsExtendedAction
settingsAssembleOnOpenAction
javax.swing.Action settingsAssembleOnOpenAction
settingsAssembleAllAction
javax.swing.Action settingsAssembleAllAction
settingsWarningsAreErrorsAction
javax.swing.Action settingsWarningsAreErrorsAction
settingsStartAtMainAction
javax.swing.Action settingsStartAtMainAction
settingsProgramArgumentsAction
javax.swing.Action settingsProgramArgumentsAction
settingsDelayedBranchingAction
javax.swing.Action settingsDelayedBranchingAction
settingsExceptionHandlerAction
javax.swing.Action settingsExceptionHandlerAction
settingsEditorAction
javax.swing.Action settingsEditorAction
settingsHighlightingAction
javax.swing.Action settingsHighlightingAction
settingsMemoryConfigurationAction
javax.swing.Action settingsMemoryConfigurationAction
helpHelpAction
javax.swing.Action helpHelpAction
helpAboutAction
javax.swing.Action helpAboutAction
Package mars.venus.editors.generic
Class mars.venus.editors.generic.GenericTextArea extends javax.swing.JTextArea implements Serializable
Serialized Fields
editPane
EditPane editPane
undoManager
javax.swing.undo.UndoManager undoManager
undoableEditListener
javax.swing.event.UndoableEditListener undoableEditListener
sourceCode
javax.swing.JTextArea sourceCode
editAreaScrollPane
javax.swing.JScrollPane editAreaScrollPane
isCompoundEdit
boolean isCompoundEdit
compoundEdit
javax.swing.undo.CompoundEdit compoundEdit
Package mars.venus.editors.jeditsyntax
Class mars.venus.editors.jeditsyntax.JEditBasedTextArea extends JEditTextArea implements Serializable
Serialized Fields
editPane
EditPane editPane
undoManager
javax.swing.undo.UndoManager undoManager
undoableEditListener
javax.swing.event.UndoableEditListener undoableEditListener
isCompoundEdit
boolean isCompoundEdit
compoundEdit
javax.swing.undo.CompoundEdit compoundEdit
sourceCode
JEditBasedTextArea sourceCode
Class mars.venus.editors.jeditsyntax.JEditTextArea extends javax.swing.JComponent implements Serializable
Serialized Fields
lineNumbersVertical
javax.swing.JScrollBar lineNumbersVertical
Creates a new JEditTextArea with the specified settings.
popupMenu
javax.swing.JPopupMenu popupMenu
painter
TextAreaPainter painter
popup
javax.swing.JPopupMenu popup
listenerList
javax.swing.event.EventListenerList listenerList
caretEvent
mars.venus.editors.jeditsyntax.JEditTextArea.MutableCaretEvent caretEvent
caretBlinks
boolean caretBlinks
caretVisible
boolean caretVisible
blink
boolean blink
editable
boolean editable
caretBlinkRate
int caretBlinkRate
firstLine
int firstLine
visibleLines
int visibleLines
electricScroll
int electricScroll
horizontalOffset
int horizontalOffset
vertical
javax.swing.JScrollBar vertical
horizontal
javax.swing.JScrollBar horizontal
scrollBarsInitialized
boolean scrollBarsInitialized
inputHandler
InputHandler inputHandler
document
SyntaxDocument document
documentHandler
mars.venus.editors.jeditsyntax.JEditTextArea.DocumentHandler documentHandler
lineSegment
javax.swing.text.Segment lineSegment
selectionStart
int selectionStart
selectionStartLine
int selectionStartLine
selectionEnd
int selectionEnd
selectionEndLine
int selectionEndLine
biasLeft
boolean biasLeft
bracketPosition
int bracketPosition
bracketLine
int bracketLine
magicCaret
int magicCaret
overwrite
boolean overwrite
rectSelect
boolean rectSelect
unredoing
boolean unredoing
Class mars.venus.editors.jeditsyntax.SyntaxDocument extends javax.swing.text.PlainDocument implements Serializable
Serialized Fields
tokenMarker
TokenMarker tokenMarker
Class mars.venus.editors.jeditsyntax.TextAreaPainter extends javax.swing.JComponent implements Serializable
Serialized Fields
currentLineIndex
int currentLineIndex
currentLineTokens
Token currentLineTokens
currentLine
javax.swing.text.Segment currentLine
textArea
JEditTextArea textArea
styles
SyntaxStyle[] styles
caretColor
java.awt.Color caretColor
selectionColor
java.awt.Color selectionColor
lineHighlightColor
java.awt.Color lineHighlightColor
bracketHighlightColor
java.awt.Color bracketHighlightColor
eolMarkerColor
java.awt.Color eolMarkerColor
blockCaret
boolean blockCaret
lineHighlight
boolean lineHighlight
bracketHighlight
boolean bracketHighlight
paintInvalid
boolean paintInvalid
eolMarkers
boolean eolMarkers
cols
int cols
rows
int rows
tabSize
int tabSize
tabSizeChars
int tabSizeChars
fm
java.awt.FontMetrics fm
highlights
TextAreaPainter.Highlight highlights
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Index
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
A B C D E F G H I J K L M N O P Q R S T U V W X Y _
A
AbstractDumpFormat – Class in mars.mips.dump
Abstract class for memory dump file formats.
AbstractDumpFormat(String, String, String, String) –
Constructor for class mars.mips.dump.AbstractDumpFormat
Typical constructor.
AbstractFontSettingDialog – Class in mars.venus
Abstract class for a font selection dialog.
AbstractFontSettingDialog(Frame, String, boolean, Font) –
Constructor for class mars.venus.AbstractFontSettingDialog
Create a new font chooser.
AbstractMarsToolAndApplication – Class in mars.tools
An abstract class that provides generic components to facilitate implementation of
a MarsTool and/or stand-alone Mars-based application.
AbstractMarsToolAndApplication(String, String) –
Constructor for class mars.tools.AbstractMarsToolAndApplication
Simple constructor
AbstractMarsToolAndApplication.ConnectButton – Class in mars.tools
AbstractMarsToolAndApplication.ConnectButton() –
Constructor for class mars.tools.AbstractMarsToolAndApplication.ConnectButton
AbstractMarsToolAndApplication.EnterKeyListener – Class in mars.tools
AbstractMarsToolAndApplication.EnterKeyListener(AbstractButton) –
Constructor for class mars.tools.AbstractMarsToolAndApplication.EnterKeyListener
AbstractSyscall – Class in mars.mips.instructions.syscalls
Abstract class that a MIPS syscall system service may extend.
AbstractSyscall(int, String) –
Constructor for class mars.mips.instructions.syscalls.AbstractSyscall
Constructor is provided so subclass may initialize instance variables.
accessIsFromGUI() –
Method in class mars.mips.hardware.AccessNotice
Query whether the access originated from MARS GUI (AWT event queue)
accessIsFromMIPS() –
Method in class mars.mips.hardware.AccessNotice
Query whether the access originated from executing MIPS program
AccessNotice – Class in mars.mips.hardware
Object provided to Observers of runtime access to MIPS memory or registers.
AccessNotice(int) –
Constructor for class mars.mips.hardware.AccessNotice
action() –
Method in class mars.tools.AbstractMarsToolAndApplication
Required MarsTool method to carry out Tool functions.
action() –
Method in class mars.tools.MarsBot
action() –
Method in interface mars.tools.MarsTool
Performs tool functions.
action() –
Method in class mars.tools.ScavengerHunt
action() –
Method in class mars.tools.ScreenMagnifier
actionPerformed(ActionEvent) –
Method in class mars.tools.BHTSimulator
Handles the actions when selecting another value in one of the two combo boxes.
actionPerformed(ActionEvent) –
Method in class mars.venus.Coprocessor1Window
Called when user clicks on a condition flag checkbox.
actionPerformed(ActionEvent) –
Method in class mars.venus.EditCopyAction
actionPerformed(ActionEvent) –
Method in class mars.venus.EditCutAction
actionPerformed(ActionEvent) –
Method in class mars.venus.EditFindReplaceAction
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.backspace
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.backspace_word
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.clip_copy
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.clip_cut
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.clip_paste
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.delete
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.delete_word
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.document_end
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.document_home
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.end
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.home
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.insert_break
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.insert_char
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.insert_tab
actionPerformed(ActionListener, String) –
Method in interface mars.venus.editors.jeditsyntax.InputHandler.MacroRecorder
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.next_char
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.next_line
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.next_page
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.next_word
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.overwrite
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.prev_char
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.prev_line
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.prev_page
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.prev_word
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.repeat
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.select_all
actionPerformed(ActionEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler.toggle_rect
actionPerformed(ActionEvent) –
Method in class mars.venus.EditPasteAction
actionPerformed(ActionEvent) –
Method in class mars.venus.EditRedoAction
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
actionPerformed(ActionEvent) –
Method in class mars.venus.EditSelectAllAction
actionPerformed(ActionEvent) –
Method in class mars.venus.EditUndoAction
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
actionPerformed(ActionEvent) –
Method in class mars.venus.FileCloseAction
actionPerformed(ActionEvent) –
Method in class mars.venus.FileCloseAllAction
actionPerformed(ActionEvent) –
Method in class mars.venus.FileDumpMemoryAction
actionPerformed(ActionEvent) –
Method in class mars.venus.FileExitAction
Exit MARS, unless one or more files have unsaved edits and user cancels.
actionPerformed(ActionEvent) –
Method in class mars.venus.FileNewAction
Code to create a new document.
actionPerformed(ActionEvent) –
Method in class mars.venus.FileOpenAction
Launch a file chooser for name of file to open
actionPerformed(ActionEvent) –
Method in class mars.venus.FilePrintAction
Uses the HardcopyWriter class developed by David Flanagan for the book
“Java Examples in a Nutshell”.
actionPerformed(ActionEvent) –
Method in class mars.venus.FileSaveAction
saves the file, if not alredy saved it will do a saveAs
actionPerformed(ActionEvent) –
Method in class mars.venus.FileSaveAllAction
actionPerformed(ActionEvent) –
Method in class mars.venus.FileSaveAsAction
actionPerformed(ActionEvent) –
Method in class mars.venus.GuiAction
does nothing by default.
actionPerformed(ActionEvent) –
Method in class mars.venus.HelpAboutAction
actionPerformed(ActionEvent) –
Method in class mars.venus.HelpHelpAction
Displays tabs with categories of information
actionPerformed(ActionEvent) –
Method in class mars.venus.RepeatButton
Handle action events.
actionPerformed(ActionEvent) –
Method in class mars.venus.RunAssembleAction
actionPerformed(ActionEvent) –
Method in class mars.venus.RunBackstepAction
perform next simulated instruction step.
actionPerformed(ActionEvent) –
Method in class mars.venus.RunClearBreakpointsAction
When this option is selected, tell text segment window to clear breakpoints in its table model.
actionPerformed(ActionEvent) –
Method in class mars.venus.RunGoAction
Action to take when GO is selected — run the MIPS program!
actionPerformed(ActionEvent) –
Method in class mars.venus.RunPauseAction
actionPerformed(ActionEvent) –
Method in class mars.venus.RunResetAction
reset GUI components and MIPS resources
actionPerformed(ActionEvent) –
Method in class mars.venus.RunStepAction
perform next simulated instruction step.
actionPerformed(ActionEvent) –
Method in class mars.venus.RunStopAction
actionPerformed(ActionEvent) –
Method in class mars.venus.RunToggleBreakpointsAction
When this option is selected, tell text segment window to clear breakpoints in its table model.
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsAddressDisplayBaseAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsAssembleAllAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsAssembleOnOpenAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsDelayedBranchingAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsEditorAction
When this action is triggered, launch a dialog to view and modify
editor settings.
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsExceptionHandlerAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsExtendedAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsHighlightingAction
When this action is triggered, launch a dialog to view and modify
editor settings.
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsLabelAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsMemoryConfigurationAction
When this action is triggered, launch a dialog to view and modify
editor settings.
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsPopupInputAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsProgramArgumentsAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsStartAtMainAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsValueDisplayBaseAction
actionPerformed(ActionEvent) –
Method in class mars.venus.SettingsWarningsAreErrorsAction
actionPerformed(ActionEvent) –
Method in class mars.venus.ToolAction
Response when tool’s item selected from menu.
add(Token) –
Method in class mars.assembler.TokenList
Adds a Token object to the end of the list.
add(ErrorMessage) –
Method in class mars.ErrorList
Add new error message to end of list.
add(ErrorMessage, int) –
Method in class mars.ErrorList
Add new error message at specified index position.
add(String, byte) –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
Adds a key-value mapping.
addArg(String) –
Method in class mars.assembler.Macro
addAsObserver() –
Method in class mars.tools.AbstractMarsToolAndApplication
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
addAsObserver(int, int) –
Method in class mars.tools.AbstractMarsToolAndApplication
Add this app/tool as an Observer of the specified subrange of MIPS memory.
addAsObserver(Register) –
Method in class mars.tools.AbstractMarsToolAndApplication
Add this app/tool as an Observer of the specified MIPS register.
addAsObserver() –
Method in class mars.tools.BHTSimulator
Adds BHTSimulator as observer of the text segment.
addAsObserver() –
Method in class mars.tools.BitmapDisplay
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
addAsObserver() –
Method in class mars.tools.DigitalLabSim
addAsObserver() –
Method in class mars.tools.FloatRepresentation
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
addAsObserver() –
Method in class mars.tools.InstructionCounter
addAsObserver() –
Method in class mars.tools.InstructionStatistics
registers the tool as observer for the text segment of the MIPS program
addAsObserver() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
addAsObserver() –
Method in class mars.tools.MemoryReferenceVisualization
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
addCaretListener(CaretListener) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Adds a caret change listener to this text area.
addConditionFlagClear(int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addConditionFlagSet(int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addCoprocessor0Restore(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addCoprocessor1Restore(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addCustomHighlight(TextAreaPainter.Highlight) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Adds a custom highlight painter.
addDefaultKeyBindings() –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Sets up the default key bindings.
addDefaultKeyBindings() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Adds the default key bindings to this input handler.
addDoNothing(int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addKeyBinding(String, ActionListener) –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Adds a key binding to this input handler.
addKeyBinding(String, ActionListener) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Adds a key binding to this input handler.
addLabel(String) –
Method in class mars.assembler.Macro
addMemoryRestoreByte(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addMemoryRestoreHalf(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addMemoryRestoreRawWord(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addMemoryRestoreWord(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addObserver(Observer) –
Method in class mars.mips.hardware.Memory
Method to accept registration from observer for any memory address.
addObserver(Observer, int) –
Method in class mars.mips.hardware.Memory
Method to accept registration from observer for specific address.
addObserver(Observer, int, int) –
Method in class mars.mips.hardware.Memory
Method to accept registration from observer for specific address range.
addPCRestore(int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addProgramArgumentsPanel() –
Method in class mars.venus.TextSegmentWindow
addRegisterFileRestore(int, int) –
Method in class mars.simulator.BackStepper
Add a new “back step” (the undo action) to the stack.
addRegistersObserver(Observer) –
Static method in class mars.mips.hardware.Coprocessor0
Each individual register is a separate object and Observable.
addRegistersObserver(Observer) –
Static method in class mars.mips.hardware.Coprocessor1
Each individual register is a separate object and Observable.
addRegistersObserver(Observer) –
Static method in class mars.mips.hardware.RegisterFile
Each individual register is a separate object and Observable.
ADDRESS_EXCEPTION_LOAD –
Static variable in class mars.simulator.Exceptions
ADDRESS_EXCEPTION_STORE –
Static variable in class mars.simulator.Exceptions
AddressErrorException – Exception in mars.mips.hardware
Represents MIPS AddressErrorException.
AddressErrorException(String, int, int) –
Constructor for exception mars.mips.hardware.AddressErrorException
Constructor for the AddressErrorException class
addStopListener(Simulator.StopListener) –
Method in class mars.simulator.Simulator
addSymbol(Token, int, boolean, ErrorList) –
Method in class mars.assembler.SymbolTable
Adds a Symbol object into the array of Symbols.
addToken(int, byte) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Adds a token to the token list.
addUndoableEdit(UndoableEdit) –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Adds an undoable edit to this document’s undo list.
aff –
Variable in class mars.tools.DigitalLabSim.SevenSegmentDisplay
ALIGN –
Static variable in class mars.assembler.Directives
alignToWordBoundary(int) –
Static method in class mars.mips.hardware.Memory
Utility method to align given address to next full word boundary, if not already
aligned.
allocateBytesFromHeap(int) –
Method in class mars.mips.hardware.Memory
Returns the next available word-aligned heap address.
apply(Font) –
Method in class mars.venus.AbstractFontSettingDialog
Apply the given font.
APPLY_TOOL_TIP_TEXT –
Static variable in class mars.venus.SettingsHighlightingAction
ARITHMETIC_OVERFLOW_EXCEPTION –
Static variable in class mars.simulator.Exceptions
ASCII –
Static variable in class mars.assembler.Directives
ASCII –
Static variable in class mars.venus.NumberDisplayBaseChooser
ASCII_NON_PRINT –
Static variable in class mars.Globals
Placeholder for non-printable ASCII codes
ASCII_TABLE –
Static variable in class mars.Globals
Array of strings to display for ASCII codes in ASCII display of data segment.
AsciiTextDumpFormat – Class in mars.mips.dump
Class that represents the “ASCII text” memory dump format.
AsciiTextDumpFormat() –
Constructor for class mars.mips.dump.AsciiTextDumpFormat
Constructor.
ASCIIZ –
Static variable in class mars.assembler.Directives
assemble(MIPSprogram, boolean) –
Method in class mars.assembler.Assembler
Parse and generate machine code for the given MIPS program.
assemble(MIPSprogram, boolean, boolean) –
Method in class mars.assembler.Assembler
Parse and generate machine code for the given MIPS program.
assemble(ArrayList, boolean) –
Method in class mars.assembler.Assembler
Parse and generate machine code for the given MIPS program.
assemble(ArrayList, boolean, boolean) –
Method in class mars.assembler.Assembler
Parse and generate machine code for the given MIPS program.
assemble(ArrayList, boolean) –
Method in class mars.MIPSprogram
Assembles the MIPS source program.
assemble(ArrayList, boolean, boolean) –
Method in class mars.MIPSprogram
Assembles the MIPS source program.
ASSEMBLE_ALL_ENABLED –
Static variable in class mars.Settings
Flag to determine whether only the current editor source file (enabled false) or
all files in its directory (enabled true) will be assembled when assembly is selected.
ASSEMBLE_ON_OPEN_ENABLED –
Static variable in class mars.Settings
Flag to determine whether or not a file is immediately and automatically assembled
upon opening.
Assembler – Class in mars.assembler
An Assembler is capable of assembling a MIPS program.
Assembler() –
Constructor for class mars.assembler.Assembler
AUTO_INDENT –
Static variable in class mars.Settings
Flag to control whether or not language-aware editor will use auto-indent feature
B
BACKSPACE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
BACKSPACE_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
backStep() –
Method in class mars.simulator.BackStepper
Carry out a “back step”, which will undo the latest execution step.
BackStepper – Class in mars.simulator
Used to “step backward” through execution, undoing each instruction.
BackStepper() –
Constructor for class mars.simulator.BackStepper
Create a fresh BackStepper.
backSteppingEnabled() –
Method in class mars.MIPSprogram
Returns status of BackStepper associated with this program.
BARE_MACHINE_ENABLED –
Static variable in class mars.Settings
Flag to determine whether or not program being assembled is limited to
using register numbers instead of names.
BasicInstruction – Class in mars.mips.instructions
Class to represent a basic instruction in the MIPS instruction set.
BasicInstruction(String, String, BasicInstructionFormat, String, SimulationCode) –
Constructor for class mars.mips.instructions.BasicInstruction
BasicInstruction constructor.
BasicInstruction(String, BasicInstructionFormat, String, SimulationCode) –
Constructor for class mars.mips.instructions.BasicInstruction
BasicInstructionFormat – Class in mars.mips.instructions
These are the MIPS-defined formats of basic machine instructions.
beginCompoundEdit() –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Starts a compound edit that can be undone in one operation.
beginMacro(Token) –
Method in class mars.assembler.MacroPool
This method will be called by parser when reached .macro
directive.
Instantiates a new Macro object and stores it in MacroPool.current
.
BHT_DEFAULT_HISTORY –
Static variable in class mars.tools.BHTSimulator
constant for the default history size
BHT_DEFAULT_INITVAL –
Static variable in class mars.tools.BHTSimulator
constant for the default inital value
BHT_DEFAULT_SIZE –
Static variable in class mars.tools.BHTSimulator
constant for the default size of the BHT
BHT_DO_NOT_TAKE_BRANCH –
Static variable in class mars.tools.BHTSimGUI
constant for the String representing “do not take the branch”
BHT_HEADING –
Static variable in class mars.tools.BHTSimulator
the heading of the tool
BHT_NAME –
Static variable in class mars.tools.BHTSimulator
the name of the tool
BHT_TAKE_BRANCH –
Static variable in class mars.tools.BHTSimGUI
constant for the String representing “take the branch”
BHT_VERSION –
Static variable in class mars.tools.BHTSimulator
the version of the tool
BHTableModel – Class in mars.tools
Simulates the actual functionality of a Branch History Table (BHT).
BHTableModel(int, int, boolean) –
Constructor for class mars.tools.BHTableModel
Constructs a new BHT with given number of entries and history size.
BHTEntry – Class in mars.tools
Represents a single entry of the Branch History Table.
BHTEntry(int, boolean) –
Constructor for class mars.tools.BHTEntry
Constructs a BHT entry with a given history size.
BHTSimGUI – Class in mars.tools
Represents the GUI of the BHT Simulator Tool.
BHTSimGUI() –
Constructor for class mars.tools.BHTSimGUI
Creates the GUI components of the BHT Simulator
The GUI is a subclass of JPanel which is integrated in the GUI of the MARS tool
BHTSimulator – Class in mars.tools
A MARS tool for simulating branch prediction with a Branch History Table (BHT)
BHTSimulator() –
Constructor for class mars.tools.BHTSimulator
Creates a BHT Simulator with given name and heading.
biasLeft –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
BIG_ENDIAN –
Static variable in class mars.mips.hardware.Memory
Constant representing byte order of each memory word.
Binary – Class in mars.util
Some utility methods for working with binary representations.
Binary() –
Constructor for class mars.util.Binary
BinaryDumpFormat – Class in mars.mips.dump
Class that represents the “binary” memory dump format.
BinaryDumpFormat() –
Constructor for class mars.mips.dump.BinaryDumpFormat
Constructor.
binaryStringToHexDigit(String) –
Static method in class mars.util.Binary
Translate String consisting of ‘1’s and ‘0’s into char equivalent of the corresponding
hexadecimal digit.
binaryStringToHexString(String) –
Static method in class mars.util.Binary
Translate String consisting of ‘1’s and ‘0’s into String equivalent of the corresponding
hexadecimal value.
binaryStringToInt(String) –
Static method in class mars.util.Binary
Translate String consisting of ‘1’s and ‘0’s into an int value having that binary representation.
binaryStringToLong(String) –
Static method in class mars.util.Binary
Translate String consisting of ‘1’s and ‘0’s into a long value having that binary representation.
BinaryTextDumpFormat – Class in mars.mips.dump
Class that represents the “binary text” memory dump format.
BinaryTextDumpFormat() –
Constructor for class mars.mips.dump.BinaryTextDumpFormat
Constructor.
BitmapDisplay – Class in mars.tools
Bitmapp display simulator.
BitmapDisplay(String, String) –
Constructor for class mars.tools.BitmapDisplay
Simple constructor, likely used to run a stand-alone bitmap display tool.
BitmapDisplay() –
Constructor for class mars.tools.BitmapDisplay
Simple constructor, likely used by the MARS Tools menu mechanism
bitValue(int, int) –
Static method in class mars.util.Binary
Returns the bit value of the given bit position of the given int value.
bitValue(long, int) –
Static method in class mars.util.Binary
Returns the bit value of the given bit position of the given long value.
blink –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
blinkCaret() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Blinks the caret.
blockCaret –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
blockCaret –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
BOTTOM –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
bracketHighlight –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
bracketHighlight –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
bracketHighlightColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
bracketHighlightColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
bracketLine –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
bracketPosition –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
BREAKPOINT –
Static variable in class mars.simulator.Simulator
various reasons for simulate to end…
BREAKPOINT_EXCEPTION –
Static variable in class mars.simulator.Exceptions
buildBasicStatementFromBasicInstruction(ErrorList) –
Method in class mars.ProgramStatement
Given specification of BasicInstruction for this operator, build the
corresponding assembly statement in basic assembly format (e.g.
buildButtonAreaMarsTool() –
Method in class mars.tools.AbstractMarsToolAndApplication
The MarsTool default set of controls has one row of 3 buttons.
buildButtonAreaStandAlone() –
Method in class mars.tools.AbstractMarsToolAndApplication
The Mars stand-alone app default set of controls has two rows of controls.
buildConfigurationCollection() –
Static method in class mars.mips.hardware.MemoryConfigurations
buildControlPanel() –
Method in class mars.venus.AbstractFontSettingDialog
buildDialogPanel() –
Method in class mars.venus.AbstractFontSettingDialog
buildDisplayArea() –
Method in class mars.tools.FloatRepresentation
buildHeadingArea() –
Method in class mars.tools.AbstractMarsToolAndApplication
Constructs GUI header as label with default positioning and font.
buildMachineStatementFromBasicStatement(ErrorList) –
Method in class mars.ProgramStatement
Given the current statement in Basic Assembly format (see above), build the
32-bit binary machine code statement.
buildMainDisplayArea() –
Method in class mars.tools.AbstractMarsToolAndApplication
Abstract method that must be instantiated by subclass to build the main display area
of the GUI.
buildMainDisplayArea() –
Method in class mars.tools.BHTSimulator
Creates a GUI and initialize the GUI with the default values.
buildMainDisplayArea() –
Method in class mars.tools.BitmapDisplay
Method that constructs the main display area.
buildMainDisplayArea() –
Method in class mars.tools.CacheSimulator
Method that constructs the main cache simulator display area.
buildMainDisplayArea() –
Method in class mars.tools.DigitalLabSim
buildMainDisplayArea() –
Method in class mars.tools.FloatRepresentation
Method that constructs the main display area.
buildMainDisplayArea() –
Method in class mars.tools.InstructionCounter
buildMainDisplayArea() –
Method in class mars.tools.InstructionStatistics
creates the display area for the tool as required by the API
buildMainDisplayArea() –
Method in class mars.tools.IntroToTools
Implementation of the inherited abstract method to build the main
display area of the GUI.
buildMainDisplayArea() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Method that constructs the main display area.
buildMainDisplayArea() –
Method in class mars.tools.MemoryReferenceVisualization
Method that constructs the main display area.
buildToolsMenu() –
Method in class mars.venus.ToolLoader
Called in VenusUI to build its Tools menu.
button –
Variable in class mars.tools.DigitalLabSim.HexaKeyboard
BYTE –
Static variable in class mars.assembler.Directives
BYTE_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS byte is 1.
C
CacheSimulator – Class in mars.tools
A data cache simulator.
CacheSimulator(String, String) –
Constructor for class mars.tools.CacheSimulator
Simple constructor, likely used to run a stand-alone cache simulator.
CacheSimulator() –
Constructor for class mars.tools.CacheSimulator
Simple constructor, likely used by the MARS Tools menu mechanism
CANCEL_TOOL_TIP_TEXT –
Static variable in class mars.venus.SettingsHighlightingAction
CARET_BLINK_RATE –
Static variable in class mars.Settings
Caret blink rate in milliseconds, 0 means don’t blink.
caretBlinkRate –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
caretBlinkRate –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
caretBlinks –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
caretBlinks –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
caretColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
caretColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
caretEvent –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
caretTimer –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
caretUpdate(CaretEvent) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Display caret position on the edit pane.
caretVisible –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
caretVisible –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
CAUSE –
Static variable in class mars.mips.hardware.Coprocessor0
CENTER –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
changeResetValue(int) –
Method in class mars.mips.hardware.Register
Change the register’s reset value; the value to which it will be
set when resetValue() is called.
CHAR_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS character is 1.
charnum –
Variable in class mars.venus.HardcopyWriter
chars_per_line –
Variable in class mars.venus.HardcopyWriter
chars_per_tab –
Variable in class mars.venus.HardcopyWriter
charwidth –
Variable in class mars.venus.HardcopyWriter
clear() –
Method in class mars.assembler.SymbolTable
Creates a fresh arrayList for a new table.
clear() –
Method in class mars.mips.hardware.Memory
Explicitly clear the contents of memory.
clearAllBreakpoints() –
Method in class mars.venus.TextSegmentWindow
Clears all breakpoints that have been set since last assemble, and
updates the display of the breakpoint column.
clearBit(int, int) –
Static method in class mars.util.Binary
Sets the specified bit of the specified value to 0, and returns the result.
clearConditionFlag(int) –
Static method in class mars.mips.hardware.Coprocessor1
Set condition flag to 0 (false).
clearConditionFlags() –
Static method in class mars.mips.hardware.Coprocessor1
Clear all condition flags (0-7).
clearHighlighting() –
Method in class mars.venus.Coprocessor0Window
Clear highlight background color from any row currently highlighted.
clearHighlighting() –
Method in class mars.venus.Coprocessor1Window
Clear highlight background color from any row currently highlighted.
clearHighlighting() –
Method in class mars.venus.DataSegmentWindow
Clear highlight background color from any cell currently highlighted.
clearHighlighting() –
Method in class mars.venus.RegistersWindow
Clear highlight background color from any cell currently highlighted.
clearPane() –
Method in class mars.venus.ExecutePane
Clears out all components of the Execute tab: text segment
display, data segment display, label display and register display.
clearWindow() –
Method in class mars.venus.Coprocessor0Window
Reset and redisplay registers
clearWindow() –
Method in class mars.venus.Coprocessor1Window
Reset and redisplay registers.
clearWindow() –
Method in class mars.venus.DataSegmentWindow
Removes the table from its frame, typically done when a file is closed.
clearWindow() –
Method in class mars.venus.LabelsWindow
Clear the window
clearWindow() –
Method in class mars.venus.RegistersWindow
clear and redisplay registers
clearWindow() –
Method in class mars.venus.TextSegmentWindow
remove all components
CLIFF_TERMINATION –
Static variable in class mars.simulator.Simulator
CLIP_COPY –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
CLIP_CUT –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
CLIP_PASTE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
clone() –
Method in class mars.assembler.TokenList
Makes clone (shallow copy) of this token list object.
close() –
Method in class mars.venus.Editor
Perform “close” operation on current tab’s file.
close() –
Method in class mars.venus.HardcopyWriter
This is the close( ) method that all Writer subclasses must implement.
CLOSE_TOOL_TIP_TEXT –
Static variable in class mars.venus.SettingsHighlightingAction
closeAll() –
Method in class mars.venus.Editor
Close all currently open files.
closeAllFiles() –
Method in class mars.venus.EditTabbedPane
Carries out all necessary operations to implement
the Close All operation from the File menu.
closeCurrentFile() –
Method in class mars.venus.EditTabbedPane
Carries out all necessary operations to implement
the Close operation from the File menu.
closeDialog() –
Method in class mars.venus.AbstractFontSettingDialog
closeFile(int) –
Static method in class mars.util.SystemIO
Close the file with specified file descriptor
COLON –
Static variable in class mars.assembler.TokenTypes
COLOR_PREDICTION_CORRECT –
Static variable in class mars.tools.BHTSimGUI
constant for the color to signal a correct prediction
COLOR_PREDICTION_INCORRECT –
Static variable in class mars.tools.BHTSimGUI
constant for the color to signal a misprediction
COLOR_PREPREDICTION –
Static variable in class mars.tools.BHTSimGUI
constant for the color that highlights the current BHT entry
cols –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
cols –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
COMMENT –
Static variable in class mars.assembler.TokenTypes
COMMENT1 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Comment 1 token id.
COMMENT2 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Comment 2 token id.
commitMacro(Token) –
Method in class mars.assembler.MacroPool
This method will be called by parser when reached .end_macro
directive.
connect() –
Method in class mars.tools.AbstractMarsToolAndApplication.ConnectButton
connectButton –
Variable in class mars.tools.AbstractMarsToolAndApplication
construct() –
Method in class mars.simulator.SwingWorker
Compute the value to be returned by the get method.
convertLineColumnToStreamPosition(int, int) –
Method in class mars.venus.EditPane
Given line and column (position in the line) numbers, calculate
its byte stream position in text being edited.
convertStreamPositionToLineColumn(int) –
Method in class mars.venus.EditPane
Coprocessor0 – Class in mars.mips.hardware
Represents Coprocessor 0.
Coprocessor0() –
Constructor for class mars.mips.hardware.Coprocessor0
Coprocessor0Window – Class in mars.venus
Sets up a window to display registers in the UI.
Coprocessor0Window() –
Constructor for class mars.venus.Coprocessor0Window
Constructor which sets up a fresh window with a table that contains the register values.
Coprocessor1 – Class in mars.mips.hardware
Represents Coprocessor 1, the Floating Point Unit (FPU)
Coprocessor1() –
Constructor for class mars.mips.hardware.Coprocessor1
Coprocessor1Window – Class in mars.venus
Sets up a window to display Coprocessor 1 registers in the Registers pane of the UI.
Coprocessor1Window() –
Constructor for class mars.venus.Coprocessor1Window
Constructor which sets up a fresh window with a table that contains the register values.
copy() –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Returns a copy of this input handler that shares the same
key bindings.
copy() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Returns a copy of this input handler that shares the same
key bindings.
copy() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Places the selected text into the clipboard.
copy() –
Method in interface mars.venus.editors.MARSTextEditingArea
copyrightHolders –
Static variable in class mars.Globals
MARS copyright holders
copyrightYears –
Static variable in class mars.Globals
MARS copyright years
copyText() –
Method in class mars.venus.EditPane
copy currently-selected text into clipboard
counter –
Variable in class mars.tools.InstructionCounter
Number of instructions executed until now.
counterI –
Variable in class mars.tools.InstructionCounter
Number of instructions of type I.
counterJ –
Variable in class mars.tools.InstructionCounter
Number of instructions of type J.
counterR –
Variable in class mars.tools.InstructionCounter
Number of instructions of type R.
countObservers() –
Method in class mars.mips.hardware.Memory
Return number of observers
createExampleTokenList() –
Method in class mars.mips.instructions.Instruction
Used to build a token list from the example instruction
provided as constructor argument.
createFontFromStringValues(String, String, String) –
Static method in class mars.util.EditorFont
Creates a new Font object based on the given String specifications.
createMacroPool() –
Method in class mars.MIPSprogram
Instantiates a new MacroPool and sends reference of this
MIPSprogram to it
createParsedList() –
Method in class mars.MIPSprogram
Produces new empty list to hold parsed source code statements.
currentFont –
Variable in class mars.venus.AbstractFontSettingDialog
cut() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Deletes the selected text from the text area and places it
into the clipboard.
cut() –
Method in interface mars.venus.editors.MARSTextEditingArea
cutText() –
Method in class mars.venus.EditPane
cut currently-selected text into clipboard
D
DATA –
Static variable in class mars.assembler.Directives
DATA_SEGMENT_HIGHLIGHTING –
Static variable in class mars.Settings
Flag to control whether or not highlighting is applied to data segment window
DATA_SYMBOL –
Static variable in class mars.assembler.Symbol
dataBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for storage of non-global static data in data segment: 0x10010000 (from SPIM)
DATASEGMENT_HIGHLIGHT_BACKGROUND –
Static variable in class mars.Settings
RGB color for text segment highlighted background
DATASEGMENT_HIGHLIGHT_FONT –
Static variable in class mars.Settings
Font for text segment highlighted background
DATASEGMENT_HIGHLIGHT_FOREGROUND –
Static variable in class mars.Settings
RGB color for text segment highlighted foreground
dataSegmentBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for (user) data segment: 0x10000000
dataSegmentLimitAddress –
Static variable in class mars.mips.hardware.Memory
DataSegmentWindow – Class in mars.venus
Represents the Data Segment window, which is a type of JInternalFrame.
DataSegmentWindow(NumberDisplayBaseChooser[]) –
Constructor for class mars.venus.DataSegmentWindow
Constructor for the Data Segment window.
DataTypes – Class in mars.assembler
Information about MIPS data types.
DataTypes() –
Constructor for class mars.assembler.DataTypes
debug –
Static variable in class mars.Globals
Flag to determine whether or not to produce internal debugging information.
DECIMAL –
Static variable in class mars.venus.NumberDisplayBaseChooser
DEFAULT_SIZE –
Static variable in class mars.util.EditorFont
DEFAULT_STATUS_VALUE –
Static variable in class mars.mips.hardware.Coprocessor0
DEFAULT_STYLE_INT –
Static variable in class mars.util.EditorFont
DEFAULT_STYLE_STRING –
Static variable in class mars.util.EditorFont
defaultBooleanSettingsValues –
Static variable in class mars.Settings
Last resort default values for boolean settings; will use only if neither
the Preferences nor the properties file work.
DefaultInputHandler – Class in mars.venus.editors.jeditsyntax
The default input handler.
DefaultInputHandler() –
Constructor for class mars.venus.editors.jeditsyntax.DefaultInputHandler
Creates a new input handler with no key bindings defined.
defaultMaxSteps –
Static variable in class mars.venus.RunGoAction
DELAYED_BRANCHING_ENABLED –
Static variable in class mars.Settings
Flag to determine whether or not delayed branching is in effect at MIPS execution.
DelayedBranch – Class in mars.simulator
Represents a (potential) delayed branch.
DelayedBranch() –
Constructor for class mars.simulator.DelayedBranch
DELETE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
DELETE_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
deleteAsObserver() –
Method in class mars.tools.AbstractMarsToolAndApplication
Delete this app/tool as an Observer of MIPS Observables (memory and registers).
deleteAsObserver(Register) –
Method in class mars.tools.AbstractMarsToolAndApplication
Delete this app/tool as an Observer of the specified MIPS register
deleteAsObserver() –
Method in class mars.tools.FloatRepresentation
Delete this app/tool as an Observer of the attached register.
deleteLines(int, int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Informs the token marker that line have been deleted from
the document.
deleteObserver(Observer) –
Method in class mars.mips.hardware.Memory
Remove specified memory observers
deleteObservers() –
Method in class mars.mips.hardware.Memory
Remove all memory observers
deleteRegistersObserver(Observer) –
Static method in class mars.mips.hardware.Coprocessor0
Each individual register is a separate object and Observable.
deleteRegistersObserver(Observer) –
Static method in class mars.mips.hardware.Coprocessor1
Each individual register is a separate object and Observable.
deleteRegistersObserver(Observer) –
Static method in class mars.mips.hardware.RegisterFile
Each individual register is a separate object and Observable.
DELIMITER –
Static variable in class mars.assembler.TokenTypes
description –
Variable in class mars.mips.instructions.Instruction
Description of instruction for display to user
descriptionDetailSeparator –
Static variable in class mars.venus.HelpHelpAction
Separates Instruction name descriptor from detailed (operation) description
in help string.
DigitalLabSim – Class in mars.tools
DigitalLabSim(String, String) –
Constructor for class mars.tools.DigitalLabSim
DigitalLabSim() –
Constructor for class mars.tools.DigitalLabSim
DigitalLabSim.HexaKeyboard – Class in mars.tools
DigitalLabSim.HexaKeyboard() –
Constructor for class mars.tools.DigitalLabSim.HexaKeyboard
DigitalLabSim.HexaKeyboard.EcouteurClick – Class in mars.tools
DigitalLabSim.HexaKeyboard.EcouteurClick(int) –
Constructor for class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
DigitalLabSim.OneSecondCounter – Class in mars.tools
DigitalLabSim.OneSecondCounter() –
Constructor for class mars.tools.DigitalLabSim.OneSecondCounter
DigitalLabSim.SevenSegmentDisplay – Class in mars.tools
DigitalLabSim.SevenSegmentDisplay(char) –
Constructor for class mars.tools.DigitalLabSim.SevenSegmentDisplay
DigitalLabSim.SevenSegmentPanel – Class in mars.tools
DigitalLabSim.SevenSegmentPanel() –
Constructor for class mars.tools.DigitalLabSim.SevenSegmentPanel
DIRECTIVE –
Static variable in class mars.assembler.TokenTypes
Directives – Class in mars.assembler
Class representing MIPS assembler directives.
discardAllUndoableEdits() –
Method in class mars.venus.editors.generic.GenericTextArea
Tell UndoManager to discard all its collected undoable edits.
discardAllUndoableEdits() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Get rid of any accumulated undoable edits.
discardAllUndoableEdits() –
Method in interface mars.venus.editors.MARSTextEditingArea
discardAllUndoableEdits() –
Method in class mars.venus.EditPane
Get rid of any accumulated undoable edits.
disconnect() –
Method in class mars.tools.AbstractMarsToolAndApplication.ConnectButton
dispatchEventToMenu(KeyEvent) –
Method in class mars.venus.VenusUI
Send keyboard event to menu for possible processing.
display –
Variable in class mars.tools.DigitalLabSim.SevenSegmentPanel
DISPLAY_ADDRESSES_IN_HEX –
Static variable in class mars.Settings
Default setting for displaying addresses and values in hexidecimal in the Execute
pane.
DISPLAY_VALUES_IN_HEX –
Static variable in class mars.Settings
displayCaretPosition(int) –
Method in class mars.venus.EditPane
Update the caret position label on the editor’s border to
display the current line and column.
displayCaretPosition(Point) –
Method in class mars.venus.EditPane
Display cursor coordinates
DIVIDE_BY_ZERO_EXCEPTION –
Static variable in class mars.simulator.Exceptions
document –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
document –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
DOCUMENT_END –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
DOCUMENT_HOME –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
documentChanged(DocumentEvent) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
documentHandler –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
doFindText(String, boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Finds next occurrence of text in a forward search of a string.
doFindText(String, boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Finds next occurrence of text in a forward search of a string.
doFindText(String, boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
doFindText(String, boolean) –
Method in class mars.venus.EditPane
Finds next occurrence of text in a forward search of a string.
doReplace(String, String, boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Finds and replaces next occurrence of text in a string in a forward search.
doReplace(String, String, boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Finds and replaces next occurrence of text in a string in a forward search.
doReplace(String, String, boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
doReplace(String, String, boolean) –
Method in class mars.venus.EditPane
Finds and replaces next occurrence of text in a string in a forward search.
doReplaceAll(String, String, boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Finds and replaces ALL occurrences of text in a string in a forward search.
doReplaceAll(String, String, boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Finds and replaces ALL occurrences of text in a string in a forward search.
doReplaceAll(String, String, boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
doReplaceAll(String, String, boolean) –
Method in class mars.venus.EditPane
Finds and replaces ALL occurrences of text in a string in a forward search.
DOUBLE –
Static variable in class mars.assembler.Directives
DOUBLE_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS double is 8.
doublewordAligned(int) –
Static method in class mars.mips.hardware.Memory
Utility to determine if given address is doubleword-aligned.
DumpFormat – Interface in mars.mips.dump
Interface for memory dump file formats.
DumpFormatLoader – Class in mars.mips.dump
DumpFormatLoader() –
Constructor for class mars.mips.dump.DumpFormatLoader
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.AbstractDumpFormat
Write MIPS memory contents according to the
specification for this format.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.AsciiTextDumpFormat
Interpret MIPS memory contents as ASCII characters.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.BinaryDumpFormat
Write MIPS memory contents in pure binary format.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.BinaryTextDumpFormat
Write MIPS memory contents in binary text format.
dumpMemoryRange(File, int, int) –
Method in interface mars.mips.dump.DumpFormat
Write MIPS memory contents according to the
specification for this format.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.HexTextDumpFormat
Write MIPS memory contents in hexadecimal text format.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.IntelHexDumpFormat
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.MIFDumpFormat
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
dumpMemoryRange(File, int, int) –
Method in class mars.mips.dump.SegmentWindowDumpFormat
Write MIPS memory contents in Segment Window format.
dumpTriples –
Static variable in class mars.util.MemoryDump
A list of segmentname/dumpformat/filename triples which should be dumped
E
editable –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
editable –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
EditCopyAction – Class in mars.venus
Action for the Edit -> Copy menu item
EditCopyAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditCopyAction
EditCutAction – Class in mars.venus
Action for the Edit -> Cut menu item
EditCutAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditCutAction
EDITED –
Static variable in class mars.venus.FileStatus
open/saved edit window with unsaved edits
EditFindReplaceAction – Class in mars.venus
Action for the Edit -> Find/Replace menu item
EditFindReplaceAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditFindReplaceAction
Editor – Class in mars.venus
Manage the file being edited.
Editor(VenusUI) –
Constructor for class mars.venus.Editor
Create editor.
EDITOR_CURRENT_LINE_HIGHLIGHTING –
Static variable in class mars.Settings
Flag to control whether or not editor will highlight the line currently being edited
EDITOR_FONT –
Static variable in class mars.Settings
Font for the text editor
EDITOR_LINE_NUMBERS_DISPLAYED –
Static variable in class mars.Settings
Flag to determine whether or not the editor will display line numbers.
EDITOR_POPUP_PREFIX_LENGTH –
Static variable in class mars.Settings
Number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled)
EDITOR_TAB_SIZE –
Static variable in class mars.Settings
Editor tab size in characters.
EditorFont – Class in mars.util
Specialized Font class designed to be used by both the
settings menu methods and the Settings class.
EditorFont() –
Constructor for class mars.util.EditorFont
EditPane – Class in mars.venus
Represents one file opened for editing.
EditPane(VenusUI) –
Constructor for class mars.venus.EditPane
Constructor for the EditPane class.
EditPasteAction – Class in mars.venus
Action for the Edit -> Paste menu item
EditPasteAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditPasteAction
EditRedoAction – Class in mars.venus
Action for the Edit -> Redo menu item
EditRedoAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditRedoAction
EditSelectAllAction – Class in mars.venus
Action for the Edit -> Copy menu item
EditSelectAllAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditSelectAllAction
editsSavedOrAbandoned() –
Method in class mars.venus.Editor
Called by several of the Action objects when there is potential
loss of editing changes.
editsSavedOrAbandoned() –
Method in class mars.venus.EditTabbedPane
Check whether file has unsaved edits and, if so, check with user about saving them.
EditTabbedPane – Class in mars.venus
Tabbed pane for the editor.
EditTabbedPane(VenusUI, Editor, MainPane) –
Constructor for class mars.venus.EditTabbedPane
Constructor for the EditTabbedPane class.
EditUndoAction – Class in mars.venus
Action for the Edit -> Undo menu item
EditUndoAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.EditUndoAction
electricScroll –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
electricScroll –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
empty() –
Method in class mars.simulator.BackStepper
Test whether there are steps that can be undone.
enabled() –
Method in class mars.simulator.BackStepper
Determine whether execution “undo” steps are currently being recorded.
END –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
END –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The token type, that along with a length of 0
marks the end of the token list.
END_MACRO –
Static variable in class mars.assembler.Directives
endCompoundEdit() –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Ends a compound edit that can be undone in one operation.
ensureCapacity(int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Ensures that the lineInfo array can contain the
specified index.
eolMarkerColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
eolMarkerColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
eolMarkers –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
eolMarkers –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
EPC –
Static variable in class mars.mips.hardware.Coprocessor0
equals(Object) –
Method in class mars.assembler.Macro
EQV –
Static variable in class mars.assembler.Directives
ERROR –
Static variable in class mars.assembler.TokenTypes
ERROR –
Static variable in class mars.ErrorMessage
Constant to indicate this message is error not warning
ERROR_MESSAGE_PREFIX –
Static variable in class mars.ErrorList
errorCount() –
Method in class mars.ErrorList
Count of number of error messages in list.
errorLimitExceeded() –
Method in class mars.ErrorList
Check to see if error limit has been exceeded.
ErrorList – Class in mars
Maintains list of generated error messages, regardless of source (tokenizing, parsing,
assembly, execution).
ErrorList() –
Constructor for class mars.ErrorList
Constructor for ErrorList
ErrorMessage – Class in mars
Represents occurrance of an error detected during tokenizing, assembly or simulation.
ErrorMessage(String, int, int, String) –
Constructor for class mars.ErrorMessage
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
ErrorMessage(String, int, int, String, String) –
Constructor for class mars.ErrorMessage
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
ErrorMessage(boolean, String, int, int, String, String) –
Constructor for class mars.ErrorMessage
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
ErrorMessage(MIPSprogram, int, int, String) –
Constructor for class mars.ErrorMessage
Constructor for ErrorMessage.
ErrorMessage(boolean, MIPSprogram, int, int, String) –
Constructor for class mars.ErrorMessage
Constructor for ErrorMessage.
errors() –
Method in exception mars.ProcessingException
Produce the list of error messages.
errorsOccurred() –
Method in class mars.ErrorList
Determine whether error has occured or not.
EVEN_ROW_BACKGROUND –
Static variable in class mars.Settings
RGB color for table even row background (text, data, register displays)
EVEN_ROW_FONT –
Static variable in class mars.Settings
Font for table even row background (text, data, register displays)
EVEN_ROW_FOREGROUND –
Static variable in class mars.Settings
RGB color for table even row foreground (text, data, register displays)
exampleFormat –
Variable in class mars.mips.instructions.Instruction
Example usage of this instruction.
EXCEPTION –
Static variable in class mars.simulator.Simulator
EXCEPTION_HANDLER –
Static variable in class mars.Settings
Current specified exception handler file (a MIPS assembly source file)
EXCEPTION_HANDLER_ENABLED –
Static variable in class mars.Settings
Flag to determine whether the currently selected exception handler source file will
be included in each assembly operation.
EXCEPTION_LEVEL –
Static variable in class mars.mips.hardware.Coprocessor0
exceptionHandlerAddress –
Static variable in class mars.mips.hardware.Memory
starting address for exception handlers: 0x80000180
Exceptions – Class in mars.simulator
Represents an error/interrupt that occurs during execution (simulation).
Exceptions() –
Constructor for class mars.simulator.Exceptions
executeAction(ActionListener, Object, String) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Executes the specified action, repeating and recording it as
necessary.
ExecutePane – Class in mars.venus
Container for the execution-related windows.
ExecutePane(VenusUI, RegistersWindow, Coprocessor1Window, Coprocessor0Window) –
Constructor for class mars.venus.ExecutePane
initialize the Execute pane with major components
exitCode –
Static variable in class mars.Globals
MARS exit code — useful with SYSCALL 17 when running from command line (not GUI)
EXTENDED_ASSEMBLER_ENABLED –
Static variable in class mars.Settings
Flag to determine whether or not program being assembled is limited to
basic MIPS instructions and formats.
ExtendedInstruction – Class in mars.mips.instructions
ExtendedInstruction represents a MIPS extended (a.k.a pseudo) instruction.
ExtendedInstruction(String, String, String, String) –
Constructor for class mars.mips.instructions.ExtendedInstruction
Constructor for ExtendedInstruction.
ExtendedInstruction(String, String, String) –
Constructor for class mars.mips.instructions.ExtendedInstruction
Constructor for ExtendedInstruction.
ExtendedInstruction(String, String) –
Constructor for class mars.mips.instructions.ExtendedInstruction
Constructor for ExtendedInstruction, where no instruction description or
compact translation is provided.
EXTERN –
Static variable in class mars.assembler.Directives
EXTERNAL_INTERRUPT_DISPLAY –
Static variable in class mars.simulator.Exceptions
EXTERNAL_INTERRUPT_HEXA_KEYBOARD –
Static variable in class mars.tools.DigitalLabSim
EXTERNAL_INTERRUPT_KEYBOARD –
Static variable in class mars.simulator.Exceptions
The exception number is stored in coprocessor 0 cause register ($13)
Note: the codes for External Interrupts have been modified from MIPS
specs in order to encode two pieces of information.
EXTERNAL_INTERRUPT_TIMER –
Static variable in class mars.tools.DigitalLabSim
externalInterruptingDevice –
Static variable in class mars.simulator.Simulator
externBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for .extern directive: 0x10000000
extractBranchAddress(ProgramStatement) –
Static method in class mars.tools.BHTSimulator
Extracts the target address of the branch.
extractOperator(String) –
Method in class mars.mips.instructions.Instruction
Used by subclass constructors to extract operator mnemonic from the
instruction example.
F
FileCloseAction – Class in mars.venus
Action for the File -> Close menu item
FileCloseAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileCloseAction
FileCloseAllAction – Class in mars.venus
Action for the File -> Close All menu item
FileCloseAllAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileCloseAllAction
FileDumpMemoryAction – Class in mars.venus
Action for the File -> Save For Dump Memory menu item
FileDumpMemoryAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileDumpMemoryAction
fileErrorString –
Static variable in class mars.util.SystemIO
String used for description of file error
FileExitAction – Class in mars.venus
Action for the File -> Exit menu item
FileExitAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileExitAction
fileExtensionMatch(String, String) –
Static method in class mars.util.FilenameFinder
Determine if given filename ends with given extension.
fileExtensions –
Static variable in class mars.Globals
List of accepted file extensions for MIPS assembly source files.
FILENAME_PREFIX –
Static variable in class mars.ErrorList
FilenameFinder – Class in mars.util
Utility class to perform necessary file-related search
operations.
FilenameFinder() –
Constructor for class mars.util.FilenameFinder
FileNewAction – Class in mars.venus
Action for the File -> New menu item
FileNewAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileNewAction
FileOpenAction – Class in mars.venus
Action for the File -> Open menu item
FileOpenAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileOpenAction
FilePrintAction – Class in mars.venus
Action for the File -> Print menu item
FilePrintAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FilePrintAction
FileSaveAction – Class in mars.venus
Action for the File -> Save menu item
FileSaveAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileSaveAction
FileSaveAllAction – Class in mars.venus
Action for the File -> Close All menu item
FileSaveAllAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileSaveAllAction
FileSaveAsAction – Class in mars.venus
Action for the File -> Save As menu item
FileSaveAsAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.FileSaveAsAction
FileStatus – Class in mars.venus
Used to store and return information on the status of the current ASM file that
is being edited in the program.
FileStatus() –
Constructor for class mars.venus.FileStatus
Create a FileStatus object with FileStatis.NO_FILE for status and null for file getters.
FileStatus(int, String) –
Constructor for class mars.venus.FileStatus
Create a FileStatus object with given status and file pathname.
findDumpFormatGivenCommandDescriptor(ArrayList, String) –
Static method in class mars.mips.dump.DumpFormatLoader
findMatchingBracket(Document, int) –
Static method in class mars.venus.editors.jeditsyntax.TextUtilities
Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket).
findWordEnd(String, int, String) –
Static method in class mars.venus.editors.jeditsyntax.TextUtilities
Locates the end of the word at the specified position.
findWordStart(String, int, String) –
Static method in class mars.venus.editors.jeditsyntax.TextUtilities
Locates the start of the word at the specified position.
finished() –
Method in class mars.simulator.SwingWorker
Called on the event dispatching thread (not on the worker thread)
after the construct method has returned.
fireCaretEvent() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
fireInsertUpdate(DocumentEvent) –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
fireRemoveUpdate(DocumentEvent) –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
firstLine –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
firstToken –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
The first token in the list.
fixSymbolTableAddress(int, int) –
Method in class mars.assembler.SymbolTable
Fix address in symbol table entry.
FLOAT –
Static variable in class mars.assembler.Directives
FLOAT_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS float is 4.
FLOATING_POINT_OVERFLOW –
Static variable in class mars.simulator.Exceptions
FLOATING_POINT_UNDERFLOW –
Static variable in class mars.simulator.Exceptions
FloatRepresentation – Class in mars.tools
Tool to help students learn about IEEE 754 representation of 32 bit
floating point values.
FloatRepresentation(String, String) –
Constructor for class mars.tools.FloatRepresentation
Simple constructor, likely used to run a stand-alone memory reference visualizer.
FloatRepresentation() –
Constructor for class mars.tools.FloatRepresentation
Simple constructor, likely used by the MARS Tools menu mechanism
flush() –
Method in class mars.venus.HardcopyWriter
This is the flush( ) method that all Writer subclasses must implement.
fm –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
focusedComponent –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
font –
Variable in class mars.venus.HardcopyWriter
fontsize –
Variable in class mars.venus.HardcopyWriter
formatDoubleNumber(long, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of a double given a long containing
the 64 bit pattern and the numerical base to use (10 or 16).
formatFloatNumber(int, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of a float given an integer containing
the 32 bit pattern and the numerical base to use (10 or 16).
formatNumber(int, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of an integer given the value and the
numerical base to convert it to.
formatNumber(float, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of a float given the value and the
numerical base to convert it to.
formatNumber(double, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of a double given the value and the
numerical base to convert it to.
formatNumber(int) –
Method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of a number given the value.
formatUnsignedInteger(int, int) –
Static method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of an unsigned given the value and the
numerical base to convert it to.
formatUnsignedInteger(int) –
Method in class mars.venus.NumberDisplayBaseChooser
Produces a string form of an unsigned integer given the value.
FP_REGISTER_NAME –
Static variable in class mars.assembler.TokenTypes
G
generateErrorAndWarningReport() –
Method in class mars.ErrorList
Produce report containing both warnings and errors, warnings first.
generateErrorReport() –
Method in class mars.ErrorList
Produce error report.
generateWarningReport() –
Method in class mars.ErrorList
Produce warning report.
GENERIC_TEXT_EDITOR –
Static variable in class mars.Settings
Flag to control whether or not to use generic text editor instead of language-aware styled editor
GenericTextArea – Class in mars.venus.editors.generic
GenericTextArea(EditPane, JComponent) –
Constructor for class mars.venus.editors.generic.GenericTextArea
get(int) –
Method in class mars.assembler.TokenList
Returns requested token given position number (starting at 0).
get(int, int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read the given number of bytes (max 4).
get() –
Method in class mars.simulator.SwingWorker
Return the value created by the construct method.
get() –
Static method in class mars.venus.FileStatus
Get file status
getAccessType() –
Method in class mars.mips.hardware.AccessNotice
Get the access type: READ or WRITE.
getAction() –
Method in class mars.simulator.SimulatorNotice
Fetch the memory address that was accessed.
getAction(String) –
Static method in class mars.venus.editors.jeditsyntax.InputHandler
Returns a named text area action.
getActionName(ActionListener) –
Static method in class mars.venus.editors.jeditsyntax.InputHandler
Returns the name of the specified text area action.
getActions() –
Static method in class mars.venus.editors.jeditsyntax.InputHandler
Returns an enumeration of all available actions.
getAddress() –
Method in class mars.assembler.Symbol
Returns the address of the the Symbol.
getAddress(String) –
Method in class mars.assembler.SymbolTable
Method to return the address associated with the given label.
getAddress() –
Method in exception mars.mips.hardware.AddressErrorException
Get the erroneous memory address.
getAddress() –
Method in class mars.mips.hardware.MemoryAccessNotice
Fetch the memory address that was accessed.
getAddress() –
Method in class mars.ProgramStatement
Produces Text Segment address where the binary machine statement is stored.
getAddressDisplayBase() –
Method in class mars.venus.ExecutePane
Retrieve the number system base for displaying memory addresses
getAddressDisplayBaseChooser() –
Method in class mars.venus.ExecutePane
Retrieve component used to set numerical base (10 or 16) of address display.
getAddressDisplayBaseMenuItem() –
Method in class mars.venus.VenusUI
Get reference to settings menu item for display base of memory/register values.
getAddressLocalOrGlobal(String) –
Method in class mars.assembler.SymbolTable
Method to return the address associated with the given label.
getAddressOfFirstNull(int, int) –
Method in class mars.mips.hardware.Memory
Look for first “null” memory value in an address range.
getAddressOfFirstNull(int, int) –
Static method in class mars.util.MemoryDump
Look for first “null” memory value in an address range.
getAllFamilies() –
Static method in class mars.util.EditorFont
Obtain an array of all available font family names.
getAllSymbols() –
Method in class mars.assembler.SymbolTable
For obtaining all the Symbols.
getArgs() –
Method in class mars.assembler.Macro
getAsciiNonPrint() –
Static method in class mars.Globals
getAsciiStrings() –
Static method in class mars.Globals
getAssembleAllEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
getAssembleOnOpenEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
getAssembleTextArea() –
Method in class mars.venus.MessagesPane
Returns component used to display assembler messages
getAutoIndent() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Constructs string for auto-indent feature.
getBackStepper() –
Method in class mars.MIPSprogram
Returns BackStepper associated with this program.
getBackSteppingEnabled() –
Method in class mars.Settings
Return whether backstepping is permitted at this time.
getBareMachineEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.BARE_MACHINE_ENABLED)
getBase() –
Method in class mars.venus.NumberDisplayBaseChooser
Retrieve the current number base.
getBase(boolean) –
Static method in class mars.venus.NumberDisplayBaseChooser
Return the number base corresponding to the specified setting.
getBaseAddresses(String[]) –
Static method in class mars.util.MemoryDump
Get the MIPS memory base address(es) of the specified segment name(s).
getBasicAssemblyStatement() –
Method in class mars.ProgramStatement
Produces Basic Assembly statement for this MIPS source statement.
getBasicIntructionTemplateList() –
Method in class mars.mips.instructions.ExtendedInstruction
Get ArrayList of Strings that represent list of templates for
basic instructions generated by this extended instruction.
getBinaryStatement() –
Method in class mars.ProgramStatement
Produces 32-bit binary machine statement as int.
getBooleanSetting(int) –
Method in class mars.Settings
Fetch value of a boolean setting given its identifier.
getBracketHighlightColor() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the bracket highlight color.
getBracketLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the line of the highlighted bracket (the bracket
matching the one before the caret)
getBracketPosition() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the position of the highlighted bracket (the bracket
matching the one before the caret)
getBreakpointCount() –
Method in class mars.venus.TextSegmentWindow
Returns number of breakpoints currently set.
getByte(int) –
Method in class mars.mips.hardware.Memory
Reads specified Memory byte into low order 8 bits of int.
getByte(int, int) –
Static method in class mars.util.Binary
Gets the specified byte of the specified value.
getByteOrder() –
Method in class mars.mips.hardware.Memory
Retrieve memory byte order.
getCallStack() –
Method in class mars.assembler.MacroPool
getCaretBlinkRate() –
Method in class mars.Settings
Retrieve the caret blink rate in milliseconds.
getCaretColor() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the caret color.
getCaretLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the caret line.
getCaretPosition() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the caret position.
getCaretPosition() –
Method in interface mars.venus.editors.MARSTextEditingArea
getCbBHTentries() –
Method in class mars.tools.BHTSimGUI
Returns the combo box for selecting the number of BHT entries.
getCbBHThistory() –
Method in class mars.tools.BHTSimGUI
Returns the combo box for selecting the size of the BHT history.
getCbBHTinitVal() –
Method in class mars.tools.BHTSimGUI
Returns the combo box for selecting the initial value of the BHT
getCharactersPerLine() –
Method in class mars.venus.HardcopyWriter
Return the number of columns of characters that fit on the page
getCodeHighlighting() –
Method in class mars.venus.TextSegmentWindow
Get code highlighting status.
getColor() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns the color specified in this style.
getColorAsHexString() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns the color coded as Stringified 32-bit hex with
Red in bits 16-23, Green in bits 8-15, Blue in bits 0-7
e.g.
getColorSettingByKey(String) –
Method in class mars.Settings
Get Color object for specified settings key.
getColorSettingByPosition(int) –
Method in class mars.Settings
Get Color object for specified settings name (a static constant).
getColumnClass(int) –
Method in class mars.tools.BHTableModel
Returns the class/type of the i-th column of the table.
getColumnCount() –
Method in class mars.tools.BHTableModel
Returns the number of columns.
getColumnName(int) –
Method in class mars.tools.BHTableModel
Returns the name of the i-th column of the table.
getCommandDescriptor() –
Method in class mars.mips.dump.AbstractDumpFormat
One-word description of format to be used by MARS command mode parser
and user in conjunction with the “dump” option.
getCommandDescriptor() –
Method in interface mars.mips.dump.DumpFormat
A short one-word descriptor that will be used by the MARS
command line parser (and the MARS command line user) to specify
that this format is to be used.
getCommonFamilies() –
Static method in class mars.util.EditorFont
Obtain an array of common font family names.
getCompactBasicIntructionTemplateList() –
Method in class mars.mips.instructions.ExtendedInstruction
Get ArrayList of Strings that represent list of templates for
basic instructions generated by the “compact” or 16-bit version
of this extended instruction.
getCompactInstructionLength() –
Method in class mars.mips.instructions.ExtendedInstruction
Get length in bytes that this extended instruction requires in its
binary form if it includes an alternative expansion for compact
memory (16 bit addressing) configuration.
getConditionFlag(int) –
Static method in class mars.mips.hardware.Coprocessor1
Get value of specified condition flag (0-7).
getConditionFlagCount() –
Static method in class mars.mips.hardware.Coprocessor1
Get count of condition flags.
getConditionFlags() –
Static method in class mars.mips.hardware.Coprocessor1
Get array of condition flags (0-7).
getConfigurationByName(String) –
Static method in class mars.mips.hardware.MemoryConfigurations
getConfigurationIdentifier() –
Method in class mars.mips.hardware.MemoryConfiguration
getConfigurationItemNames() –
Method in class mars.mips.hardware.MemoryConfiguration
getConfigurationItemValues() –
Method in class mars.mips.hardware.MemoryConfiguration
getConfigurationName() –
Method in class mars.mips.hardware.MemoryConfiguration
getConfigurationsIterator() –
Static method in class mars.mips.hardware.MemoryConfigurations
getCoprocessor0Window() –
Method in class mars.venus.ExecutePane
Access the coprocessor0 values window.
getCoprocessor0Window() –
Method in class mars.venus.RegistersPane
Return component containing coprocessor 0 (exceptions) register set.
getCoprocessor1Window() –
Method in class mars.venus.ExecutePane
Access the coprocessor1 values window.
getCoprocessor1Window() –
Method in class mars.venus.RegistersPane
Return component containing coprocessor 1 (floating point) register set.
getCurrent() –
Method in class mars.assembler.MacroPool
getCurrentConfiguration() –
Static method in class mars.mips.hardware.MemoryConfigurations
getCurrentEditTab() –
Method in class mars.venus.EditTabbedPane
The current EditPane representing a file.
getCurrentEditTabForFile(File) –
Method in class mars.venus.EditTabbedPane
If the given file is open in the tabbed pane, make it the
current tab.
getCurrentOpenDirectory() –
Method in class mars.venus.Editor
Get name of current directory for Open operation.
getCurrentSaveDirectory() –
Method in class mars.venus.Editor
Get name of current directory for Save or Save As operation.
getCurrentSyntaxStyles() –
Static method in class mars.venus.editors.jeditsyntax.SyntaxUtilities
Returns the CURRENT style table.
getDataBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getDataSegmentBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getDataSegmentHighlighting() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
getDataSegmentLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getDataSegmentWindow() –
Method in class mars.venus.ExecutePane
Access the data segment window.
getDataSymbols() –
Method in class mars.assembler.SymbolTable
For obtaining the Data Symbols.
getDefaultColorSettingByKey(String) –
Method in class mars.Settings
Get default Color value for specified settings key.
getDefaultColorSettingByPosition(int) –
Method in class mars.Settings
Get default Color object for specified settings name (a static constant).
getDefaultConfiguration() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultDataBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultDataSegmentBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultDataSegmentLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getDefaultEditorSyntaxStyleByPosition(int) –
Method in class mars.Settings
getDefaultEditorTabSize() –
Method in class mars.Settings
Get the text editor default tab size in characters
getDefaultExceptionHandlerAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultExternBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultFontByPosition(int) –
Method in class mars.Settings
Retrieve a default Font setting
getDefaultGlobalPointer() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultHeapBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelDataBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelDataSegmentLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelHighAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelTextBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultKernelTextLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getDefaultMemoryMapBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaults() –
Static method in class mars.venus.editors.jeditsyntax.TextAreaDefaults
Returns a new TextAreaDefaults object with the default values filled
in.
getDefaultStackBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultStackLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getDefaultStackPointer() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultSyntaxStyles() –
Static method in class mars.venus.editors.jeditsyntax.SyntaxUtilities
Returns the default style table.
getDefaultTextBaseAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDefaultTextLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getDefaultUserHighAddress() –
Static method in class mars.mips.hardware.MemoryConfigurations
getDelay() –
Method in class mars.venus.RepeatButton
Gets the delay for the timer of this button.
getDelayedBranchingEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
getDescription() –
Method in class mars.assembler.Directives
Get description of this Directives object
getDescription() –
Method in class mars.mips.dump.AbstractDumpFormat
Get a short description of the format, suitable for displaying along with
the extension, in the file save dialog, or as a tool tip.
getDescription() –
Method in interface mars.mips.dump.DumpFormat
Get a short description of the format, suitable
for displaying along with the extension, if any, in the file
save dialog and also for displaying as a tool tip.
getDescription() –
Method in class mars.mips.instructions.Instruction
Get string describing the instruction.
getDescription() –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
getDirectiveList() –
Static method in class mars.assembler.Directives
Produces List of Directive objects
getDisplayAddressesInHex() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
getDisplayValuesInHex() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
getDocument() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the document this text area is editing.
getDocument() –
Method in interface mars.venus.editors.MARSTextEditingArea
getDocumentLength() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the length of the document.
getDoubleFromRegisterPair(int) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the double value stored in the given FPU register.
getDoubleFromRegisterPair(String) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the double value stored in the given FPU register.
getEditor() –
Method in class mars.venus.VenusUI
Get reference to Editor object associated with this GUI.
getEditorFont() –
Method in class mars.Settings
Current editor font.
getEditorLineNumbersDisplayed() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
getEditorPopupPrefixLength() –
Method in class mars.Settings
Get number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
getEditorSyntaxStyleByPosition(int) –
Method in class mars.Settings
getEditorTabSize() –
Method in class mars.Settings
Get the tab size in characters.
getEditPane() –
Method in class mars.venus.MainPane
Returns current edit pane.
getEditPaneForFile(String) –
Method in class mars.venus.EditTabbedPane
If there is an EditPane for the given file pathname, return it else return null.
getEditTabbedPane() –
Method in class mars.venus.MainPane
Returns component containing editor display
getElectricScroll() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the number of lines from the top and button of the
text area that are always visible.
getEOLMarkerColor() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the EOL marker color.
getEOLMarkersPainted() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns true if EOL markers are drawn, false otherwise.
getErrorLimit() –
Method in class mars.ErrorList
Get limit on number of error messages to be generated
by one assemble operation.
getErrorList() –
Method in class mars.assembler.Assembler
Get list of assembler errors and warnings
getErrorMessages() –
Method in class mars.ErrorList
Get ArrayList of error messages.
getErrors() –
Method in class mars.assembler.Tokenizer
Fetch this Tokenizer’s error list.
getExact() –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
Determines whether match occurred in an exact-match or prefix-match search.
getExample() –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
getExampleFormat() –
Method in class mars.mips.instructions.Instruction
Get string descriptor of instruction’s format.
getExampleLength() –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
getExamplePaddedToLength(int) –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
getExceptionHandler() –
Method in class mars.Settings
Name of currently selected exception handler file.
getExceptionHandlerAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getExceptionHandlerEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
getExecutePane() –
Method in class mars.venus.MainPane
returns component containing execution-time display
getExecuteTab() –
Method in class mars.venus.MainPane
returns component containing execution-time display.
getExpansionHistory() –
Method in class mars.assembler.MacroPool
getExtendedAssemblerEnabled() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
getExtension(File) –
Static method in class mars.util.FilenameFinder
Get the filename extension of the specified File.
getExternalTools() –
Static method in class mars.Globals
Get list of MarsTools that reside outside the MARS distribution.
getExternBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getFile() –
Static method in class mars.venus.FileStatus
Returns the ASM file.
getFileErrorMessage() –
Static method in class mars.util.SystemIO
Retrieve file operation or error message
getFileExtension() –
Method in class mars.mips.dump.AbstractDumpFormat
Get the file extension associated with this format.
getFileExtension() –
Method in interface mars.mips.dump.DumpFormat
Get the file extension associated with this format.
getFileFilter(ArrayList, String, boolean) –
Static method in class mars.util.FilenameFinder
Get a FileFilter that will filter files based on the given list of filename extensions.
getFileFilter(ArrayList, String) –
Static method in class mars.util.FilenameFinder
Get a FileFilter that will filter files based on the given list of filename extensions.
getFileFilter(String, String, boolean) –
Static method in class mars.util.FilenameFinder
Get a FileFilter that will filter files based on the given filename extension.
getFileFilter(String, String) –
Static method in class mars.util.FilenameFinder
Get a FileFilter that will filter files based on the given filename extension.
getFilename() –
Method in class mars.assembler.SourceLine
Retrieve name of file containing source statement
getFilename() –
Method in class mars.ErrorMessage
Produce name of file containing error.
getFilename() –
Method in class mars.MIPSprogram
Produces name of associated source code file.
getFilename() –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
getFilename() –
Method in class mars.venus.FileStatus
Get file name with no path information.
getFilenameList(ClassLoader, String, String) –
Static method in class mars.util.FilenameFinder
Locate files and return list of file names.
getFilenameList(ClassLoader, String, ArrayList) –
Static method in class mars.util.FilenameFinder
Locate files and return list of file names.
getFilenameList(String, String) –
Static method in class mars.util.FilenameFinder
Locate files and return list of file names.
getFilenameList(String, ArrayList) –
Static method in class mars.util.FilenameFinder
Locate files and return list of file names.
getFilenameList(ArrayList, String) –
Static method in class mars.util.FilenameFinder
Return list of file names.
getFilenameList(ArrayList, ArrayList) –
Static method in class mars.util.FilenameFinder
Return list of file names.
getFileStatus() –
Method in class mars.venus.EditPane
Get the editing status for this EditPane’s associated document.
getFileStatus() –
Method in class mars.venus.FileStatus
Get editing status of this file.
getFirstLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the line displayed at the text area’s origin.
getFloatFromRegister(int) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the float value stored in the given FPU register.
getFloatFromRegister(String) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the float value stored in the given FPU register.
getFont() –
Method in class mars.venus.AbstractFontSettingDialog
getFont() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
getFont() –
Method in interface mars.venus.editors.MARSTextEditingArea
getFontByPosition(int) –
Method in class mars.Settings
Retrieve a Font setting
getFontMetrics(Font) –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns the font metrics for the styled font.
getFontMetrics() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the font metrics used by this component.
getFontMetrics(Font) –
Method in interface mars.venus.editors.MARSTextEditingArea
getFontStyleStrings() –
Static method in class mars.util.EditorFont
Get array containing String values for font style names.
getFromLine() –
Method in class mars.assembler.Macro
getGlobalPointer() –
Method in class mars.mips.hardware.MemoryConfiguration
getGui() –
Static method in class mars.Globals
getHalf(int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read a 2 byte word into lower 16 bits of int.
getHeapBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getHelpComponent() –
Method in class mars.tools.AbstractMarsToolAndApplication
Override this method to provide a JComponent (probably a JButton) of your choice
to be placed just left of the Close/Exit button.
getHelpComponent() –
Method in class mars.tools.BitmapDisplay
Overrides default method, to provide a Help button for this tool/app.
getHelpComponent() –
Method in class mars.tools.DigitalLabSim
getHelpComponent() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Overrides default method, to provide a Help button for this tool/app.
getHelpComponent() –
Method in class mars.tools.MemoryReferenceVisualization
Overrides default method, to provide a Help button for this tool/app.
getHistoryAsStr() –
Method in class mars.tools.BHTEntry
Builds a string representation of the BHT entry’s history.
getHorizontalOffset() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the horizontal offset of drawn lines.
getIdxForAddress(int) –
Method in class mars.tools.BHTableModel
Returns the index into the BHT for a given branch instruction address.
getIgnoreCase() –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
Returns true if the keyword map is set to be case insensitive,
false otherwise.
getInitialDelay() –
Method in class mars.venus.RepeatButton
Gets the initial delay for the timer of this button.
getInitialProgramCounter() –
Static method in class mars.mips.hardware.RegisterFile
For returning the program counter’s initial (reset) value.
getInputHandler() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the input handler.
getInputString(String) –
Method in class mars.venus.MessagesPane
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g.
getInputString(int) –
Method in class mars.venus.MessagesPane
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g.
getInstance() –
Static method in class mars.mips.hardware.Memory
Returns the unique Memory instance, which becomes in essence global.
getInstance() –
Static method in class mars.simulator.Simulator
Returns the Simulator object
getInstance() –
Static method in class mars.venus.RunSpeedPanel
Retrieve the run speed panel object
getInstruction() –
Method in class mars.ProgramStatement
Produces Instruction object corresponding to this statement’s operator.
getInstructionCategory(ProgramStatement) –
Method in class mars.tools.InstructionStatistics
decodes the instruction and determines the category of the instruction.
getInstructionFormat() –
Method in class mars.mips.instructions.BasicInstruction
Gets the operand format of the instruction.
getInstructionLength() –
Method in class mars.mips.instructions.ExtendedInstruction
Get length in bytes that this extended instruction requires in its
binary form.
getInstructionLength() –
Method in class mars.mips.instructions.Instruction
Get length in bytes that this instruction requires in its binary form.
getInstructionList() –
Method in class mars.mips.instructions.InstructionSet
Retrieve the current instruction set.
getIntFromRegister(int) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the 32-bit int bit pattern stored in the given FPU register.
getIntFromRegister(String) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the 32-bit int bit pattern stored in the given FPU register.
getInvalidLinesPainted() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns true if invalid lines are painted as red tildes (~),
false otherwise.
getKernelBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKernelDataBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKernelDataSegmentLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKernelHighAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKernelTextBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKernelTextLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getKeywords() –
Static method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
Get KeywordMap containing all MIPS key words.
getLabelSortState() –
Method in class mars.Settings
Get the saved state of the Labels Window sorting (can sort by either
label or address and either ascending or descending order).
getLabelsWindow() –
Method in class mars.venus.ExecutePane
Access the label values window.
getLabelWindowVisibility() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
getLeadingWhiteSpace() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Makes a copy of leading white space (tab or space) from the current line and
returns it.
getLength() –
Method in class mars.mips.hardware.MemoryAccessNotice
Fetch the length in bytes of the access operation (4,2,1).
getLengthInBytes(Directives) –
Static method in class mars.assembler.DataTypes
Get length in bytes for numeric MIPS directives.
getLimitAddresses(String[]) –
Static method in class mars.util.MemoryDump
Get the MIPS memory limit address(es) of the specified segment name(s).
getLine() –
Method in class mars.ErrorMessage
Produce line number of error.
getLineCount() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the number of lines in the document.
getLineCount() –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Returns the number of lines in this token marker.
getLineEndOffset(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the end offset of the specified line.
getLineHighlightColor() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the line highlight color.
getLineLength(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the length of the specified line.
getLineNumber() –
Method in class mars.assembler.SourceLine
Retrieve line number of source statement
getLineNumbersList(Document) –
Method in class mars.venus.EditPane
getLineOfOffset(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the line containing the specified offset.
getLinesPerPage() –
Method in class mars.venus.HardcopyWriter
Return the number of lines that fit on a page
getLineStartOffset(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the start offset of the specified line.
getLineText(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the text on the specified line.
getLineText(int, Segment) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Copies the text on the specified line into a segment.
getLocalMacroPool() –
Method in class mars.MIPSprogram
Gets local macro pool MacroPool for this program
getLocalSymbolTable() –
Method in class mars.MIPSprogram
Returns SymbolTable associated with this program.
getLongFromRegisterPair(int) –
Static method in class mars.mips.hardware.Coprocessor1
Gets a long representing the double value stored in the given double
precision FPU register.
getLongFromRegisterPair(String) –
Static method in class mars.mips.hardware.Coprocessor1
Gets the double value stored in the given FPU register.
getMachineList() –
Method in class mars.MIPSprogram
Produces list of machine statements that are assembled from the program.
getMachineStatement() –
Method in class mars.ProgramStatement
Produces binary machine statement as 32 character string, all ‘0’ and ‘1’ chars.
getMacroExpansionHistory() –
Method in class mars.ErrorMessage
Returns string describing macro expansion.
getMacroRecorder() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Returns the macro recorder.
getMagicCaretPosition() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the `magic’ caret position.
getMainPane() –
Method in class mars.venus.VenusUI
Get reference to messages pane associated with this GUI.
getMarkLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the mark line.
getMarkPosition() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the mark position.
getMatchingMacro(TokenList, int) –
Method in class mars.assembler.MacroPool
Will be called by parser when reaches a macro expansion call
getMaxSteps() –
Method in class mars.simulator.SimulatorNotice
Fetch the length in bytes of the access operation (4,2,1).
getMemoryConfiguration() –
Method in class mars.Settings
Returns identifier of current built-in memory configuration.
getMemoryMapBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getMemoryMapLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getMemoryMapLimitAddress() –
Method in class mars.mips.hardware.MemoryConfigurations
getMenuState() –
Static method in class mars.venus.VenusUI
Get current menu state.
getMessage() –
Method in class mars.ErrorMessage
Produce error message.
getMessagesPane() –
Method in class mars.venus.VenusUI
Get reference to messages pane associated with this GUI.
getMinimumSize() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the painter’s minimum size.
getMIPSprogram() –
Method in class mars.assembler.SourceLine
Retrieve MIPSprogram object containing source statement
getMIPSTokenExamples() –
Static method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
getMIPSTokenLabels() –
Static method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
getName() –
Method in class mars.assembler.Directives
Get name of this Directives object
getName() –
Method in class mars.assembler.Macro
getName() –
Method in class mars.assembler.Symbol
Returns the label of the the Symbol.
getName() –
Method in class mars.mips.hardware.Register
Returns the name of the Register.
getName() –
Method in class mars.mips.instructions.Instruction
Get operation mnemonic
getName() –
Method in class mars.mips.instructions.syscalls.AbstractSyscall
Return the name you have chosen for this syscall.
getName() –
Method in interface mars.mips.instructions.syscalls.Syscall
Return a name you have chosen for this syscall.
getName() –
Method in class mars.mips.instructions.syscalls.SyscallNumberOverride
Get the service name as a String.
getName() –
Method in class mars.tools.AbstractMarsToolAndApplication
Required MarsTool method to return Tool name.
getName() –
Method in class mars.tools.BHTSimulator
Returns the name of the tool.
getName() –
Method in class mars.tools.BitmapDisplay
Required MarsTool method to return Tool name.
getName() –
Method in class mars.tools.CacheSimulator
Required MarsTool method to return Tool name.
getName() –
Method in class mars.tools.DigitalLabSim
getName() –
Method in class mars.tools.FloatRepresentation
Fetch tool name (for display in MARS Tools menu)
getName() –
Method in class mars.tools.InstructionCounter
getName() –
Method in class mars.tools.InstructionStatistics
returns the name of the tool
getName() –
Method in class mars.tools.IntroToTools
Required method to return Tool name.
getName() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Required MarsTool method to return Tool name.
getName() –
Method in class mars.tools.MarsBot
getName() –
Method in interface mars.tools.MarsTool
Return a name you have chosen for this tool.
getName() –
Method in class mars.tools.MemoryReferenceVisualization
Required MarsTool method to return Tool name.
getName() –
Method in class mars.tools.ScavengerHunt
getName() –
Method in class mars.tools.ScreenMagnifier
getName() –
Static method in class mars.venus.FileStatus
Returns the name of the file.
getNextCounter() –
Method in class mars.assembler.MacroPool
MacroPool.counter will be set to 0 on construction of this class and will
be incremented by each call.
getNextDefaultFilename() –
Method in class mars.venus.Editor
Generates a default file name
getNumber(String) –
Static method in class mars.mips.hardware.Coprocessor0
For getting the number representation of the register.
getNumber() –
Method in class mars.mips.hardware.Register
Returns the number of the Register.
getNumber(String) –
Static method in class mars.mips.hardware.RegisterFile
For getting the number representation of the register.
getNumber() –
Method in class mars.mips.instructions.syscalls.AbstractSyscall
Return the assigned service number.
getNumber() –
Method in interface mars.mips.instructions.syscalls.Syscall
Return the assigned service number.
getNumber() –
Method in class mars.mips.instructions.syscalls.SyscallNumberOverride
Get the new service number as an int.
getOperand(int) –
Method in class mars.ProgramStatement
Produces operand value from given array position (first operand is position 0).
getOperands() –
Method in class mars.ProgramStatement
Produces int array of operand values for this statement.
getOperationMask() –
Method in class mars.mips.instructions.BasicInstruction
Gets the 32-character operation mask.
getOriginalFromLine() –
Method in class mars.assembler.Macro
getOriginalProgram() –
Method in class mars.assembler.Token
Produces original program containing this token.
getOriginalSourceLine() –
Method in class mars.assembler.Token
Produces original line number of this token.
getOriginalTokenList() –
Method in class mars.ProgramStatement
Produces token list generated from original source statement.
getOriginalToLine() –
Method in class mars.assembler.Macro
getOuterComponent() –
Method in class mars.venus.editors.generic.GenericTextArea
getOuterComponent() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
getOuterComponent() –
Method in interface mars.venus.editors.MARSTextEditingArea
getPainter() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the object responsible for painting this text area.
getParent() –
Method in class mars.venus.FileStatus
Get file parent pathname.
getParsedList() –
Method in class mars.MIPSprogram
Produces existing list of parsed source code statements.
getPathname() –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
getPathname() –
Method in class mars.venus.FileStatus
Get full file pathname.
getPosition() –
Method in class mars.ErrorMessage
Produce position within erroneous line.
getPrediction() –
Method in class mars.tools.BHTEntry
Returns the branch prediction based on the history.
getPredictionAsStr() –
Method in class mars.tools.BHTEntry
Returns a string representation of the BHT entry’s current prediction.
getPredictionAtIdx(int) –
Method in class mars.tools.BHTableModel
Retrieve the prediction for the i-th BHT entry.
getPreferredSize() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the painter’s preferred size.
getPrintableBasicAssemblyStatement() –
Method in class mars.ProgramStatement
Produces printable Basic Assembly statement for this MIPS source
statement.
getProcessedLine() –
Method in class mars.assembler.TokenList
Retrieve the source line String associated with this
token list.
getProgram() –
Method in class mars.assembler.Macro
getProgramArguments() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
getProgramArguments() –
Method in class mars.venus.TextSegmentWindow
Get program arguments from text field in south border of text segment window.
getProgramCounter() –
Static method in class mars.mips.hardware.RegisterFile
For returning the program counters value.
getProgramCounter() –
Method in class mars.simulator.SimulatorNotice
Fetch the value of the access operation (the value read or written).
getProgramCounterRegister() –
Static method in class mars.mips.hardware.RegisterFile
Returns Register object for program counter.
getPropertyEntry(String, String) –
Static method in class mars.Globals
Read and return property file value (if any) for requested property.
getRawWord(int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read a 4 byte word as an int.
getRawWordOrNull(int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read a 4 byte word as an int and return Integer.
getRegister(String) –
Static method in class mars.mips.hardware.Coprocessor0
Get register object corresponding to given name.
getRegister(String) –
Static method in class mars.mips.hardware.Coprocessor1
Get register object corresponding to given name.
getRegisterName() –
Method in class mars.mips.hardware.RegisterAccessNotice
Fetch the register number of register accessed.
getRegisterNumber(String) –
Static method in class mars.mips.hardware.Coprocessor1
For getting the number representation of the FPU register.
getRegisterPosition(Register) –
Static method in class mars.mips.hardware.Coprocessor0
Coprocessor0 implements only selected registers, so the register number
(8, 12, 13, 14) does not correspond to its position in the list of registers
(0, 1, 2, 3).
getRegisters() –
Static method in class mars.mips.hardware.Coprocessor0
For returning the set of registers.
getRegisters() –
Static method in class mars.mips.hardware.Coprocessor1
For returning the set of registers.
getRegisters() –
Static method in class mars.mips.hardware.RegisterFile
For returning the set of registers.
getRegistersHighlighting() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
getRegistersPane() –
Method in class mars.venus.VenusUI
Get reference to registers pane associated with this GUI.
getRegistersWindow() –
Method in class mars.venus.ExecutePane
Access the register values window.
getRegistersWindow() –
Method in class mars.venus.RegistersPane
Return component containing integer register set.
getRepeatCount() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Returns the number of times the next action will be repeated.
getReset() –
Static method in class mars.venus.VenusUI
To find out whether the register values are reset.
getResetValue() –
Method in class mars.mips.hardware.Register
Returns the reset value of the Register.
getRightClickPopup() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the right click popup menu.
getRowCount() –
Method in class mars.tools.BHTableModel
Returns the number of entries of the BHT.
getRunAssembleAction() –
Method in class mars.venus.VenusUI
Return reference tothe Run->Assemble item’s action.
getRunSpeed() –
Method in class mars.simulator.SimulatorNotice
Fetch the value of the access operation (the value read or written).
getRunSpeed() –
Method in class mars.venus.RunSpeedPanel
returns current run speed setting, in instructions/second.
getRunTextArea() –
Method in class mars.venus.MessagesPane
Returns component used to display runtime messages
getSegmentBounds(String) –
Static method in class mars.util.MemoryDump
Return array with segment address bounds for specified segment.
getSegmentMapKey(Segment, int, int) –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
getSegmentNames() –
Static method in class mars.util.MemoryDump
Get the names of segments available for memory dump.
getSelectedText() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the selected text, or null if no selection is active.
getSelectedText() –
Method in interface mars.venus.editors.MARSTextEditingArea
getSelectionColor() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the selection color.
getSelectionEnd() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the selection end offset.
getSelectionEnd(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the offset where the selection ends on the specified
line.
getSelectionEnd() –
Method in interface mars.venus.editors.MARSTextEditingArea
getSelectionEndLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the selection end line.
getSelectionStart() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the selection start offset.
getSelectionStart(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the offset where the selection starts on the specified
line.
getSelectionStart() –
Method in interface mars.venus.editors.MARSTextEditingArea
getSelectionStartLine() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the selection start line.
getSettings() –
Static method in class mars.Globals
getSimulationCode() –
Method in class mars.mips.instructions.BasicInstruction
Gets the SimulationCode object.
getSize() –
Method in class mars.assembler.SymbolTable
Get the count of entries currently in the table.
getSortedBreakPointsArray() –
Method in class mars.venus.TextSegmentWindow
Returns array of current breakpoints, each represented by a MIPS program counter address.
getSource() –
Method in class mars.assembler.SourceLine
Retrieve source statement itself
getSource() –
Method in class mars.ProgramStatement
Produces MIPS source statement.
getSource() –
Method in class mars.venus.EditPane
Get source code text
getSourceFile() –
Method in class mars.ProgramStatement
Produces String name of the source file containing this statement.
getSourceLine() –
Method in class mars.assembler.Token
Produces line number of MIPS program of this token.
getSourceLine(int) –
Method in class mars.MIPSprogram
Produces specified line of MIPS source program.
getSourceLine() –
Method in class mars.ProgramStatement
Produces line number of MIPS source statement.
getSourceLineCount() –
Method in class mars.venus.EditPane
Calculate and return number of lines in source code text.
getSourceLineList() –
Method in class mars.MIPSprogram
Retrieve list of source statements that comprise the program.
getSourceList() –
Method in class mars.MIPSprogram
Produces list of source statements that comprise the program.
getSourceMIPSprogram() –
Method in class mars.assembler.Token
Produces MIPSprogram object associated with this token.
getSourceMIPSprogram() –
Method in class mars.ProgramStatement
Produces MIPSprogram object representing the source file containing this statement.
getStackBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getStackLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getStackPointer() –
Method in class mars.mips.hardware.MemoryConfiguration
getStartAtMain() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
getStarted() –
Static method in class mars.venus.VenusUI
To find out whether MIPS program is currently executing.
getStartLabel() –
Static method in class mars.assembler.SymbolTable
Fetches the text segment label (symbol) which, if declared global, indicates
the starting address for execution.
getStartPos() –
Method in class mars.assembler.Token
Produces position within source line of this token.
getStatement(int) –
Method in class mars.mips.hardware.Memory
Gets ProgramStatement from Text Segment.
getStatementNoNotify(int) –
Method in class mars.mips.hardware.Memory
Gets ProgramStatement from Text Segment without notifying observers.
getStatsPredCorrect() –
Method in class mars.tools.BHTEntry
Get the absolute number of correct predictions.
getStatsPredIncorrect() –
Method in class mars.tools.BHTEntry
Get the absolute number of mispredictions.
getStatsPredPrecision() –
Method in class mars.tools.BHTEntry
Get the percentage of correct predictions.
getStringMapKey(String) –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
getStrippedTokenList() –
Method in class mars.ProgramStatement
Produces token list stripped of all but operator and operand tokens.
getStyledFont(Font) –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns the specified font, but with the style’s bold and
italic flags applied.
getStyles() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the syntax styles used to paint colorized text.
getSubstitutedLine(int, TokenList, long, ErrorList) –
Method in class mars.assembler.Macro
Substitutes macro arguments in a line of source code inside macro
definition to be parsed after macro expansion.
getSymbol(String) –
Method in class mars.assembler.SymbolTable
Produce Symbol object from symbol table that corresponds to given String.
getSymbolGivenAddress(String) –
Method in class mars.assembler.SymbolTable
Produce Symbol object from symbol table that has the given address.
getSymbolGivenAddressLocalOrGlobal(String) –
Method in class mars.assembler.SymbolTable
Produce Symbol object from either local or global symbol table that has the
given address.
getSyntaxSensitiveToolTipText(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Return any relevant tool tip text for token at specified position.
getSyscallOverrides() –
Method in class mars.Globals
Read any syscall number assignment overrides from config file.
getTabBHT() –
Method in class mars.tools.BHTSimGUI
Returns the table representing the BHT.
getTabSize() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Fetch the tab size in characters.
getTaLog() –
Method in class mars.tools.BHTSimGUI
Returns the text area for log purposes.
getText() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the entire text of this text area.
getText(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the specified substring of the document.
getText(int, int, Segment) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Copies the specified substring of the document into a segment.
getText() –
Method in interface mars.venus.editors.MARSTextEditingArea
getTextArea(EventObject) –
Static method in class mars.venus.editors.jeditsyntax.InputHandler
Returns the text area that fired the specified event.
getTextBaseAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getTextColumnOrder() –
Method in class mars.Settings
Order of text segment display columns (there are 5, numbered 0 to 4).
getTextLimitAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getTextSegmentWindow() –
Method in class mars.venus.ExecutePane
Access the text segment window.
getTextSymbols() –
Method in class mars.assembler.SymbolTable
For obtaining the Text Symbols.
getTfAddress() –
Method in class mars.tools.BHTSimGUI
Returns the text field for displaying the address of the most recent branch instruction
getTfIndex() –
Method in class mars.tools.BHTSimGUI
Returns the text field for displaying the corresponding index into the BHT
getTfInstruction() –
Method in class mars.tools.BHTSimGUI
Returns the text field for displaying the most recent branch instruction
getThread() –
Method in class mars.mips.hardware.AccessNotice
Get reference to thread that created this notice
getTokenExactMatchHelp(Token, String) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
Construct and return any appropriate help information for
the given token.
getTokenExactMatchHelp(Token, String) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Construct and return any appropriate help information for
the given token.
getTokenList() –
Method in class mars.mips.instructions.Instruction
Get TokenList corresponding to correct instruction syntax.
getTokenList() –
Method in class mars.MIPSprogram
Produces list of tokens that comprise the program.
getTokenMarker() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the document’s token marker.
getTokenMarker() –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Returns the token marker that is to be used to split lines
of this document up into tokens.
getTokenPrefixMatchHelp(String, Token, Token, String) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
Construct and return any appropriate help information for
prefix match based on current line’s token list.
getTokenPrefixMatchHelp(String, Token, Token, String) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Construct and return any appropriate help information for
the given token or “token prefix”.
getTokenText() –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
The document text that mached this item
getToLine() –
Method in class mars.assembler.Macro
getToolTipText(MouseEvent) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns the tool tip to display at the specified location.
getToolTipText(MouseEvent) –
Method in interface mars.venus.editors.jeditsyntax.TextAreaPainter.Highlight
Returns the tool tip to display at the specified
location.
getType() –
Method in class mars.assembler.Symbol
Finds the type of symbol, text or data.
getType() –
Method in class mars.assembler.Token
Produces token type of this token.
getType() –
Method in exception mars.mips.hardware.AddressErrorException
Get the exception type (load or store).
getUndoManager() –
Method in class mars.venus.editors.generic.GenericTextArea
Returns the undo manager for this editing area
getUndoManager() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Returns the undo manager for this editing area
getUndoManager() –
Method in interface mars.venus.editors.MARSTextEditingArea
getUndoManager() –
Method in class mars.venus.EditPane
get the manager in charge of Undo and Redo operations
getUserHighAddress() –
Method in class mars.mips.hardware.MemoryConfiguration
getUserRegister(String) –
Static method in class mars.mips.hardware.RegisterFile
Get register object corresponding to given name.
getValue() –
Method in class mars.assembler.Token
Produces source code of this token.
getValue(int) –
Static method in class mars.mips.hardware.Coprocessor0
Returns the value of the register who’s number is num.
getValue(int) –
Static method in class mars.mips.hardware.Coprocessor1
Returns the value of the FPU register who’s number is num.
getValue() –
Method in class mars.mips.hardware.MemoryAccessNotice
Fetch the value of the access operation (the value read or written).
getValue() –
Method in class mars.mips.hardware.Register
Returns the value of the Register.
getValue(int) –
Static method in class mars.mips.hardware.RegisterFile
Returns the value of the register who’s number is num.
getValue() –
Method in class mars.simulator.SwingWorker
Get the value produced by the worker thread, or null if it
hasn’t been constructed yet.
getValueAt(int, int) –
Method in class mars.tools.BHTableModel
Returns the value of the cell at the given row and column
Required by the TableModel interface.
getValueDisplayBase() –
Method in class mars.venus.ExecutePane
Retrieve the number system base for displaying values (mem/register contents)
getValueDisplayBaseChooser() –
Method in class mars.venus.ExecutePane
Retrieve component used to set numerical base (10 or 16) of data value display.
getValueDisplayBaseMenuItem() –
Method in class mars.venus.VenusUI
Get reference to settings menu item for display base of memory/register values.
getValueNoNotify() –
Method in class mars.mips.hardware.Register
Returns the value of the Register.
getVisibleLines() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns the number of lines visible in this text area.
getWarningsAreErrors() –
Method in class mars.Settings
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
getWord(int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read a 4 byte word as an int.
getWordNoNotify(int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, read a 4 byte word as an int.
GLOBAL_POINTER_REGISTER –
Static variable in class mars.mips.hardware.RegisterFile
globalPointer –
Static variable in class mars.mips.hardware.Memory
base address for storing globals
Globals – Class in mars
Collection of globally-available data structures.
Globals() –
Constructor for class mars.Globals
GLOBL –
Static variable in class mars.assembler.Directives
go() –
Method in class mars.tools.AbstractMarsToolAndApplication
Run the simulator as stand-alone application.
grabAction –
Variable in class mars.venus.editors.jeditsyntax.InputHandler
grabFocus() –
Method in interface mars.venus.editors.MARSTextEditingArea
grabNextKeyStroke(ActionListener) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Grabs the next key typed event and invokes the specified
action with the key as a the action command.
GuiAction – Class in mars.venus
parent class for Action subclasses to be defined for every menu/toolbar
option.
GuiAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.GuiAction
H
HALF –
Static variable in class mars.assembler.Directives
HALF_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS halfword is 2.
handleExecBranchInst(int, boolean) –
Method in class mars.tools.BHTSimulator
Handles the execution of the branch instruction.
handleGrabAction(KeyEvent) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
If a key is being grabbed, this method should be called with
the appropriate key event.
handlePreBranchInst(ProgramStatement) –
Method in class mars.tools.BHTSimulator
Handles the execution branch instruction.
HardcopyWriter – Class in mars.venus
HardcopyWriter(Frame, String, int, double, double, double, double) –
Constructor for class mars.venus.HardcopyWriter
The constructor for this class has a bunch of arguments:
The frame argument is required for all printing in Java.
HardcopyWriter.PrintCanceledException – Exception in mars.venus
This is the exception class that the HardcopyWriter constructor
throws when the user clicks “Cancel” in the print dialog box.
HardcopyWriter.PrintCanceledException(String) –
Constructor for exception mars.venus.HardcopyWriter.PrintCanceledException
hasCompactTranslation() –
Method in class mars.mips.instructions.ExtendedInstruction
Determine whether or not this pseudo-instruction has a second
translation optimized for 16 bit address space: a compact version.
hasUnsavedEdits() –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
hasUnsavedEdits() –
Method in class mars.venus.FileStatus
Determine if file has been modified since last save or, if not yet saved, since
being created using New or Open.
haveMenuRequestFocus() –
Method in class mars.venus.VenusUI
Have the menu request keyboard focus.
headerfont –
Variable in class mars.venus.HardcopyWriter
headermetrics –
Variable in class mars.venus.HardcopyWriter
headery –
Variable in class mars.venus.HardcopyWriter
heapAddress –
Static variable in class mars.mips.hardware.Memory
heapBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for heap: 0x10040000 (I think from SPIM not MIPS)
height –
Variable in class mars.venus.HardcopyWriter
HelpAboutAction – Class in mars.venus
Action for the Help -> About menu item
HelpAboutAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.HelpAboutAction
HelpHelpAction – Class in mars.venus
Action for the Help -> Help menu item
HelpHelpAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.HelpHelpAction
helpPath –
Static variable in class mars.Globals
Path to folder that contains help text
HEXADECIMAL –
Static variable in class mars.venus.NumberDisplayBaseChooser
hexStringToBinaryString(String) –
Static method in class mars.util.Binary
Translate String consisting of hexadecimal digits into String consisting of
corresponding binary digits (‘1’s and ‘0’s).
HexTextDumpFormat – Class in mars.mips.dump
Class that represents the “hexadecimal text” memory dump format.
HexTextDumpFormat() –
Constructor for class mars.mips.dump.HexTextDumpFormat
Constructor.
highlights –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
highlightStepAtAddress(int) –
Method in class mars.venus.TextSegmentWindow
Highlights the source code line whose address matches the given
text segment address.
highlightStepAtAddress(int, boolean) –
Method in class mars.venus.TextSegmentWindow
Highlights the source code line whose address matches the given
text segment address.
highlightStepAtPC() –
Method in class mars.venus.TextSegmentWindow
Highlights the source code line whose address matches the current
program counter value.
highlightStepAtPC(boolean) –
Method in class mars.venus.TextSegmentWindow
Highlights the source code line whose address matches the current
program counter value.
highOrderLongToInt(long) –
Static method in class mars.util.Binary
Returns int representing the bit values of the high order 32 bits of given
64 bit long value.
HOME –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
horizontal –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
horizontalOffset –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
I
I_BRANCH_FORMAT –
Static variable in class mars.mips.instructions.BasicInstructionFormat
I_FORMAT –
Static variable in class mars.mips.instructions.BasicInstructionFormat
id –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The id of this token.
ID_COUNT –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The total number of defined token ids.
IDENTIFIER –
Static variable in class mars.assembler.TokenTypes
imagesPath –
Static variable in class mars.Globals
Path to folder that contains images
INCLUDE –
Static variable in class mars.assembler.Directives
incrementPC() –
Static method in class mars.mips.hardware.RegisterFile
Method to increment the Program counter in the general case (not a jump or branch).
inDataSegment(int) –
Static method in class mars.mips.hardware.Memory
Handy little utility to find out if given address is in MARS data
segment (starts at Memory.dataSegmentBaseAddress).
inDelaySlot() –
Method in class mars.simulator.BackStepper
Determine whether the next back-step action occurred as the result of
an instruction that executed in the “delay slot” of a delayed branch.
inDelaySlot() –
Static method in class mars.simulator.Simulator
Determine whether or not the next instruction to be executed is in a
“delay slot”.
init(JEditTextArea, TextAreaPainter.Highlight) –
Method in interface mars.venus.editors.jeditsyntax.TextAreaPainter.Highlight
Called after the highlight painter has been added.
initBHT(int, int, boolean) –
Method in class mars.tools.BHTableModel
Initializes the BHT with the given size and history.
initialize(boolean) –
Static method in class mars.Globals
Method called once upon system initialization to create the global data structures.
initializePostGUI() –
Method in class mars.tools.AbstractMarsToolAndApplication
Method that will be called once just after the GUI is constructed in the go() and action()
methods.
initializePostGUI() –
Method in class mars.tools.BitmapDisplay
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes.
initializePostGUI() –
Method in class mars.tools.CacheSimulator
The only post-GUI initialization is to create the initial cache object based on the default settings
of the various combo boxes.
initializePostGUI() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Initialization code to be executed after the GUI is configured.
initializePostGUI() –
Method in class mars.tools.MemoryReferenceVisualization
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes.
initializePreGUI() –
Method in class mars.tools.AbstractMarsToolAndApplication
Method that will be called once just before the GUI is constructed in the go() and action()
methods.
initializePreGUI() –
Method in class mars.tools.BitmapDisplay
Initialize all JComboBox choice structures not already initialized at declaration.
initializePreGUI() –
Method in class mars.tools.CacheSimulator
Initialize all JComboBox choice structures not already initialized at declaration.
initializePreGUI() –
Method in class mars.tools.InstructionCounter
initializePreGUI() –
Method in class mars.tools.InstructionStatistics
performs initialization tasks of the counters before the GUI is created.
initializePreGUI() –
Method in class mars.tools.KeyboardAndDisplaySimulator
initializePreGUI() –
Method in class mars.tools.MemoryReferenceVisualization
Initialize all JComboBox choice structures not already initialized at declaration.
initializeProgramCounter(int) –
Static method in class mars.mips.hardware.RegisterFile
For initializing the Program Counter.
initializeProgramCounter(boolean) –
Static method in class mars.mips.hardware.RegisterFile
Will initialize the Program Counter to either the default reset value, or the address
associated with source program global label “main”, if it exists as a text segment label
and the global setting is set.
inKernelDataSegment(int) –
Static method in class mars.mips.hardware.Memory
Handy little utility to find out if given address is in MARS kernel data
segment (starts at Memory.kernelDataSegmentBaseAddress).
inKernelTextSegment(int) –
Static method in class mars.mips.hardware.Memory
Handy little utility to find out if given address is in MARS kernel
text segment (starts at Memory.kernelTextBaseAddress).
inMemoryMapSegment(int) –
Static method in class mars.mips.hardware.Memory
Handy little utility to find out if given address is in the Memory Map area
starts at Memory.memoryMapBaseAddress, range 0xffff0000 to 0xffffffff.
InputHandler – Class in mars.venus.editors.jeditsyntax
An input handler converts the user’s key strokes into concrete actions.
InputHandler() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler
inputHandler –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
inputHandler –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
InputHandler.backspace – Class in mars.venus.editors.jeditsyntax
InputHandler.backspace() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.backspace
InputHandler.backspace_word – Class in mars.venus.editors.jeditsyntax
InputHandler.backspace_word() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.backspace_word
InputHandler.clip_copy – Class in mars.venus.editors.jeditsyntax
InputHandler.clip_copy() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.clip_copy
InputHandler.clip_cut – Class in mars.venus.editors.jeditsyntax
InputHandler.clip_cut() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.clip_cut
InputHandler.clip_paste – Class in mars.venus.editors.jeditsyntax
InputHandler.clip_paste() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.clip_paste
InputHandler.delete – Class in mars.venus.editors.jeditsyntax
InputHandler.delete() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.delete
InputHandler.delete_word – Class in mars.venus.editors.jeditsyntax
InputHandler.delete_word() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.delete_word
InputHandler.document_end – Class in mars.venus.editors.jeditsyntax
InputHandler.document_end(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.document_end
InputHandler.document_home – Class in mars.venus.editors.jeditsyntax
InputHandler.document_home(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.document_home
InputHandler.end – Class in mars.venus.editors.jeditsyntax
InputHandler.end(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.end
InputHandler.home – Class in mars.venus.editors.jeditsyntax
InputHandler.home(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.home
InputHandler.insert_break – Class in mars.venus.editors.jeditsyntax
InputHandler.insert_break() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.insert_break
InputHandler.insert_char – Class in mars.venus.editors.jeditsyntax
InputHandler.insert_char() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.insert_char
InputHandler.insert_tab – Class in mars.venus.editors.jeditsyntax
InputHandler.insert_tab() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.insert_tab
InputHandler.MacroRecorder – Interface in mars.venus.editors.jeditsyntax
Macro recorder.
InputHandler.next_char – Class in mars.venus.editors.jeditsyntax
InputHandler.next_char(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.next_char
InputHandler.next_line – Class in mars.venus.editors.jeditsyntax
InputHandler.next_line(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.next_line
InputHandler.next_page – Class in mars.venus.editors.jeditsyntax
InputHandler.next_page(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.next_page
InputHandler.next_word – Class in mars.venus.editors.jeditsyntax
InputHandler.next_word(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.next_word
InputHandler.NonRecordable – Interface in mars.venus.editors.jeditsyntax
If an action implements this interface, it should not be recorded
by the macro recorder.
InputHandler.NonRepeatable – Interface in mars.venus.editors.jeditsyntax
If an action implements this interface, it should not be repeated.
InputHandler.overwrite – Class in mars.venus.editors.jeditsyntax
InputHandler.overwrite() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.overwrite
InputHandler.prev_char – Class in mars.venus.editors.jeditsyntax
InputHandler.prev_char(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.prev_char
InputHandler.prev_line – Class in mars.venus.editors.jeditsyntax
InputHandler.prev_line(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.prev_line
InputHandler.prev_page – Class in mars.venus.editors.jeditsyntax
InputHandler.prev_page(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.prev_page
InputHandler.prev_word – Class in mars.venus.editors.jeditsyntax
InputHandler.prev_word(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.prev_word
InputHandler.repeat – Class in mars.venus.editors.jeditsyntax
InputHandler.repeat() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.repeat
InputHandler.select_all – Class in mars.venus.editors.jeditsyntax
InputHandler.select_all() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.select_all
InputHandler.toggle_rect – Class in mars.venus.editors.jeditsyntax
InputHandler.toggle_rect() –
Constructor for class mars.venus.editors.jeditsyntax.InputHandler.toggle_rect
InputHandler.Wrapper – Interface in mars.venus.editors.jeditsyntax
For use by EditAction.Wrapper only.
INSERT_BREAK –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
INSERT_CHAR –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
INSERT_TAB –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
insertLines(int, int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Informs the token marker that lines have been inserted into
the document.
inSteppedExecution() –
Method in class mars.MIPSprogram
Will be true only while in process of simulating a program statement
in step mode (e.g.
Instruction – Class in mars.mips.instructions
Base class to represent member of MIPS instruction set.
Instruction() –
Constructor for class mars.mips.instructions.Instruction
INSTRUCTION_LENGTH –
Static variable in class mars.mips.instructions.Instruction
Length in bytes of a machine instruction.
INSTRUCTION_LENGTH_BITS –
Static variable in class mars.mips.instructions.Instruction
InstructionCounter – Class in mars.tools
Instruction counter tool.
InstructionCounter(String, String) –
Constructor for class mars.tools.InstructionCounter
Simple constructor, likely used to run a stand-alone memory reference visualizer.
InstructionCounter() –
Constructor for class mars.tools.InstructionCounter
Simple construction, likely used by the MARS Tools menu mechanism.
instructionSet –
Static variable in class mars.Globals
The set of implemented MIPS instructions.
InstructionSet – Class in mars.mips.instructions
The list of Instruction objects, each of which represents a MIPS instruction.
InstructionSet() –
Constructor for class mars.mips.instructions.InstructionSet
Creates a new InstructionSet object.
InstructionStatistics – Class in mars.tools
A MARS tool for obtaining instruction statistics by instruction category.
InstructionStatistics(String, String) –
Constructor for class mars.tools.InstructionStatistics
Simple constructor, likely used to run a stand-alone enhanced instruction counter.
InstructionStatistics() –
Constructor for class mars.tools.InstructionStatistics
Simple construction, likely used by the MARS Tools menu mechanism.
INTEGER_16 –
Static variable in class mars.assembler.TokenTypes
INTEGER_16U –
Static variable in class mars.assembler.TokenTypes
INTEGER_32 –
Static variable in class mars.assembler.TokenTypes
INTEGER_5 –
Static variable in class mars.assembler.TokenTypes
IntelHexDumpFormat – Class in mars.mips.dump
Intel’s Hex memory initialization format
IntelHexDumpFormat() –
Constructor for class mars.mips.dump.IntelHexDumpFormat
Constructor.
INTERNAL_FIRST –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The first id that can be used for internal state
in a token marker.
INTERNAL_LAST –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The last id that can be used for internal state
in a token marker.
interrupt() –
Method in class mars.simulator.SwingWorker
A new method that interrupts the worker thread.
inTextSegment(int) –
Static method in class mars.mips.hardware.Memory
Handy little utility to find out if given address is in MARS text
segment (starts at Memory.textBaseAddress).
IntroToTools – Class in mars.tools
The “hello world” of MarsTools!
IntroToTools(String, String) –
Constructor for class mars.tools.IntroToTools
Simple constructor, likely used to run a stand-alone memory reference visualizer.
IntroToTools() –
Constructor for class mars.tools.IntroToTools
Simple constructor, likely used by the MARS Tools menu mechanism
intToAscii(int) –
Static method in class mars.util.Binary
Produce ASCII string equivalent of integer value, interpreting it as 4 one-byte
characters.
intToBinaryString(int, int) –
Static method in class mars.util.Binary
Translate int value into a String consisting of ‘1’s and ‘0’s.
intToBinaryString(int) –
Static method in class mars.util.Binary
Translate int value into a String consisting of ‘1’s and ‘0’s.
intToHalfHexString(int) –
Static method in class mars.util.Binary
Returns a 6 character string representing the 16-bit hexadecimal equivalent of the
given integer value.
intToHexString(int) –
Static method in class mars.util.Binary
Prefix a hexadecimal-indicating string “0x” to the string which is
returned by the method “Integer.toHexString”.
INVALID –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Invalid token id.
invalidateLine(int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Marks a line as needing a repaint.
invalidateLineRange(int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Marks a range of lines as needing a repaint.
invalidateSelectedLines() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Repaints the lines containing the selection.
InvalidRegisterAccessException – Exception in mars.mips.hardware
Represents attempt to access double precision register using an odd
(e.g.
InvalidRegisterAccessException() –
Constructor for exception mars.mips.hardware.InvalidRegisterAccessException
Constructor for IllegalRegisterException.
isAssembled() –
Static method in class mars.venus.FileStatus
Tells whether the file has been assembled.
isBeingUsedAsAMarsTool –
Variable in class mars.tools.AbstractMarsToolAndApplication
isBlockCaretEnabled() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns true if the caret should be drawn as a block, false otherwise.
isBold() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns true if boldface is enabled for this style.
isBracketHighlightEnabled() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns true if bracket highlighting is enabled, false otherwise.
isBranchInstruction(ProgramStatement) –
Static method in class mars.tools.BHTSimulator
Determines if the instruction is a branch instruction or not.
isCaretBlinkEnabled() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns true if the caret is blinking, false otherwise.
isCaretVisible() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns true if the caret is visible, false otherwise.
isConnected() –
Method in class mars.tools.AbstractMarsToolAndApplication.ConnectButton
isEditable() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns true if this text area is editable, false otherwise.
isEdited() –
Static method in class mars.venus.FileStatus
Tells whether the file has been edited since it has been saved.
isEmpty() –
Method in class mars.assembler.TokenList
Returns empty/non-empty status of list.
isFloatingDirective(Directives) –
Static method in class mars.assembler.Directives
Lets you know whether given directive is for floating number (FLOAT,DOUBLE).
isFloatingTokenType(TokenTypes) –
Static method in class mars.assembler.TokenTypes
Lets you know if given tokentype is for floating point numbers (REAL_NUMBER).
isHex(String) –
Static method in class mars.util.Binary
Parsing method to see if a string represents a hex number.
isIntegerDirective(Directives) –
Static method in class mars.assembler.Directives
Lets you know whether given directive is for integer (WORD,HALF,BYTE).
isIntegerTokenType(TokenTypes) –
Static method in class mars.assembler.TokenTypes
Lets you know if given tokentype is for integers (INTGER_5, INTEGER_16, INTEGER_32).
isItalic() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns true if italics is enabled for this style.
isLineHighlightEnabled() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns true if line highlight is enabled, false otherwise.
isManagingFocus() –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Returns if this component can be traversed by pressing the
Tab key.
isNew() –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
isNew() –
Method in class mars.venus.FileStatus
Determine if file is “new”, which means created using New but not yet saved.
isNextLineRequested() –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Returns true if the next line should be repainted.
isObserving() –
Method in class mars.tools.AbstractMarsToolAndApplication
Query method to let you know if the tool/app is (or could be) currently
“observing” any MIPS resources.
isOctal(String) –
Static method in class mars.util.Binary
Parsing method to see if a string represents an octal number.
isOverwriteEnabled() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns true if overwrite mode is enabled, false otherwise.
isPlain() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns true if no font styles are enabled.
isRepeatEnabled() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Returns if repeating is enabled.
isRepeatEnabled() –
Method in class mars.venus.RepeatButton
Checks if the button should fire events when held.
isSaved() –
Static method in class mars.venus.FileStatus
Tells whether the file has been saved.
isSelectionRectangular() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Returns true if the selection is rectangular, false otherwise.
isValidIdentifier(String) –
Static method in class mars.assembler.TokenTypes
isWarning() –
Method in class mars.ErrorMessage
Determine whether this message represents error or warning.
J
J_FORMAT –
Static variable in class mars.mips.instructions.BasicInstructionFormat
JEditBasedTextArea – Class in mars.venus.editors.jeditsyntax
Adaptor subclass for JEditTextArea
Provides those methods required by the MARSTextEditingArea interface
that are not defined by JEditTextArea.
JEditBasedTextArea(EditPane, JComponent) –
Constructor for class mars.venus.editors.jeditsyntax.JEditBasedTextArea
JEditTextArea – Class in mars.venus.editors.jeditsyntax
jEdit’s text area component.
JEditTextArea(JComponent) –
Constructor for class mars.venus.editors.jeditsyntax.JEditTextArea
Creates a new JEditTextArea with the default settings.
JEditTextArea(TextAreaDefaults, JComponent) –
Constructor for class mars.venus.editors.jeditsyntax.JEditTextArea
job –
Variable in class mars.venus.HardcopyWriter
jobname –
Variable in class mars.venus.HardcopyWriter
K
KDATA –
Static variable in class mars.assembler.Directives
kernelBaseAddress –
Static variable in class mars.mips.hardware.Memory
kernel boundary.
kernelDataBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for kernel data segment: 0x90000000
kernelDataSegmentLimitAddress –
Static variable in class mars.mips.hardware.Memory
kernelHighAddress –
Static variable in class mars.mips.hardware.Memory
highest address acessible in kernel mode.
kernelTextBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for kernel text segment: 0x80000000
kernelTextLimitAddress –
Static variable in class mars.mips.hardware.Memory
KeyboardAndDisplaySimulator – Class in mars.tools
Keyboard and Display Simulator.
KeyboardAndDisplaySimulator(String, String) –
Constructor for class mars.tools.KeyboardAndDisplaySimulator
Simple constructor, likely used to run a stand-alone keyboard/display simulator.
KeyboardAndDisplaySimulator() –
Constructor for class mars.tools.KeyboardAndDisplaySimulator
Simple constructor, likely used by the MARS Tools menu mechanism
keyPressed(KeyEvent) –
Method in class mars.tools.AbstractMarsToolAndApplication.EnterKeyListener
keyPressed(KeyEvent) –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Handle a key pressed event.
keyTyped(KeyEvent) –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Handle a key typed event.
KEYWORD1 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Keyword 1 token id.
KEYWORD2 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Keyword 2 token id.
KEYWORD3 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Keyword 3 token id.
KeywordMap – Class in mars.venus.editors.jeditsyntax
A KeywordMap is similar to a hashtable in that it maps keys
to values.
KeywordMap(boolean) –
Constructor for class mars.venus.editors.jeditsyntax.KeywordMap
Creates a new KeywordMap.
KeywordMap(boolean, int) –
Constructor for class mars.venus.editors.jeditsyntax.KeywordMap
Creates a new KeywordMap.
KTEXT –
Static variable in class mars.assembler.Directives
L
LABEL –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Label token id.
LABEL_SORT_STATE –
Static variable in class mars.Settings
State for sorting label window display
LABEL_WINDOW_VISIBILITY –
Static variable in class mars.Settings
Default visibilty of label window (symbol table).
LabelsWindow – Class in mars.venus
Represents the Labels window, which is a type of JInternalFrame.
LabelsWindow() –
Constructor for class mars.venus.LabelsWindow
Constructor for the Labels (symbol table) window.
lastAddress –
Variable in class mars.tools.InstructionCounter
The last address we saw.
lastAddress –
Variable in class mars.tools.InstructionStatistics
The last address we saw.
lastLine –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
The last tokenized line.
lastToken –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
The last token in the list.
LEFT_OF_SCROLLBAR –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
Adding components with this name to the text area will place
them left of the horizontal scroll bar.
LEFT_PAREN –
Static variable in class mars.assembler.TokenTypes
length –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The length of this token.
length –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
The number of lines in the model being tokenized.
LINE_PREFIX –
Static variable in class mars.ErrorList
lineascent –
Variable in class mars.venus.HardcopyWriter
lineheight –
Variable in class mars.venus.HardcopyWriter
lineHighlight –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
lineHighlight –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
lineHighlightColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
lineHighlightColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
lineInfo –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
An array for storing information about lines.
linenum –
Variable in class mars.venus.HardcopyWriter
lines_per_page –
Variable in class mars.venus.HardcopyWriter
lineSegment –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
lineToY(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts a line index to a y co-ordinate.
listenerList –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
LITERAL1 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Literal 1 token id.
LITERAL2 –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Literal 2 token id.
LITTLE_ENDIAN –
Static variable in class mars.mips.hardware.Memory
Constant representing byte order of each memory word.
loadDumpFormats() –
Method in class mars.mips.dump.DumpFormatLoader
Dynamically loads dump formats into an ArrayList.
loadPropertiesFromFile(String) –
Static method in class mars.util.PropertiesFile
Produce Properties (a Hashtable) object containing key-value pairs
from specified properties file.
longToBinaryString(long, int) –
Static method in class mars.util.Binary
Translate long value into a String consisting of ‘1’s and ‘0’s.
longToBinaryString(long) –
Static method in class mars.util.Binary
Translate long value into a String consisting of ‘1’s and ‘0’s.
longToHexString(long) –
Static method in class mars.util.Binary
Prefix a hexadecimal-indicating string “0x” to the string equivalent to the
hexadecimal value in the long parameter.
lookup(Segment, int, int) –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
Looks up a key.
LOW_DOUBLE_VALUE –
Static variable in class mars.assembler.DataTypes
Largest magnitude negative value that can be stored in a MIPS double(negative of the max)
LOW_FLOAT_VALUE –
Static variable in class mars.assembler.DataTypes
Largest magnitude negative value that can be stored in a MIPS float (negative of the max)
lowOrderLongToInt(long) –
Static method in class mars.util.Binary
Returns int representing the bit values of the low order 32 bits of given
64 bit long value.
M
MACRO –
Static variable in class mars.assembler.Directives
Macro – Class in mars.assembler
Stores information of a macro definition.
Macro() –
Constructor for class mars.assembler.Macro
MACRO_ARG –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Macro parameter token.
MACRO_PARAMETER –
Static variable in class mars.assembler.TokenTypes
MacroPool – Class in mars.assembler
Stores information of macros defined by now.
MacroPool(MIPSprogram) –
Constructor for class mars.assembler.MacroPool
Create an empty MacroPool for given program
magicCaret –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
main(String[]) –
Static method in class Mars
main(String[]) –
Static method in class mars.tools.BitmapDisplay
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.CacheSimulator
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.DigitalLabSim
main(String[]) –
Static method in class mars.tools.FloatRepresentation
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.IntroToTools
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.KeyboardAndDisplaySimulator
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.MemoryReferenceVisualization
Main provided for pure stand-alone use.
main(String[]) –
Static method in class mars.tools.ScreenMagnifier
main(String[]) –
Static method in class mars.venus.HardcopyWriter
A program that prints the specified file using HardcopyWriter
main(String[]) –
Static method in class mars.venus.RepeatButton
Main method, for testing.
MainPane – Class in mars.venus
Creates the tabbed areas in the UI and also created the internal windows that
exist in them.
MainPane(VenusUI, Editor, RegistersWindow, Coprocessor1Window, Coprocessor0Window) –
Constructor for class mars.venus.MainPane
Constructor for the MainPane class.
mainUI –
Variable in class mars.venus.GuiAction
makeTemplateSubstitutions(MIPSprogram, String, TokenList) –
Static method in class mars.mips.instructions.ExtendedInstruction
Given a basic instruction template and the list of tokens from an extended
instruction statement, substitute operands from the token list appropriately into the
template to generate the basic statement.
mapLength –
Variable in class mars.venus.editors.jeditsyntax.KeywordMap
markTokens(Segment, int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
A wrapper for the lower-level markTokensImpl method
that is called to split a line up into tokens.
markTokensImpl(byte, Segment, int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
markTokensImpl(byte, Segment, int) –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
An abstract method that splits a line up into tokens.
mars – package mars
Mars – Class in
Portal to Mars
Mars() –
Constructor for class Mars
mars.assembler – package mars.assembler
mars.mips.dump – package mars.mips.dump
mars.mips.hardware – package mars.mips.hardware
mars.mips.instructions – package mars.mips.instructions
mars.mips.instructions.syscalls – package mars.mips.instructions.syscalls
mars.simulator – package mars.simulator
mars.tools – package mars.tools
mars.util – package mars.util
mars.venus – package mars.venus
mars.venus.editors – package mars.venus.editors
mars.venus.editors.generic – package mars.venus.editors.generic
mars.venus.editors.jeditsyntax – package mars.venus.editors.jeditsyntax
mars.venus.editors.jeditsyntax.tokenmarker – package mars.venus.editors.jeditsyntax.tokenmarker
MarsBot – Class in mars.tools
Simple Demo of Mars tool capability
MarsBot() –
Constructor for class mars.tools.MarsBot
MarsLaunch – Class in mars
Launch the Mars application
MarsLaunch(String[]) –
Constructor for class mars.MarsLaunch
MarsSplashScreen – Class in mars
Produces MARS splash screen.
Adapted from http://www.java-tips.org/content/view/1267/2/
MarsSplashScreen(int) –
Constructor for class mars.MarsSplashScreen
MARSTextEditingArea – Interface in mars.venus.editors
Specifies capabilities that any test editor used in MARS must have.
MarsTool – Interface in mars.tools
Interface for any tool that interacts with an executing MIPS program.
MATCH_ALL_EXTENSIONS –
Static variable in class mars.util.FilenameFinder
matchDirective(String) –
Static method in class mars.assembler.Directives
Find Directive object, if any, which matches the given String.
matchesAnyMacroName(String) –
Method in class mars.assembler.MacroPool
matchOperator(String) –
Method in class mars.mips.instructions.InstructionSet
Given an operator mnemonic, will return the corresponding Instruction object(s)
from the instruction set.
matchTokenType(String) –
Static method in class mars.assembler.TokenTypes
Classifies the given token into one of the MIPS types.
MAX_BLINK_RATE –
Static variable in class mars.venus.Editor
MAX_BYTE_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum value that can be stored in a MIPS byte is 27-1
MAX_DOUBLE_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum positive finite value that can be stored in a MIPS double is same as Java Double
MAX_FLOAT_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum positive finite value that can be stored in a MIPS float is same as Java Float
MAX_HALF_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum value that can be stored in a MIPS halfword is 215-1
MAX_SIZE –
Static variable in class mars.util.EditorFont
MAX_STEPS –
Static variable in class mars.simulator.Simulator
MAX_TAB_SIZE –
Static variable in class mars.venus.Editor
MAX_UHALF_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum value that can be stored in an unsigned MIPS halfword is 216-1
MAX_WORD_VALUE –
Static variable in class mars.assembler.DataTypes
Maximum value that can be stored in a MIPS word is 231-1
maxExampleLength(ArrayList) –
Static method in class mars.venus.editors.jeditsyntax.PopupHelpItem
MAXIMUM_SCROLLED_CHARACTERS –
Static variable in class mars.venus.MessagesPane
maximumBacksteps –
Static variable in class mars.Globals
Maximum number of back-step operations to buffer
maximumErrorMessages –
Static variable in class mars.Globals
Maximum number of assembler errors produced by one assemble operation
maximumMessageCharacters –
Static variable in class mars.Globals
Maximum length of scrolled message window (MARS Messages and Run I/O)
maxSteps –
Static variable in class mars.venus.RunGoAction
memory –
Static variable in class mars.Globals
Simulated MIPS memory component.
Memory – Class in mars.mips.hardware
Represents MIPS memory.
MEMORY_CONFIGURATION –
Static variable in class mars.Settings
Identifier of current memory configuration
MemoryAccessNotice – Class in mars.mips.hardware
Object provided to Observers of runtime access to MIPS memory.
memoryAndRegistersLock –
Static variable in class mars.Globals
Lock variable used at head of synchronized block to guard MIPS memory and registers
MemoryConfiguration – Class in mars.mips.hardware
Models the memory configuration for the simulated MIPS machine.
MemoryConfiguration(String, String, String[], int[]) –
Constructor for class mars.mips.hardware.MemoryConfiguration
MemoryConfigurations – Class in mars.mips.hardware
Models the collection of MIPS memory configurations.
MemoryConfigurations() –
Constructor for class mars.mips.hardware.MemoryConfigurations
MemoryDump – Class in mars.util
MemoryDump() –
Constructor for class mars.util.MemoryDump
memoryMapBaseAddress –
Static variable in class mars.mips.hardware.Memory
starting address for memory mapped I/O: 0xffff0000 (-65536)
memoryMapLimitAddress –
Static variable in class mars.mips.hardware.Memory
MemoryReferenceVisualization – Class in mars.tools
Memory reference visualization.
MemoryReferenceVisualization(String, String) –
Constructor for class mars.tools.MemoryReferenceVisualization
Simple constructor, likely used to run a stand-alone memory reference visualizer.
MemoryReferenceVisualization() –
Constructor for class mars.tools.MemoryReferenceVisualization
Simple constructor, likely used by the MARS Tools menu mechanism
menu –
Variable in class mars.venus.VenusUI
MESSAGE_SEPARATOR –
Static variable in class mars.ErrorList
MessagesPane – Class in mars.venus
Creates the message window at the bottom of the UI.
MessagesPane() –
Constructor for class mars.venus.MessagesPane
Constructor for the class, sets up two fresh tabbed text areas for program feedback.
metrics –
Variable in class mars.venus.HardcopyWriter
MIFDumpFormat – Class in mars.mips.dump
The Memory Initialization File (.mif) VHDL-supported file format
This is documented for the Altera platform at
www.altera.com/support/software/nativelink/quartus2/glossary/def_mif.html.
MIFDumpFormat() –
Constructor for class mars.mips.dump.MIFDumpFormat
Constructor.
MIN_BLINK_RATE –
Static variable in class mars.venus.Editor
MIN_BYTE_VALUE –
Static variable in class mars.assembler.DataTypes
Lowest value that can be stored in a MIPS byte is -27
MIN_HALF_VALUE –
Static variable in class mars.assembler.DataTypes
Lowest value that can be stored in a MIPS halfword is -215
MIN_SIZE –
Static variable in class mars.util.EditorFont
MIN_TAB_SIZE –
Static variable in class mars.venus.Editor
MIN_UHALF_VALUE –
Static variable in class mars.assembler.DataTypes
Lowest value that can be stored in na unsigned MIPS halfword is 0
MIN_WORD_VALUE –
Static variable in class mars.assembler.DataTypes
Lowest value that can be stored in a MIPS word is -231
MINUS –
Static variable in class mars.assembler.TokenTypes
MIPSprogram – Class in mars
Internal representations of MIPS program.
MIPSprogram() –
Constructor for class mars.MIPSprogram
MIPSTokenMarker – Class in mars.venus.editors.jeditsyntax.tokenmarker
MIPS token marker.
MIPSTokenMarker() –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
MIPSTokenMarker(KeywordMap) –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
mnemonic –
Variable in class mars.mips.instructions.Instruction
The instruction name.
modifyDisplay(char) –
Method in class mars.tools.DigitalLabSim.SevenSegmentDisplay
modifyDisplay(int, char) –
Method in class mars.tools.DigitalLabSim.SevenSegmentPanel
mouseClicked(MouseEvent) –
Method in class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
mouseClicked(MouseEvent) –
Method in class mars.venus.RepeatButton
Handle mouse clicked events.
mouseEntered(MouseEvent) –
Method in class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
mouseEntered(MouseEvent) –
Method in class mars.venus.RepeatButton
Handle mouse entered events.
mouseExited(MouseEvent) –
Method in class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
mouseExited(MouseEvent) –
Method in class mars.venus.RepeatButton
Handle mouse exited events.
mousePressed(MouseEvent) –
Method in class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
mousePressed(MouseEvent) –
Method in class mars.venus.PopupListener
mousePressed(MouseEvent) –
Method in class mars.venus.RepeatButton
Handle mouse pressed events.
mouseReleased(MouseEvent) –
Method in class mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
mouseReleased(MouseEvent) –
Method in class mars.venus.PopupListener
mouseReleased(MouseEvent) –
Method in class mars.venus.RepeatButton
Handle mouse released events.
N
NEW_EDITED –
Static variable in class mars.venus.FileStatus
New edit window with unsaved edits
NEW_NOT_EDITED –
Static variable in class mars.venus.FileStatus
New edit window with no edits
newFile() –
Method in class mars.venus.Editor
Perform “new” operation to create an empty tab.
newFile() –
Method in class mars.venus.EditTabbedPane
Carries out all necessary operations to implement
the New operation from the File menu.
newline() –
Method in class mars.venus.HardcopyWriter
This internal method begins a new line
newpage() –
Method in class mars.venus.HardcopyWriter
This internal method begins a new page and prints the header.
next –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
The next token in the linked list.
NEXT_CHAR –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
NEXT_LINE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
NEXT_PAGE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
NEXT_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
nextIndex(String, String, int, boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Returns next posn of word in text – forward search.
nextIndex(String, String, int, boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Returns next posn of word in text – forward search.
nextLineRequested –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
True if the next line should be painted.
nextTabStop(float, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Implementation of TabExpander interface.
NO_DEVICE –
Static variable in class mars.simulator.Simulator
NO_FILE –
Static variable in class mars.venus.FileStatus
initial state or after close
NORMAL_TERMINATION –
Static variable in class mars.simulator.Simulator
NOT_EDITED –
Static variable in class mars.venus.FileStatus
open/saved edit window with no edits
NOT_FOUND –
Static variable in class mars.assembler.SymbolTable
notifyObservers() –
Method in class mars.mips.hardware.Memory
Overridden to be unavailable.
notifyObservers(Object) –
Method in class mars.mips.hardware.Memory
Overridden to be unavailable.
NULL –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Normal text token id.
NUMBER_OF_CHARACTERS_TO_CUT –
Static variable in class mars.venus.MessagesPane
numberDisplayBaseChanged(NumberDisplayBaseChooser) –
Method in class mars.venus.ExecutePane
Update display of columns based on state of given chooser.
NumberDisplayBaseChooser – Class in mars.venus
Use to select base for displaying numbers.
NumberDisplayBaseChooser(String, boolean) –
Constructor for class mars.venus.NumberDisplayBaseChooser
constructor.
O
obj –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
This is for use by the token marker implementations
themselves.
ODD_ROW_BACKGROUND –
Static variable in class mars.Settings
RGB color for table odd row background (text, data, register displays)
ODD_ROW_FONT –
Static variable in class mars.Settings
Font for table odd row background (text, data, register displays)
ODD_ROW_FOREGROUND –
Static variable in class mars.Settings
RGB color for table odd row foreground (text, data, register displays)
offsetToX(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts an offset in a line into an x co-ordinate.
open() –
Method in class mars.venus.Editor
Open file in a new tab.
openFile(String, int) –
Static method in class mars.util.SystemIO
Open a file for either reading or writing.
openFile() –
Method in class mars.venus.EditTabbedPane
Carries out all necessary operations to implement
the Open operation from the File menu.
openFile(File) –
Method in class mars.venus.EditTabbedPane
Carries out all necessary operations to open the
specified file in the editor.
OPENING –
Static variable in class mars.venus.FileStatus
file is being opened.
OperandFormat – Class in mars.assembler
Provides utility method related to MIPS operand formats.
operandMask –
Static variable in class mars.mips.instructions.Instruction
Characters used in instruction mask to indicate bit positions
for ‘f’irst, ‘s’econd, and ‘t’hird operands.
OPERATOR –
Static variable in class mars.assembler.TokenTypes
OPERATOR –
Static variable in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Operator token id.
outOfRange(Directives, int) –
Static method in class mars.assembler.DataTypes
Determines whether given integer value falls within value range for given directive.
outOfRange(Directives, double) –
Static method in class mars.assembler.DataTypes
Determines whether given floating point value falls within value range for given directive.
OVERWRITE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
overwrite –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
overwriteSetSelectedText(String) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Similar to setSelectedText(), but overstrikes the
appropriate number of characters if overwrite mode is enabled.
P
page –
Variable in class mars.venus.HardcopyWriter
pageBreak() –
Method in class mars.venus.HardcopyWriter
End the current page.
pagedpi –
Variable in class mars.venus.HardcopyWriter
pagenum –
Variable in class mars.venus.HardcopyWriter
pagesize –
Variable in class mars.venus.HardcopyWriter
paint(Graphics) –
Method in class mars.tools.DigitalLabSim.SevenSegmentDisplay
paint(Graphics) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Repaints the text.
paintBracketHighlight(Graphics, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintCaret(Graphics, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
painter –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
paintHighlight(Graphics, int, int) –
Method in interface mars.venus.editors.jeditsyntax.TextAreaPainter.Highlight
This should paint the highlight and delgate to the
next highlight painter.
paintHighlight(Graphics, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintInvalid –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
paintInvalid –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintLine(Graphics, TokenMarker, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintLineHighlight(Graphics, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintPlainLine(Graphics, int, Font, Color, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
paintSyntaxLine(Segment, Token, SyntaxStyle[], TabExpander, Graphics, int, int) –
Static method in class mars.venus.editors.jeditsyntax.SyntaxUtilities
paintSyntaxLine(Graphics, TokenMarker, int, Font, Color, int, int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
parseKeyStroke(String) –
Static method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Converts a string to a keystroke.
paste() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Inserts the clipboard contents into the text.
paste() –
Method in interface mars.venus.editors.MARSTextEditingArea
pasteText() –
Method in class mars.venus.EditPane
paste clipboard contents at cursor position
PAUSE_OR_STOP –
Static variable in class mars.simulator.Simulator
paused(boolean, int, ProcessingException) –
Method in class mars.venus.RunGoAction
Method to be called when Pause is selected through menu/toolbar/shortcut.
performApply() –
Method in class mars.venus.AbstractFontSettingDialog
performSpecialClosingDuties() –
Method in class mars.tools.AbstractMarsToolAndApplication
This method is called when tool/app is exited either through the close/exit button or the window’s X box.
PLUS –
Static variable in class mars.assembler.TokenTypes
popFromCallStack() –
Method in class mars.assembler.MacroPool
populate() –
Method in class mars.mips.instructions.InstructionSet
Adds all instructions to the set.
popup –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
popup –
Static variable in class mars.venus.editors.jeditsyntax.SyntaxUtilities
popup –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
POPUP_INSTRUCTION_GUIDANCE –
Static variable in class mars.Settings
Flag to control whether or not editor will provide popup instruction guidance while typing
POPUP_SYSCALL_INPUT –
Static variable in class mars.Settings
Flag to control whether or not simulator will use popup dialog for input syscalls
PopupHelpItem – Class in mars.venus.editors.jeditsyntax
Handly little class to contain help information for a popupMenu or
tool tip item.
PopupHelpItem(String, String, String, boolean) –
Constructor for class mars.venus.editors.jeditsyntax.PopupHelpItem
Create popup help item.
PopupHelpItem(String, String, String) –
Constructor for class mars.venus.editors.jeditsyntax.PopupHelpItem
Create popup help item, where match is result of an exact-match search.
PopupListener – Class in mars.venus
PopupListener(JPopupMenu) –
Constructor for class mars.venus.PopupListener
popupShowing –
Static variable in class mars.venus.editors.jeditsyntax.SyntaxUtilities
Paints the specified line onto the graphics context.
POSITION_PREFIX –
Static variable in class mars.ErrorList
postMarsMessage(String) –
Method in class mars.venus.MessagesPane
Post a message to the assembler display
postRunMessage(String) –
Method in class mars.venus.MessagesPane
Post a message to the runtime display
preferredTextAreaDimension –
Static variable in class mars.tools.KeyboardAndDisplaySimulator
prefixMatchDirectives(String) –
Static method in class mars.assembler.Directives
Find Directive object, if any, which contains the given string as a prefix.
prefixMatchOperator(String) –
Method in class mars.mips.instructions.InstructionSet
Given a string, will return the Instruction object(s) from the instruction
set whose operator mnemonic prefix matches it.
prepareFilesForAssembly(ArrayList, String, String) –
Method in class mars.MIPSprogram
Prepares the given list of files for assembly.
PREV_CHAR –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
PREV_LINE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
PREV_PAGE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
PREV_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
printprops –
Static variable in class mars.venus.HardcopyWriter
printString(String) –
Static method in class mars.util.SystemIO
Implements syscall having 4 in $v0, to print a string.
ProcessingException – Exception in mars
Class to represent error that occurs while assembling or running a MIPS program.
ProcessingException(ErrorList) –
Constructor for exception mars.ProcessingException
Constructor for ProcessingException.
ProcessingException(ProgramStatement, String) –
Constructor for exception mars.ProcessingException
Constructor for ProcessingException to handle runtime exceptions
ProcessingException(ProgramStatement, String, int) –
Constructor for exception mars.ProcessingException
Constructor for ProcessingException to handle runtime exceptions
ProcessingException(ProgramStatement, AddressErrorException) –
Constructor for exception mars.ProcessingException
Constructor for ProcessingException to handle address runtime exceptions
ProcessingException() –
Constructor for exception mars.ProcessingException
Constructor for ProcessingException.
processKeyEvent(KeyEvent) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Forwards key events directly to the input handler.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.AbstractMarsToolAndApplication
Override this method to process a received notice from MIPS Observable (memory or register)
It will only be called if the notice was generated as the result of MIPS instruction execution.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.BHTSimulator
Callback for text segment access by the MIPS simulator.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.BitmapDisplay
Update display when connected MIPS program accesses (data) memory.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.CacheSimulator
Apply caching policies and update display when connected MIPS program accesses (data) memory.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.InstructionCounter
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.InstructionStatistics
method that is called each time the MIPS simulator accesses the text segment.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.KeyboardAndDisplaySimulator
Update display when connected MIPS program accesses (data) memory.
processMIPSUpdate(Observable, AccessNotice) –
Method in class mars.tools.MemoryReferenceVisualization
Update display when connected MIPS program accesses (data) memory.
program –
Static variable in class mars.Globals
the program currently being worked with.
PROGRAM_ARGUMENTS –
Static variable in class mars.Settings
Flag to determine whether or not to display and use program arguments
ProgramArgumentList – Class in mars.simulator
Models Program Arguments, one or more strings provided to the MIPS
program at runtime.
ProgramArgumentList(String) –
Constructor for class mars.simulator.ProgramArgumentList
Constructor that parses string to produce list.
ProgramArgumentList(String[]) –
Constructor for class mars.simulator.ProgramArgumentList
Constructor that gets list from String array, one argument per element.
ProgramArgumentList(String[], int) –
Constructor for class mars.simulator.ProgramArgumentList
Constructor that gets list from section of String array, one
argument per element.
ProgramArgumentList(ArrayList) –
Constructor for class mars.simulator.ProgramArgumentList
Constructor that gets list from ArrayList of String, one argument per element.
ProgramArgumentList(ArrayList, int) –
Constructor for class mars.simulator.ProgramArgumentList
Constructor that gets list from section of String ArrayList, one
argument per element.
ProgramStatement – Class in mars
Represents one assembly/machine statement.
ProgramStatement(MIPSprogram, String, TokenList, TokenList, Instruction, int, int) –
Constructor for class mars.ProgramStatement
Constructor for ProgramStatement when there are links back to all source and token
information.
ProgramStatement(int, int) –
Constructor for class mars.ProgramStatement
Constructor for ProgramStatement used only for writing a binary machine
instruction with no source code to refer back to.
PropertiesFile – Class in mars.util
Provides means to work with “.properties” files which are used to store
various MARS settings.
PropertiesFile() –
Constructor for class mars.util.PropertiesFile
pushOnCallStack(Token) –
Method in class mars.assembler.MacroPool
Q
QUOTED_STRING –
Static variable in class mars.assembler.TokenTypes
R
R_FORMAT –
Static variable in class mars.mips.instructions.BasicInstructionFormat
RandomStreams – Class in mars.mips.instructions.syscalls
This small class serves only to hold a static HashMap for storing
random number generators for use by all the random number generator
syscalls.
RandomStreams() –
Constructor for class mars.mips.instructions.syscalls.RandomStreams
READ –
Static variable in class mars.mips.hardware.AccessNotice
Indicates the purpose of access was to read.
readChar(int) –
Static method in class mars.util.SystemIO
Implements syscall having 12 in $v0, to read a char value.
readDouble(int) –
Static method in class mars.util.SystemIO
Implements syscall to read a double value.
readFloat(int) –
Static method in class mars.util.SystemIO
Implements syscall to read a float value.
readFromFile(int, byte[], int) –
Static method in class mars.util.SystemIO
Read bytes from file.
readInteger(int) –
Static method in class mars.util.SystemIO
Implements syscall to read an integer value.
readSource(String) –
Method in class mars.MIPSprogram
Reads MIPS source code from file into structure.
readString(int, int) –
Static method in class mars.util.SystemIO
Implements syscall to read a string.
readyForCommit() –
Method in class mars.assembler.Macro
Operations to be done on this macro before it is committed in macro pool.
REAL_NUMBER –
Static variable in class mars.assembler.TokenTypes
recalculateVisibleLines() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Recalculates the number of visible lines.
RECEIVER_CONTROL –
Static variable in class mars.tools.KeyboardAndDisplaySimulator
RECEIVER_DATA –
Static variable in class mars.tools.KeyboardAndDisplaySimulator
recorder –
Variable in class mars.venus.editors.jeditsyntax.InputHandler
rectSelect –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
redo() –
Method in class mars.venus.editors.generic.GenericTextArea
Redo previous edit
redo() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Redo previous edit
redo() –
Method in interface mars.venus.editors.MARSTextEditingArea
redo() –
Method in class mars.venus.EditPane
Redo previous edit
refresh() –
Method in class mars.venus.Coprocessor0Window
Refresh the table, triggering re-rendering.
refresh() –
Method in class mars.venus.Coprocessor1Window
Refresh the table, triggering re-rendering.
refresh() –
Method in class mars.venus.RegistersWindow
Refresh the table, triggering re-rendering.
regionMatches(boolean, Segment, int, String) –
Static method in class mars.venus.editors.jeditsyntax.SyntaxUtilities
Checks if a subregion of a Segment is equal to a
string.
regionMatches(boolean, Segment, int, char[]) –
Static method in class mars.venus.editors.jeditsyntax.SyntaxUtilities
Checks if a subregion of a Segment is equal to a
character array.
Register – Class in mars.mips.hardware
Abstraction to represent a register of a MIPS Assembler.
Register(String, int, int) –
Constructor for class mars.mips.hardware.Register
Creates a new register with specified name, number, and value.
register(int) –
Static method in class mars.simulator.DelayedBranch
Register the fact that a successful branch is to occur.
REGISTER_HIGHLIGHT_BACKGROUND –
Static variable in class mars.Settings
RGB color for register highlighted background
REGISTER_HIGHLIGHT_FONT –
Static variable in class mars.Settings
Font for register highlighted background
REGISTER_HIGHLIGHT_FOREGROUND –
Static variable in class mars.Settings
RGB color for register highlighted foreground
REGISTER_NAME –
Static variable in class mars.assembler.TokenTypes
note: REGISTER_NAME is token of form $zero whereas REGISTER_NUMBER is token
of form $0.
REGISTER_NUMBER –
Static variable in class mars.assembler.TokenTypes
RegisterAccessNotice – Class in mars.mips.hardware
Object provided to Observers of runtime access to MIPS register.
RegisterFile – Class in mars.mips.hardware
Represents the collection of MIPS registers.
RegisterFile() –
Constructor for class mars.mips.hardware.RegisterFile
REGISTERS_HIGHLIGHTING –
Static variable in class mars.Settings
Flag to control whether or not highlighting is applied to register windows
RegistersPane – Class in mars.venus
Contains tabbed areas in the UI to display register contents
RegistersPane(VenusUI, RegistersWindow, Coprocessor1Window, Coprocessor0Window) –
Constructor for class mars.venus.RegistersPane
Constructor for the RegistersPane class.
RegistersWindow – Class in mars.venus
Sets up a window to display registers in the UI.
RegistersWindow() –
Constructor for class mars.venus.RegistersWindow
Constructor which sets up a fresh window with a table that contains the register values.
registerTableModelListener(TableModelListener) –
Method in class mars.venus.TextSegmentWindow
Assign listener to Table model.
remove(int) –
Method in class mars.assembler.TokenList
Removes Token object at specified list position.
remove(EditPane) –
Method in class mars.venus.EditTabbedPane
Remove the pane and update menu status
removeAllKeyBindings() –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Removes all key bindings from this input handler.
removeAllKeyBindings() –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Removes all key bindings from this input handler.
removeCaretListener(CaretListener) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Removes a caret change listener from this text area.
removeKeyBinding(String) –
Method in class mars.venus.editors.jeditsyntax.DefaultInputHandler
Removes a key binding from this input handler.
removeKeyBinding(String) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Removes a key binding from this input handler.
removeNotify() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Called by the AWT when this component is removed from it’s parent.
removeProgramArgumentsPanel() –
Method in class mars.venus.TextSegmentWindow
removeStopListener(Simulator.StopListener) –
Method in class mars.simulator.Simulator
removeSymbol(Token) –
Method in class mars.assembler.SymbolTable
Removes a symbol from the Symbol table.
REPEAT –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
repeat –
Variable in class mars.venus.editors.jeditsyntax.InputHandler
RepeatButton – Class in mars.venus
RepeatButton is a JButton which contains a timer
for firing events while the button is held down.
RepeatButton() –
Constructor for class mars.venus.RepeatButton
Creates a button with no set text or icon.
RepeatButton(Action) –
Constructor for class mars.venus.RepeatButton
Creates a button where properties are taken from the Action supplied.
RepeatButton(Icon) –
Constructor for class mars.venus.RepeatButton
Creates a button with an icon.
RepeatButton(String) –
Constructor for class mars.venus.RepeatButton
Creates a button with text.
RepeatButton(String, Icon) –
Constructor for class mars.venus.RepeatButton
Creates a button with initial text and an icon.
repeatCount –
Variable in class mars.venus.editors.jeditsyntax.InputHandler
replaceSelection(String) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Same as setSelectedText but named for compatibility with
JTextComponent method replaceSelection.
replaceSelection(String) –
Method in interface mars.venus.editors.MARSTextEditingArea
requestFocusInWindow() –
Method in interface mars.venus.editors.MARSTextEditingArea
RESERVED_INSTRUCTION_EXCEPTION –
Static variable in class mars.simulator.Exceptions
reset(boolean) –
Method in class mars.Settings
Reset settings to default values, as described in the constructor comments.
reset() –
Method in class mars.tools.AbstractMarsToolAndApplication
Method that will be called each time the default Reset button is clicked.
reset() –
Method in class mars.tools.BHTSimulator
Performs a reset of the simulator.
reset() –
Method in class mars.tools.BitmapDisplay
Method to reset counters and display when the Reset button selected.
reset() –
Method in class mars.tools.CacheSimulator
Method to reset cache, counters and display when the Reset button selected.
reset() –
Method in class mars.tools.DigitalLabSim
reset() –
Method in class mars.tools.FloatRepresentation
Method to reset display values to 0 when the Reset button selected.
reset() –
Method in class mars.tools.InstructionCounter
reset() –
Method in class mars.tools.InstructionStatistics
resets the counter values of the tool and updates the display.
reset() –
Method in class mars.tools.KeyboardAndDisplaySimulator
Method to reset counters and display when the Reset button selected.
reset() –
Method in class mars.tools.MemoryReferenceVisualization
Method to reset counters and display when the Reset button selected.
reset() –
Method in class mars.venus.AbstractFontSettingDialog
reset() –
Static method in class mars.venus.FileStatus
Resets all the values in FileStatus
RESET_TOOL_TIP_TEXT –
Static variable in class mars.venus.SettingsHighlightingAction
resetFiles() –
Static method in class mars.util.SystemIO
Reset all files — clears out the file descriptor table.
resetHexaKeyboard() –
Method in class mars.tools.DigitalLabSim.HexaKeyboard
resetMaxSteps() –
Static method in class mars.venus.RunGoAction
Reset max steps limit to default value at termination of a simulated execution.
resetMemoryRange() –
Method in class mars.venus.DataSegmentWindow
Reset range of memory addresses to base address of currently selected segment and update display.
resetOneSecondCounter() –
Method in class mars.tools.DigitalLabSim.OneSecondCounter
resetRegisters() –
Static method in class mars.mips.hardware.Coprocessor0
Method to reinitialize the values of the registers.
resetRegisters() –
Static method in class mars.mips.hardware.Coprocessor1
Method to reinitialize the values of the registers.
resetRegisters() –
Static method in class mars.mips.hardware.RegisterFile
Method to reinitialize the values of the registers.
resetSevenSegment() –
Method in class mars.tools.DigitalLabSim.SevenSegmentPanel
resetSimulator() –
Method in class mars.tools.BHTSimulator
Resets the simulator by clearing the GUI elements and resetting the BHT.
resetValue() –
Method in class mars.mips.hardware.Register
Resets the value of the register to the value it was constructed with.
resetValues() –
Method in class mars.venus.DataSegmentWindow
Reset all data display values to 0
revalidate() –
Method in interface mars.venus.editors.MARSTextEditingArea
RIGHT –
Static variable in class mars.venus.editors.jeditsyntax.JEditTextArea
RIGHT_PAREN –
Static variable in class mars.assembler.TokenTypes
rows –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
rows –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
RunAssembleAction – Class in mars.venus
Action class for the Run -> Assemble menu item (and toolbar icon)
RunAssembleAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunAssembleAction
RunBackstepAction – Class in mars.venus
Action for the Run -> Backstep menu item
RunBackstepAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunBackstepAction
RunClearBreakpointsAction – Class in mars.venus
Action class for the Run menu item to clear execution breakpoints that have been set.
RunClearBreakpointsAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunClearBreakpointsAction
Create the object and register with text segment window as a listener on its table model.
RunGoAction – Class in mars.venus
Action class for the Run -> Go menu item (and toolbar icon)
RunGoAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunGoAction
RUNNABLE –
Static variable in class mars.venus.FileStatus
successful assembly
RUNNING –
Static variable in class mars.venus.FileStatus
execution is under way
RunPauseAction – Class in mars.venus
Action class for the Run -> Pause menu item (and toolbar icon)
RunPauseAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunPauseAction
RunResetAction – Class in mars.venus
Action for the Run -> Reset menu item
RunResetAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunResetAction
RunSpeedPanel – Class in mars.venus
Class for the Run speed slider control.
runSpeedPanelExists –
Static variable in class mars.Globals
RunStepAction – Class in mars.venus
Action for the Run -> Step menu item
RunStepAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunStepAction
RunStopAction – Class in mars.venus
Action class for the Run -> Stop menu item (and toolbar icon)
RunStopAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunStopAction
RunToggleBreakpointsAction – Class in mars.venus
Action class for the Run menu item to clear execution breakpoints that have been set.
RunToggleBreakpointsAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.RunToggleBreakpointsAction
Create the object and register with text segment window as a listener on its table model.
S
save() –
Method in class mars.venus.Editor
Perform “save” operation on current tab’s file.
saveAll() –
Method in class mars.venus.Editor
Perform save operation on all open files (tabs).
saveAllFiles() –
Method in class mars.venus.EditTabbedPane
Saves all files currently open in the editor.
saveAs() –
Method in class mars.venus.Editor
Perform “save as” operation on current tab’s file.
saveAsCurrentFile() –
Method in class mars.venus.EditTabbedPane
Pops up a dialog box to do “Save As” operation.
saveCurrentFile() –
Method in class mars.venus.EditTabbedPane
Saves file under existing name.
ScavengerHunt – Class in mars.tools
Demo of Mars tool capability.
ScavengerHunt() –
Constructor for class mars.tools.ScavengerHunt
ScreenMagnifier – Class in mars.tools
Handy little tool to magnify a selected section of the screen
by a given scale and display it.
ScreenMagnifier() –
Constructor for class mars.tools.ScreenMagnifier
scrollBarsInitialized –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
scrollTo(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Ensures that the specified line and offset is visible by scrolling
the text area if necessary.
scrollToCaret() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Ensures that the caret is visible by scrolling the text area if
necessary.
SegmentWindowDumpFormat – Class in mars.mips.dump
Dump MIPS memory contents in Segment Window format.
SegmentWindowDumpFormat() –
Constructor for class mars.mips.dump.SegmentWindowDumpFormat
Constructor.
select(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Selects from the start offset to the end offset.
select(int, int) –
Method in interface mars.venus.editors.MARSTextEditingArea
SELECT_ALL –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_DOC_END –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_DOC_HOME –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_END –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_HOME –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_NEXT_CHAR –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_NEXT_LINE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_NEXT_PAGE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_NEXT_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_PREV_CHAR –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_PREV_LINE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_PREV_PAGE –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
SELECT_PREV_WORD –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
selectAll() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Selects all text in the document.
selectAll() –
Method in interface mars.venus.editors.MARSTextEditingArea
selectAllText() –
Method in class mars.venus.EditPane
select all text
selectEditorTextLine(String, int, int) –
Method in class mars.venus.MessagesPane
Will select the specified line in an editor tab.
selectErrorMessage(String, int, int) –
Method in class mars.venus.MessagesPane
Will select the Mars Messages tab error message that matches the given
specifications, if it is found.
selectionColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
selectionColor –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
selectionEnd –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
selectionEndLine –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
selectionStart –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
selectionStartLine –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
selectLine(int) –
Method in class mars.venus.EditPane
Select the specified editor text line.
selectLine(int, int) –
Method in class mars.venus.EditPane
Select the specified editor text line.
selectMarsMessageTab() –
Method in class mars.venus.MessagesPane
Make the assembler message tab current (up front)
selectNone() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Moves the mark to the caret position.
selectRunMessageTab() –
Method in class mars.venus.MessagesPane
Make the runtime message tab current (up front)
SET –
Static variable in class mars.assembler.Directives
set(int, Token) –
Method in class mars.assembler.TokenList
Replaces token at position with different one.
set(int, int, int) –
Method in class mars.mips.hardware.Memory
Starting at the given address, write the given value over the given number of bytes.
set(int) –
Static method in class mars.venus.FileStatus
Set file status.
setAddress(int) –
Method in class mars.assembler.Symbol
Sets (replaces) the address of the the Symbol.
setArgs(ArrayList
Method in class mars.assembler.Macro
setAssembleAllEnabled(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
setAssembled(boolean) –
Static method in class mars.venus.FileStatus
Changes the value of assenbked to the parameter given.
setAssembleOnOpenEnabled(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
setBackground(Color) –
Method in interface mars.venus.editors.MARSTextEditingArea
setBase(int) –
Method in class mars.venus.NumberDisplayBaseChooser
Set the current number base.
setBasicAssemblyStatement(String) –
Method in class mars.ProgramStatement
Assigns given String to be Basic Assembly statement equivalent to this source line.
setBinaryStatement(int) –
Method in class mars.ProgramStatement
Assigns given int to be binary machine code equivalent to this source line.
setBit(int, int) –
Static method in class mars.util.Binary
Sets the specified bit of the specified value to 1, and returns the result.
setBlockCaretEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets if the caret should be drawn as a block, false otherwise.
setBooleanSetting(int, boolean) –
Method in class mars.Settings
Set value of a boolean setting given its id and the value.
setBracketHighlightColor(Color) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the bracket highlight color.
setBracketHighlightEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Enables or disables bracket highlighting.
setByte(int, int) –
Method in class mars.mips.hardware.Memory
Writes low order 8 bits of given value into specified Memory byte.
setByte(int, int, int) –
Static method in class mars.util.Binary
Sets the specified byte of the specified value to the low order 8 bits of
specified replacement value, and returns the result.
setByteOrder(boolean) –
Method in class mars.mips.hardware.Memory
Set byte order to either LITTLE_ENDIAN or BIG_ENDIAN.
setCaretBlinkEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Toggles caret blinking.
setCaretBlinkRate(int) –
Method in class mars.Settings
Set the caret blinking rate in milliseconds.
setCaretBlinkRate(int) –
Method in class mars.venus.editors.generic.GenericTextArea
Set the caret blinking rate in milliseconds.
setCaretBlinkRate(int) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Set the caret blinking rate in milliseconds.
setCaretBlinkRate(int) –
Method in interface mars.venus.editors.MARSTextEditingArea
setCaretColor(Color) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the caret color.
setCaretPosition(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the caret position.
setCaretPosition(int) –
Method in interface mars.venus.editors.MARSTextEditingArea
setCaretVisible(boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Control caret visibility
setCaretVisible(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets if the caret should be visible.
setCaretVisible(boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setCodeHighlighting(boolean) –
Method in class mars.venus.TextSegmentWindow
Used to enable or disable source code highlighting.
setColorSettingByKey(String, Color) –
Method in class mars.Settings
Set Color object for specified settings key.
setColorSettingByPosition(int, Color) –
Method in class mars.Settings
Set Color object for specified settings name (a static constant).
setConditionFlag(int) –
Static method in class mars.mips.hardware.Coprocessor1
Set condition flag to 1 (true).
setConditionFlags() –
Static method in class mars.mips.hardware.Coprocessor1
Set all condition flags (0-7).
setConfiguration() –
Static method in class mars.mips.hardware.Memory
Sets current memory configuration for simulated MIPS.
setCurrent(Macro) –
Method in class mars.assembler.MacroPool
setCurrentConfiguration(MemoryConfiguration) –
Static method in class mars.mips.hardware.MemoryConfigurations
setCurrentEditTab(EditPane) –
Method in class mars.venus.EditTabbedPane
Select the specified EditPane to be the current tab.
setDataSegmentHighlighting(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
setDelay(int) –
Method in class mars.venus.RepeatButton
Set the delay for the timer of this button.
setDelayedBranchingEnabled(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
setDelayedBranchingEnabledNonPersistent(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
setDescription(String) –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
setDisplayAddressesInHex(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
setDisplayValuesInHex(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
setDocument(SyntaxDocument) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the document this text area is editing.
setDouble(int, double) –
Method in class mars.mips.hardware.Memory
Writes 64 bit double value starting at specified Memory address.
setEditable(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets if this component is editable.
setEditable(boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setEdited(boolean) –
Static method in class mars.venus.FileStatus
Changes the value of edited to the parameter given.
setEditorFont(Font) –
Method in class mars.Settings
Set editor font to the specified Font object and write it to persistent storage.
setEditorLineNumbersDisplayed(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
setEditorPopupPrefixLength(int) –
Method in class mars.Settings
Set number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
setEditorSyntaxStyleByPosition(int, SyntaxStyle) –
Method in class mars.Settings
setEditorTabSize(int) –
Method in class mars.Settings
Set the tab size in characters.
setEditTabbedPane(EditTabbedPane) –
Method in class mars.venus.Editor
Set associated EditTabbedPane.
setElectricScroll(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the number of lines from the top and bottom of the text
area that are always visible
setEnabled(boolean) –
Method in class mars.simulator.BackStepper
Set enable status.
setEnabled(boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setEnabled(boolean) –
Method in class mars.venus.RepeatButton
Sets the enabled state of this button.
setEOLMarkerColor(Color) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the EOL marker color.
setEOLMarkersPainted(boolean) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets if EOL markers are to be drawn.
setExample(String) –
Method in class mars.venus.editors.jeditsyntax.PopupHelpItem
setExceptionHandler(String) –
Method in class mars.Settings
Set name of exception handler file and write it to persistent storage.
setExceptionHandlerEnabled(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
setExtendedAssemblerEnabled(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
setFile(File) –
Static method in class mars.venus.FileStatus
Sets the file to the ASM file passed.
setFileStatus(int) –
Method in class mars.venus.EditPane
Set the editing status for this EditPane’s associated document.
setFileStatus(int) –
Method in class mars.venus.FileStatus
Set editing status of this file.
setFirstLine(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the line displayed at the text area’s origin and
updates the scroll bars.
setFont(Font) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
setFont(Font) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the font for this component.
setFont(Font) –
Method in interface mars.venus.editors.MARSTextEditingArea
setFontByPosition(int, Font) –
Method in class mars.Settings
Store a Font setting
setFontStyle(int) –
Method in class mars.venus.HardcopyWriter
Set the font style.
setFromLine(int) –
Method in class mars.assembler.Macro
setGraphicsFlags(Graphics, Font) –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Sets the foreground color and font of the specified graphics
context to that specified in this style.
setGui(VenusUI) –
Static method in class mars.Globals
setHalf(int, int) –
Method in class mars.mips.hardware.Memory
Starting at the given halfword address, write the lower 16 bits of given value
into 2 bytes (a halfword).
setHorizontalOffset(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the horizontal offset of drawn lines.
setIgnoreCase(boolean) –
Method in class mars.venus.editors.jeditsyntax.KeywordMap
Sets if the keyword map should be case insensitive.
setInitialDelay(int) –
Method in class mars.venus.RepeatButton
Sets the initial delay for the timer of this button.
setInputHandler(InputHandler) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the input handler.
setInvalidLinesPainted(boolean) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets if invalid lines are to be painted as red tildes.
setLabelSortState(String) –
Method in class mars.Settings
Store the current state of the Labels Window sorter.
setLabelWindowVisibility(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
setLabelWindowVisibility(boolean) –
Method in class mars.venus.ExecutePane
Show or hide the label window (symbol table).
setLineHighlightColor(Color) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the line highlight color.
setLineHighlightEnabled(boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Does nothing, but required by the interface.
setLineHighlightEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Use for highlighting the line currently being edited.
setLineHighlightEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Enables or disables current line highlighting.
setLineHighlightEnabled(boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setLocalMacroPool(MacroPool) –
Method in class mars.MIPSprogram
Sets local macro pool MacroPool for this program
setMachineStatement(String) –
Method in class mars.ProgramStatement
Assigns given String to be binary machine code (32 characters, all of them 0 or 1)
equivalent to this source line.
setMacroRecorder(InputHandler.MacroRecorder) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Sets the macro recorder.
setMagicCaretPosition(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the `magic’ caret position.
setMemoryConfiguration(String) –
Method in class mars.Settings
Store the identifier of the memory configuration.
setName(String) –
Method in class mars.assembler.Macro
setName(String) –
Static method in class mars.venus.FileStatus
Changes the value of name to the parameter given.
setNumber(int) –
Method in class mars.mips.instructions.syscalls.AbstractSyscall
Set the service number.
setNumber(int) –
Method in interface mars.mips.instructions.syscalls.Syscall
Set the service number.
setOrigin(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
A fast way of changing both the first line and horizontal
offset.
setOriginal(MIPSprogram, int) –
Method in class mars.assembler.Token
Set original program and line number for this token.
setOriginalFromLine(int) –
Method in class mars.assembler.Macro
setOriginalToLine(int) –
Method in class mars.assembler.Macro
setOverwriteEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets if overwrite mode should be enabled.
setPathname(String) –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
setPathname(String) –
Method in class mars.venus.FileStatus
Set full file pathname.
setPathname(String, String) –
Method in class mars.venus.FileStatus
Set full file pathname.
setProcessedLine(String) –
Method in class mars.assembler.TokenList
Use this to record the source line String for this token list
after possible modification (textual substitution) during
assembly preprocessing.
setProgram(MIPSprogram) –
Method in class mars.assembler.Macro
setProgramArguments(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
setProgramCounter(int) –
Static method in class mars.mips.hardware.RegisterFile
For setting the Program Counter.
setRawWord(int, int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, write the given value over 4 bytes (a word).
setRegisterPairToDouble(int, double) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the double value given.
setRegisterPairToDouble(String, double) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the double value given.
setRegisterPairToLong(int, long) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given.
setRegisterPairToLong(String, long) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given.
setRegisters(int) –
Static method in class mars.simulator.Exceptions
Given MIPS exception cause code, will place that code into
coprocessor 0 CAUSE register ($13), set the EPC register to
“current” program counter, and set Exception Level bit in STATUS register.
setRegisters(int, int) –
Static method in class mars.simulator.Exceptions
Given MIPS exception cause code and bad address, place the bad address into VADDR
register ($8) then call overloaded setRegisters with the cause code to do the rest.
setRegistersHighlighting(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
setRegisterToFloat(String, float) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the value given.
setRegisterToFloat(int, float) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the value given.
setRegisterToInt(String, int) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
setRegisterToInt(int, int) –
Static method in class mars.mips.hardware.Coprocessor1
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
setRepeatCount(int) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Sets the number of times the next action will be repeated.
setRepeatEnabled(boolean) –
Method in class mars.venus.editors.jeditsyntax.InputHandler
Enables repeating.
setRepeatEnabled(boolean) –
Method in class mars.venus.RepeatButton
Sets if the button should fire events when held.
setReset(boolean) –
Static method in class mars.venus.VenusUI
To set whether the register values are reset.
setRightClickPopup(JPopupMenu) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the right click popup menu.
setSaved(boolean) –
Static method in class mars.venus.FileStatus
Changes the value of saved to the parameter given.
setSelectedText(String) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Replaces the selection with the specified text.
setSelectionColor(Color) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the selection color.
setSelectionEnd(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the selection end.
setSelectionEnd(int) –
Method in interface mars.venus.editors.MARSTextEditingArea
setSelectionRectangular(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets if the selection should be rectangular.
setSelectionStart(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the selection start.
setSelectionStart(int) –
Method in interface mars.venus.editors.MARSTextEditingArea
setSelectionVisible(boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
Control selection visibility
setSelectionVisible(boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
setSelectionVisible(boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setSettingsMenuItem(JCheckBoxMenuItem) –
Method in class mars.venus.NumberDisplayBaseChooser
Set the menu item from Settings menu that corresponds to this chooser.
setShowLineNumbersEnabled(boolean) –
Method in class mars.venus.EditPane
enable or disable checkbox that controls display of line numbers
setSource(String) –
Method in class mars.ProgramStatement
associates MIPS source statement.
setSourceCode(String, boolean) –
Method in class mars.venus.editors.generic.GenericTextArea
For initalizing the source code when opening an ASM file
setSourceCode(String, boolean) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
setSourceCode(String, boolean) –
Method in interface mars.venus.editors.MARSTextEditingArea
setSourceCode(String, boolean) –
Method in class mars.venus.EditPane
For initalizing the source code when opening an ASM file
setSourceLineList(ArrayList
Method in class mars.MIPSprogram
Set list of source statements that comprise the program.
setStartAtMain(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
setStarted(boolean) –
Static method in class mars.venus.VenusUI
To set whether MIPS program execution has started.
setStatement(int, ProgramStatement) –
Method in class mars.mips.hardware.Memory
Stores ProgramStatement in Text Segment.
setStyles(SyntaxStyle[]) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Sets the syntax styles used to paint colorized text.
setTabSize(int) –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Set the number of characters a tab will expand to.
setTabSize(int) –
Method in class mars.venus.editors.jeditsyntax.TextAreaPainter
Set the tab size in characters.
setTabSize(int) –
Method in interface mars.venus.editors.MARSTextEditingArea
setText(String) –
Method in class mars.venus.editors.generic.GenericTextArea
Override inherited setText to temporarily remove UndoableEditListener because this
operation is not undoable.
setText(String) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the entire text of this text area.
setText(String) –
Method in interface mars.venus.editors.MARSTextEditingArea
setTextColumnOrder(int[]) –
Method in class mars.Settings
Store the current order of Text Segment window table columns, so the ordering
can be preserved and restored.
Settings – Class in mars
Contains various IDE settings.
Settings() –
Constructor for class mars.Settings
Create Settings object and set to saved values.
Settings(boolean) –
Constructor for class mars.Settings
Create Settings object and set to saved values.
SettingsAddressDisplayBaseAction – Class in mars.venus
Action class for the Settings menu item to control number base (10 or 16) of memory addresses.
SettingsAddressDisplayBaseAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsAddressDisplayBaseAction
SettingsAssembleAllAction – Class in mars.venus
Action class for the Settings menu item to determine whether assemble operation applies
only to current file or to all files in its directory.
SettingsAssembleAllAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsAssembleAllAction
SettingsAssembleOnOpenAction – Class in mars.venus
Action class for the Settings menu item to control automatic assemble of file upon opening.
SettingsAssembleOnOpenAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsAssembleOnOpenAction
SettingsDelayedBranchingAction – Class in mars.venus
Action class for the Settings menu item to control delayed branching.
SettingsDelayedBranchingAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsDelayedBranchingAction
SettingsEditorAction – Class in mars.venus
Action class for the Settings menu item for text editor settings.
SettingsEditorAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsEditorAction
Create a new SettingsEditorAction.
SettingsExceptionHandlerAction – Class in mars.venus
Action class for the Settings menu item for optionally loading a MIPS exception handler.
SettingsExceptionHandlerAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsExceptionHandlerAction
SettingsExtendedAction – Class in mars.venus
Action class for the Settings menu item to control use of extended (pseudo) instructions or formats.
SettingsExtendedAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsExtendedAction
SettingsHighlightingAction – Class in mars.venus
Action class for the Settings menu item for text editor settings.
SettingsHighlightingAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsHighlightingAction
Create a new SettingsEditorAction.
SettingsLabelAction – Class in mars.venus
Action class for the Settings menu item to control display of Labels window (symbol table).
SettingsLabelAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsLabelAction
SettingsMemoryConfigurationAction – Class in mars.venus
Action class for the Settings menu item for text editor settings.
SettingsMemoryConfigurationAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsMemoryConfigurationAction
Create a new SettingsEditorAction.
SettingsPopupInputAction – Class in mars.venus
Action class for the Settings menu item to control use of popup dialog for input syscalls.
SettingsPopupInputAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsPopupInputAction
SettingsProgramArgumentsAction – Class in mars.venus
Action class for the Settings menu item to control whether or not
program arguments can be entered and used.
SettingsProgramArgumentsAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsProgramArgumentsAction
SettingsStartAtMainAction – Class in mars.venus
Action class for the Settings menu item to control whether or not
assembler warnings are considered errors.
SettingsStartAtMainAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsStartAtMainAction
SettingsValueDisplayBaseAction – Class in mars.venus
Action class for the Settings menu item to control number base (10 or 16) of memory/register contents.
SettingsValueDisplayBaseAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsValueDisplayBaseAction
SettingsWarningsAreErrorsAction – Class in mars.venus
Action class for the Settings menu item to control whether or not
assembler warnings are considered errors.
SettingsWarningsAreErrorsAction(String, Icon, String, Integer, KeyStroke, VenusUI) –
Constructor for class mars.venus.SettingsWarningsAreErrorsAction
setTitle(String, String, int) –
Method in class mars.venus.Editor
Places name of file currently being edited into its edit tab and
the application’s title bar.
setTokenMarker(TokenMarker) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Sets the document’s token marker.
setTokenMarker(TokenMarker) –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Sets the token marker that is to be used to split lines of
this document up into tokens.
setToLine(int) –
Method in class mars.assembler.Macro
setType(TokenTypes) –
Method in class mars.assembler.Token
Set or modify token type.
setupTable() –
Method in class mars.venus.DataSegmentWindow
Generates and displays fresh table, typically done upon successful assembly.
setupTable() –
Method in class mars.venus.LabelsWindow
Initialize table of labels (symbol table)
setupTable() –
Method in class mars.venus.TextSegmentWindow
Method to be called once the user compiles the program.
setupWindow() –
Method in class mars.venus.Coprocessor0Window
Sets up the data for the window.
setupWindow() –
Method in class mars.venus.Coprocessor1Window
Sets up the data for the window.
setupWindow() –
Method in class mars.venus.RegistersWindow
Sets up the data for the window.
setValue(int) –
Method in class mars.mips.hardware.Register
Sets the value of the register to the val passed to it.
setWarningsAreErrors(boolean) –
Method in class mars.Settings
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
setWindowBounds() –
Method in class mars.venus.ExecutePane
This method will set the bounds of this JDesktopPane’s internal windows
relative to the current size of this JDesktopPane.
setWord(int, int) –
Method in class mars.mips.hardware.Memory
Starting at the given word address, write the given value over 4 bytes (a word).
showingLineNumbers() –
Method in class mars.venus.EditPane
get editor’s line number display status
showRegisters() –
Static method in class mars.mips.hardware.Coprocessor0
Method for displaying the register values for debugging.
showRegisters() –
Static method in class mars.mips.hardware.Coprocessor1
Method for displaying the register values for debugging.
showRegisters() –
Static method in class mars.mips.hardware.RegisterFile
Method for displaying the register values for debugging.
showSplash() –
Method in class mars.MarsSplashScreen
A simple little method to show a title screen in the center
of the screen for the amount of time given in the constructor
simulate(ProgramStatement) –
Method in interface mars.mips.instructions.SimulationCode
Method to simulate the execution of a specific MIPS basic instruction.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.AbstractSyscall
Performs syscall function.
simulate(ProgramStatement) –
Method in interface mars.mips.instructions.syscalls.Syscall
Performs syscall function.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallClose
Performs syscall function to close file descriptor given in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallConfirmDialog
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallExit
Performs syscall function to exit the MIPS program.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallExit2
Performs syscall function to exit the MIPS program with return value given in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallInputDialogDouble
System call to input data.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallInputDialogFloat
System call to input data.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallInputDialogInt
System call to input data.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallInputDialogString
System call to input data.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMessageDialog
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMessageDialogDouble
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMessageDialogFloat
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMessageDialogInt
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMessageDialogString
System call to display a message to user.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMidiOut
Performs syscall function to send MIDI output to sound card.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallMidiOutSync
Performs syscall function to send MIDI output to sound card.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallOpen
Performs syscall function to open file name specified by $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintChar
Performs syscall function to print on the console the character stored in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintDouble
Performs syscall function to print double whose bits are stored in $f12 & $f13.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintFloat
Performs syscall function to display float whose bits are stored in $f12
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintInt
Performs syscall function to print on the console the integer stored in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintIntBinary
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintIntHex
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintIntUnsigned
Performs syscall function to print on the console the integer stored in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallPrintString
Performs syscall function to print string stored starting at address in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRandDouble
System call to the random number generator.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRandFloat
System call to the random number generator.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRandInt
System call to the random number generator.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRandIntRange
System call to the random number generator, with an upper range specified.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRandSeed
Set the seed of the underlying Java pseudorandom number generator.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallRead
Performs syscall function to read from file descriptor given in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallReadChar
Performs syscall function to read a character from input console into $a0
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallReadDouble
Performs syscall function to read the bits of input double into $f0 and $f1.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallReadFloat
Performs syscall function to read the bits of input float into $f0
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallReadInt
Performs syscall function to read an integer from input console into $v0
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallReadString
Performs syscall function to read console input string into buffer starting at address in $a0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallSbrk
Performs syscall function to allocate amount of heap memory specified in $a0, putting address into $v0.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallSleep
System call to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallTime
Performs syscall function to place current system time into $a0 (low order 32 bits)
and $a1 (high order 32 bits).
simulate(ProgramStatement) –
Method in class mars.mips.instructions.syscalls.SyscallWrite
Performs syscall function to write to file descriptor given in $a0.
simulate(int[]) –
Method in class mars.MIPSprogram
Simulates execution of the MIPS program.
simulate(int) –
Method in class mars.MIPSprogram
Simulates execution of the MIPS program.
simulate(MIPSprogram, int, int, int[], AbstractAction) –
Method in class mars.simulator.Simulator
Simulate execution of given MIPS program.
simulateFromPC(int[], int, AbstractAction) –
Method in class mars.MIPSprogram
Simulates execution of the MIPS program.
simulateStepAtPC(AbstractAction) –
Method in class mars.MIPSprogram
Simulates execution of the MIPS program.
SimulationCode – Interface in mars.mips.instructions
Interface to represent the method for simulating the execution of a specific MIPS basic
instruction.
Simulator – Class in mars.simulator
Used to simulate the execution of an assembled MIPS program.
Simulator.StopListener – Interface in mars.simulator
SIMULATOR_START –
Static variable in class mars.simulator.SimulatorNotice
SIMULATOR_STOP –
Static variable in class mars.simulator.SimulatorNotice
SimulatorNotice – Class in mars.simulator
Object provided to Observers of the Simulator.
SimulatorNotice(int, int, double, int) –
Constructor for class mars.simulator.SimulatorNotice
Constructor will be called only within this package, so assume
address and length are in valid ranges.
size() –
Method in class mars.assembler.TokenList
Returns number of tokens in list.
sizeIntToSizeString(int) –
Static method in class mars.util.EditorFont
Given an int representing font size, returns corresponding string.
sizeStringToSizeInt(String) –
Static method in class mars.util.EditorFont
Given a String representing font size, returns corresponding int.
SMART_HOME_END_PROPERTY –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
If this client property is set to Boolean.TRUE on the text area,
the home/end keys will support ‘smart’ BRIEF-like behaviour
(one press = start/end of line, two presses = start/end of
viewscreen, three presses = start/end of document).
SourceLine – Class in mars.assembler
Handy class to represent, for a given line of source code, the code
itself, the program containing it, and its line number within that program.
SourceLine(String, MIPSprogram, int) –
Constructor for class mars.assembler.SourceLine
SourceLine constructor
SPACE –
Static variable in class mars.assembler.Directives
STACK_POINTER_REGISTER –
Static variable in class mars.mips.hardware.RegisterFile
stackBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for stack: 0x7ffffffc (this is mine – start of highest word below kernel space)
stackLimitAddress –
Static variable in class mars.mips.hardware.Memory
stackPointer –
Static variable in class mars.mips.hardware.Memory
starting address for stack: 0x7fffeffc (this is from SPIM not MIPS)
start() –
Method in class mars.simulator.SwingWorker
Start the worker thread.
START_AT_MAIN –
Static variable in class mars.Settings
Flag to control whether or not assembler automatically initializes program counter to ‘main’s address
STATUS –
Static variable in class mars.mips.hardware.Coprocessor0
stepped(boolean, int, ProcessingException) –
Method in class mars.venus.RunStepAction
stopExecution(AbstractAction) –
Method in class mars.simulator.Simulator
Set the volatile stop boolean variable checked by the execution
thread at the end of each MIPS instruction execution.
stopped(Simulator) –
Method in interface mars.simulator.Simulator.StopListener
stopped(ProcessingException, int) –
Method in class mars.venus.RunGoAction
Method to be called when Stop is selected through menu/toolbar/shortcut.
storeProgramArguments() –
Method in class mars.simulator.ProgramArgumentList
stringToInt(String) –
Static method in class mars.util.Binary
Attempt to validate given string whose characters represent a 32 bit integer.
stringToLong(String) –
Static method in class mars.util.Binary
Attempt to validate given string whose characters represent a 64 bit long.
styleIntToStyleString(int) –
Static method in class mars.util.EditorFont
Given an int that represents a font style from the Font class,
returns the corresponding String.
styles –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
styles –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
styleStringToStyleInt(String) –
Static method in class mars.util.EditorFont
Given a string that represents a font style, returns the
corresponding final int defined in Font: PLAIN, BOLD, ITALIC.
substituteSpacesForTabs(String) –
Static method in class mars.util.EditorFont
substituteSpacesForTabs(String, int) –
Static method in class mars.util.EditorFont
Handy utility to produce a string that substitutes spaces for all tab characters
in the given string.
supportsMultilineTokens() –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Returns if the token marker supports tokens that span multiple
lines.
SwingWorker – Class in mars.simulator
This is the 3rd version of SwingWorker (also known as
SwingWorker 3), an abstract class that you subclass to
perform GUI-related work in a dedicated thread.
SwingWorker(boolean) –
Constructor for class mars.simulator.SwingWorker
Start a thread that will call the construct method
and then exit.
SwitchSegment(Graphics, char) –
Method in class mars.tools.DigitalLabSim.SevenSegmentDisplay
Symbol – Class in mars.assembler
Represents a MIPS program identifier to be stored in the symbol table.
Symbol(String, int, boolean) –
Constructor for class mars.assembler.Symbol
Basic constructor, creates a symbol object.
SymbolTable – Class in mars.assembler
Creats a table of Symbol objects.
SymbolTable(String) –
Constructor for class mars.assembler.SymbolTable
Create a new empty symbol table for given file
symbolTable –
Static variable in class mars.Globals
Symbol table for file currently being assembled.
SyntaxDocument – Class in mars.venus.editors.jeditsyntax
A document implementation that can be tokenized by the syntax highlighting
system.
SyntaxDocument() –
Constructor for class mars.venus.editors.jeditsyntax.SyntaxDocument
SyntaxStyle – Class in mars.venus.editors.jeditsyntax
A simple text style class.
SyntaxStyle(Color, boolean, boolean) –
Constructor for class mars.venus.editors.jeditsyntax.SyntaxStyle
Creates a new SyntaxStyle.
SyntaxUtilities – Class in mars.venus.editors.jeditsyntax
Class with several utility functions used by jEdit’s syntax colorizing
subsystem.
Syscall – Interface in mars.mips.instructions.syscalls
Interface for any MIPS syscall system service.
SYSCALL_BUFSIZE –
Static variable in class mars.util.SystemIO
Buffer size for syscalls for file I/O
SYSCALL_EXCEPTION –
Static variable in class mars.simulator.Exceptions
SYSCALL_MAXFILES –
Static variable in class mars.util.SystemIO
Maximum number of files that can be open
SyscallClose – Class in mars.mips.instructions.syscalls
Service to close file descriptor given in $a0.
SyscallClose() –
Constructor for class mars.mips.instructions.syscalls.SyscallClose
Build an instance of the Close syscall.
SyscallConfirmDialog – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallConfirmDialog() –
Constructor for class mars.mips.instructions.syscalls.SyscallConfirmDialog
Build an instance of the syscall with its default service number and name.
SyscallExit – Class in mars.mips.instructions.syscalls
Service to exit the MIPS program.
SyscallExit() –
Constructor for class mars.mips.instructions.syscalls.SyscallExit
Build an instance of the Exit syscall.
SyscallExit2 – Class in mars.mips.instructions.syscalls
Service to exit the MIPS program with return value given in $a0.
SyscallExit2() –
Constructor for class mars.mips.instructions.syscalls.SyscallExit2
Build an instance of the Exit2 syscall.
SyscallInputDialogDouble – Class in mars.mips.instructions.syscalls
Service to input data.
SyscallInputDialogDouble() –
Constructor for class mars.mips.instructions.syscalls.SyscallInputDialogDouble
Build an instance of the syscall with its default service number and name.
SyscallInputDialogFloat – Class in mars.mips.instructions.syscalls
Service to input data.
SyscallInputDialogFloat() –
Constructor for class mars.mips.instructions.syscalls.SyscallInputDialogFloat
Build an instance of the syscall with its default service number and name.
SyscallInputDialogInt – Class in mars.mips.instructions.syscalls
Service to input data.
SyscallInputDialogInt() –
Constructor for class mars.mips.instructions.syscalls.SyscallInputDialogInt
Build an instance of the syscall with its default service number and name.
SyscallInputDialogString – Class in mars.mips.instructions.syscalls
Service to input data.
SyscallInputDialogString() –
Constructor for class mars.mips.instructions.syscalls.SyscallInputDialogString
Build an instance of the syscall with its default service number and name.
SyscallMessageDialog – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallMessageDialog() –
Constructor for class mars.mips.instructions.syscalls.SyscallMessageDialog
Build an instance of the syscall with its default service number and name.
SyscallMessageDialogDouble – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallMessageDialogDouble() –
Constructor for class mars.mips.instructions.syscalls.SyscallMessageDialogDouble
Build an instance of the syscall with its default service number and name.
SyscallMessageDialogFloat – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallMessageDialogFloat() –
Constructor for class mars.mips.instructions.syscalls.SyscallMessageDialogFloat
Build an instance of the syscall with its default service number and name.
SyscallMessageDialogInt – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallMessageDialogInt() –
Constructor for class mars.mips.instructions.syscalls.SyscallMessageDialogInt
Build an instance of the syscall with its default service number and name.
SyscallMessageDialogString – Class in mars.mips.instructions.syscalls
Service to display a message to user.
SyscallMessageDialogString() –
Constructor for class mars.mips.instructions.syscalls.SyscallMessageDialogString
Build an instance of the syscall with its default service number and name.
SyscallMidiOut – Class in mars.mips.instructions.syscalls
Service to output simulated MIDI tone to sound card.
SyscallMidiOut() –
Constructor for class mars.mips.instructions.syscalls.SyscallMidiOut
Build an instance of the MIDI (simulated) out syscall.
SyscallMidiOutSync – Class in mars.mips.instructions.syscalls
Service to output simulated MIDI tone to sound card.
SyscallMidiOutSync() –
Constructor for class mars.mips.instructions.syscalls.SyscallMidiOutSync
Build an instance of the MIDI (simulated) out syscall.
SyscallNumberOverride – Class in mars.mips.instructions.syscalls
Represents User override of default syscall number assignment.
SyscallNumberOverride(String, String) –
Constructor for class mars.mips.instructions.syscalls.SyscallNumberOverride
Constructor is called with two strings: service name and desired
number.
SyscallOpen – Class in mars.mips.instructions.syscalls
Service to open file name specified by $a0.
SyscallOpen() –
Constructor for class mars.mips.instructions.syscalls.SyscallOpen
Build an instance of the Open file syscall.
SyscallPrintChar – Class in mars.mips.instructions.syscalls
Service to display character stored in $a0 on the console.
SyscallPrintChar() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintChar
Build an instance of the Print Char syscall.
SyscallPrintDouble – Class in mars.mips.instructions.syscalls
Service to display double whose bits are stored in $f12 & $f13 onto the console.
SyscallPrintDouble() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintDouble
Build an instance of the Print Double syscall.
SyscallPrintFloat – Class in mars.mips.instructions.syscalls
Service to display on the console float whose bits are stored in $f12
SyscallPrintFloat() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintFloat
Build an instance of the Print Float syscall.
SyscallPrintInt – Class in mars.mips.instructions.syscalls
Service to display integer stored in $a0 on the console.
SyscallPrintInt() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintInt
Build an instance of the Print Integer syscall.
SyscallPrintIntBinary – Class in mars.mips.instructions.syscalls
Service to display integer stored in $a0 on the console.
SyscallPrintIntBinary() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintIntBinary
Build an instance of the Print Integer syscall.
SyscallPrintIntHex – Class in mars.mips.instructions.syscalls
Service to display integer stored in $a0 on the console.
SyscallPrintIntHex() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintIntHex
Build an instance of the Print Integer syscall.
SyscallPrintIntUnsigned – Class in mars.mips.instructions.syscalls
Service to display integer stored in $a0 on the console as unsigned decimal.
SyscallPrintIntUnsigned() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintIntUnsigned
Build an instance of the Print Integer Unsigned syscall.
SyscallPrintString – Class in mars.mips.instructions.syscalls
Service to display string stored starting at address in $a0 onto the console.
SyscallPrintString() –
Constructor for class mars.mips.instructions.syscalls.SyscallPrintString
Build an instance of the Print String syscall.
SyscallRandDouble – Class in mars.mips.instructions.syscalls
Service to return a random floating point value.
SyscallRandDouble() –
Constructor for class mars.mips.instructions.syscalls.SyscallRandDouble
Build an instance of the syscall with its default service number and name.
SyscallRandFloat – Class in mars.mips.instructions.syscalls
Service to return a random floating point value.
SyscallRandFloat() –
Constructor for class mars.mips.instructions.syscalls.SyscallRandFloat
Build an instance of the syscall with its default service number and name.
SyscallRandInt – Class in mars.mips.instructions.syscalls
Service to return a random integer.
SyscallRandInt() –
Constructor for class mars.mips.instructions.syscalls.SyscallRandInt
Build an instance of the syscall with its default service number and name.
SyscallRandIntRange – Class in mars.mips.instructions.syscalls
Service to return a random integer in a specified range.
SyscallRandIntRange() –
Constructor for class mars.mips.instructions.syscalls.SyscallRandIntRange
Build an instance of the syscall with its default service number and name.
SyscallRandSeed – Class in mars.mips.instructions.syscalls
Service to set seed for the underlying Java pseudorandom number generator.
SyscallRandSeed() –
Constructor for class mars.mips.instructions.syscalls.SyscallRandSeed
Build an instance of the syscall with its default service number and name.
SyscallRead – Class in mars.mips.instructions.syscalls
Service to read from file descriptor given in $a0.
SyscallRead() –
Constructor for class mars.mips.instructions.syscalls.SyscallRead
Build an instance of the Read file syscall.
SyscallReadChar – Class in mars.mips.instructions.syscalls
Service to read a character from input console into $a0.
SyscallReadChar() –
Constructor for class mars.mips.instructions.syscalls.SyscallReadChar
Build an instance of the Read Char syscall.
SyscallReadDouble – Class in mars.mips.instructions.syscalls
Service to read the bits of console input double into $f0 and $f1.
SyscallReadDouble() –
Constructor for class mars.mips.instructions.syscalls.SyscallReadDouble
Build an instance of the Read Double syscall.
SyscallReadFloat – Class in mars.mips.instructions.syscalls
Service to read the bits of input float into $f0
SyscallReadFloat() –
Constructor for class mars.mips.instructions.syscalls.SyscallReadFloat
Build an instance of the Read Float syscall.
SyscallReadInt – Class in mars.mips.instructions.syscalls
Service to read an integer from input console into $v0.
SyscallReadInt() –
Constructor for class mars.mips.instructions.syscalls.SyscallReadInt
Build an instance of the Read Integer syscall.
SyscallReadString – Class in mars.mips.instructions.syscalls
Service to read console input string into buffer starting at address in $a0.
SyscallReadString() –
Constructor for class mars.mips.instructions.syscalls.SyscallReadString
Build an instance of the Read String syscall.
SyscallSbrk – Class in mars.mips.instructions.syscalls
Service to allocate amount of heap memory specified in $a0, putting address into $v0.
SyscallSbrk() –
Constructor for class mars.mips.instructions.syscalls.SyscallSbrk
Build an instance of the Sbrk syscall.
SyscallSleep – Class in mars.mips.instructions.syscalls
Service to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
SyscallSleep() –
Constructor for class mars.mips.instructions.syscalls.SyscallSleep
Build an instance of the syscall with its default service number and name.
SyscallTime – Class in mars.mips.instructions.syscalls
Service to read a character from input console into $a0.
SyscallTime() –
Constructor for class mars.mips.instructions.syscalls.SyscallTime
Build an instance of the Read Char syscall.
SyscallWrite – Class in mars.mips.instructions.syscalls
Service to write to file descriptor given in $a0.
SyscallWrite() –
Constructor for class mars.mips.instructions.syscalls.SyscallWrite
Build an instance of the Write file syscall.
SystemIO – Class in mars.util
Provides standard i/o services needed to simulate the MIPS syscall
routines.
SystemIO() –
Constructor for class mars.util.SystemIO
T
tableChanged(TableModelEvent) –
Method in class mars.venus.RunClearBreakpointsAction
Required TableModelListener method.
tabSize –
Variable in class mars.venus.editors.jeditsyntax.TextAreaDefaults
tabSize –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
tabSizeChars –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
tellEditingComponentToRequestFocusInWindow() –
Method in class mars.venus.EditPane
Delegates to text area’s requestFocusInWindow method.
TERMINATED –
Static variable in class mars.venus.FileStatus
execution terminated
TEXT –
Static variable in class mars.assembler.Directives
TEXT_COLUMN_ORDER –
Static variable in class mars.Settings
Order of text segment table columns
TEXT_FOUND –
Static variable in interface mars.venus.editors.MARSTextEditingArea
TEXT_NOT_FOUND –
Static variable in interface mars.venus.editors.MARSTextEditingArea
TEXT_REPLACED_FOUND_NEXT –
Static variable in interface mars.venus.editors.MARSTextEditingArea
TEXT_REPLACED_NOT_FOUND_NEXT –
Static variable in interface mars.venus.editors.MARSTextEditingArea
TEXT_SYMBOL –
Static variable in class mars.assembler.Symbol
textArea –
Variable in class mars.venus.editors.jeditsyntax.TextAreaPainter
TextAreaDefaults – Class in mars.venus.editors.jeditsyntax
Encapsulates default settings for a text area.
TextAreaDefaults() –
Constructor for class mars.venus.editors.jeditsyntax.TextAreaDefaults
TextAreaPainter – Class in mars.venus.editors.jeditsyntax
The text area repaint manager.
TextAreaPainter(JEditTextArea, TextAreaDefaults) –
Constructor for class mars.venus.editors.jeditsyntax.TextAreaPainter
Creates a new repaint manager.
TextAreaPainter.Highlight – Interface in mars.venus.editors.jeditsyntax
Highlight interface.
textBaseAddress –
Static variable in class mars.mips.hardware.Memory
base address for (user) text segment: 0x00400000
textLimitAddress –
Static variable in class mars.mips.hardware.Memory
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND –
Static variable in class mars.Settings
RGB color for text segment delay slot highlighted background
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT –
Static variable in class mars.Settings
Font for text segment delay slot highlighted background
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND –
Static variable in class mars.Settings
RGB color for text segment delay slot highlighted foreground
TEXTSEGMENT_HIGHLIGHT_BACKGROUND –
Static variable in class mars.Settings
RGB color for text segment highlighted background
TEXTSEGMENT_HIGHLIGHT_FONT –
Static variable in class mars.Settings
Font for table odd row foreground (text, data, register displays)
TEXTSEGMENT_HIGHLIGHT_FOREGROUND –
Static variable in class mars.Settings
RGB color for text segment highlighted foreground
TextSegmentWindow – Class in mars.venus
Creates the Text Segment window in the Execute tab of the UI
TextSegmentWindow() –
Constructor for class mars.venus.TextSegmentWindow
Constructor, sets up a new JInternalFrame.
TextUtilities – Class in mars.venus.editors.jeditsyntax
Class with several utility functions used by the text area component.
TextUtilities() –
Constructor for class mars.venus.editors.jeditsyntax.TextUtilities
theWindow –
Variable in class mars.tools.AbstractMarsToolAndApplication
thisMarsApp –
Variable in class mars.tools.AbstractMarsToolAndApplication
time –
Variable in class mars.venus.HardcopyWriter
TOGGLE_RECT –
Static variable in class mars.venus.editors.jeditsyntax.InputHandler
toggleBreakpoints() –
Method in class mars.venus.TextSegmentWindow
Enable or disable all items in the Breakpoints column.
Token – Class in mars.assembler
Represents one token in the input MIPS program.
Token(TokenTypes, String, MIPSprogram, int, int) –
Constructor for class mars.assembler.Token
Constructor for Token class.
Token – Class in mars.venus.editors.jeditsyntax.tokenmarker
A linked list of tokens.
Token(int, byte) –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.Token
Creates a new token.
token –
Variable in class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
The id of the last token of the line.
TOKEN_DELIMITERS –
Static variable in class mars.assembler.TokenTypes
tokenIsMacroParameter(String, boolean) –
Static method in class mars.assembler.Macro
returns whether tokenValue is macro parameter or not
tokenize(MIPSprogram) –
Method in class mars.assembler.Tokenizer
Will tokenize a complete MIPS program.
tokenize() –
Method in class mars.MIPSprogram
Tokenizes the MIPS source program.
tokenizeExampleInstruction(String) –
Method in class mars.assembler.Tokenizer
Used only to create a token list for the example provided with each instruction
specification.
tokenizeLine(int, String) –
Method in class mars.assembler.Tokenizer
Will tokenize one line of source code.
tokenizeLine(MIPSprogram, int, String) –
Method in class mars.assembler.Tokenizer
tokenizeLine(int, String, ErrorList) –
Method in class mars.assembler.Tokenizer
Will tokenize one line of source code.
tokenizeLines() –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Reparses the document, by passing all lines to the token
marker.
tokenizeLines(int, int) –
Method in class mars.venus.editors.jeditsyntax.SyntaxDocument
Reparses the document, by passing the specified lines to the
token marker.
Tokenizer – Class in mars.assembler
A tokenizer is capable of tokenizing a complete MIPS program, or a given line from
a MIPS program.
Tokenizer() –
Constructor for class mars.assembler.Tokenizer
Simple constructor.
Tokenizer(MIPSprogram) –
Constructor for class mars.assembler.Tokenizer
Constructor for use with existing MIPSprogram.
TokenList – Class in mars.assembler
Represents the list of tokens in a single line of MIPS code.
TokenList() –
Constructor for class mars.assembler.TokenList
Constructor for objects of class TokenList
tokenList –
Variable in class mars.mips.instructions.Instruction
List of tokens generated by tokenizing example usage (see exampleFormat).
tokenMarker –
Variable in class mars.venus.editors.jeditsyntax.SyntaxDocument
TokenMarker – Class in mars.venus.editors.jeditsyntax.tokenmarker
A token marker that splits lines of text into tokens.
TokenMarker() –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Creates a new TokenMarker.
TokenMarker.LineInfo – Class in mars.venus.editors.jeditsyntax.tokenmarker
Inner class for storing information about tokenized lines.
TokenMarker.LineInfo() –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
Creates a new LineInfo object with token = Token.NULL
and obj = null.
TokenMarker.LineInfo(byte, Object) –
Constructor for class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
Creates a new LineInfo object with the specified
parameters.
TokenTypes – Class in mars.assembler
Constants to identify the types of tokens found in MIPS programs.
ToolAction – Class in mars.venus
Connects a MarsTool class (class that implements MarsTool interface) to
the Mars menu system by supplying the response to that tool’s menu item
selection.
ToolAction(Class, String) –
Constructor for class mars.venus.ToolAction
Simple constructor.
ToolLoader – Class in mars.venus
This class provides functionality to bring external Mars tools into the Mars
system by adding them to its Tools menu.
ToolLoader() –
Constructor for class mars.venus.ToolLoader
toString() –
Method in class mars.assembler.Directives
Produces String-ified version of Directive object
toString() –
Method in class mars.assembler.Token
Get a String representing the token.
toString() –
Method in class mars.assembler.TokenList
Get a String representing the token list.
toString() –
Method in class mars.assembler.TokenTypes
Produces String equivalent of this token type, which is its name.
toString() –
Method in class mars.mips.dump.AbstractDumpFormat
String representing this object.
toString() –
Method in interface mars.mips.dump.DumpFormat
Descriptive name for the format.
toString() –
Method in class mars.mips.hardware.MemoryAccessNotice
String representation indicates access type, address and length in bytes
toString() –
Method in class mars.mips.hardware.RegisterAccessNotice
String representation indicates access type and which register
toString() –
Method in class mars.ProgramStatement
Crude attempt at building String representation of this complex structure.
toString() –
Method in class mars.simulator.SimulatorNotice
String representation indicates access type, address and length in bytes
toString() –
Method in class mars.venus.editors.jeditsyntax.SyntaxStyle
Returns a string representation of this object.
toString() –
Method in class mars.venus.editors.jeditsyntax.tokenmarker.Token
Returns a string representation of this token.
toTypeString() –
Method in class mars.assembler.TokenList
Get a String representing the sequence of token types for this list.
translate() –
Method in interface mars.assembler.TranslationCode
This is a callback method defined in anonymous class specified as
argument to ExtendedInstruction constructor.
TranslationCode – Interface in mars.assembler
This interface is intended for use by ExtendedInstruction objects to define, using
the translate() method, how to translate the extended (pseudo) instruction into
a sequence of one or more basic instructions, which can then be translated into
binary machine code.
TRANSMITTER_CONTROL –
Static variable in class mars.tools.KeyboardAndDisplaySimulator
TRANSMITTER_DATA –
Static variable in class mars.tools.KeyboardAndDisplaySimulator
TRAP_EXCEPTION –
Static variable in class mars.simulator.Exceptions
twoIntsToLong(int, int) –
Static method in class mars.util.Binary
Returns long (64 bit integer) combining the bit values of two given 32 bit
integer values.
U
undo() –
Method in class mars.venus.editors.generic.GenericTextArea
Undo previous edit
undo() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Undo previous edit
undo() –
Method in interface mars.venus.editors.MARSTextEditingArea
undo() –
Method in class mars.venus.EditPane
Undo previous edit
unhighlightAllSteps() –
Method in class mars.venus.TextSegmentWindow
If any steps are highlighted, this erases the highlighting.
UNLIMITED_SPEED –
Static variable in class mars.venus.RunSpeedPanel
Constant that represents unlimited run speed.
unredoing –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
unsignedIntToIntString(int) –
Static method in class mars.util.Binary
Produce String equivalent of integer value interpreting it as an unsigned integer.
update(Observable, Object) –
Method in class mars.tools.AbstractMarsToolAndApplication
Called when receiving notice of access to MIPS memory or registers.
update(Observable, Object) –
Method in class mars.tools.DigitalLabSim
update(Observable, Object) –
Method in class mars.tools.FloatRepresentation
Override inherited update() to update display when “attached” register is modified
either by MIPS program or by user editing it on the MARS user interface.
update(Observable, Object) –
Method in class mars.tools.MarsBot
update(Observable, Object) –
Method in class mars.tools.ScavengerHunt
update(Observable, Object) –
Method in class mars.venus.Coprocessor0Window
Required by Observer interface.
update(Observable, Object) –
Method in class mars.venus.Coprocessor1Window
Required by Observer interface.
update(Observable, Object) –
Method in class mars.venus.DataSegmentWindow
Required by Observer interface.
update(Observable, Object) –
Method in class mars.venus.EditPane
Update, if source code is visible, when Font setting changes.
update(Observable, Object) –
Method in class mars.venus.RegistersWindow
Required by Observer interface.
updateBaseAddressComboBox() –
Method in class mars.venus.DataSegmentWindow
updateBasicStatements() –
Method in class mars.venus.TextSegmentWindow
Redisplay the basic statements.
updateBracketHighlight(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
updateCell(int, int) –
Method in class mars.venus.DataSegmentWindow
Update data display to show this value (I’m not sure it is being called).
updateCodeAddresses() –
Method in class mars.venus.TextSegmentWindow
Redisplay the addresses.
updateDataAddresses() –
Method in class mars.venus.DataSegmentWindow
Redisplay the addresses.
updateDisplay() –
Method in class mars.tools.AbstractMarsToolAndApplication
Override this method to implement updating of GUI after each MIPS instruction is executed,
while running in “timed” mode (user specifies execution speed on the slider control).
updateDisplay() –
Method in class mars.tools.BitmapDisplay
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode.
updateDisplay() –
Method in class mars.tools.CacheSimulator
Updates display immediately after each update (AccessNotice) is processed, after
cache configuration changes as needed, and after each execution step when Mars
is running in timed mode.
updateDisplay() –
Method in class mars.tools.InstructionCounter
updateDisplay() –
Method in class mars.tools.InstructionStatistics
updates the text fields and progress bars according to the current counter values.
updateDisplay() –
Method in class mars.tools.MemoryReferenceVisualization
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode.
updateDoubleRegisterValue(int, int) –
Method in class mars.venus.Coprocessor1Window
This method handles the updating of the GUI.
updateFloatRegisterValue(int, int, int) –
Method in class mars.venus.Coprocessor1Window
This method handles the updating of the GUI.
updateHexaKeyboard(char) –
Method in class mars.tools.DigitalLabSim
updateLabelAddresses() –
Method in class mars.venus.LabelsWindow
Method to update display of label addresses.
updateModelForMemoryRange(int) –
Method in class mars.venus.DataSegmentWindow
Update table model with contents of new memory “chunk”.
updateOneSecondCounter(char) –
Method in class mars.tools.DigitalLabSim
updatePrediction(boolean) –
Method in class mars.tools.BHTEntry
Updates the entry’s history and prediction.
updatePredictionAtIdx(int, boolean) –
Method in class mars.tools.BHTableModel
Updates the BHT entry with the outcome of the branch instruction.
updateRedoState() –
Method in class mars.venus.EditPane
Update state of Edit menu’s Redo menu item.
updateRegister(String, int) –
Static method in class mars.mips.hardware.Coprocessor0
Sets the value of the register given to the value given.
updateRegister(int, int) –
Static method in class mars.mips.hardware.Coprocessor0
This method updates the register value who’s number is num.
updateRegister(int, int) –
Static method in class mars.mips.hardware.Coprocessor1
This method updates the FPU register value who’s number is num.
updateRegister(int, int) –
Static method in class mars.mips.hardware.RegisterFile
This method updates the register value who’s number is num.
updateRegister(String, int) –
Static method in class mars.mips.hardware.RegisterFile
Sets the value of the register given to the value given.
updateRegisters() –
Method in class mars.venus.Coprocessor0Window
Update register display using current display base (10 or 16)
updateRegisters(int) –
Method in class mars.venus.Coprocessor0Window
Update register display using specified display base
updateRegisters() –
Method in class mars.venus.Coprocessor1Window
Redisplay registers using current display number base (10 or 16)
updateRegisters(int) –
Method in class mars.venus.Coprocessor1Window
Redisplay registers using specified display number base (10 or 16)
updateRegisters() –
Method in class mars.venus.RegistersWindow
update register display using current number base (10 or 16)
updateRegisters(int) –
Method in class mars.venus.RegistersWindow
update register display using specified number base (10 or 16)
updateRegisterValue(int, int, int) –
Method in class mars.venus.Coprocessor0Window
This method handles the updating of the GUI.
updateRegisterValue(int, int, int) –
Method in class mars.venus.RegistersWindow
This method handles the updating of the GUI.
updateScrollBars() –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Updates the state of the scroll bars.
updateSevenSegment(int, char) –
Method in class mars.tools.DigitalLabSim
updateStaticFileStatus() –
Method in class mars.venus.EditPane
Delegates to corresponding FileStatus method
updateStaticFileStatus() –
Method in class mars.venus.FileStatus
Update static FileStatus fields with values from this FileStatus object
To support legacy code that depends on the static.
updateSyntaxStyles() –
Method in class mars.venus.editors.generic.GenericTextArea
Does nothing, but required by the interface.
updateSyntaxStyles() –
Method in class mars.venus.editors.jeditsyntax.JEditBasedTextArea
Update the syntax style table, which is obtained from
SyntaxUtilities.
updateSyntaxStyles() –
Method in interface mars.venus.editors.MARSTextEditingArea
updateUndoState() –
Method in class mars.venus.EditPane
Update state of Edit menu’s Undo menu item.
updateValues() –
Method in class mars.venus.DataSegmentWindow
Update data display to show all values
userHighAddress –
Static variable in class mars.mips.hardware.Memory
highest address accessible in user (not kernel) mode.
userInputAlert –
Static variable in class mars.Globals
String to GUI’s RunI/O text area when echoing user input from pop-up dialog.
usingCompactMemoryConfiguration() –
Method in class mars.mips.hardware.Memory
Determine whether the current memory configuration has a maximum address that can be stored
in 16 bits.
V
VADDR –
Static variable in class mars.mips.hardware.Coprocessor0
Coprocessor register names
VenusUI – Class in mars.venus
Top level container for Venus GUI.
VenusUI(String) –
Constructor for class mars.venus.VenusUI
Constructor for the Class.
version –
Static variable in class mars.Globals
The current MARS version number.
vertical –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
visibleLines –
Variable in class mars.venus.editors.jeditsyntax.JEditTextArea
W
WARNING –
Static variable in class mars.ErrorMessage
Constant to indicate this message is warning not error
WARNING_MESSAGE_PREFIX –
Static variable in class mars.ErrorList
warningCount() –
Method in class mars.ErrorList
Count of number of warning messages in list.
WARNINGS_ARE_ERRORS –
Static variable in class mars.Settings
Flag to determine whether or not assembler warnings are considered errors.
warningsOccurred() –
Method in class mars.ErrorList
Determine whether warning has occured or not.
width –
Variable in class mars.venus.HardcopyWriter
willBranch(ProgramStatement) –
Static method in class mars.tools.BHTSimulator
Checks if the branch instruction delivered as parameter will branch or not.
WORD –
Static variable in class mars.assembler.Directives
WORD_LENGTH_BYTES –
Static variable in class mars.mips.hardware.Memory
MIPS word length in bytes.
WORD_SIZE –
Static variable in class mars.assembler.DataTypes
Number of bytes occupied by MIPS word is 4.
wordAligned(int) –
Static method in class mars.mips.hardware.Memory
Utility to determine if given address is word-aligned.
WRITE –
Static variable in class mars.mips.hardware.AccessNotice
Indicates the purpose of access was to write.
write(char[], int, int) –
Method in class mars.venus.HardcopyWriter
This is the write( ) method of the stream.
writeToFile(int, byte[], int) –
Static method in class mars.util.SystemIO
Write bytes to file.
X
x0 –
Variable in class mars.venus.HardcopyWriter
xToOffset(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts an x co-ordinate to an offset within a line.
xyToOffset(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts a point to an offset, from the start of the text.
Y
y0 –
Variable in class mars.venus.HardcopyWriter
yToLine(int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts a y co-ordinate to a line index.
_
_offsetToX(int, int) –
Method in class mars.venus.editors.jeditsyntax.JEditTextArea
Converts an offset in a line into an x co-ordinate.
A B C D E F G H I J K L M N O P Q R S T U V W X Y _
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Deprecated List
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Deprecated API
Contents Deprecated Methods
Deprecated Constructors
Deprecated Methods
mars.Settings.getAssembleAllEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
mars.Settings.getAssembleOnOpenEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
mars.Settings.getBareMachineEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.BARE_MACHINE_ENABLED)
mars.Settings.getDataSegmentHighlighting()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
mars.Settings.getDelayedBranchingEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
mars.Settings.getDisplayAddressesInHex()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
mars.Settings.getDisplayValuesInHex()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
mars.Settings.getEditorLineNumbersDisplayed()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
mars.Settings.getExceptionHandlerEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
mars.Settings.getExtendedAssemblerEnabled()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
mars.Settings.getLabelWindowVisibility()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
mars.Settings.getProgramArguments()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
mars.Settings.getRegistersHighlighting()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
mars.Settings.getStartAtMain()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
mars.Settings.getWarningsAreErrors()
Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
mars.Settings.setAssembleAllEnabled(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
mars.Settings.setAssembleOnOpenEnabled(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
mars.Settings.setDataSegmentHighlighting(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
mars.Settings.setDelayedBranchingEnabled(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
mars.Settings.setDelayedBranchingEnabledNonPersistent(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
mars.Settings.setDisplayAddressesInHex(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
mars.Settings.setDisplayValuesInHex(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
mars.Settings.setEditorLineNumbersDisplayed(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
mars.Settings.setExceptionHandlerEnabled(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
mars.Settings.setExtendedAssemblerEnabled(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
mars.Settings.setLabelWindowVisibility(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
mars.Settings.setProgramArguments(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
mars.Settings.setRegistersHighlighting(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
mars.Settings.setStartAtMain(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
mars.Settings.setWarningsAreErrors(boolean)
Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
Deprecated Constructors
mars.ErrorMessage(boolean, String, int, int, String, String)
Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
mars.ErrorMessage(String, int, int, String)
Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
mars.ErrorMessage(String, int, int, String, String)
Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Classes
Mars
/* Javadoc style sheet */
/* Define colors, fonts and other style attributes here to override the defaults */
/* Page background color */
body { background-color: #FFFFFF; color:#000000 }
/* Headings */
h1 { font-size: 145% }
/* Table colors */
.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */
.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */
.TableRowColor { background: #FFFFFF; color:#000000 } /* White */
/* Font used in left-hand frame lists */
.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }
/* Navigation bar fonts and colors */
.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */
.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */
.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}
.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}
.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}
Overview
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Packages
mars
mars.assembler
mars.mips.dump
mars.mips.hardware
mars.mips.instructions
mars.mips.instructions.syscalls
mars.simulator
mars.tools
mars.util
mars.venus
mars.venus.editors
mars.venus.editors.generic
mars.venus.editors.jeditsyntax
mars.venus.editors.jeditsyntax.tokenmarker
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
API Help
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
How This API Document Is Organized
This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
Overview
The Overview page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.
Package
Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain four categories:
Interfaces (italic)
Classes
Enums
Exceptions
Errors
Annotation Types
Class/Interface
Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
Class inheritance diagram
Direct Subclasses
All Known Subinterfaces
All Known Implementing Classes
Class/interface declaration
Class/interface description
Nested Class Summary
Field Summary
Constructor Summary
Method Summary
Field Detail
Constructor Detail
Method Detail
Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
Annotation Type
Each annotation type has its own separate page with the following sections:
Annotation Type declaration
Annotation Type description
Required Element Summary
Optional Element Summary
Element Detail
Enum
Each enum has its own separate page with the following sections:
Enum declaration
Enum description
Enum Constant Summary
Enum Constant Detail
Tree (Class Hierarchy)
There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with java.lang.Object. The interfaces do not inherit from java.lang.Object. When viewing the Overview page, clicking on “Tree” displays the hierarchy for all packages.
When viewing a particular package, class or interface page, clicking “Tree” displays the hierarchy for only that package.
Deprecated API
The Deprecated API page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
Index
The Index contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
Prev/Next
These links take you to the next or previous class, interface, package, or related page.
Frames/No Frames
These links show and hide the HTML frames. All pages are available with or without frames.
Serialized Form
Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking “Serialized Form” in the “See also” section of the class description.
Constant Field Values
The Constant Field Values page lists the static final fields and their values.
This help file applies to API documentation generated using the standard doclet.
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package
Class Summary
Mars Portal to Mars
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
All Classes
All Classes
AbstractDumpFormat
AbstractFontSettingDialog
AbstractMarsToolAndApplication
AbstractSyscall
AccessNotice
AddressErrorException
AsciiTextDumpFormat
Assembler
BackStepper
BasicInstruction
BasicInstructionFormat
BHTableModel
BHTEntry
BHTSimGUI
BHTSimulator
Binary
BinaryDumpFormat
BinaryTextDumpFormat
BitmapDisplay
CacheSimulator
Coprocessor0
Coprocessor0Window
Coprocessor1
Coprocessor1Window
DataSegmentWindow
DataTypes
DefaultInputHandler
DelayedBranch
DigitalLabSim
Directives
DumpFormat
DumpFormatLoader
EditCopyAction
EditCutAction
EditFindReplaceAction
Editor
EditorFont
EditPane
EditPasteAction
EditRedoAction
EditSelectAllAction
EditTabbedPane
EditUndoAction
ErrorList
ErrorMessage
Exceptions
ExecutePane
ExtendedInstruction
FileCloseAction
FileCloseAllAction
FileDumpMemoryAction
FileExitAction
FilenameFinder
FileNewAction
FileOpenAction
FilePrintAction
FileSaveAction
FileSaveAllAction
FileSaveAsAction
FileStatus
FloatRepresentation
GenericTextArea
Globals
GuiAction
HardcopyWriter
HardcopyWriter.PrintCanceledException
HelpAboutAction
HelpHelpAction
HexTextDumpFormat
InputHandler
InputHandler.backspace
InputHandler.backspace_word
InputHandler.clip_copy
InputHandler.clip_cut
InputHandler.clip_paste
InputHandler.delete
InputHandler.delete_word
InputHandler.document_end
InputHandler.document_home
InputHandler.end
InputHandler.home
InputHandler.insert_break
InputHandler.insert_char
InputHandler.insert_tab
InputHandler.MacroRecorder
InputHandler.next_char
InputHandler.next_line
InputHandler.next_page
InputHandler.next_word
InputHandler.NonRecordable
InputHandler.NonRepeatable
InputHandler.overwrite
InputHandler.prev_char
InputHandler.prev_line
InputHandler.prev_page
InputHandler.prev_word
InputHandler.repeat
InputHandler.select_all
InputHandler.toggle_rect
InputHandler.Wrapper
Instruction
InstructionCounter
InstructionSet
InstructionStatistics
IntelHexDumpFormat
IntroToTools
InvalidRegisterAccessException
JEditBasedTextArea
JEditTextArea
KeyboardAndDisplaySimulator
KeywordMap
LabelsWindow
Macro
MacroPool
MainPane
Mars
MarsBot
MarsLaunch
MarsSplashScreen
MARSTextEditingArea
MarsTool
Memory
MemoryAccessNotice
MemoryConfiguration
MemoryConfigurations
MemoryDump
MemoryReferenceVisualization
MessagesPane
MIFDumpFormat
MIPSprogram
MIPSTokenMarker
NumberDisplayBaseChooser
OperandFormat
PopupHelpItem
PopupListener
ProcessingException
ProgramArgumentList
ProgramStatement
PropertiesFile
RandomStreams
Register
RegisterAccessNotice
RegisterFile
RegistersPane
RegistersWindow
RepeatButton
RunAssembleAction
RunBackstepAction
RunClearBreakpointsAction
RunGoAction
RunPauseAction
RunResetAction
RunSpeedPanel
RunStepAction
RunStopAction
RunToggleBreakpointsAction
ScavengerHunt
ScreenMagnifier
SegmentWindowDumpFormat
Settings
SettingsAddressDisplayBaseAction
SettingsAssembleAllAction
SettingsAssembleOnOpenAction
SettingsDelayedBranchingAction
SettingsEditorAction
SettingsExceptionHandlerAction
SettingsExtendedAction
SettingsHighlightingAction
SettingsLabelAction
SettingsMemoryConfigurationAction
SettingsPopupInputAction
SettingsProgramArgumentsAction
SettingsStartAtMainAction
SettingsValueDisplayBaseAction
SettingsWarningsAreErrorsAction
SimulationCode
Simulator
Simulator.StopListener
SimulatorNotice
SourceLine
SwingWorker
Symbol
SymbolTable
SyntaxDocument
SyntaxStyle
SyntaxUtilities
Syscall
SyscallClose
SyscallConfirmDialog
SyscallExit
SyscallExit2
SyscallInputDialogDouble
SyscallInputDialogFloat
SyscallInputDialogInt
SyscallInputDialogString
SyscallMessageDialog
SyscallMessageDialogDouble
SyscallMessageDialogFloat
SyscallMessageDialogInt
SyscallMessageDialogString
SyscallMidiOut
SyscallMidiOutSync
SyscallNumberOverride
SyscallOpen
SyscallPrintChar
SyscallPrintDouble
SyscallPrintFloat
SyscallPrintInt
SyscallPrintIntBinary
SyscallPrintIntHex
SyscallPrintIntUnsigned
SyscallPrintString
SyscallRandDouble
SyscallRandFloat
SyscallRandInt
SyscallRandIntRange
SyscallRandSeed
SyscallRead
SyscallReadChar
SyscallReadDouble
SyscallReadFloat
SyscallReadInt
SyscallReadString
SyscallSbrk
SyscallSleep
SyscallTime
SyscallWrite
SystemIO
TextAreaDefaults
TextAreaPainter
TextAreaPainter.Highlight
TextSegmentWindow
TextUtilities
Token
Token
Tokenizer
TokenList
TokenMarker
TokenTypes
ToolAction
ToolLoader
TranslationCode
VenusUI
mars
mars.assembler
mars.mips.dump
mars.mips.hardware
mars.mips.instructions
mars.mips.instructions.syscalls
mars.simulator
mars.tools
mars.util
mars.venus
mars.venus.editors
mars.venus.editors.generic
mars.venus.editors.jeditsyntax
mars.venus.editors.jeditsyntax.tokenmarker
Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object Mars
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
IntroToTools
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class IntroToTools
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.IntroToTools
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class IntroToTools
extends AbstractMarsToolAndApplication
The “hello world” of MarsTools!
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
IntroToTools()
Simple constructor, likely used by the MARS Tools menu mechanism
IntroToTools(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Method Summary
protected javax.swing.JComponent buildMainDisplayArea()
Implementation of the inherited abstract method to build the main
display area of the GUI.
java.lang.String getName()
Required method to return Tool name.
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, getHelpComponent, go, initializePostGUI, initializePreGUI, isObserving, performSpecialClosingDuties, processMIPSUpdate, reset, update, updateDisplay
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Constructor Detail
IntroToTools
public IntroToTools(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
IntroToTools
public IntroToTools()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a MemoryReferenceVisualization object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the application.
getName
public java.lang.String getName()
Required method to return Tool name.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Implementation of the inherited abstract method to build the main
display area of the GUI. It will be placed in the CENTER area of a
BorderLayout. The title is in the NORTH area, and the controls are
in the SOUTH area.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.DigitalLabSim
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class DigitalLabSim
extends AbstractMarsToolAndApplication
See Also:
Serialized Form
Nested Class Summary
class DigitalLabSim.HexaKeyboard
class DigitalLabSim.OneSecondCounter
class DigitalLabSim.SevenSegmentDisplay
class DigitalLabSim.SevenSegmentPanel
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static int EXTERNAL_INTERRUPT_HEXA_KEYBOARD
static int EXTERNAL_INTERRUPT_TIMER
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DigitalLabSim()
DigitalLabSim(java.lang.String title,
java.lang.String heading)
Method Summary
protected void addAsObserver()
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
protected javax.swing.JComponent buildMainDisplayArea()
Abstract method that must be instantiated by subclass to build the main display area
of the GUI.
protected javax.swing.JComponent getHelpComponent()
Override this method to provide a JComponent (probably a JButton) of your choice
to be placed just left of the Close/Exit button.
java.lang.String getName()
Required MarsTool method to return Tool name.
static void main(java.lang.String[] args)
protected void reset()
Method that will be called each time the default Reset button is clicked.
void update(java.util.Observable ressource,
java.lang.Object accessNotice)
Called when receiving notice of access to MIPS memory or registers.
void updateHexaKeyboard(char row)
void updateOneSecondCounter(char value)
void updateSevenSegment(int number,
char value)
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, go, initializePostGUI, initializePreGUI, isObserving, performSpecialClosingDuties, processMIPSUpdate, updateDisplay
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
EXTERNAL_INTERRUPT_TIMER
public static final int EXTERNAL_INTERRUPT_TIMER
See Also:
Constant Field Values
EXTERNAL_INTERRUPT_HEXA_KEYBOARD
public static final int EXTERNAL_INTERRUPT_HEXA_KEYBOARD
See Also:
Constant Field Values
Constructor Detail
DigitalLabSim
public DigitalLabSim(java.lang.String title,
java.lang.String heading)
DigitalLabSim
public DigitalLabSim()
Method Detail
main
public static void main(java.lang.String[] args)
getName
public java.lang.String getName()
Description copied from class: AbstractMarsToolAndApplication
Required MarsTool method to return Tool name. Must be defined by subclass.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
addAsObserver
protected void addAsObserver()
Description copied from class: AbstractMarsToolAndApplication
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
By default, will add as an Observer of the entire Data Segment in memory.
Override if you want something different. Note that the Memory methods to add an
Observer to memory are flexible (you can register for a range of addresses) but
may throw an AddressErrorException that you need to catch.
This method is called whenever the default “Connect” button on a MarsTool or the
default “Assemble and run” on a stand-alone Mars app is selected. The corresponding
NOTE: if you do not want to register as an Observer of the entire data segment
(starts at address 0x10000000) then override this to either do some alternative
or nothing at all. This method is also overloaded to allow arbitrary memory
subrange.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
update
public void update(java.util.Observable ressource,
java.lang.Object accessNotice)
Description copied from class: AbstractMarsToolAndApplication
Called when receiving notice of access to MIPS memory or registers. Default
implementation of method required by Observer interface. This method will filter out
notices originating from the MARS GUI or from direct user editing of memory or register
displays. Only notices arising from MIPS program access are allowed in.
It then calls two methods to be overridden by the subclass (since they do
nothing by default): processMIPSUpdate() then updateDisplay().
Specified by:
update in interface java.util.Observer
Overrides:
update in class AbstractMarsToolAndApplication
Parameters:
ressource – the attached MIPS resource
accessNotice – AccessNotice information provided by the resource
reset
protected void reset()
Description copied from class: AbstractMarsToolAndApplication
Method that will be called each time the default Reset button is clicked.
Use it to reset any data structures and/or GUI components. By default it does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Description copied from class: AbstractMarsToolAndApplication
Abstract method that must be instantiated by subclass to build the main display area
of the GUI. It will be placed in the CENTER area of a BorderLayout. The title
is in the NORTH area, and the controls are in the SOUTH area.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
getHelpComponent
protected javax.swing.JComponent getHelpComponent()
Description copied from class: AbstractMarsToolAndApplication
Override this method to provide a JComponent (probably a JButton) of your choice
to be placed just left of the Close/Exit button. Its anticipated use is for a
“help” button that launches a help message or dialog. But it can be any valid
JComponent that doesn’t mind co-existing among a bunch of JButtons.
Overrides:
getHelpComponent in class AbstractMarsToolAndApplication
updateSevenSegment
public void updateSevenSegment(int number,
char value)
updateHexaKeyboard
public void updateHexaKeyboard(char row)
updateOneSecondCounter
public void updateOneSecondCounter(char value)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FloatRepresentation
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class FloatRepresentation
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.FloatRepresentation
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class FloatRepresentation
extends AbstractMarsToolAndApplication
Tool to help students learn about IEEE 754 representation of 32 bit
floating point values. This representation is used by MIPS “float”
directive and instructions and also the Java (and most other languages)
“float” data type. As written, it can ALMOST be adapted to 64 bit by
changing a few constants.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
FloatRepresentation()
Simple constructor, likely used by the MARS Tools menu mechanism
FloatRepresentation(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Method Summary
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
protected javax.swing.JComponent buildDisplayArea()
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area.
protected void deleteAsObserver()
Delete this app/tool as an Observer of the attached register.
java.lang.String getName()
Fetch tool name (for display in MARS Tools menu)
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
protected void reset()
Method to reset display values to 0 when the Reset button selected.
void update(java.util.Observable register,
java.lang.Object accessNotice)
Override inherited update() to update display when “attached” register is modified
either by MIPS program or by user editing it on the MARS user interface.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, getHelpComponent, go, initializePostGUI, initializePreGUI, isObserving, performSpecialClosingDuties, processMIPSUpdate, updateDisplay
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Constructor Detail
FloatRepresentation
public FloatRepresentation(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
FloatRepresentation
public FloatRepresentation()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a FloatRepresentation object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the application.
getName
public java.lang.String getName()
Fetch tool name (for display in MARS Tools menu)
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
String containing tool name
addAsObserver
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only. This version will register us as observer over the selected
floating point register, if any. If no register is selected, it will not do anything.
If you use the inherited GUI buttons, this method is invoked when you click “Connect” button
on MarsTool or the “Assemble and Run” button on a Mars-based app.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
deleteAsObserver
protected void deleteAsObserver()
Delete this app/tool as an Observer of the attached register. This overrides
the inherited version which deletes only as an Observer of memory.
This method is called when the default “Disconnect” button on a MarsTool is selected or
when the MIPS program execution triggered by the default “Assemble and run” on a stand-alone
Mars app terminates (e.g. when the button is re-enabled).
Overrides:
deleteAsObserver in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area. This will be vertically sandwiched between
the standard heading area at the top and the control area at the bottom.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
the GUI component containing the application/tool-specific part of the user interface
update
public void update(java.util.Observable register,
java.lang.Object accessNotice)
Override inherited update() to update display when “attached” register is modified
either by MIPS program or by user editing it on the MARS user interface.
The latter is the reason for overriding the inherited update() method.
The inherited method will filter out notices triggered by the MARS GUI or the user.
Specified by:
update in interface java.util.Observer
Overrides:
update in class AbstractMarsToolAndApplication
Parameters:
register – the attached register
accessNotice – information provided by register in RegisterAccessNotice object
reset
protected void reset()
Method to reset display values to 0 when the Reset button selected.
If attached to a MIPS register at the time, the register will be reset as well.
Overrides inherited method that does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
buildDisplayArea
protected javax.swing.JComponent buildDisplayArea()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BHTSimulator
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class BHTSimulator
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.BHTSimulator
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class BHTSimulator
extends AbstractMarsToolAndApplication
implements java.awt.event.ActionListener
A MARS tool for simulating branch prediction with a Branch History Table (BHT)
The simulation is based on observing the access to the instruction memory area (text segment).
If a branch instruction is encountered, a prediction based on a BHT is performed.
The outcome of the branch is compared with the prediction and the prediction is updated accordingly.
Statistics about the correct and incorrect number of predictions can be obtained for each BHT entry.
The number of entries in the BHT and the history that is considered for each prediction can be configured interactively.
A change of the configuration however causes a re-initialization of the BHT.
The tool can be used to show how branch prediction works in case of loops and how effective such simple methods are.
In case of nested loops the difference of BHT with 1 or 2 Bit history can be explored and visualized.
Author:
ingo. -klu.ac.at
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static int BHT_DEFAULT_HISTORY
constant for the default history size
static boolean BHT_DEFAULT_INITVAL
constant for the default inital value
static int BHT_DEFAULT_SIZE
constant for the default size of the BHT
static java.lang.String BHT_HEADING
the heading of the tool
static java.lang.String BHT_NAME
the name of the tool
static java.lang.String BHT_VERSION
the version of the tool
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BHTSimulator()
Creates a BHT Simulator with given name and heading.
Method Summary
void actionPerformed(java.awt.event.ActionEvent event)
Handles the actions when selecting another value in one of the two combo boxes.
protected void addAsObserver()
Adds BHTSimulator as observer of the text segment.
protected javax.swing.JComponent buildMainDisplayArea()
Creates a GUI and initialize the GUI with the default values.
protected static int extractBranchAddress(ProgramStatement stmt)
Extracts the target address of the branch.
java.lang.String getName()
Returns the name of the tool.
protected void handleExecBranchInst(int branchInstAddr,
boolean branchTaken)
Handles the execution of the branch instruction.
protected void handlePreBranchInst(ProgramStatement stmt)
Handles the execution branch instruction.
protected static boolean isBranchInstruction(ProgramStatement stmt)
Determines if the instruction is a branch instruction or not.
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Callback for text segment access by the MIPS simulator.
protected void reset()
Performs a reset of the simulator.
protected void resetSimulator()
Resets the simulator by clearing the GUI elements and resetting the BHT.
protected static boolean willBranch(ProgramStatement stmt)
Checks if the branch instruction delivered as parameter will branch or not.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, getHelpComponent, go, initializePostGUI, initializePreGUI, isObserving, performSpecialClosingDuties, update, updateDisplay
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
BHT_DEFAULT_SIZE
public static final int BHT_DEFAULT_SIZE
constant for the default size of the BHT
See Also:
Constant Field Values
BHT_DEFAULT_HISTORY
public static final int BHT_DEFAULT_HISTORY
constant for the default history size
See Also:
Constant Field Values
BHT_DEFAULT_INITVAL
public static final boolean BHT_DEFAULT_INITVAL
constant for the default inital value
See Also:
Constant Field Values
BHT_NAME
public static final java.lang.String BHT_NAME
the name of the tool
See Also:
Constant Field Values
BHT_VERSION
public static final java.lang.String BHT_VERSION
the version of the tool
See Also:
Constant Field Values
BHT_HEADING
public static final java.lang.String BHT_HEADING
the heading of the tool
See Also:
Constant Field Values
Constructor Detail
BHTSimulator
public BHTSimulator()
Creates a BHT Simulator with given name and heading.
Method Detail
addAsObserver
protected void addAsObserver()
Adds BHTSimulator as observer of the text segment.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Creates a GUI and initialize the GUI with the default values.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
getName
public java.lang.String getName()
Returns the name of the tool.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
the tool’s name as String
reset
protected void reset()
Performs a reset of the simulator.
This causes the BHT to be reseted and the log messages to be cleared.
Overrides:
reset in class AbstractMarsToolAndApplication
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
Handles the actions when selecting another value in one of the two combo boxes.
Selecting a different BHT size or history causes a reset of the simulator.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
resetSimulator
protected void resetSimulator()
Resets the simulator by clearing the GUI elements and resetting the BHT.
handlePreBranchInst
protected void handlePreBranchInst(ProgramStatement stmt)
Handles the execution branch instruction.
This method is called each time a branch instruction is executed.
Based on the address of the instruction the corresponding index into the BHT is calculated.
The prediction is obtained from the BHT at the calculated index and is visualized appropriately.
Parameters:
stmt – the branch statement that is executed
handleExecBranchInst
protected void handleExecBranchInst(int branchInstAddr,
boolean branchTaken)
Handles the execution of the branch instruction.
The correctness of the prediction is visualized in both the table and the log message area.
The BHT is updated based on the information if the branch instruction was taken or not.
Parameters:
branchInstAddr – the address of the branch instruction
branchTaken – the information if the branch is taken or not (determined in a step before)
isBranchInstruction
protected static boolean isBranchInstruction(ProgramStatement stmt)
Determines if the instruction is a branch instruction or not.
Parameters:
stmt – the statement to investigate
Returns:
true, if stmt is a branch instruction, otherwise false
willBranch
protected static boolean willBranch(ProgramStatement stmt)
Checks if the branch instruction delivered as parameter will branch or not.
Parameters:
stmt – the branch instruction to be investigated
Returns:
true if the branch will be taken, otherwise false
extractBranchAddress
protected static int extractBranchAddress(ProgramStatement stmt)
Extracts the target address of the branch.
In MIPS the target address is encoded as 16-bit value.
The target address is encoded relative to the address of the instruction after the branch instruction
Parameters:
stmt – the branch instruction
Returns:
the address of the instruction that is executed if the branch is taken
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Callback for text segment access by the MIPS simulator.
The method is called each time the text segment is accessed to fetch the next instruction.
If the next instruction to execute was a branch instruction, the branch prediction is performed and visualized.
In case the last instruction was a branch instruction, the outcome of the branch prediction is analyzed and visualized.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
resource – the observed resource
notice – signals the type of access (memory, register etc.)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
KeyboardAndDisplaySimulator
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class KeyboardAndDisplaySimulator
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.KeyboardAndDisplaySimulator
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class KeyboardAndDisplaySimulator
extends AbstractMarsToolAndApplication
Keyboard and Display Simulator. It can be run either as a stand-alone Java application having
access to the mars package, or through MARS as an item in its Tools menu. It makes
maximum use of methods inherited from its abstract superclass AbstractMarsToolAndApplication.
Pete Sanderson
Version 1.0, 24 July 2008.
Version 1.1, 24 November 2008 corrects two omissions: (1) the tool failed to register as an observer
of kernel text memory when counting instruction executions for transmitter ready bit
reset delay, and (2) the tool failed to test the Status register’s Exception Level bit before
raising the exception that results in the interrupt (if the Exception Level bit is 1, that
means an interrupt is being processed, so disable further interrupts).
Version 1.2, 6 August 2009, soft-codes the MMIO register locations for new memory configuration
feature of MARS 3.7. Previously memory segment addresses were fixed and final. Now they
can be modified dynamically so the tool has to get its values dynamically as well.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static java.awt.Dimension preferredTextAreaDimension
static int RECEIVER_CONTROL
static int RECEIVER_DATA
static int TRANSMITTER_CONTROL
static int TRANSMITTER_DATA
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
KeyboardAndDisplaySimulator()
Simple constructor, likely used by the MARS Tools menu mechanism
KeyboardAndDisplaySimulator(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone keyboard/display simulator.
Method Summary
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area.
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
java.lang.String getName()
Required MarsTool method to return Tool name.
protected void initializePostGUI()
Initialization code to be executed after the GUI is configured.
protected void initializePreGUI()
Method that will be called once just before the GUI is constructed in the go() and action()
methods.
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
protected void reset()
Method to reset counters and display when the Reset button selected.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, go, isObserving, performSpecialClosingDuties, update, updateDisplay
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
preferredTextAreaDimension
public static java.awt.Dimension preferredTextAreaDimension
RECEIVER_CONTROL
public static int RECEIVER_CONTROL
RECEIVER_DATA
public static int RECEIVER_DATA
TRANSMITTER_CONTROL
public static int TRANSMITTER_CONTROL
TRANSMITTER_DATA
public static int TRANSMITTER_DATA
Constructor Detail
KeyboardAndDisplaySimulator
public KeyboardAndDisplaySimulator(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone keyboard/display simulator.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
KeyboardAndDisplaySimulator
public KeyboardAndDisplaySimulator()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a KeyboardAndDisplaySimulator object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the application.
getName
public java.lang.String getName()
Required MarsTool method to return Tool name.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
initializePreGUI
protected void initializePreGUI()
Description copied from class: AbstractMarsToolAndApplication
Method that will be called once just before the GUI is constructed in the go() and action()
methods. Use it to initialize any data structures needed for the application whose values
will be needed to determine the initial state of GUI components. By default it does nothing.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
addAsObserver
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
When user enters keystroke, set RECEIVER_CONTROL and RECEIVER_DATA using the action listener.
When user loads word (lw) from RECEIVER_DATA (we are notified of the read), then clear RECEIVER_CONTROL.
When user stores word (sw) to TRANSMITTER_DATA (we are notified of the write), then clear TRANSMITTER_CONTROL, read TRANSMITTER_DATA,
echo the character to display, wait for delay period, then set TRANSMITTER_CONTROL.
If you use the inherited GUI buttons, this method is invoked when you click “Connect” button on MarsTool or the
“Assemble and Run” button on a Mars-based app.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area. It is organized vertically
into two major components: the display and the keyboard. The display itself
is a JTextArea and it echoes characters placed into the low order byte of
the Transmitter Data location, 0xffff000c. They keyboard is also a JTextArea
places each typed character into the Receive Data location 0xffff0004.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
the GUI component containing these two areas
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
memory – the attached memory
accessNotice – information provided by memory in MemoryAccessNotice object
initializePostGUI
protected void initializePostGUI()
Initialization code to be executed after the GUI is configured. Overrides inherited default.
Overrides:
initializePostGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
Method to reset counters and display when the Reset button selected.
Overrides inherited method that does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
getHelpComponent
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
Overrides:
getHelpComponent in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InstructionStatistics
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class InstructionStatistics
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.InstructionStatistics
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class InstructionStatistics
extends AbstractMarsToolAndApplication
A MARS tool for obtaining instruction statistics by instruction category.
The code of this tools is initially based on the Instruction counter tool by Felipe Lassa.
Author:
Ingo Kofler
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected int lastAddress
The last address we saw.
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
InstructionStatistics()
Simple construction, likely used by the MARS Tools menu mechanism.
InstructionStatistics(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone enhanced instruction counter.
Method Summary
protected void addAsObserver()
registers the tool as observer for the text segment of the MIPS program
protected javax.swing.JComponent buildMainDisplayArea()
creates the display area for the tool as required by the API
protected int getInstructionCategory(ProgramStatement stmt)
decodes the instruction and determines the category of the instruction.
java.lang.String getName()
returns the name of the tool
protected void initializePreGUI()
performs initialization tasks of the counters before the GUI is created.
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
method that is called each time the MIPS simulator accesses the text segment.
protected void reset()
resets the counter values of the tool and updates the display.
protected void updateDisplay()
updates the text fields and progress bars according to the current counter values.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, getHelpComponent, go, initializePostGUI, isObserving, performSpecialClosingDuties, update
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
lastAddress
protected int lastAddress
The last address we saw. We ignore it because the only way for a
program to execute twice the same instruction is to enter an infinite
loop, which is not insteresting in the POV of counting instructions.
Constructor Detail
InstructionStatistics
public InstructionStatistics(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone enhanced instruction counter.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
InstructionStatistics
public InstructionStatistics()
Simple construction, likely used by the MARS Tools menu mechanism.
Method Detail
getName
public java.lang.String getName()
returns the name of the tool
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
the tools’s name
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
creates the display area for the tool as required by the API
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
a panel that holds the GUI of the tool
addAsObserver
protected void addAsObserver()
registers the tool as observer for the text segment of the MIPS program
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
getInstructionCategory
protected int getInstructionCategory(ProgramStatement stmt)
decodes the instruction and determines the category of the instruction.
The instruction is decoded by extracting the operation and function code of the 32-bit instruction.
Only the most relevant instructions are decoded and categorized.
Parameters:
stmt – the instruction to decode
Returns:
the category of the instruction
See Also:
CATEGORY_ALU,
CATEGORY_JUMP,
CATEGORY_BRANCH,
CATEGORY_MEM,
CATEGORY_OTHER
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
method that is called each time the MIPS simulator accesses the text segment.
Before an instruction is executed by the simulator, the instruction is fetched from the program memory.
This memory access is observed and the corresponding instruction is decoded and categorized by the tool.
According to the category the counter values are increased and the display gets updated.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
resource – the observed resource
notice – signals the type of access (memory, register etc.)
initializePreGUI
protected void initializePreGUI()
performs initialization tasks of the counters before the GUI is created.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
resets the counter values of the tool and updates the display.
Overrides:
reset in class AbstractMarsToolAndApplication
updateDisplay
protected void updateDisplay()
updates the text fields and progress bars according to the current counter values.
Overrides:
updateDisplay in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim.SevenSegmentPanel
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim.SevenSegmentPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.tools.DigitalLabSim.SevenSegmentPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Enclosing class:
DigitalLabSim
public class DigitalLabSim.SevenSegmentPanel
extends javax.swing.JPanel
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
DigitalLabSim.SevenSegmentDisplay[] display
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DigitalLabSim.SevenSegmentPanel()
Method Summary
void modifyDisplay(int num,
char val)
void resetSevenSegment()
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
display
public DigitalLabSim.SevenSegmentDisplay[] display
Constructor Detail
DigitalLabSim.SevenSegmentPanel
public DigitalLabSim.SevenSegmentPanel()
Method Detail
modifyDisplay
public void modifyDisplay(int num,
char val)
resetSevenSegment
public void resetSevenSegment()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InstructionCounter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class InstructionCounter
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.InstructionCounter
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class InstructionCounter
extends AbstractMarsToolAndApplication
Instruction counter tool. Can be used to know how many instructions
were executed to complete a given program.
Code slightly based on MemoryReferenceVisualization.
Author:
Felipe Lessa
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected int counter
Number of instructions executed until now.
protected int counterI
Number of instructions of type I.
protected int counterJ
Number of instructions of type J.
protected int counterR
Number of instructions of type R.
protected int lastAddress
The last address we saw.
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
InstructionCounter()
Simple construction, likely used by the MARS Tools menu mechanism.
InstructionCounter(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Method Summary
protected void addAsObserver()
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
protected javax.swing.JComponent buildMainDisplayArea()
Abstract method that must be instantiated by subclass to build the main display area
of the GUI.
java.lang.String getName()
Required MarsTool method to return Tool name.
protected void initializePreGUI()
Method that will be called once just before the GUI is constructed in the go() and action()
methods.
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Override this method to process a received notice from MIPS Observable (memory or register)
It will only be called if the notice was generated as the result of MIPS instruction execution.
protected void reset()
Method that will be called each time the default Reset button is clicked.
protected void updateDisplay()
Override this method to implement updating of GUI after each MIPS instruction is executed,
while running in “timed” mode (user specifies execution speed on the slider control).
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, getHelpComponent, go, initializePostGUI, isObserving, performSpecialClosingDuties, update
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
counter
protected int counter
Number of instructions executed until now.
counterR
protected int counterR
Number of instructions of type R.
counterI
protected int counterI
Number of instructions of type I.
counterJ
protected int counterJ
Number of instructions of type J.
lastAddress
protected int lastAddress
The last address we saw. We ignore it because the only way for a
program to execute twice the same instruction is to enter an infinite
loop, which is not insteresting in the POV of counting instructions.
Constructor Detail
InstructionCounter
public InstructionCounter(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
InstructionCounter
public InstructionCounter()
Simple construction, likely used by the MARS Tools menu mechanism.
Method Detail
getName
public java.lang.String getName()
Description copied from class: AbstractMarsToolAndApplication
Required MarsTool method to return Tool name. Must be defined by subclass.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Description copied from class: AbstractMarsToolAndApplication
Abstract method that must be instantiated by subclass to build the main display area
of the GUI. It will be placed in the CENTER area of a BorderLayout. The title
is in the NORTH area, and the controls are in the SOUTH area.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
addAsObserver
protected void addAsObserver()
Description copied from class: AbstractMarsToolAndApplication
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
By default, will add as an Observer of the entire Data Segment in memory.
Override if you want something different. Note that the Memory methods to add an
Observer to memory are flexible (you can register for a range of addresses) but
may throw an AddressErrorException that you need to catch.
This method is called whenever the default “Connect” button on a MarsTool or the
default “Assemble and run” on a stand-alone Mars app is selected. The corresponding
NOTE: if you do not want to register as an Observer of the entire data segment
(starts at address 0x10000000) then override this to either do some alternative
or nothing at all. This method is also overloaded to allow arbitrary memory
subrange.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Description copied from class: AbstractMarsToolAndApplication
Override this method to process a received notice from MIPS Observable (memory or register)
It will only be called if the notice was generated as the result of MIPS instruction execution.
By default it does nothing. After this method is complete, the updateDisplay() method will be
invoked automatically.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
initializePreGUI
protected void initializePreGUI()
Description copied from class: AbstractMarsToolAndApplication
Method that will be called once just before the GUI is constructed in the go() and action()
methods. Use it to initialize any data structures needed for the application whose values
will be needed to determine the initial state of GUI components. By default it does nothing.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
Description copied from class: AbstractMarsToolAndApplication
Method that will be called each time the default Reset button is clicked.
Use it to reset any data structures and/or GUI components. By default it does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
updateDisplay
protected void updateDisplay()
Description copied from class: AbstractMarsToolAndApplication
Override this method to implement updating of GUI after each MIPS instruction is executed,
while running in “timed” mode (user specifies execution speed on the slider control).
Does nothing by default.
Overrides:
updateDisplay in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MarsBot
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class MarsBot
java.lang.Object
mars.tools.MarsBot
All Implemented Interfaces:
java.util.Observer, MarsTool
public class MarsBot
extends java.lang.Object
implements java.util.Observer, MarsTool
Simple Demo of Mars tool capability
Constructor Summary
MarsBot()
Method Summary
void action()
Performs tool functions.
java.lang.String getName()
Return a name you have chosen for this tool.
void update(java.util.Observable o,
java.lang.Object arg)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MarsBot
public MarsBot()
Method Detail
getName
public java.lang.String getName()
Description copied from interface: MarsTool
Return a name you have chosen for this tool. It will appear as the
menu item.
Specified by:
getName in interface MarsTool
action
public void action()
Description copied from interface: MarsTool
Performs tool functions. It will be invoked when the tool is selected
from the Tools menu.
Specified by:
action in interface MarsTool
update
public void update(java.util.Observable o,
java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
CacheSimulator
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class CacheSimulator
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.CacheSimulator
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class CacheSimulator
extends AbstractMarsToolAndApplication
A data cache simulator. It can be run either as a stand-alone Java application having
access to the mars package, or through MARS as an item in its Tools menu. It makes
maximum use of methods inherited from its abstract superclass AbstractMarsToolOrApp.
Pete Sanderson, v 1.0: 16-18 October 2006, v 1.1: 7 November 2006. v 1.2: 23 December 2010.
Version 1.2 fixes a bug in the hit/miss animator under full or N-way set associative. It was
animating the block of initial access (first block of set). Now it animates the block
of final access (where address found or stored). Also added log display to GUI (previously System.out).
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
CacheSimulator()
Simple constructor, likely used by the MARS Tools menu mechanism
CacheSimulator(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone cache simulator.
Method Summary
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main cache simulator display area.
java.lang.String getName()
Required MarsTool method to return Tool name.
protected void initializePostGUI()
The only post-GUI initialization is to create the initial cache object based on the default settings
of the various combo boxes.
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Apply caching policies and update display when connected MIPS program accesses (data) memory.
protected void reset()
Method to reset cache, counters and display when the Reset button selected.
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
cache configuration changes as needed, and after each execution step when Mars
is running in timed mode.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, getHelpComponent, go, isObserving, performSpecialClosingDuties, update
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Constructor Detail
CacheSimulator
public CacheSimulator(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone cache simulator.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
CacheSimulator
public CacheSimulator()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a CacheSimulator object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the Cache Simulator.
getName
public java.lang.String getName()
Required MarsTool method to return Tool name.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main cache simulator display area. It is organized vertically
into three major components: the cache configuration which an be modified
using combo boxes, the cache performance which is updated as the
attached MIPS program executes, and the runtime log which is optionally used
to display log of each cache access.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
the GUI component containing these three areas
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Apply caching policies and update display when connected MIPS program accesses (data) memory.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
memory – the attached memory
accessNotice – information provided by memory in MemoryAccessNotice object
initializePreGUI
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
Also creates initial default cache object. Overrides inherited method that does nothing.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
initializePostGUI
protected void initializePostGUI()
The only post-GUI initialization is to create the initial cache object based on the default settings
of the various combo boxes. Overrides inherited method that does nothing.
Overrides:
initializePostGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
Method to reset cache, counters and display when the Reset button selected.
Overrides inherited method that does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
updateDisplay
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
cache configuration changes as needed, and after each execution step when Mars
is running in timed mode. Overrides inherited method that does nothing.
Overrides:
updateDisplay in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim.HexaKeyboard.EcouteurClick
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim.HexaKeyboard.EcouteurClick
java.lang.Object
mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick
All Implemented Interfaces:
java.awt.event.MouseListener, java.util.EventListener
Enclosing class:
DigitalLabSim.HexaKeyboard
public class DigitalLabSim.HexaKeyboard.EcouteurClick
extends java.lang.Object
implements java.awt.event.MouseListener
Constructor Summary
DigitalLabSim.HexaKeyboard.EcouteurClick(int val)
Method Summary
void mouseClicked(java.awt.event.MouseEvent arg0)
void mouseEntered(java.awt.event.MouseEvent arg0)
void mouseExited(java.awt.event.MouseEvent arg0)
void mousePressed(java.awt.event.MouseEvent arg0)
void mouseReleased(java.awt.event.MouseEvent arg0)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
DigitalLabSim.HexaKeyboard.EcouteurClick
public DigitalLabSim.HexaKeyboard.EcouteurClick(int val)
Method Detail
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent arg0)
Specified by:
mouseEntered in interface java.awt.event.MouseListener
mouseExited
public void mouseExited(java.awt.event.MouseEvent arg0)
Specified by:
mouseExited in interface java.awt.event.MouseListener
mousePressed
public void mousePressed(java.awt.event.MouseEvent arg0)
Specified by:
mousePressed in interface java.awt.event.MouseListener
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent arg0)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent arg0)
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ScreenMagnifier
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class ScreenMagnifier
java.lang.Object
mars.tools.ScreenMagnifier
All Implemented Interfaces:
MarsTool
public class ScreenMagnifier
extends java.lang.Object
implements MarsTool
Handy little tool to magnify a selected section of the screen
by a given scale and display it. The screen image snapshot
will be of the screen pixels beneath the tool’s frame. The
scale can be adjusted. The image is displayed in the tool’s
scrollable panel. You can highlight items on the image using
the scribbler (hold down mouse button and move it on the
image). The magnification scale adjustment is on the tool’s
window, but other settings can be modified on a button-
triggered dialog. It will capture the contents of the
underlying MARS graphical user interface, but NOT the
contents of other Mars Tools frames.
Author:
Pete Sanderson
Constructor Summary
ScreenMagnifier()
Method Summary
void action()
Performs tool functions.
java.lang.String getName()
Return a name you have chosen for this tool.
static void main(java.lang.String[] args)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ScreenMagnifier
public ScreenMagnifier()
Method Detail
getName
public java.lang.String getName()
Description copied from interface: MarsTool
Return a name you have chosen for this tool. It will appear as the
menu item.
Specified by:
getName in interface MarsTool
action
public void action()
Description copied from interface: MarsTool
Performs tool functions. It will be invoked when the tool is selected
from the Tools menu.
Specified by:
action in interface MarsTool
main
public static void main(java.lang.String[] args)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AbstractMarsToolAndApplication.ConnectButton
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class AbstractMarsToolAndApplication.ConnectButton
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
mars.tools.AbstractMarsToolAndApplication.ConnectButton
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
Enclosing class:
AbstractMarsToolAndApplication
protected class AbstractMarsToolAndApplication.ConnectButton
extends javax.swing.JButton
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JButton
javax.swing.JButton.AccessibleJButton
Nested classes/interfaces inherited from class javax.swing.AbstractButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
AbstractMarsToolAndApplication.ConnectButton()
Method Summary
void connect()
void disconnect()
boolean isConnected()
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
Methods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
AbstractMarsToolAndApplication.ConnectButton
public AbstractMarsToolAndApplication.ConnectButton()
Method Detail
connect
public void connect()
disconnect
public void disconnect()
isConnected
public boolean isConnected()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim.SevenSegmentDisplay
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim.SevenSegmentDisplay
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
mars.tools.DigitalLabSim.SevenSegmentDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Enclosing class:
DigitalLabSim
public class DigitalLabSim.SevenSegmentDisplay
extends javax.swing.JComponent
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
char aff
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DigitalLabSim.SevenSegmentDisplay(char aff)
Method Summary
void modifyDisplay(char val)
void paint(java.awt.Graphics g)
void SwitchSegment(java.awt.Graphics g,
char segment)
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
aff
public char aff
Constructor Detail
DigitalLabSim.SevenSegmentDisplay
public DigitalLabSim.SevenSegmentDisplay(char aff)
Method Detail
modifyDisplay
public void modifyDisplay(char val)
SwitchSegment
public void SwitchSegment(java.awt.Graphics g,
char segment)
paint
public void paint(java.awt.Graphics g)
Overrides:
paint in class javax.swing.JComponent
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MemoryReferenceVisualization
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class MemoryReferenceVisualization
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.MemoryReferenceVisualization
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class MemoryReferenceVisualization
extends AbstractMarsToolAndApplication
Memory reference visualization. It can be run either as a stand-alone Java application having
access to the mars package, or through MARS as an item in its Tools menu. It makes
maximum use of methods inherited from its abstract superclass AbstractMarsToolAndApplication.
Pete Sanderson, verison 1.0, 14 November 2006.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MemoryReferenceVisualization()
Simple constructor, likely used by the MARS Tools menu mechanism
MemoryReferenceVisualization(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Method Summary
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area.
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
java.lang.String getName()
Required MarsTool method to return Tool name.
protected void initializePostGUI()
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes.
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
protected void reset()
Method to reset counters and display when the Reset button selected.
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, go, isObserving, performSpecialClosingDuties, update
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Constructor Detail
MemoryReferenceVisualization
public MemoryReferenceVisualization(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone memory reference visualizer.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
MemoryReferenceVisualization
public MemoryReferenceVisualization()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a MemoryReferenceVisualization object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the application.
getName
public java.lang.String getName()
Required MarsTool method to return Tool name.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
addAsObserver
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only. This version will register us as observer over the
the memory range as selected by the base address combo box and capacity of the visualization display
(number of visualization elements times the number of memory words each one represents).
It does so by calling the inherited 2-parameter overload of this method.
If you use the inherited GUI buttons, this
method is invoked when you click “Connect” button on MarsTool or the
“Assemble and Run” button on a Mars-based app.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area. It is organized vertically
into two major components: the display configuration which an be modified
using combo boxes, and the visualization display which is updated as the
attached MIPS program executes.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
the GUI component containing these two areas
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
memory – the attached memory
accessNotice – information provided by memory in MemoryAccessNotice object
initializePreGUI
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
Overrides inherited method that does nothing.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
initializePostGUI
protected void initializePostGUI()
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes. Overrides inherited method that does nothing.
Overrides:
initializePostGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
Method to reset counters and display when the Reset button selected.
Overrides inherited method that does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
updateDisplay
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode. Overrides inherited method that does nothing.
Overrides:
updateDisplay in class AbstractMarsToolAndApplication
getHelpComponent
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
Overrides:
getHelpComponent in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MarsTool
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Interface MarsTool
All Known Implementing Classes:
AbstractMarsToolAndApplication, BHTSimulator, BitmapDisplay, CacheSimulator, DigitalLabSim, FloatRepresentation, InstructionCounter, InstructionStatistics, IntroToTools, KeyboardAndDisplaySimulator, MarsBot, MemoryReferenceVisualization, ScavengerHunt, ScreenMagnifier
public interface MarsTool
Interface for any tool that interacts with an executing MIPS program.
A qualifying tool must be a class in the Tools package that
implements the MarsTool interface, must be compiled into a .class file,
and its .class file must be in the same Tools folder as MarsTool.class.
Mars will detect a qualifying tool upon startup, create an instance
using its no-argument constructor and add it to its Tools menu.
When its menu item is selected, the action() method will be invoked.
A tool may receive communication from MIPS system resources
(registers or memory) by registering as an Observer with
Mars.Memory and/or Mars.Register objects.
It may also
communicate directly with those resources through their
published methods PROVIDED any such communication is
wrapped inside a block synchronized on the
Mars.Globals.memoryAndRegistersLock object.
Method Summary
void action()
Performs tool functions.
java.lang.String getName()
Return a name you have chosen for this tool.
Method Detail
getName
java.lang.String getName()
Return a name you have chosen for this tool. It will appear as the
menu item.
action
void action()
Performs tool functions. It will be invoked when the tool is selected
from the Tools menu.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
mars.tools
Interfaces
MarsTool
Classes
AbstractMarsToolAndApplication
BHTableModel
BHTEntry
BHTSimGUI
BHTSimulator
BitmapDisplay
CacheSimulator
DigitalLabSim
FloatRepresentation
InstructionCounter
InstructionStatistics
IntroToTools
KeyboardAndDisplaySimulator
MarsBot
MemoryReferenceVisualization
ScavengerHunt
ScreenMagnifier
BHTSimGUI
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class BHTSimGUI
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.tools.BHTSimGUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class BHTSimGUI
extends javax.swing.JPanel
Represents the GUI of the BHT Simulator Tool.
The GUI consists of mainly four parts:
A configuration panel to select the number of entries and the history size
A information panel that displays the most recent branch instruction including its address and BHT index
A table representing the BHT with all entries and their internal state and statistics
A log panel that summarizes the predictions in a textual form
Author:
ingo. -klu.ac.at
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static java.lang.String BHT_DO_NOT_TAKE_BRANCH
constant for the String representing “do not take the branch”
static java.lang.String BHT_TAKE_BRANCH
constant for the String representing “take the branch”
static java.awt.Color COLOR_PREDICTION_CORRECT
constant for the color to signal a correct prediction
static java.awt.Color COLOR_PREDICTION_INCORRECT
constant for the color to signal a misprediction
static java.awt.Color COLOR_PREPREDICTION
constant for the color that highlights the current BHT entry
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BHTSimGUI()
Creates the GUI components of the BHT Simulator
The GUI is a subclass of JPanel which is integrated in the GUI of the MARS tool
Method Summary
javax.swing.JComboBox getCbBHTentries()
Returns the combo box for selecting the number of BHT entries.
javax.swing.JComboBox getCbBHThistory()
Returns the combo box for selecting the size of the BHT history.
javax.swing.JComboBox getCbBHTinitVal()
Returns the combo box for selecting the initial value of the BHT
javax.swing.JTable getTabBHT()
Returns the table representing the BHT.
javax.swing.JTextArea getTaLog()
Returns the text area for log purposes.
javax.swing.JTextField getTfAddress()
Returns the text field for displaying the address of the most recent branch instruction
javax.swing.JTextField getTfIndex()
Returns the text field for displaying the corresponding index into the BHT
javax.swing.JTextField getTfInstruction()
Returns the text field for displaying the most recent branch instruction
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
COLOR_PREPREDICTION
public static final java.awt.Color COLOR_PREPREDICTION
constant for the color that highlights the current BHT entry
COLOR_PREDICTION_CORRECT
public static final java.awt.Color COLOR_PREDICTION_CORRECT
constant for the color to signal a correct prediction
COLOR_PREDICTION_INCORRECT
public static final java.awt.Color COLOR_PREDICTION_INCORRECT
constant for the color to signal a misprediction
BHT_TAKE_BRANCH
public static final java.lang.String BHT_TAKE_BRANCH
constant for the String representing “take the branch”
See Also:
Constant Field Values
BHT_DO_NOT_TAKE_BRANCH
public static final java.lang.String BHT_DO_NOT_TAKE_BRANCH
constant for the String representing “do not take the branch”
See Also:
Constant Field Values
Constructor Detail
BHTSimGUI
public BHTSimGUI()
Creates the GUI components of the BHT Simulator
The GUI is a subclass of JPanel which is integrated in the GUI of the MARS tool
Method Detail
getCbBHTentries
public javax.swing.JComboBox getCbBHTentries()
Returns the combo box for selecting the number of BHT entries.
Returns:
the reference to the combo box
getCbBHThistory
public javax.swing.JComboBox getCbBHThistory()
Returns the combo box for selecting the size of the BHT history.
Returns:
the reference to the combo box
getCbBHTinitVal
public javax.swing.JComboBox getCbBHTinitVal()
Returns the combo box for selecting the initial value of the BHT
Returns:
the reference to the combo box
getTabBHT
public javax.swing.JTable getTabBHT()
Returns the table representing the BHT.
Returns:
the reference to the table
getTaLog
public javax.swing.JTextArea getTaLog()
Returns the text area for log purposes.
Returns:
the reference to the text area
getTfInstruction
public javax.swing.JTextField getTfInstruction()
Returns the text field for displaying the most recent branch instruction
Returns:
the reference to the text field
getTfAddress
public javax.swing.JTextField getTfAddress()
Returns the text field for displaying the address of the most recent branch instruction
Returns:
the reference to the text field
getTfIndex
public javax.swing.JTextField getTfIndex()
Returns the text field for displaying the corresponding index into the BHT
Returns:
the reference to the text field
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BHTableModel
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class BHTableModel
java.lang.Object
javax.swing.table.AbstractTableModel
mars.tools.BHTableModel
All Implemented Interfaces:
java.io.Serializable, javax.swing.table.TableModel
public class BHTableModel
extends javax.swing.table.AbstractTableModel
Simulates the actual functionality of a Branch History Table (BHT).
The BHT consists of a number of BHT entries which are used to perform branch prediction.
The entries of the BHT are stored as a Vector of BHTEntry objects.
The number of entries is configurable but has to be a power of 2.
The history kept by each BHT entry is also configurable during run-time.
A change of the configuration however causes a complete reset of the BHT.
The typical interaction is as follows:
Construction of a BHT with a certain number of entries with a given history size.
When encountering a branch instruction the index of the relevant BHT entry is calculated via the getIdxForAddress(int) method.
The current prediction of the BHT entry at the calculated index is obtained via the getPredictionAtIdx(int) method.
After detecting if the branch was really taken or not, this feedback is provided to the BHT by the updatePredictionAtIdx(int, boolean) method.
Additionally it serves as TableModel that can be directly used to render the state of the BHT in a JTable.
Feedback provided to the BHT causes a change of the internal state and a repaint of the table(s) associated to this model.
Author:
ingo. -klu.ac.at
See Also:
Serialized Form
Field Summary
Fields inherited from class javax.swing.table.AbstractTableModel
listenerList
Constructor Summary
BHTableModel(int numEntries,
int historySize,
boolean initVal)
Constructs a new BHT with given number of entries and history size.
Method Summary
java.lang.Class getColumnClass(int i)
Returns the class/type of the i-th column of the table.
int getColumnCount()
Returns the number of columns.
java.lang.String getColumnName(int i)
Returns the name of the i-th column of the table.
int getIdxForAddress(int address)
Returns the index into the BHT for a given branch instruction address.
boolean getPredictionAtIdx(int index)
Retrieve the prediction for the i-th BHT entry.
int getRowCount()
Returns the number of entries of the BHT.
java.lang.Object getValueAt(int row,
int col)
Returns the value of the cell at the given row and column
Required by the TableModel interface.
void initBHT(int numEntries,
int historySize,
boolean initVal)
Initializes the BHT with the given size and history.
void updatePredictionAtIdx(int index,
boolean branchTaken)
Updates the BHT entry with the outcome of the branch instruction.
Methods inherited from class javax.swing.table.AbstractTableModel
addTableModelListener, findColumn, fireTableCellUpdated, fireTableChanged, fireTableDataChanged, fireTableRowsDeleted, fireTableRowsInserted, fireTableRowsUpdated, fireTableStructureChanged, getListeners, getTableModelListeners, isCellEditable, removeTableModelListener, setValueAt
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
BHTableModel
public BHTableModel(int numEntries,
int historySize,
boolean initVal)
Constructs a new BHT with given number of entries and history size.
Parameters:
numEntries – number of entries in the BHT
historySize – size of the history (in bits/number of past branches)
Method Detail
getColumnName
public java.lang.String getColumnName(int i)
Returns the name of the i-th column of the table.
Required by the TableModel interface.
Specified by:
getColumnName in interface javax.swing.table.TableModel
Overrides:
getColumnName in class javax.swing.table.AbstractTableModel
Parameters:
i – the index of the column
Returns:
name of the i-th column
getColumnClass
public java.lang.Class getColumnClass(int i)
Returns the class/type of the i-th column of the table.
Required by the TableModel interface.
Specified by:
getColumnClass in interface javax.swing.table.TableModel
Overrides:
getColumnClass in class javax.swing.table.AbstractTableModel
Parameters:
i – the index of the column
Returns:
class representing the type of the i-th column
getColumnCount
public int getColumnCount()
Returns the number of columns.
Required by the TableModel interface.
Returns:
currently the constant 6
getRowCount
public int getRowCount()
Returns the number of entries of the BHT.
Required by the TableModel interface.
Returns:
number of rows / entries of the BHT
getValueAt
public java.lang.Object getValueAt(int row,
int col)
Returns the value of the cell at the given row and column
Required by the TableModel interface.
Parameters:
row – the row index
col – the column index
Returns:
the value of the cell
initBHT
public void initBHT(int numEntries,
int historySize,
boolean initVal)
Initializes the BHT with the given size and history.
All previous data like the BHT entries’ history and statistics will get lost.
A refresh of the table that use this BHT as model will be triggered.
Parameters:
numEntries – number of entries in the BHT (has to be a power of 2)
historySize – size of the history to consider
initVal – initial value for each entry (true means take branch, false do not take branch)
getIdxForAddress
public int getIdxForAddress(int address)
Returns the index into the BHT for a given branch instruction address.
A simple direct mapping is used.
Parameters:
address – the address of the branch instruction
Returns:
the index into the BHT
getPredictionAtIdx
public boolean getPredictionAtIdx(int index)
Retrieve the prediction for the i-th BHT entry.
Parameters:
index – the index of the entry in the BHT
Returns:
the prediction to take (true) or do not take (false) the branch
updatePredictionAtIdx
public void updatePredictionAtIdx(int index,
boolean branchTaken)
Updates the BHT entry with the outcome of the branch instruction.
This causes a change in the model and signals to update the connected table(s).
Parameters:
index – the index of the entry in the BHT
branchTaken –
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.tools
Interface Summary
MarsTool Interface for any tool that interacts with an executing MIPS program.
Class Summary
AbstractMarsToolAndApplication An abstract class that provides generic components to facilitate implementation of
a MarsTool and/or stand-alone Mars-based application.
BHTableModel Simulates the actual functionality of a Branch History Table (BHT).
BHTEntry Represents a single entry of the Branch History Table.
BHTSimGUI Represents the GUI of the BHT Simulator Tool.
BHTSimulator A MARS tool for simulating branch prediction with a Branch History Table (BHT)
BitmapDisplay Bitmapp display simulator.
CacheSimulator A data cache simulator.
DigitalLabSim
FloatRepresentation Tool to help students learn about IEEE 754 representation of 32 bit
floating point values.
InstructionCounter Instruction counter tool.
InstructionStatistics A MARS tool for obtaining instruction statistics by instruction category.
IntroToTools The “hello world” of MarsTools!
KeyboardAndDisplaySimulator Keyboard and Display Simulator.
MarsBot Simple Demo of Mars tool capability
MemoryReferenceVisualization Memory reference visualization.
ScavengerHunt Demo of Mars tool capability.
ScreenMagnifier Handy little tool to magnify a selected section of the screen
by a given scale and display it.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class AbstractMarsToolAndApplication
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
Direct Known Subclasses:
BHTSimulator, BitmapDisplay, CacheSimulator, DigitalLabSim, FloatRepresentation, InstructionCounter, InstructionStatistics, IntroToTools, KeyboardAndDisplaySimulator, MemoryReferenceVisualization
public abstract class AbstractMarsToolAndApplication
extends javax.swing.JFrame
implements MarsTool, java.util.Observer
An abstract class that provides generic components to facilitate implementation of
a MarsTool and/or stand-alone Mars-based application. Provides default definitions
of both the action() method required to implement MarsTool and the go() method
conventionally used to launch a Mars-based stand-alone application. It also provides
generic definitions for interactively controlling the application. The generic controls
for MarsTools are 3 buttons: connect/disconnect to MIPS resource (memory and/or
registers), reset, and close (exit). The generic controls for stand-alone Mars apps
include: button that triggers a file open dialog, a text field to display status
messages, the run-speed slider to control execution rate when running a MIPS program,
a button that assembles and runs the current MIPS program, a button to interrupt
the running MIPS program, a reset button, and an exit button.
Pete Sanderson, 14 November 2006.
See Also:
Serialized Form
Nested Class Summary
protected class AbstractMarsToolAndApplication.ConnectButton
protected class AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected AbstractMarsToolAndApplication.ConnectButton connectButton
protected boolean isBeingUsedAsAMarsTool
protected java.awt.Window theWindow
protected AbstractMarsToolAndApplication thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
protected AbstractMarsToolAndApplication(java.lang.String title,
java.lang.String heading)
Simple constructor
Method Summary
void action()
Required MarsTool method to carry out Tool functions.
protected void addAsObserver()
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
protected void addAsObserver(int lowEnd,
int highEnd)
Add this app/tool as an Observer of the specified subrange of MIPS memory.
protected void addAsObserver(Register reg)
Add this app/tool as an Observer of the specified MIPS register.
protected javax.swing.JComponent buildButtonAreaMarsTool()
The MarsTool default set of controls has one row of 3 buttons.
protected javax.swing.JComponent buildButtonAreaStandAlone()
The Mars stand-alone app default set of controls has two rows of controls.
protected javax.swing.JComponent buildHeadingArea()
Constructs GUI header as label with default positioning and font.
protected abstract javax.swing.JComponent buildMainDisplayArea()
Abstract method that must be instantiated by subclass to build the main display area
of the GUI.
protected void deleteAsObserver()
Delete this app/tool as an Observer of MIPS Observables (memory and registers).
protected void deleteAsObserver(Register reg)
Delete this app/tool as an Observer of the specified MIPS register
protected javax.swing.JComponent getHelpComponent()
Override this method to provide a JComponent (probably a JButton) of your choice
to be placed just left of the Close/Exit button.
abstract java.lang.String getName()
Required MarsTool method to return Tool name.
void go()
Run the simulator as stand-alone application.
protected void initializePostGUI()
Method that will be called once just after the GUI is constructed in the go() and action()
methods.
protected void initializePreGUI()
Method that will be called once just before the GUI is constructed in the go() and action()
methods.
protected boolean isObserving()
Query method to let you know if the tool/app is (or could be) currently
“observing” any MIPS resources.
protected void performSpecialClosingDuties()
This method is called when tool/app is exited either through the close/exit button or the window’s X box.
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Override this method to process a received notice from MIPS Observable (memory or register)
It will only be called if the notice was generated as the result of MIPS instruction execution.
protected void reset()
Method that will be called each time the default Reset button is clicked.
void update(java.util.Observable resource,
java.lang.Object accessNotice)
Called when receiving notice of access to MIPS memory or registers.
protected void updateDisplay()
Override this method to implement updating of GUI after each MIPS instruction is executed,
while running in “timed” mode (user specifies execution speed on the slider control).
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
isBeingUsedAsAMarsTool
protected boolean isBeingUsedAsAMarsTool
thisMarsApp
protected AbstractMarsToolAndApplication thisMarsApp
theWindow
protected java.awt.Window theWindow
connectButton
protected AbstractMarsToolAndApplication.ConnectButton connectButton
Constructor Detail
AbstractMarsToolAndApplication
protected AbstractMarsToolAndApplication(java.lang.String title,
java.lang.String heading)
Simple constructor
Parameters:
title – String containing title bar text
Method Detail
getName
public abstract java.lang.String getName()
Required MarsTool method to return Tool name. Must be defined by subclass.
Specified by:
getName in interface MarsTool
Overrides:
getName in class java.awt.Component
Returns:
Tool name. MARS will display this in menu item.
buildMainDisplayArea
protected abstract javax.swing.JComponent buildMainDisplayArea()
Abstract method that must be instantiated by subclass to build the main display area
of the GUI. It will be placed in the CENTER area of a BorderLayout. The title
is in the NORTH area, and the controls are in the SOUTH area.
go
public void go()
Run the simulator as stand-alone application. For this default implementation,
the user-defined main display of the user interface is identical for both stand-alone
and MARS Tools menu use, but the control buttons are different because the stand-alone
must include a mechansim for controlling the opening, assembling, and executing of
an underlying MIPS program. The generic controls include: a button that triggers a
file open dialog, a text field to display status messages, the run-speed slider
to control execution rate when running a MIPS program, a button that assembles and
runs the current MIPS program, a reset button, and an exit button.
This method calls 3 methods that can be defined/overriden in the subclass: initializePreGUI()
for any special initialization that must be completed before building the user
interface (e.g. data structures whose properties determine default GUI settings),
initializePostGUI() for any special initialization that cannot be
completed until after the building the user interface (e.g. data structure whose
properties are determined by default GUI settings), and buildMainDisplayArea()
to contain application-specific displays of parameters and results.
action
public void action()
Required MarsTool method to carry out Tool functions. It is invoked when MARS
user selects this tool from the Tools menu. This default implementation provides
generic definitions for interactively controlling the tool. The generic controls
for MarsTools are 3 buttons: connect/disconnect to MIPS resource (memory and/or
registers), reset, and close (exit). Like “go()” above, this default version
calls 3 methods that can be defined/overriden in the subclass: initializePreGUI()
for any special initialization that must be completed before building the user
interface (e.g. data structures whose properties determine default GUI settings),
initializePostGUI() for any special initialization that cannot be
completed until after the building the user interface (e.g. data structure whose
properties are determined by default GUI settings), and buildMainDisplayArea()
to contain application-specific displays of parameters and results.
Specified by:
action in interface MarsTool
initializePreGUI
protected void initializePreGUI()
Method that will be called once just before the GUI is constructed in the go() and action()
methods. Use it to initialize any data structures needed for the application whose values
will be needed to determine the initial state of GUI components. By default it does nothing.
initializePostGUI
protected void initializePostGUI()
Method that will be called once just after the GUI is constructed in the go() and action()
methods. Use it to initialize data structures needed for the application whose values
may depend on the initial state of GUI components. By default it does nothing.
reset
protected void reset()
Method that will be called each time the default Reset button is clicked.
Use it to reset any data structures and/or GUI components. By default it does nothing.
buildHeadingArea
protected javax.swing.JComponent buildHeadingArea()
Constructs GUI header as label with default positioning and font. May be overridden.
buildButtonAreaMarsTool
protected javax.swing.JComponent buildButtonAreaMarsTool()
The MarsTool default set of controls has one row of 3 buttons. It includes a dual-purpose button to
attach or detach simulator to MIPS memory, a button to reset the cache, and one to close the tool.
buildButtonAreaStandAlone
protected javax.swing.JComponent buildButtonAreaStandAlone()
The Mars stand-alone app default set of controls has two rows of controls. It includes a text field for
displaying status messages, a button to trigger an open file dialog, the MARS run speed slider
to control timed execution, a button to assemble and run the program, a reset button
whose action is determined by the subclass reset() method, and an exit button.
update
public void update(java.util.Observable resource,
java.lang.Object accessNotice)
Called when receiving notice of access to MIPS memory or registers. Default
implementation of method required by Observer interface. This method will filter out
notices originating from the MARS GUI or from direct user editing of memory or register
displays. Only notices arising from MIPS program access are allowed in.
It then calls two methods to be overridden by the subclass (since they do
nothing by default): processMIPSUpdate() then updateDisplay().
Specified by:
update in interface java.util.Observer
Parameters:
resource – the attached MIPS resource
accessNotice – AccessNotice information provided by the resource
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable resource,
AccessNotice notice)
Override this method to process a received notice from MIPS Observable (memory or register)
It will only be called if the notice was generated as the result of MIPS instruction execution.
By default it does nothing. After this method is complete, the updateDisplay() method will be
invoked automatically.
performSpecialClosingDuties
protected void performSpecialClosingDuties()
This method is called when tool/app is exited either through the close/exit button or the window’s X box.
Override it to perform any special housecleaning needed. By default it does nothing.
addAsObserver
protected void addAsObserver()
Add this app/tool as an Observer of desired MIPS Observables (memory and registers).
By default, will add as an Observer of the entire Data Segment in memory.
Override if you want something different. Note that the Memory methods to add an
Observer to memory are flexible (you can register for a range of addresses) but
may throw an AddressErrorException that you need to catch.
This method is called whenever the default “Connect” button on a MarsTool or the
default “Assemble and run” on a stand-alone Mars app is selected. The corresponding
NOTE: if you do not want to register as an Observer of the entire data segment
(starts at address 0x10000000) then override this to either do some alternative
or nothing at all. This method is also overloaded to allow arbitrary memory
subrange.
addAsObserver
protected void addAsObserver(int lowEnd,
int highEnd)
Add this app/tool as an Observer of the specified subrange of MIPS memory. Note
that this method is not invoked automatically like the no-argument version, but
if you use this method, you can still take advantage of provided default deleteAsObserver()
since it will remove the app as a memory observer regardless of the subrange
or number of subranges it is registered for.
Parameters:
lowEnd – low end of memory address range.
highEnd – high end of memory address range; must be >= lowEnd
addAsObserver
protected void addAsObserver(Register reg)
Add this app/tool as an Observer of the specified MIPS register.
deleteAsObserver
protected void deleteAsObserver()
Delete this app/tool as an Observer of MIPS Observables (memory and registers).
By default, will delete as an Observer of memory.
Override if you want something different.
This method is called when the default “Disconnect” button on a MarsTool is selected or
when the MIPS program execution triggered by the default “Assemble and run” on a stand-alone
Mars app terminates (e.g. when the button is re-enabled).
deleteAsObserver
protected void deleteAsObserver(Register reg)
Delete this app/tool as an Observer of the specified MIPS register
isObserving
protected boolean isObserving()
Query method to let you know if the tool/app is (or could be) currently
“observing” any MIPS resources. When running as a MarsTool, this
will be true by default after clicking the “Connect to MIPS” button until “Disconnect
from MIPS” is clicked. When running as a stand-alone app, this will be
true by default after clicking the “Assemble and Run” button until until
program execution has terminated either normally or by clicking the “Stop”
button. The phrase “or could be” was added above because depending on how
the tool/app operates, it may be possible to run the MIPS program without
first registering as an Observer — i.e. addAsObserver() is overridden and
takes no action.
Returns:
true if tool/app is (or could be) currently active as an Observer.
updateDisplay
protected void updateDisplay()
Override this method to implement updating of GUI after each MIPS instruction is executed,
while running in “timed” mode (user specifies execution speed on the slider control).
Does nothing by default.
getHelpComponent
protected javax.swing.JComponent getHelpComponent()
Override this method to provide a JComponent (probably a JButton) of your choice
to be placed just left of the Close/Exit button. Its anticipated use is for a
“help” button that launches a help message or dialog. But it can be any valid
JComponent that doesn’t mind co-existing among a bunch of JButtons.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.tools
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)
mars.tools.BHTableModel
mars.tools.BHTEntry
java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container javax.swing.JComponent (implements java.io.Serializable)
javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
javax.swing.JButton (implements javax.accessibility.Accessible)
mars.tools.AbstractMarsToolAndApplication.ConnectButton
mars.tools.DigitalLabSim.SevenSegmentDisplay
javax.swing.JPanel (implements javax.accessibility.Accessible)
mars.tools.BHTSimGUI
mars.tools.DigitalLabSim.HexaKeyboard
mars.tools.DigitalLabSim.SevenSegmentPanel
java.awt.Window (implements javax.accessibility.Accessible)
java.awt.Frame (implements java.awt.MenuContainer)
javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.tools.AbstractMarsToolAndApplication (implements mars.tools.MarsTool, java.util.Observer)
mars.tools.BHTSimulator (implements java.awt.event.ActionListener)
mars.tools.BitmapDisplay
mars.tools.CacheSimulator
mars.tools.DigitalLabSim
mars.tools.FloatRepresentation
mars.tools.InstructionCounter
mars.tools.InstructionStatistics
mars.tools.IntroToTools
mars.tools.KeyboardAndDisplaySimulator
mars.tools.MemoryReferenceVisualization
mars.tools.DigitalLabSim.HexaKeyboard.EcouteurClick (implements java.awt.event.MouseListener)
mars.tools.DigitalLabSim.OneSecondCounter
java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
mars.tools.AbstractMarsToolAndApplication.EnterKeyListener
mars.tools.MarsBot (implements mars.tools.MarsTool, java.util.Observer)
mars.tools.ScavengerHunt (implements mars.tools.MarsTool, java.util.Observer)
mars.tools.ScreenMagnifier (implements mars.tools.MarsTool)
Interface Hierarchy
mars.tools.MarsTool
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
ScavengerHunt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class ScavengerHunt
java.lang.Object
mars.tools.ScavengerHunt
All Implemented Interfaces:
java.util.Observer, MarsTool
public class ScavengerHunt
extends java.lang.Object
implements java.util.Observer, MarsTool
Demo of Mars tool capability. Ken Vollmar, 27 Oct 2006
This tool displays movements by a series of players in a game of ScavengerHunt.
Players will read and write MIPS memory-mapped locations to move and regain energy.
See accompanying documentation for memory-mapped addresses, rules of the game, etc.
Constructor Summary
ScavengerHunt()
Method Summary
void action()
Performs tool functions.
java.lang.String getName()
Return a name you have chosen for this tool.
void update(java.util.Observable o,
java.lang.Object arg)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ScavengerHunt
public ScavengerHunt()
Method Detail
getName
public java.lang.String getName()
Description copied from interface: MarsTool
Return a name you have chosen for this tool. It will appear as the
menu item.
Specified by:
getName in interface MarsTool
action
public void action()
Description copied from interface: MarsTool
Performs tool functions. It will be invoked when the tool is selected
from the Tools menu.
Specified by:
action in interface MarsTool
update
public void update(java.util.Observable o,
java.lang.Object arg)
Specified by:
update in interface java.util.Observer
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim.OneSecondCounter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim.OneSecondCounter
java.lang.Object
mars.tools.DigitalLabSim.OneSecondCounter
Enclosing class:
DigitalLabSim
public class DigitalLabSim.OneSecondCounter
extends java.lang.Object
Constructor Summary
DigitalLabSim.OneSecondCounter()
Method Summary
void resetOneSecondCounter()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
DigitalLabSim.OneSecondCounter
public DigitalLabSim.OneSecondCounter()
Method Detail
resetOneSecondCounter
public void resetOneSecondCounter()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BHTEntry
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class BHTEntry
java.lang.Object
mars.tools.BHTEntry
public class BHTEntry
extends java.lang.Object
Represents a single entry of the Branch History Table.
The entry holds the information about former branch predictions and outcomes.
The number of past branch outcomes can be configured and is called the history.
The semantics of the history of size n is as follows.
The entry will change its prediction, if it mispredicts the branch n times in series.
The prediction of the entry can be obtained by the getPrediction() method.
Feedback of taken or not taken branches is provided to the entry via the updatePrediction(boolean) method.
This causes the history and the prediction to be updated.
Additionally the entry keeps track about how many times the prediction was correct or incorrect.
The statistics can be obtained by the methods getStatsPredCorrect(), getStatsPredIncorrect() and getStatsPredPrecision().
Author:
ingo. -klu.ac.at
Constructor Summary
BHTEntry(int historySize,
boolean initVal)
Constructs a BHT entry with a given history size.
Method Summary
java.lang.String getHistoryAsStr()
Builds a string representation of the BHT entry’s history.
boolean getPrediction()
Returns the branch prediction based on the history.
java.lang.String getPredictionAsStr()
Returns a string representation of the BHT entry’s current prediction.
int getStatsPredCorrect()
Get the absolute number of correct predictions.
int getStatsPredIncorrect()
Get the absolute number of mispredictions.
double getStatsPredPrecision()
Get the percentage of correct predictions.
void updatePrediction(boolean branchTaken)
Updates the entry’s history and prediction.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
BHTEntry
public BHTEntry(int historySize,
boolean initVal)
Constructs a BHT entry with a given history size.
The size of the history can only be set via the constructor and cannot be changed afterwards.
Parameters:
historySize – number of past branch outcomes to remember
initVal – the initial value of the entry (take or do not take)
Method Detail
getPrediction
public boolean getPrediction()
Returns the branch prediction based on the history.
Returns:
true if prediction is to take the branch, false otherwise
updatePrediction
public void updatePrediction(boolean branchTaken)
Updates the entry’s history and prediction.
This method provides feedback for a prediction.
The history and the statistics are updated accordingly.
Based on the updated history a new prediction is calculated
Parameters:
branchTaken – signals if the branch was taken (true) or not (false)
getStatsPredIncorrect
public int getStatsPredIncorrect()
Get the absolute number of mispredictions.
Returns:
number of incorrect predictions (mispredictions)
getStatsPredCorrect
public int getStatsPredCorrect()
Get the absolute number of correct predictions.
Returns:
number of correct predictions
getStatsPredPrecision
public double getStatsPredPrecision()
Get the percentage of correct predictions.
Returns:
the percentage of correct predictions
getHistoryAsStr
public java.lang.String getHistoryAsStr()
Builds a string representation of the BHT entry’s history.
The history is a sequence of flags that signal if the branch was taken (T) or not taken (NT).
Returns:
a string representation of the BHT entry’s history
getPredictionAsStr
public java.lang.String getPredictionAsStr()
Returns a string representation of the BHT entry’s current prediction.
The prediction can be either to TAKE or do NOT TAKE the branch.
Returns:
a string representation of the BHT entry’s current prediction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AbstractMarsToolAndApplication.EnterKeyListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class AbstractMarsToolAndApplication.EnterKeyListener
java.lang.Object
java.awt.event.KeyAdapter
mars.tools.AbstractMarsToolAndApplication.EnterKeyListener
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener
Enclosing class:
AbstractMarsToolAndApplication
protected class AbstractMarsToolAndApplication.EnterKeyListener
extends java.awt.event.KeyAdapter
Constructor Summary
AbstractMarsToolAndApplication.EnterKeyListener(javax.swing.AbstractButton who)
Method Summary
void keyPressed(java.awt.event.KeyEvent e)
Methods inherited from class java.awt.event.KeyAdapter
keyReleased, keyTyped
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
AbstractMarsToolAndApplication.EnterKeyListener
public AbstractMarsToolAndApplication.EnterKeyListener(javax.swing.AbstractButton who)
Method Detail
keyPressed
public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class java.awt.event.KeyAdapter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BitmapDisplay
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class BitmapDisplay
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.tools.AbstractMarsToolAndApplication
mars.tools.BitmapDisplay
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants, MarsTool
public class BitmapDisplay
extends AbstractMarsToolAndApplication
Bitmapp display simulator. It can be run either as a stand-alone Java application having
access to the mars package, or through MARS as an item in its Tools menu. It makes
maximum use of methods inherited from its abstract superclass AbstractMarsToolAndApplication.
Pete Sanderson, verison 1.0, 23 December 2010.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class mars.tools.AbstractMarsToolAndApplication
AbstractMarsToolAndApplication.ConnectButton, AbstractMarsToolAndApplication.EnterKeyListener
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.tools.AbstractMarsToolAndApplication
connectButton, isBeingUsedAsAMarsTool, theWindow, thisMarsApp
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
BitmapDisplay()
Simple constructor, likely used by the MARS Tools menu mechanism
BitmapDisplay(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone bitmap display tool.
Method Summary
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only.
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area.
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
java.lang.String getName()
Required MarsTool method to return Tool name.
protected void initializePostGUI()
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes.
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
static void main(java.lang.String[] args)
Main provided for pure stand-alone use.
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
protected void reset()
Method to reset counters and display when the Reset button selected.
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode.
Methods inherited from class mars.tools.AbstractMarsToolAndApplication
action, addAsObserver, addAsObserver, buildButtonAreaMarsTool, buildButtonAreaStandAlone, buildHeadingArea, deleteAsObserver, deleteAsObserver, go, isObserving, performSpecialClosingDuties, update
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Constructor Detail
BitmapDisplay
public BitmapDisplay(java.lang.String title,
java.lang.String heading)
Simple constructor, likely used to run a stand-alone bitmap display tool.
Parameters:
title – String containing title for title bar
heading – String containing text for heading shown in upper part of window.
BitmapDisplay
public BitmapDisplay()
Simple constructor, likely used by the MARS Tools menu mechanism
Method Detail
main
public static void main(java.lang.String[] args)
Main provided for pure stand-alone use. Recommended stand-alone use is to write a
driver program that instantiates a Bitmap object then invokes its go() method.
“stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
is no driver program to invoke the application.
getName
public java.lang.String getName()
Required MarsTool method to return Tool name.
Specified by:
getName in interface MarsTool
Specified by:
getName in class AbstractMarsToolAndApplication
Returns:
Tool name. MARS will display this in menu item.
addAsObserver
protected void addAsObserver()
Override the inherited method, which registers us as an Observer over the static data segment
(starting address 0x10010000) only. This version will register us as observer over the
the memory range as selected by the base address combo box and capacity of the visualization display
(number of visualization elements times the number of memory words each one represents).
It does so by calling the inherited 2-parameter overload of this method.
If you use the inherited GUI buttons, this
method is invoked when you click “Connect” button on MarsTool or the
“Assemble and Run” button on a Mars-based app.
Overrides:
addAsObserver in class AbstractMarsToolAndApplication
buildMainDisplayArea
protected javax.swing.JComponent buildMainDisplayArea()
Method that constructs the main display area. It is organized vertically
into two major components: the display configuration which an be modified
using combo boxes, and the visualization display which is updated as the
attached MIPS program executes.
Specified by:
buildMainDisplayArea in class AbstractMarsToolAndApplication
Returns:
the GUI component containing these two areas
processMIPSUpdate
protected void processMIPSUpdate(java.util.Observable memory,
AccessNotice accessNotice)
Update display when connected MIPS program accesses (data) memory.
Overrides:
processMIPSUpdate in class AbstractMarsToolAndApplication
Parameters:
memory – the attached memory
accessNotice – information provided by memory in MemoryAccessNotice object
initializePreGUI
protected void initializePreGUI()
Initialize all JComboBox choice structures not already initialized at declaration.
Overrides inherited method that does nothing.
Overrides:
initializePreGUI in class AbstractMarsToolAndApplication
initializePostGUI
protected void initializePostGUI()
The only post-GUI initialization is to create the initial Grid object based on the default settings
of the various combo boxes. Overrides inherited method that does nothing.
Overrides:
initializePostGUI in class AbstractMarsToolAndApplication
reset
protected void reset()
Method to reset counters and display when the Reset button selected.
Overrides inherited method that does nothing.
Overrides:
reset in class AbstractMarsToolAndApplication
updateDisplay
protected void updateDisplay()
Updates display immediately after each update (AccessNotice) is processed, after
display configuration changes as needed, and after each execution step when Mars
is running in timed mode. Overrides inherited method that does nothing.
Overrides:
updateDisplay in class AbstractMarsToolAndApplication
getHelpComponent
protected javax.swing.JComponent getHelpComponent()
Overrides default method, to provide a Help button for this tool/app.
Overrides:
getHelpComponent in class AbstractMarsToolAndApplication
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DigitalLabSim.HexaKeyboard
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.tools
Class DigitalLabSim.HexaKeyboard
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.tools.DigitalLabSim.HexaKeyboard
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
Enclosing class:
DigitalLabSim
public class DigitalLabSim.HexaKeyboard
extends javax.swing.JPanel
See Also:
Serialized Form
Nested Class Summary
class DigitalLabSim.HexaKeyboard.EcouteurClick
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
javax.swing.JButton[] button
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DigitalLabSim.HexaKeyboard()
Method Summary
void resetHexaKeyboard()
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
button
public javax.swing.JButton[] button
Constructor Detail
DigitalLabSim.HexaKeyboard
public DigitalLabSim.HexaKeyboard()
Method Detail
resetHexaKeyboard
public void resetHexaKeyboard()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MacroPool
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class MacroPool
java.lang.Object
mars.assembler.MacroPool
public class MacroPool
extends java.lang.Object
Stores information of macros defined by now.
Will be used in first pass of assembling MIPS source code. When reached
.macro directive, parser calls
MacroPool#BeginMacro(String, int) and skips source code lines until
reaches .end_macro directive. then calls
MacroPool#CommitMacro(int) and the macro information stored in a
Macro instance will be added to macroList.
Each MIPSprogram will have one MacroPool
NOTE: Forward referencing macros (macro expansion before its definition in
source code) and Nested macro definition (defining a macro inside other macro
definition) are not supported.
Author:
M.H.Sekhavat
Constructor Summary
MacroPool(MIPSprogram mipsProgram)
Create an empty MacroPool for given program
Method Summary
void beginMacro(Token nameToken)
This method will be called by parser when reached .macro
directive.
Instantiates a new Macro object and stores it in current
.
void commitMacro(Token endToken)
This method will be called by parser when reached .end_macro
directive.
java.util.ArrayList
Macro getCurrent()
java.lang.String getExpansionHistory()
Macro getMatchingMacro(TokenList tokens,
int callerLine)
Will be called by parser when reaches a macro expansion call
int getNextCounter()
counter will be set to 0 on construction of this class and will
be incremented by each call.
boolean matchesAnyMacroName(java.lang.String value)
void popFromCallStack()
boolean pushOnCallStack(Token token)
void setCurrent(Macro current)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MacroPool
public MacroPool(MIPSprogram mipsProgram)
Create an empty MacroPool for given program
Parameters:
mipsProgram – associated MIPS program
Method Detail
beginMacro
public void beginMacro(Token nameToken)
This method will be called by parser when reached .macro
directive.
Instantiates a new Macro object and stores it in current
. current will be added to macroList by
#CommitMacro(int)
Parameters:
nameToken – Token containing name of macro after .macro directive
commitMacro
public void commitMacro(Token endToken)
This method will be called by parser when reached .end_macro
directive.
Adds/Replaces current macro into the macroList.
Parameters:
endToken – Token containing .end_macro directive in source code
getMatchingMacro
public Macro getMatchingMacro(TokenList tokens,
int callerLine)
Will be called by parser when reaches a macro expansion call
Parameters:
tokens – tokens passed to macro expansion call
Returns:
Macro object matching the name and argument count of
tokens passed
matchesAnyMacroName
public boolean matchesAnyMacroName(java.lang.String value)
Parameters:
value –
Returns:
true if any macros have been defined with name value
by now, not concerning arguments count.
getCurrent
public Macro getCurrent()
setCurrent
public void setCurrent(Macro current)
getNextCounter
public int getNextCounter()
counter will be set to 0 on construction of this class and will
be incremented by each call. parser calls this method once for every
expansions. it will be a unique id for each expansion of macro in a file
Returns:
counter value
getCallStack
public java.util.ArrayList
pushOnCallStack
public boolean pushOnCallStack(Token token)
popFromCallStack
public void popFromCallStack()
getExpansionHistory
public java.lang.String getExpansionHistory()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Directives
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Directives
java.lang.Object
mars.assembler.Directives
public final class Directives
extends java.lang.Object
Class representing MIPS assembler directives. If Java had enumerated types, these
would probably be implemented that way. Each directive is represented by a unique object.
The directive name is indicative of the directive it represents. For example, DATA
represents the MIPS .data directive.
Author:
Pete Sanderson
Field Summary
static Directives ALIGN
static Directives ASCII
static Directives ASCIIZ
static Directives BYTE
static Directives DATA
static Directives DOUBLE
static Directives END_MACRO
static Directives EQV
static Directives EXTERN
static Directives FLOAT
static Directives GLOBL
static Directives HALF
static Directives INCLUDE
static Directives KDATA
static Directives KTEXT
static Directives MACRO
static Directives SET
static Directives SPACE
static Directives TEXT
static Directives WORD
Method Summary
java.lang.String getDescription()
Get description of this Directives object
static java.util.ArrayList getDirectiveList()
Produces List of Directive objects
java.lang.String getName()
Get name of this Directives object
static boolean isFloatingDirective(Directives direct)
Lets you know whether given directive is for floating number (FLOAT,DOUBLE).
static boolean isIntegerDirective(Directives direct)
Lets you know whether given directive is for integer (WORD,HALF,BYTE).
static Directives matchDirective(java.lang.String str)
Find Directive object, if any, which matches the given String.
static java.util.ArrayList prefixMatchDirectives(java.lang.String str)
Find Directive object, if any, which contains the given string as a prefix.
java.lang.String toString()
Produces String-ified version of Directive object
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
DATA
public static final Directives DATA
TEXT
public static final Directives TEXT
WORD
public static final Directives WORD
ASCII
public static final Directives ASCII
ASCIIZ
public static final Directives ASCIIZ
BYTE
public static final Directives BYTE
ALIGN
public static final Directives ALIGN
HALF
public static final Directives HALF
SPACE
public static final Directives SPACE
DOUBLE
public static final Directives DOUBLE
FLOAT
public static final Directives FLOAT
EXTERN
public static final Directives EXTERN
KDATA
public static final Directives KDATA
KTEXT
public static final Directives KTEXT
GLOBL
public static final Directives GLOBL
SET
public static final Directives SET
EQV
public static final Directives EQV
MACRO
public static final Directives MACRO
END_MACRO
public static final Directives END_MACRO
INCLUDE
public static final Directives INCLUDE
Method Detail
matchDirective
public static Directives matchDirective(java.lang.String str)
Find Directive object, if any, which matches the given String.
Parameters:
str – A String containing candidate directive name (e.g. “.ascii”)
Returns:
If match is found, returns matching Directives object, else returns null.
prefixMatchDirectives
public static java.util.ArrayList prefixMatchDirectives(java.lang.String str)
Find Directive object, if any, which contains the given string as a prefix. For example,
“.a” will match “.ascii”, “.asciiz” and “.align”
Parameters:
str – A String
Returns:
If match is found, returns ArrayList of matching Directives objects, else returns null.
toString
public java.lang.String toString()
Produces String-ified version of Directive object
Overrides:
toString in class java.lang.Object
Returns:
String representing Directive: its MIPS name
getName
public java.lang.String getName()
Get name of this Directives object
Returns:
name of this MIPS directive as a String
getDescription
public java.lang.String getDescription()
Get description of this Directives object
Returns:
description of this MIPS directive (for help purposes)
getDirectiveList
public static java.util.ArrayList getDirectiveList()
Produces List of Directive objects
Returns:
MIPS Directive
isIntegerDirective
public static boolean isIntegerDirective(Directives direct)
Lets you know whether given directive is for integer (WORD,HALF,BYTE).
Parameters:
direct – a MIPS directive
Returns:
true if given directive is FLOAT or DOUBLE, false otherwise
isFloatingDirective
public static boolean isFloatingDirective(Directives direct)
Lets you know whether given directive is for floating number (FLOAT,DOUBLE).
Parameters:
direct – a MIPS directive
Returns:
true if given directive is FLOAT or DOUBLE, false otherwise.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SourceLine
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class SourceLine
java.lang.Object
mars.assembler.SourceLine
public class SourceLine
extends java.lang.Object
Handy class to represent, for a given line of source code, the code
itself, the program containing it, and its line number within that program.
This is used to separately keep track of the original file/position of
a given line of code. When .include is used, it will migrate to a different
line and possibly different program but the migration should not be visible
to the user.
Constructor Summary
SourceLine(java.lang.String source,
MIPSprogram mipsProgram,
int lineNumber)
SourceLine constructor
Method Summary
java.lang.String getFilename()
Retrieve name of file containing source statement
int getLineNumber()
Retrieve line number of source statement
MIPSprogram getMIPSprogram()
Retrieve MIPSprogram object containing source statement
java.lang.String getSource()
Retrieve source statement itself
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SourceLine
public SourceLine(java.lang.String source,
MIPSprogram mipsProgram,
int lineNumber)
SourceLine constructor
Parameters:
source – The source code itself
mipsProgram – The program (object representing source file) containing that line
lineNumber – The line number within that program where source appears.
Method Detail
getSource
public java.lang.String getSource()
Retrieve source statement itself
Returns:
Source statement as String
getFilename
public java.lang.String getFilename()
Retrieve name of file containing source statement
Returns:
File name as String
getLineNumber
public int getLineNumber()
Retrieve line number of source statement
Returns:
Line number of source statement
getMIPSprogram
public MIPSprogram getMIPSprogram()
Retrieve MIPSprogram object containing source statement
Returns:
program as MIPSprogram object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SymbolTable
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class SymbolTable
java.lang.Object
mars.assembler.SymbolTable
public class SymbolTable
extends java.lang.Object
Creats a table of Symbol objects.
Author:
Jason Bumgarner, Jason Shrewsbury
Field Summary
static int NOT_FOUND
Constructor Summary
SymbolTable(java.lang.String filename)
Create a new empty symbol table for given file
Method Summary
void addSymbol(Token token,
int address,
boolean b,
ErrorList errors)
Adds a Symbol object into the array of Symbols.
void clear()
Creates a fresh arrayList for a new table.
void fixSymbolTableAddress(int originalAddress,
int replacementAddress)
Fix address in symbol table entry.
int getAddress(java.lang.String s)
Method to return the address associated with the given label.
int getAddressLocalOrGlobal(java.lang.String s)
Method to return the address associated with the given label.
java.util.ArrayList getAllSymbols()
For obtaining all the Symbols.
java.util.ArrayList getDataSymbols()
For obtaining the Data Symbols.
int getSize()
Get the count of entries currently in the table.
static java.lang.String getStartLabel()
Fetches the text segment label (symbol) which, if declared global, indicates
the starting address for execution.
Symbol getSymbol(java.lang.String s)
Produce Symbol object from symbol table that corresponds to given String.
Symbol getSymbolGivenAddress(java.lang.String s)
Produce Symbol object from symbol table that has the given address.
Symbol getSymbolGivenAddressLocalOrGlobal(java.lang.String s)
Produce Symbol object from either local or global symbol table that has the
given address.
java.util.ArrayList getTextSymbols()
For obtaining the Text Symbols.
void removeSymbol(Token token)
Removes a symbol from the Symbol table.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
NOT_FOUND
public static final int NOT_FOUND
See Also:
Constant Field Values
Constructor Detail
SymbolTable
public SymbolTable(java.lang.String filename)
Create a new empty symbol table for given file
Parameters:
filename – name of file this symbol table is associated with. Will be
used only for output/display so it can be any descriptive string.
Method Detail
addSymbol
public void addSymbol(Token token,
int address,
boolean b,
ErrorList errors)
Adds a Symbol object into the array of Symbols.
Parameters:
token – The token representing the Symbol.
address – The address of the Symbol.
b – The type of Symbol, true for data, false for text.
errors – List to which to add any processing errors that occur.
removeSymbol
public void removeSymbol(Token token)
Removes a symbol from the Symbol table. If not found, it does nothing.
This will rarely happen (only when variable is declared .globl after already
being defined in the local symbol table).
Parameters:
token – The token representing the Symbol.
getAddress
public int getAddress(java.lang.String s)
Method to return the address associated with the given label.
Parameters:
s – The label.
Returns:
The memory address of the label given, or NOT_FOUND if not found in symbol table.
getAddressLocalOrGlobal
public int getAddressLocalOrGlobal(java.lang.String s)
Method to return the address associated with the given label. Look first
in this (local) symbol table then in symbol table of labels declared
global (.globl directive).
Parameters:
s – The label.
Returns:
The memory address of the label given, or NOT_FOUND if not found in symbol table.
getSymbol
public Symbol getSymbol(java.lang.String s)
Produce Symbol object from symbol table that corresponds to given String.
Parameters:
s – target String
Returns:
Symbol object for requested target, null if not found in symbol table.
getSymbolGivenAddress
public Symbol getSymbolGivenAddress(java.lang.String s)
Produce Symbol object from symbol table that has the given address.
Parameters:
s – String representing address
Returns:
Symbol object having requested address, null if address not found in symbol table.
getSymbolGivenAddressLocalOrGlobal
public Symbol getSymbolGivenAddressLocalOrGlobal(java.lang.String s)
Produce Symbol object from either local or global symbol table that has the
given address.
Parameters:
s – String representing address
Returns:
Symbol object having requested address, null if address not found in symbol table.
getDataSymbols
public java.util.ArrayList getDataSymbols()
For obtaining the Data Symbols.
Returns:
An ArrayList of Symbol objects.
getTextSymbols
public java.util.ArrayList getTextSymbols()
For obtaining the Text Symbols.
Returns:
An ArrayList of Symbol objects.
getAllSymbols
public java.util.ArrayList getAllSymbols()
For obtaining all the Symbols.
Returns:
An ArrayList of Symbol objects.
getSize
public int getSize()
Get the count of entries currently in the table.
Returns:
Number of symbol table entries.
clear
public void clear()
Creates a fresh arrayList for a new table.
fixSymbolTableAddress
public void fixSymbolTableAddress(int originalAddress,
int replacementAddress)
Fix address in symbol table entry. Any and all entries that match the original
address will be modified to contain the replacement address. There is no effect,
if none of the addresses matches.
Parameters:
originalAddress – Address associated with 0 or more symtab entries.
replacementAddress – Any entry that has originalAddress will have its
address updated to this value. Does nothing if none do.
getStartLabel
public static java.lang.String getStartLabel()
Fetches the text segment label (symbol) which, if declared global, indicates
the starting address for execution.
Returns:
String containing global label whose text segment address is starting address for program execution.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TokenTypes
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class TokenTypes
java.lang.Object
mars.assembler.TokenTypes
public final class TokenTypes
extends java.lang.Object
Constants to identify the types of tokens found in MIPS programs. If Java had
enumerated types, that’s how these would probably be implemented.
Author:
Pete Sanderson
Field Summary
static TokenTypes COLON
static TokenTypes COMMENT
static TokenTypes DELIMITER
static TokenTypes DIRECTIVE
static TokenTypes ERROR
static TokenTypes FP_REGISTER_NAME
static TokenTypes IDENTIFIER
static TokenTypes INTEGER_16
static TokenTypes INTEGER_16U
static TokenTypes INTEGER_32
static TokenTypes INTEGER_5
static TokenTypes LEFT_PAREN
static TokenTypes MACRO_PARAMETER
static TokenTypes MINUS
static TokenTypes OPERATOR
static TokenTypes PLUS
static TokenTypes QUOTED_STRING
static TokenTypes REAL_NUMBER
static TokenTypes REGISTER_NAME
note: REGISTER_NAME is token of form $zero whereas REGISTER_NUMBER is token
of form $0.
static TokenTypes REGISTER_NUMBER
static TokenTypes RIGHT_PAREN
static java.lang.String TOKEN_DELIMITERS
Method Summary
static boolean isFloatingTokenType(TokenTypes type)
Lets you know if given tokentype is for floating point numbers (REAL_NUMBER).
static boolean isIntegerTokenType(TokenTypes type)
Lets you know if given tokentype is for integers (INTGER_5, INTEGER_16, INTEGER_32).
static boolean isValidIdentifier(java.lang.String value)
static TokenTypes matchTokenType(java.lang.String value)
Classifies the given token into one of the MIPS types.
java.lang.String toString()
Produces String equivalent of this token type, which is its name.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
TOKEN_DELIMITERS
public static final java.lang.String TOKEN_DELIMITERS
See Also:
Constant Field Values
COMMENT
public static final TokenTypes COMMENT
DIRECTIVE
public static final TokenTypes DIRECTIVE
OPERATOR
public static final TokenTypes OPERATOR
DELIMITER
public static final TokenTypes DELIMITER
REGISTER_NAME
public static final TokenTypes REGISTER_NAME
note: REGISTER_NAME is token of form $zero whereas REGISTER_NUMBER is token
of form $0. The former is part of extended assembler, and latter is part
of basic assembler.
REGISTER_NUMBER
public static final TokenTypes REGISTER_NUMBER
FP_REGISTER_NAME
public static final TokenTypes FP_REGISTER_NAME
IDENTIFIER
public static final TokenTypes IDENTIFIER
LEFT_PAREN
public static final TokenTypes LEFT_PAREN
RIGHT_PAREN
public static final TokenTypes RIGHT_PAREN
INTEGER_5
public static final TokenTypes INTEGER_5
INTEGER_16
public static final TokenTypes INTEGER_16
INTEGER_16U
public static final TokenTypes INTEGER_16U
INTEGER_32
public static final TokenTypes INTEGER_32
REAL_NUMBER
public static final TokenTypes REAL_NUMBER
QUOTED_STRING
public static final TokenTypes QUOTED_STRING
PLUS
public static final TokenTypes PLUS
MINUS
public static final TokenTypes MINUS
COLON
public static final TokenTypes COLON
ERROR
public static final TokenTypes ERROR
MACRO_PARAMETER
public static final TokenTypes MACRO_PARAMETER
Method Detail
toString
public java.lang.String toString()
Produces String equivalent of this token type, which is its name.
Overrides:
toString in class java.lang.Object
Returns:
String containing descriptive name for token type.
matchTokenType
public static TokenTypes matchTokenType(java.lang.String value)
Classifies the given token into one of the MIPS types.
Parameters:
value – String containing candidate language element, extracted from MIPS program.
Returns:
Returns the corresponding TokenTypes object if the parameter matches a
defined MIPS token type, else returns null.
isIntegerTokenType
public static boolean isIntegerTokenType(TokenTypes type)
Lets you know if given tokentype is for integers (INTGER_5, INTEGER_16, INTEGER_32).
Parameters:
type – the TokenType of interest
Returns:
true if type is an integer type, false otherwise.
isFloatingTokenType
public static boolean isFloatingTokenType(TokenTypes type)
Lets you know if given tokentype is for floating point numbers (REAL_NUMBER).
Parameters:
type – the TokenType of interest
Returns:
true if type is an floating point type, false otherwise.
isValidIdentifier
public static boolean isValidIdentifier(java.lang.String value)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
OperandFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class OperandFormat
java.lang.Object
mars.assembler.OperandFormat
public class OperandFormat
extends java.lang.Object
Provides utility method related to MIPS operand formats.
Author:
Pete Sanderson
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TokenList
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class TokenList
java.lang.Object
mars.assembler.TokenList
All Implemented Interfaces:
java.lang.Cloneable
public class TokenList
extends java.lang.Object
implements java.lang.Cloneable
Represents the list of tokens in a single line of MIPS code. It uses, but is not
a subclass of, ArrayList.
Author:
Pete Sanderson
Constructor Summary
TokenList()
Constructor for objects of class TokenList
Method Summary
void add(Token token)
Adds a Token object to the end of the list.
java.lang.Object clone()
Makes clone (shallow copy) of this token list object.
Token get(int pos)
Returns requested token given position number (starting at 0).
java.lang.String getProcessedLine()
Retrieve the source line String associated with this
token list.
boolean isEmpty()
Returns empty/non-empty status of list.
void remove(int pos)
Removes Token object at specified list position.
void set(int pos,
Token replacement)
Replaces token at position with different one.
void setProcessedLine(java.lang.String line)
Use this to record the source line String for this token list
after possible modification (textual substitution) during
assembly preprocessing.
int size()
Returns number of tokens in list.
java.lang.String toString()
Get a String representing the token list.
java.lang.String toTypeString()
Get a String representing the sequence of token types for this list.
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
TokenList
public TokenList()
Constructor for objects of class TokenList
Method Detail
setProcessedLine
public void setProcessedLine(java.lang.String line)
Use this to record the source line String for this token list
after possible modification (textual substitution) during
assembly preprocessing. The modified source will be displayed in
the Text Segment Display.
Parameters:
line – The source line, possibly modified (possibly not)
getProcessedLine
public java.lang.String getProcessedLine()
Retrieve the source line String associated with this
token list. It may or may not have been modified during
assembly preprocessing.
Returns:
The source line for this token list.
get
public Token get(int pos)
Returns requested token given position number (starting at 0).
Parameters:
pos – Position in token list.
Returns:
the requested token, or ArrayIndexOutOfBounds exception
set
public void set(int pos,
Token replacement)
Replaces token at position with different one. Will throw
ArrayIndexOutOfBounds exception if position does not exist.
Parameters:
pos – Position in token list.
replacement – Replacement token
size
public int size()
Returns number of tokens in list.
Returns:
token count.
add
public void add(Token token)
Adds a Token object to the end of the list.
Parameters:
token – Token object to be added.
remove
public void remove(int pos)
Removes Token object at specified list position. Uses ArrayList remove method.
Parameters:
pos – Position in token list. Subsequent Tokens are shifted one position left.
Throws:
java.lang.IndexOutOfBoundsException – if pos is < 0 or >= size()
isEmpty
public boolean isEmpty()
Returns empty/non-empty status of list.
Returns:
true if list has no tokens, else false.
toString
public java.lang.String toString()
Get a String representing the token list.
Overrides:
toString in class java.lang.Object
Returns:
String version of the token list
(a blank is inserted after each token).
toTypeString
public java.lang.String toTypeString()
Get a String representing the sequence of token types for this list.
Returns:
String version of the token types for this list
(a blank is inserted after each token type).
clone
public java.lang.Object clone()
Makes clone (shallow copy) of this token list object.
Overrides:
clone in class java.lang.Object
Returns:
the cloned list.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TranslationCode
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Interface TranslationCode
public interface TranslationCode
This interface is intended for use by ExtendedInstruction objects to define, using
the translate() method, how to translate the extended (pseudo) instruction into
a sequence of one or more basic instructions, which can then be translated into
binary machine code.
Author:
Pete Sanderson
Method Summary
void translate()
This is a callback method defined in anonymous class specified as
argument to ExtendedInstruction constructor.
Method Detail
translate
void translate()
This is a callback method defined in anonymous class specified as
argument to ExtendedInstruction constructor. It is called when
assembler finds a program statement matching that ExtendedInstruction,
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
mars.assembler
Interfaces
TranslationCode
Classes
Assembler
DataTypes
Directives
Macro
MacroPool
OperandFormat
SourceLine
Symbol
SymbolTable
Token
Tokenizer
TokenList
TokenTypes
Assembler
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Assembler
java.lang.Object
mars.assembler.Assembler
public class Assembler
extends java.lang.Object
An Assembler is capable of assembling a MIPS program. It has only one public
method, assemble(), which implements a two-pass assembler. It
translates MIPS source code into binary machine code.
Author:
Pete Sanderson
Constructor Summary
Assembler()
Method Summary
java.util.ArrayList assemble(java.util.ArrayList tokenizedProgramFiles,
boolean extendedAssemblerEnabled)
Parse and generate machine code for the given MIPS program.
java.util.ArrayList assemble(java.util.ArrayList tokenizedProgramFiles,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
Parse and generate machine code for the given MIPS program.
java.util.ArrayList assemble(MIPSprogram p,
boolean extendedAssemblerEnabled)
Parse and generate machine code for the given MIPS program.
java.util.ArrayList assemble(MIPSprogram p,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
Parse and generate machine code for the given MIPS program.
ErrorList getErrorList()
Get list of assembler errors and warnings
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Assembler
public Assembler()
Method Detail
assemble
public java.util.ArrayList assemble(MIPSprogram p,
boolean extendedAssemblerEnabled)
throws ProcessingException
Parse and generate machine code for the given MIPS program. It must have
already been tokenized. Warnings are not considered errors.
Parameters:
p – A MIPSprogram object representing the program source.
extendedAssemblerEnabled – A boolean value that if true permits use of extended (pseudo)
instructions in the source code. If false, these are flagged
as errors.
Returns:
An ArrayList representing the assembled program. Each member of
the list is a ProgramStatement object containing the source,
intermediate, and machine binary representations of a program
statement.
Throws:
ProcessingException
See Also:
ProgramStatement
assemble
public java.util.ArrayList assemble(MIPSprogram p,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
throws ProcessingException
Parse and generate machine code for the given MIPS program. It must have
already been tokenized.
Parameters:
p – A MIPSprogram object representing the program source.
extendedAssemblerEnabled – A boolean value that if true permits use of extended (pseudo)
instructions in the source code. If false, these are flagged
as errors.
warningsAreErrors – A boolean value – true means assembler warnings will be
considered errors and terminate the assemble; false means the
assembler will produce warning message but otherwise ignore
warnings.
Returns:
An ArrayList representing the assembled program. Each member of
the list is a ProgramStatement object containing the source,
intermediate, and machine binary representations of a program
statement.
Throws:
ProcessingException
See Also:
ProgramStatement
getErrorList
public ErrorList getErrorList()
Get list of assembler errors and warnings
Returns:
ErrorList of any assembler errors and warnings.
assemble
public java.util.ArrayList assemble(java.util.ArrayList tokenizedProgramFiles,
boolean extendedAssemblerEnabled)
throws ProcessingException
Parse and generate machine code for the given MIPS program. All source
files must have already been tokenized. Warnings will not be considered
errors.
Parameters:
tokenizedProgramFiles – An ArrayList of MIPSprogram objects, each produced from a
different source code file, representing the program source.
extendedAssemblerEnabled – A boolean value that if true permits use of extended (pseudo)
instructions in the source code. If false, these are flagged
as errors.
Returns:
An ArrayList representing the assembled program. Each member of
the list is a ProgramStatement object containing the source,
intermediate, and machine binary representations of a program
statement. Returns null if incoming array list is null or empty.
Throws:
ProcessingException
See Also:
ProgramStatement
assemble
public java.util.ArrayList assemble(java.util.ArrayList tokenizedProgramFiles,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
throws ProcessingException
Parse and generate machine code for the given MIPS program. All source
files must have already been tokenized.
Parameters:
tokenizedProgramFiles – An ArrayList of MIPSprogram objects, each produced from a
different source code file, representing the program source.
extendedAssemblerEnabled – A boolean value that if true permits use of extended (pseudo)
instructions in the source code. If false, these are flagged
as errors.
warningsAreErrors – A boolean value – true means assembler warnings will be
considered errors and terminate the assemble; false means the
assembler will produce warning message but otherwise ignore
warnings.
Returns:
An ArrayList representing the assembled program. Each member of
the list is a ProgramStatement object containing the source,
intermediate, and machine binary representations of a program
statement. Returns null if incoming array list is null or empty.
Throws:
ProcessingException
See Also:
ProgramStatement
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Tokenizer
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Tokenizer
java.lang.Object
mars.assembler.Tokenizer
public class Tokenizer
extends java.lang.Object
A tokenizer is capable of tokenizing a complete MIPS program, or a given line from
a MIPS program. Since MIPS is line-oriented, each line defines a complete statement.
Tokenizing is the process of analyzing the input MIPS program for the purpose of
recognizing each MIPS language element. The types of language elements are known as “tokens”.
MIPS tokens are defined in the TokenTypes class.
Example:
The MIPS statement here: lw $t3, 8($t4) #load third member of array
generates the following token list
IDENTIFIER, COLON, OPERATOR, REGISTER_NAME, COMMA, INTEGER_5, LEFT_PAREN,
REGISTER_NAME, RIGHT_PAREN, COMMENT
Author:
Pete Sanderson
Constructor Summary
Tokenizer()
Simple constructor.
Tokenizer(MIPSprogram program)
Constructor for use with existing MIPSprogram.
Method Summary
ErrorList getErrors()
Fetch this Tokenizer’s error list.
java.util.ArrayList tokenize(MIPSprogram p)
Will tokenize a complete MIPS program.
TokenList tokenizeExampleInstruction(java.lang.String example)
Used only to create a token list for the example provided with each instruction
specification.
TokenList tokenizeLine(int lineNum,
java.lang.String theLine)
Will tokenize one line of source code.
TokenList tokenizeLine(int lineNum,
java.lang.String theLine,
ErrorList callerErrorList)
Will tokenize one line of source code.
TokenList tokenizeLine(MIPSprogram program,
int lineNum,
java.lang.String theLine)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Tokenizer
public Tokenizer()
Simple constructor. Initializes empty error list.
Tokenizer
public Tokenizer(MIPSprogram program)
Constructor for use with existing MIPSprogram. Designed to be used with Macro feature.
Parameters:
program – A previously-existing MIPSprogram object or null if none.
Method Detail
tokenize
public java.util.ArrayList tokenize(MIPSprogram p)
throws ProcessingException
Will tokenize a complete MIPS program. MIPS is line oriented (not free format),
so we will be line-oriented too.
Parameters:
p – The MIPSprogram to be tokenized.
Returns:
An ArrayList representing the tokenized program. Each list member is a TokenList
that represents a tokenized source statement from the MIPS program.
Throws:
ProcessingException
tokenizeExampleInstruction
public TokenList tokenizeExampleInstruction(java.lang.String example)
throws ProcessingException
Used only to create a token list for the example provided with each instruction
specification.
Parameters:
example – The example MIPS instruction to be tokenized.
Returns:
An TokenList representing the tokenized instruction. Each list member is a Token
that represents one language element.
Throws:
ProcessingException – This occurs only if the instruction specification itself
contains one or more lexical (i.e. token) errors.
tokenizeLine
public TokenList tokenizeLine(int lineNum,
java.lang.String theLine)
Will tokenize one line of source code. If lexical errors are discovered,
they are noted in an ErrorMessage object which is added to the ErrorList.
Will NOT throw an exception yet because we want to persevere beyond first error.
Parameters:
lineNum – line number from source code (used in error message)
theLine – String containing source code
Returns:
the generated token list for that line
tokenizeLine
public TokenList tokenizeLine(MIPSprogram program,
int lineNum,
java.lang.String theLine)
tokenizeLine
public TokenList tokenizeLine(int lineNum,
java.lang.String theLine,
ErrorList callerErrorList)
Will tokenize one line of source code. If lexical errors are discovered,
they are noted in an ErrorMessage object which is added to the provided ErrorList
instead of the Tokenizer’s error list. Will NOT throw an exception.
Parameters:
lineNum – line number from source code (used in error message)
theLine – String containing source code
callerErrorList – errors will go into this list instead of tokenizer’s list.
Returns:
the generated token list for that line
getErrors
public ErrorList getErrors()
Fetch this Tokenizer’s error list.
Returns:
the error list
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Symbol
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Symbol
java.lang.Object
mars.assembler.Symbol
public class Symbol
extends java.lang.Object
Represents a MIPS program identifier to be stored in the symbol table.
Author:
Jason Bumgarner, Jason Shrewsbury
Field Summary
static boolean DATA_SYMBOL
static boolean TEXT_SYMBOL
Constructor Summary
Symbol(java.lang.String name,
int address,
boolean data)
Basic constructor, creates a symbol object.
Method Summary
int getAddress()
Returns the address of the the Symbol.
java.lang.String getName()
Returns the label of the the Symbol.
boolean getType()
Finds the type of symbol, text or data.
void setAddress(int newAddress)
Sets (replaces) the address of the the Symbol.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
TEXT_SYMBOL
public static final boolean TEXT_SYMBOL
See Also:
Constant Field Values
DATA_SYMBOL
public static final boolean DATA_SYMBOL
See Also:
Constant Field Values
Constructor Detail
Symbol
public Symbol(java.lang.String name,
int address,
boolean data)
Basic constructor, creates a symbol object.
Parameters:
name – The name of the Symbol.
address – The memroy address that the Symbol refers to.
data – The type of Symbol that it is.
Method Detail
getAddress
public int getAddress()
Returns the address of the the Symbol.
Returns:
The address of the Symbol.
getName
public java.lang.String getName()
Returns the label of the the Symbol.
Returns:
The label of the Symbol.
getType
public boolean getType()
Finds the type of symbol, text or data.
Returns:
The type of the data.
setAddress
public void setAddress(int newAddress)
Sets (replaces) the address of the the Symbol.
Parameters:
newAddress – The revised address of the Symbol.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.assembler
Interface Summary
TranslationCode This interface is intended for use by ExtendedInstruction objects to define, using
the translate() method, how to translate the extended (pseudo) instruction into
a sequence of one or more basic instructions, which can then be translated into
binary machine code.
Class Summary
Assembler An Assembler is capable of assembling a MIPS program.
DataTypes Information about MIPS data types.
Directives Class representing MIPS assembler directives.
Macro Stores information of a macro definition.
MacroPool Stores information of macros defined by now.
OperandFormat Provides utility method related to MIPS operand formats.
SourceLine Handy class to represent, for a given line of source code, the code
itself, the program containing it, and its line number within that program.
Symbol Represents a MIPS program identifier to be stored in the symbol table.
SymbolTable Creats a table of Symbol objects.
Token Represents one token in the input MIPS program.
Tokenizer A tokenizer is capable of tokenizing a complete MIPS program, or a given line from
a MIPS program.
TokenList Represents the list of tokens in a single line of MIPS code.
TokenTypes Constants to identify the types of tokens found in MIPS programs.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Macro
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Macro
java.lang.Object
mars.assembler.Macro
public class Macro
extends java.lang.Object
Stores information of a macro definition.
Author:
M.H.Sekhavat
Constructor Summary
Macro()
Method Summary
void addArg(java.lang.String value)
void addLabel(java.lang.String value)
boolean equals(java.lang.Object obj)
java.util.ArrayList
int getFromLine()
java.lang.String getName()
int getOriginalFromLine()
int getOriginalToLine()
MIPSprogram getProgram()
java.lang.String getSubstitutedLine(int line,
TokenList args,
long counter,
ErrorList errors)
Substitutes macro arguments in a line of source code inside macro
definition to be parsed after macro expansion.
int getToLine()
void readyForCommit()
Operations to be done on this macro before it is committed in macro pool.
void setArgs(java.util.ArrayList
void setFromLine(int fromLine)
void setName(java.lang.String name)
void setOriginalFromLine(int origFromLine)
void setOriginalToLine(int origToLine)
void setProgram(MIPSprogram program)
void setToLine(int toLine)
static boolean tokenIsMacroParameter(java.lang.String tokenValue,
boolean acceptSpimStyleParameters)
returns whether tokenValue is macro parameter or not
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Macro
public Macro()
Method Detail
getName
public java.lang.String getName()
setName
public void setName(java.lang.String name)
getProgram
public MIPSprogram getProgram()
setProgram
public void setProgram(MIPSprogram program)
getFromLine
public int getFromLine()
getOriginalFromLine
public int getOriginalFromLine()
setFromLine
public void setFromLine(int fromLine)
setOriginalFromLine
public void setOriginalFromLine(int origFromLine)
getToLine
public int getToLine()
getOriginalToLine
public int getOriginalToLine()
setToLine
public void setToLine(int toLine)
setOriginalToLine
public void setOriginalToLine(int origToLine)
getArgs
public java.util.ArrayList
setArgs
public void setArgs(java.util.ArrayList
equals
public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object
Parameters:
obj – Macro object to check if their name and count of
arguments are same
addArg
public void addArg(java.lang.String value)
getSubstitutedLine
public java.lang.String getSubstitutedLine(int line,
TokenList args,
long counter,
ErrorList errors)
Substitutes macro arguments in a line of source code inside macro
definition to be parsed after macro expansion.
Also appends “_M#” to all labels defined inside macro body where # is value of counter
Parameters:
line – source line number in macro definition to be substituted
args –
counter – unique macro expansion id
errors –
Returns:
line-th line of source code, with substituted
arguments
tokenIsMacroParameter
public static boolean tokenIsMacroParameter(java.lang.String tokenValue,
boolean acceptSpimStyleParameters)
returns whether tokenValue is macro parameter or not
Parameters:
tokenValue –
acceptSpimStyleParameters – accepts SPIM-style parameters which begin with ‘$’ if true
Returns:
addLabel
public void addLabel(java.lang.String value)
readyForCommit
public void readyForCommit()
Operations to be done on this macro before it is committed in macro pool.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DataTypes
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class DataTypes
java.lang.Object
mars.assembler.DataTypes
public final class DataTypes
extends java.lang.Object
Information about MIPS data types.
Author:
Pete Sanderson
Field Summary
static int BYTE_SIZE
Number of bytes occupied by MIPS byte is 1.
static int CHAR_SIZE
Number of bytes occupied by MIPS character is 1.
static int DOUBLE_SIZE
Number of bytes occupied by MIPS double is 8.
static int FLOAT_SIZE
Number of bytes occupied by MIPS float is 4.
static int HALF_SIZE
Number of bytes occupied by MIPS halfword is 2.
static double LOW_DOUBLE_VALUE
Largest magnitude negative value that can be stored in a MIPS double(negative of the max)
static double LOW_FLOAT_VALUE
Largest magnitude negative value that can be stored in a MIPS float (negative of the max)
static int MAX_BYTE_VALUE
Maximum value that can be stored in a MIPS byte is 27-1
static double MAX_DOUBLE_VALUE
Maximum positive finite value that can be stored in a MIPS double is same as Java Double
static double MAX_FLOAT_VALUE
Maximum positive finite value that can be stored in a MIPS float is same as Java Float
static int MAX_HALF_VALUE
Maximum value that can be stored in a MIPS halfword is 215-1
static int MAX_UHALF_VALUE
Maximum value that can be stored in an unsigned MIPS halfword is 216-1
static int MAX_WORD_VALUE
Maximum value that can be stored in a MIPS word is 231-1
static int MIN_BYTE_VALUE
Lowest value that can be stored in a MIPS byte is -27
static int MIN_HALF_VALUE
Lowest value that can be stored in a MIPS halfword is -215
static int MIN_UHALF_VALUE
Lowest value that can be stored in na unsigned MIPS halfword is 0
static int MIN_WORD_VALUE
Lowest value that can be stored in a MIPS word is -231
static int WORD_SIZE
Number of bytes occupied by MIPS word is 4.
Constructor Summary
DataTypes()
Method Summary
static int getLengthInBytes(Directives direct)
Get length in bytes for numeric MIPS directives.
static boolean outOfRange(Directives direct,
double value)
Determines whether given floating point value falls within value range for given directive.
static boolean outOfRange(Directives direct,
int value)
Determines whether given integer value falls within value range for given directive.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
DOUBLE_SIZE
public static final int DOUBLE_SIZE
Number of bytes occupied by MIPS double is 8.
See Also:
Constant Field Values
FLOAT_SIZE
public static final int FLOAT_SIZE
Number of bytes occupied by MIPS float is 4.
See Also:
Constant Field Values
WORD_SIZE
public static final int WORD_SIZE
Number of bytes occupied by MIPS word is 4.
See Also:
Constant Field Values
HALF_SIZE
public static final int HALF_SIZE
Number of bytes occupied by MIPS halfword is 2.
See Also:
Constant Field Values
BYTE_SIZE
public static final int BYTE_SIZE
Number of bytes occupied by MIPS byte is 1.
See Also:
Constant Field Values
CHAR_SIZE
public static final int CHAR_SIZE
Number of bytes occupied by MIPS character is 1.
See Also:
Constant Field Values
MAX_WORD_VALUE
public static final int MAX_WORD_VALUE
Maximum value that can be stored in a MIPS word is 231-1
See Also:
Constant Field Values
MIN_WORD_VALUE
public static final int MIN_WORD_VALUE
Lowest value that can be stored in a MIPS word is -231
See Also:
Constant Field Values
MAX_HALF_VALUE
public static final int MAX_HALF_VALUE
Maximum value that can be stored in a MIPS halfword is 215-1
See Also:
Constant Field Values
MIN_HALF_VALUE
public static final int MIN_HALF_VALUE
Lowest value that can be stored in a MIPS halfword is -215
See Also:
Constant Field Values
MAX_UHALF_VALUE
public static final int MAX_UHALF_VALUE
Maximum value that can be stored in an unsigned MIPS halfword is 216-1
See Also:
Constant Field Values
MIN_UHALF_VALUE
public static final int MIN_UHALF_VALUE
Lowest value that can be stored in na unsigned MIPS halfword is 0
See Also:
Constant Field Values
MAX_BYTE_VALUE
public static final int MAX_BYTE_VALUE
Maximum value that can be stored in a MIPS byte is 27-1
See Also:
Constant Field Values
MIN_BYTE_VALUE
public static final int MIN_BYTE_VALUE
Lowest value that can be stored in a MIPS byte is -27
See Also:
Constant Field Values
MAX_FLOAT_VALUE
public static final double MAX_FLOAT_VALUE
Maximum positive finite value that can be stored in a MIPS float is same as Java Float
See Also:
Constant Field Values
LOW_FLOAT_VALUE
public static final double LOW_FLOAT_VALUE
Largest magnitude negative value that can be stored in a MIPS float (negative of the max)
See Also:
Constant Field Values
MAX_DOUBLE_VALUE
public static final double MAX_DOUBLE_VALUE
Maximum positive finite value that can be stored in a MIPS double is same as Java Double
See Also:
Constant Field Values
LOW_DOUBLE_VALUE
public static final double LOW_DOUBLE_VALUE
Largest magnitude negative value that can be stored in a MIPS double(negative of the max)
See Also:
Constant Field Values
Constructor Detail
DataTypes
public DataTypes()
Method Detail
getLengthInBytes
public static int getLengthInBytes(Directives direct)
Get length in bytes for numeric MIPS directives.
Parameters:
direct – Directive to be measured.
Returns:
Returns length in bytes for values of that type. If type is not numeric
(or not implemented yet), returns 0.
outOfRange
public static boolean outOfRange(Directives direct,
int value)
Determines whether given integer value falls within value range for given directive.
Parameters:
direct – Directive that controls storage allocation for value.
value – The value to be stored.
Returns:
Returns true if value can be stored in the number of bytes allowed
by the given directive (.word, .half, .byte), false otherwise.
outOfRange
public static boolean outOfRange(Directives direct,
double value)
Determines whether given floating point value falls within value range for given directive.
For float, this refers to range of the data type, not precision. Example: 1.23456789012345
be stored in a float with loss of precision. It’s within the range. But 1.23e500 cannot be
stored in a float because the exponent 500 is too large (float allows 8 bits for exponent).
Parameters:
direct – Directive that controls storage allocation for value.
value – The value to be stored.
Returns:
Returns true if value is within range of
the given directive (.float, .double), false otherwise.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.assembler
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.assembler.Assembler
mars.assembler.DataTypes
mars.assembler.Directives
mars.assembler.Macro
mars.assembler.MacroPool
mars.assembler.OperandFormat
mars.assembler.SourceLine
mars.assembler.Symbol
mars.assembler.SymbolTable
mars.assembler.Token
mars.assembler.Tokenizer
mars.assembler.TokenList (implements java.lang.Cloneable)
mars.assembler.TokenTypes
Interface Hierarchy
mars.assembler.TranslationCode
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Token
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.assembler
Class Token
java.lang.Object
mars.assembler.Token
public class Token
extends java.lang.Object
Represents one token in the input MIPS program. Each Token carries, along with its
type and value, the position (line, column) in which its source appears in the MIPS program.
Author:
Pete Sanderson
Constructor Summary
Token(TokenTypes type,
java.lang.String value,
MIPSprogram sourceMIPSprogram,
int line,
int start)
Constructor for Token class.
Method Summary
MIPSprogram getOriginalProgram()
Produces original program containing this token.
int getOriginalSourceLine()
Produces original line number of this token.
int getSourceLine()
Produces line number of MIPS program of this token.
MIPSprogram getSourceMIPSprogram()
Produces MIPSprogram object associated with this token.
int getStartPos()
Produces position within source line of this token.
TokenTypes getType()
Produces token type of this token.
java.lang.String getValue()
Produces source code of this token.
void setOriginal(MIPSprogram origProgram,
int origSourceLine)
Set original program and line number for this token.
void setType(TokenTypes type)
Set or modify token type.
java.lang.String toString()
Get a String representing the token.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
Token
public Token(TokenTypes type,
java.lang.String value,
MIPSprogram sourceMIPSprogram,
int line,
int start)
Constructor for Token class.
Parameters:
type – The token type that this token has. (e.g. REGISTER_NAME)
value – The source value for this token (e.g. $t3)
sourceMIPSprogram – The MIPSprogram object containing this token
line – The line number in source program in which this token appears.
start – The starting position in that line number of this token’s source value.
See Also:
TokenTypes
Method Detail
setOriginal
public void setOriginal(MIPSprogram origProgram,
int origSourceLine)
Set original program and line number for this token.
Line number or both may change during pre-assembly as a result
of the “.include” directive, and we need to keep the original
for later reference (error messages, text segment display).
Parameters:
origProgram – MIPS program containing this token.
origSourceLine – Line within that program of this token.
getOriginalProgram
public MIPSprogram getOriginalProgram()
Produces original program containing this token.
Returns:
MIPSprogram of origin for this token.
getOriginalSourceLine
public int getOriginalSourceLine()
Produces original line number of this token. It could change as result
of “.include”
Returns:
original line number of this token.
getType
public TokenTypes getType()
Produces token type of this token.
Returns:
TokenType of this token.
setType
public void setType(TokenTypes type)
Set or modify token type. Generally used to note that
an identifier that matches an instruction name is
actually being used as a label.
Parameters:
type – new TokenTypes for this token.
getValue
public java.lang.String getValue()
Produces source code of this token.
Returns:
String containing source code of this token.
toString
public java.lang.String toString()
Get a String representing the token. This method is
equivalent to getValue().
Overrides:
toString in class java.lang.Object
Returns:
String version of the token.
getSourceMIPSprogram
public MIPSprogram getSourceMIPSprogram()
Produces MIPSprogram object associated with this token.
Returns:
MIPSprogram object associated with this token.
getSourceLine
public int getSourceLine()
Produces line number of MIPS program of this token.
Returns:
line number in source program of this token.
getStartPos
public int getStartPos()
Produces position within source line of this token.
Returns:
first character position within source program line of this token.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
PropertiesFile
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class PropertiesFile
java.lang.Object
mars.util.PropertiesFile
public class PropertiesFile
extends java.lang.Object
Provides means to work with “.properties” files which are used to store
various MARS settings.
Author:
Pete Sanderson
Constructor Summary
PropertiesFile()
Method Summary
static java.util.Properties loadPropertiesFromFile(java.lang.String file)
Produce Properties (a Hashtable) object containing key-value pairs
from specified properties file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
PropertiesFile
public PropertiesFile()
Method Detail
loadPropertiesFromFile
public static java.util.Properties loadPropertiesFromFile(java.lang.String file)
Produce Properties (a Hashtable) object containing key-value pairs
from specified properties file. This may be used as an alternative
to readPropertiesFile() which uses a different implementation.
Parameters:
file – Properties filename. Do NOT include the file extension as
it is assumed to be “.properties” and is added here.
Returns:
Properties (Hashtable) of key-value pairs read from the file.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Binary
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class Binary
java.lang.Object
mars.util.Binary
public class Binary
extends java.lang.Object
Some utility methods for working with binary representations.
Author:
Pete Sanderson, Ken Vollmar, and Jason Bumgarner
Constructor Summary
Binary()
Method Summary
static char binaryStringToHexDigit(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into char equivalent of the corresponding
hexadecimal digit.
static java.lang.String binaryStringToHexString(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into String equivalent of the corresponding
hexadecimal value.
static int binaryStringToInt(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into an int value having that binary representation.
static long binaryStringToLong(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into a long value having that binary representation.
static int bitValue(int value,
int bit)
Returns the bit value of the given bit position of the given int value.
static int bitValue(long value,
int bit)
Returns the bit value of the given bit position of the given long value.
static int clearBit(int value,
int bit)
Sets the specified bit of the specified value to 0, and returns the result.
static int getByte(int value,
int bite)
Gets the specified byte of the specified value.
static java.lang.String hexStringToBinaryString(java.lang.String value)
Translate String consisting of hexadecimal digits into String consisting of
corresponding binary digits (‘1’s and ‘0’s).
static int highOrderLongToInt(long longValue)
Returns int representing the bit values of the high order 32 bits of given
64 bit long value.
static java.lang.String intToAscii(int d)
Produce ASCII string equivalent of integer value, interpreting it as 4 one-byte
characters.
static java.lang.String intToBinaryString(int value)
Translate int value into a String consisting of ‘1’s and ‘0’s.
static java.lang.String intToBinaryString(int value,
int length)
Translate int value into a String consisting of ‘1’s and ‘0’s.
static java.lang.String intToHalfHexString(int d)
Returns a 6 character string representing the 16-bit hexadecimal equivalent of the
given integer value.
static java.lang.String intToHexString(int d)
Prefix a hexadecimal-indicating string “0x” to the string which is
returned by the method “Integer.toHexString”.
static boolean isHex(java.lang.String v)
Parsing method to see if a string represents a hex number.
static boolean isOctal(java.lang.String v)
Parsing method to see if a string represents an octal number.
static java.lang.String longToBinaryString(long value)
Translate long value into a String consisting of ‘1’s and ‘0’s.
static java.lang.String longToBinaryString(long value,
int length)
Translate long value into a String consisting of ‘1’s and ‘0’s.
static java.lang.String longToHexString(long value)
Prefix a hexadecimal-indicating string “0x” to the string equivalent to the
hexadecimal value in the long parameter.
static int lowOrderLongToInt(long longValue)
Returns int representing the bit values of the low order 32 bits of given
64 bit long value.
static int setBit(int value,
int bit)
Sets the specified bit of the specified value to 1, and returns the result.
static int setByte(int value,
int bite,
int replace)
Sets the specified byte of the specified value to the low order 8 bits of
specified replacement value, and returns the result.
static int stringToInt(java.lang.String s)
Attempt to validate given string whose characters represent a 32 bit integer.
static long stringToLong(java.lang.String s)
Attempt to validate given string whose characters represent a 64 bit long.
static long twoIntsToLong(int highOrder,
int lowOrder)
Returns long (64 bit integer) combining the bit values of two given 32 bit
integer values.
static java.lang.String unsignedIntToIntString(int d)
Produce String equivalent of integer value interpreting it as an unsigned integer.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Binary
public Binary()
Method Detail
intToBinaryString
public static java.lang.String intToBinaryString(int value,
int length)
Translate int value into a String consisting of ‘1’s and ‘0’s.
Parameters:
value – The int value to convert.
length – The number of bit positions, starting at least significant, to process.
Returns:
String consisting of ‘1’ and ‘0’ characters corresponding to the requested binary sequence.
intToBinaryString
public static java.lang.String intToBinaryString(int value)
Translate int value into a String consisting of ‘1’s and ‘0’s. Assumes all 32 bits are
to be translated.
Parameters:
value – The int value to convert.
Returns:
String consisting of ‘1’ and ‘0’ characters corresponding to the requested binary sequence.
longToBinaryString
public static java.lang.String longToBinaryString(long value,
int length)
Translate long value into a String consisting of ‘1’s and ‘0’s.
Parameters:
value – The long value to convert.
length – The number of bit positions, starting at least significant, to process.
Returns:
String consisting of ‘1’ and ‘0’ characters corresponding to the requested binary sequence.
longToBinaryString
public static java.lang.String longToBinaryString(long value)
Translate long value into a String consisting of ‘1’s and ‘0’s. Assumes all 64 bits are
to be translated.
Parameters:
value – The long value to convert.
Returns:
String consisting of ‘1’ and ‘0’ characters corresponding to the requested binary sequence.
binaryStringToInt
public static int binaryStringToInt(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into an int value having that binary representation.
The String is assumed to be at most 32 characters long. No error checking is performed.
String position 0 has most-significant bit, position length-1 has least-significant.
Parameters:
value – The String value to convert.
Returns:
int whose binary value corresponds to decoded String.
binaryStringToLong
public static long binaryStringToLong(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into a long value having that binary representation.
The String is assumed to be at most 64 characters long. No error checking is performed.
String position 0 has most-significant bit, position length-1 has least-significant.
Parameters:
value – The String value to convert.
Returns:
long whose binary value corresponds to decoded String.
binaryStringToHexString
public static java.lang.String binaryStringToHexString(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into String equivalent of the corresponding
hexadecimal value. No length limit.
String position 0 has most-significant bit, position length-1 has least-significant.
Parameters:
value – The String value to convert.
Returns:
String containing ‘0’, ‘1’, …’F’ characters which form hexadecimal
equivalent of decoded String.
hexStringToBinaryString
public static java.lang.String hexStringToBinaryString(java.lang.String value)
Translate String consisting of hexadecimal digits into String consisting of
corresponding binary digits (‘1’s and ‘0’s). No length limit.
String position 0 will have most-significant bit, position length-1 has least-significant.
Parameters:
value – String containing ‘0’, ‘1’, …’f’
characters which form hexadecimal. Letters may be either upper or lower case.
Works either with or without leading “Ox”.
Returns:
String with equivalent value in binary.
binaryStringToHexDigit
public static char binaryStringToHexDigit(java.lang.String value)
Translate String consisting of ‘1’s and ‘0’s into char equivalent of the corresponding
hexadecimal digit. String limited to length 4.
String position 0 has most-significant bit, position length-1 has least-significant.
Parameters:
value – The String value to convert.
Returns:
char ‘0’, ‘1’, …’F’ which form hexadecimal equivalent of decoded String.
If string length > 4, returns ‘0’.
intToHexString
public static java.lang.String intToHexString(int d)
Prefix a hexadecimal-indicating string “0x” to the string which is
returned by the method “Integer.toHexString”. Prepend leading zeroes
to that string as necessary to make it always eight hexadecimal digits.
Parameters:
d – The int value to convert.
Returns:
String containing ‘0’, ‘1’, …’F’ which form hexadecimal equivalent of int.
intToHalfHexString
public static java.lang.String intToHalfHexString(int d)
Returns a 6 character string representing the 16-bit hexadecimal equivalent of the
given integer value. First two characters are “0x”. It assumes value will “fit”
in 16 bits. If non-negative, prepend leading zeroes to that string as necessary
to make it always four hexadecimal digits. If negative, chop off the first
four ‘f’ digits so result is always four hexadecimal digits
Parameters:
d – The int value to convert.
Returns:
String containing ‘0’, ‘1’, …’F’ which form hexadecimal equivalent of int.
longToHexString
public static java.lang.String longToHexString(long value)
Prefix a hexadecimal-indicating string “0x” to the string equivalent to the
hexadecimal value in the long parameter. Prepend leading zeroes
to that string as necessary to make it always sixteen hexadecimal digits.
Parameters:
value – The long value to convert.
Returns:
String containing ‘0’, ‘1’, …’F’ which form hexadecimal equivalent of long.
unsignedIntToIntString
public static java.lang.String unsignedIntToIntString(int d)
Produce String equivalent of integer value interpreting it as an unsigned integer.
For instance, -1 (0xffffffff) produces “4294967295” instead of “-1”.
Parameters:
d – The int value to interpret.
Returns:
String which forms unsigned 32 bit equivalent of int.
intToAscii
public static java.lang.String intToAscii(int d)
Produce ASCII string equivalent of integer value, interpreting it as 4 one-byte
characters. If the value in a given byte does not correspond to a printable
character, it will be assigned a default character (defined in config.properties)
for a placeholder.
Parameters:
d – The int value to interpret
Returns:
String that represents ASCII equivalent
stringToInt
public static int stringToInt(java.lang.String s)
throws java.lang.NumberFormatException
Attempt to validate given string whose characters represent a 32 bit integer.
Integer.decode() is insufficient because it will not allow incorporation of
hex two’s complement (i.e. 0x80…0 through 0xff…f). Allows
optional negative (-) sign but no embedded spaces.
Parameters:
s – candidate string
Returns:
returns int value represented by given string
Throws:
java.lang.NumberFormatException – if string cannot be translated into an int
stringToLong
public static long stringToLong(java.lang.String s)
throws java.lang.NumberFormatException
Attempt to validate given string whose characters represent a 64 bit long.
Long.decode() is insufficient because it will not allow incorporation of
hex two’s complement (i.e. 0x80…0 through 0xff…f). Allows
optional negative (-) sign but no embedded spaces.
Parameters:
s – candidate string
Returns:
returns long value represented by given string
Throws:
java.lang.NumberFormatException – if string cannot be translated into a long
highOrderLongToInt
public static int highOrderLongToInt(long longValue)
Returns int representing the bit values of the high order 32 bits of given
64 bit long value.
Parameters:
longValue – The long value from which to extract bits.
Returns:
int containing high order 32 bits of argument
lowOrderLongToInt
public static int lowOrderLongToInt(long longValue)
Returns int representing the bit values of the low order 32 bits of given
64 bit long value.
Parameters:
longValue – The long value from which to extract bits.
Returns:
int containing low order 32 bits of argument
twoIntsToLong
public static long twoIntsToLong(int highOrder,
int lowOrder)
Returns long (64 bit integer) combining the bit values of two given 32 bit
integer values.
Parameters:
highOrder – Integer to form the high-order 32 bits of result.
lowOrder – Integer to form the high-order 32 bits of result.
Returns:
long containing concatenated 32 bit int values.
bitValue
public static int bitValue(int value,
int bit)
Returns the bit value of the given bit position of the given int value.
Parameters:
value – The value to read the bit from.
bit – bit position in range 0 (least significant) to 31 (most)
Returns:
0 if the bit position contains 0, and 1 otherwise.
bitValue
public static int bitValue(long value,
int bit)
Returns the bit value of the given bit position of the given long value.
Parameters:
value – The value to read the bit from.
bit – bit position in range 0 (least significant) to 63 (most)
Returns:
0 if the bit position contains 0, and 1 otherwise.
setBit
public static int setBit(int value,
int bit)
Sets the specified bit of the specified value to 1, and returns the result.
Parameters:
value – The value in which the bit is to be set.
bit – bit position in range 0 (least significant) to 31 (most)
Returns:
value possibly modified with given bit set to 1.
clearBit
public static int clearBit(int value,
int bit)
Sets the specified bit of the specified value to 0, and returns the result.
Parameters:
value – The value in which the bit is to be set.
bit – bit position in range 0 (least significant) to 31 (most)
Returns:
value possibly modified with given bit set to 0.
setByte
public static int setByte(int value,
int bite,
int replace)
Sets the specified byte of the specified value to the low order 8 bits of
specified replacement value, and returns the result.
Parameters:
value – The value in which the byte is to be set.
bite – byte position in range 0 (least significant) to 3 (most)
replace – value to place into that byte position – use low order 8 bits
Returns:
value modified value.
getByte
public static int getByte(int value,
int bite)
Gets the specified byte of the specified value.
Parameters:
value – The value in which the byte is to be retrieved.
bite – byte position in range 0 (least significant) to 3 (most)
Returns:
zero-extended byte value in low order byte.
isHex
public static boolean isHex(java.lang.String v)
Parsing method to see if a string represents a hex number.
As per http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#decode(java.lang.String),
a string represents a hex number if the string is in the forms:
Signopt 0x HexDigits
Signopt 0X HexDigits
Signopt # HexDigits
Parameters:
v – String containing numeric digits (could be decimal, octal, or hex)
Returns:
Returns true if string represents a hex number, else returns false.
isOctal
public static boolean isOctal(java.lang.String v)
Parsing method to see if a string represents an octal number.
As per http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Integer.html#decode(java.lang.String),
a string represents an octal number if the string is in the forms:
Signopt 0 OctalDigits
Parameters:
v – String containing numeric digits (could be decimal, octal, or hex)
Returns:
Returns true if string represents an octal number, else returns false.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FilenameFinder
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class FilenameFinder
java.lang.Object
mars.util.FilenameFinder
public class FilenameFinder
extends java.lang.Object
Utility class to perform necessary file-related search
operations. One is to find file names in JAR file,
another is to find names of files in given directory
of normal file system.
Author:
Pete Sanderson
Field Summary
static java.lang.String MATCH_ALL_EXTENSIONS
Constructor Summary
FilenameFinder()
Method Summary
static boolean fileExtensionMatch(java.lang.String name,
java.lang.String extension)
Determine if given filename ends with given extension.
static java.lang.String getExtension(java.io.File file)
Get the filename extension of the specified File.
static javax.swing.filechooser.FileFilter getFileFilter(java.util.ArrayList extensions,
java.lang.String description)
Get a FileFilter that will filter files based on the given list of filename extensions.
static javax.swing.filechooser.FileFilter getFileFilter(java.util.ArrayList extensions,
java.lang.String description,
boolean acceptDirectories)
Get a FileFilter that will filter files based on the given list of filename extensions.
static javax.swing.filechooser.FileFilter getFileFilter(java.lang.String extension,
java.lang.String description)
Get a FileFilter that will filter files based on the given filename extension.
static javax.swing.filechooser.FileFilter getFileFilter(java.lang.String extension,
java.lang.String description,
boolean acceptDirectories)
Get a FileFilter that will filter files based on the given filename extension.
static java.util.ArrayList getFilenameList(java.util.ArrayList nameList,
java.util.ArrayList fileExtensions)
Return list of file names.
static java.util.ArrayList getFilenameList(java.util.ArrayList nameList,
java.lang.String fileExtension)
Return list of file names.
static java.util.ArrayList getFilenameList(java.lang.ClassLoader classLoader,
java.lang.String directoryPath,
java.util.ArrayList fileExtensions)
Locate files and return list of file names.
static java.util.ArrayList getFilenameList(java.lang.ClassLoader classLoader,
java.lang.String directoryPath,
java.lang.String fileExtension)
Locate files and return list of file names.
static java.util.ArrayList getFilenameList(java.lang.String directoryPath,
java.util.ArrayList fileExtensions)
Locate files and return list of file names.
static java.util.ArrayList getFilenameList(java.lang.String directoryPath,
java.lang.String fileExtension)
Locate files and return list of file names.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
MATCH_ALL_EXTENSIONS
public static java.lang.String MATCH_ALL_EXTENSIONS
Constructor Detail
FilenameFinder
public FilenameFinder()
Method Detail
getFilenameList
public static java.util.ArrayList getFilenameList(java.lang.ClassLoader classLoader,
java.lang.String directoryPath,
java.lang.String fileExtension)
Locate files and return list of file names. Given a known relative directory path,
it will locate it and build list of all names of files in that directory
having the given file extension. If the “known file path” doesn’t work
because MARS is running from an executable JAR file, it will locate the
directory in the JAR file and proceed from there. NOTE: since this uses
the class loader to get the resource, the directory path needs to be
relative to classpath, not absolute. To work with an arbitrary file system,
use the other version of this overloaded method. Will NOT match directories
that happen to have the desired extension.
Parameters:
classLoader – class loader to use
directoryPath – Search will be confined to this directory. Use “/” as
separator but do NOT include starting or ending “/” (e.g. mars/tools)
fileExtension – Only files with this extension will be added
to the list. Do NOT include the “.” in extension.
Returns:
array list of matching file names as Strings. If none, list is empty.
getFilenameList
public static java.util.ArrayList getFilenameList(java.lang.ClassLoader classLoader,
java.lang.String directoryPath,
java.util.ArrayList fileExtensions)
Locate files and return list of file names. Given a known relative directory path,
it will locate it and build list of all names of files in that directory
having the given file extension. If the “known file path” doesn’t work
because MARS is running from an executable JAR file, it will locate the
directory in the JAR file and proceed from there. NOTE: since this uses
the class loader to get the resource, the directory path needs to be
relative to classpath, not absolute. To work with an arbitrary file system,
use the other version of this overloaded method.
Parameters:
classLoader – class loader to use
directoryPath – Search will be confined to this directory. Use “/” as
separator but do NOT include starting or ending “/” (e.g. mars/tools)
fileExtensions – ArrayList of Strings containing file extensions.
Only files with an extension in this list will be added to the list.
Do NOT include the “.”, eg “class” not “.class”. If Arraylist or
extension null or empty, all files are added.
Returns:
array list of matching file names as Strings. If none, list is empty.
getFilenameList
public static java.util.ArrayList getFilenameList(java.lang.String directoryPath,
java.lang.String fileExtension)
Locate files and return list of file names. Given a known directory path,
it will locate it and build list of all names of files in that directory
having the given file extension. If file extenion is null or empty, all
filenames are returned. Returned list contains absolute filename paths.
Parameters:
directoryPath – Search will be confined to this directory.
fileExtension – Only files with this extension will be added to the list.
Do NOT include “.” in extension.
If null or empty string, all files are added.
Returns:
array list of matching file names (absolute path). If none, list is empty.
getFilenameList
public static java.util.ArrayList getFilenameList(java.lang.String directoryPath,
java.util.ArrayList fileExtensions)
Locate files and return list of file names. Given a known directory path,
it will locate it and build list of all names of files in that directory
having the given file extension. If file extenion is null or empty, all
filenames are returned. Returned list contains absolute filename paths.
Parameters:
directoryPath – Search will be confined to this directory.
fileExtensions – ArrayList of Strings containing file extensions.
Only files with an extension in this list will be added
to the list. Do NOT include the “.” in extensions. If Arraylist or
extension null or empty, all files are added.
Returns:
array list of matching file names (absolute path). If none, list is empty.
getFilenameList
public static java.util.ArrayList getFilenameList(java.util.ArrayList nameList,
java.lang.String fileExtension)
Return list of file names. Given a list of file names, it will return the list
of all having the given file extension. If file extenion is null or empty, all
filenames are returned. Returned list contains absolute filename paths.
Parameters:
nameList – ArrayList of String containing file names.
fileExtension – Only files with this extension will be added to the list.
If null or empty string, all files are added. Do NOT include “.” in extension.
Returns:
array list of matching file names (absolute path). If none, list is empty.
getFilenameList
public static java.util.ArrayList getFilenameList(java.util.ArrayList nameList,
java.util.ArrayList fileExtensions)
Return list of file names. Given a list of file names, it will return the list
of all having the given file extension. If file extenion is null or empty, all
filenames are returned. Returned list contains absolute filename paths.
Parameters:
nameList – ArrayList of String containing file names.
fileExtensions – ArrayList of Strings containing file extensions.
Only files with an extension in this list will be added
to the list. Do NOT include the “.” in extensions. If Arraylist or
extension null or empty, all files are added.
Returns:
array list of matching file names (absolute path). If none, list is empty.
getExtension
public static java.lang.String getExtension(java.io.File file)
Get the filename extension of the specified File.
Parameters:
file – the File object representing the file of interest
Returns:
The filename extension (everything that follows
last ‘.’ in filename) or null if none.
getFileFilter
public static javax.swing.filechooser.FileFilter getFileFilter(java.util.ArrayList extensions,
java.lang.String description,
boolean acceptDirectories)
Get a FileFilter that will filter files based on the given list of filename extensions.
Parameters:
extensions – ArrayList of Strings, each string is acceptable filename extension.
description – String containing description to be added in parentheses after list of extensions.
acceptDirectories – boolean value true if directories are accepted by the filter, false otherwise.
Returns:
a FileFilter object that accepts files with given extensions, and directories if so indicated.
getFileFilter
public static javax.swing.filechooser.FileFilter getFileFilter(java.util.ArrayList extensions,
java.lang.String description)
Get a FileFilter that will filter files based on the given list of filename extensions.
All directories are accepted by the filter.
Parameters:
extensions – ArrayList of Strings, each string is acceptable filename extension
description – String containing description to be added in parentheses after list of extensions.
Returns:
a FileFilter object that accepts files with given extensions, and directories if so indicated.
getFileFilter
public static javax.swing.filechooser.FileFilter getFileFilter(java.lang.String extension,
java.lang.String description,
boolean acceptDirectories)
Get a FileFilter that will filter files based on the given filename extension.
Parameters:
extension – String containing acceptable filename extension.
description – String containing description to be added in parentheses after list of extensions.
acceptDirectories – boolean value true if directories are accepted by the filter, false otherwise.
Returns:
a FileFilter object that accepts files with given extensions, and directories if so indicated.
getFileFilter
public static javax.swing.filechooser.FileFilter getFileFilter(java.lang.String extension,
java.lang.String description)
Get a FileFilter that will filter files based on the given filename extension.
All directories are accepted by the filter.
Parameters:
extension – String containing acceptable filename extension
description – String containing description to be added in parentheses after list of extensions.
Returns:
a FileFilter object that accepts files with given extensions, and directories if so indicated.
fileExtensionMatch
public static boolean fileExtensionMatch(java.lang.String name,
java.lang.String extension)
Determine if given filename ends with given extension.
Parameters:
name – A String containing the file name
extension – A String containing the file extension. Leading period is optional.
Returns:
Returns true if filename ends with given extension, false otherwise.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
mars.util
Classes
Binary
EditorFont
FilenameFinder
MemoryDump
PropertiesFile
SystemIO
EditorFont
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class EditorFont
java.lang.Object
mars.util.EditorFont
public class EditorFont
extends java.lang.Object
Specialized Font class designed to be used by both the
settings menu methods and the Settings class.
Author:
Pete Sanderson
Field Summary
static int DEFAULT_SIZE
static int DEFAULT_STYLE_INT
static java.lang.String DEFAULT_STYLE_STRING
static int MAX_SIZE
static int MIN_SIZE
Constructor Summary
EditorFont()
Method Summary
static java.awt.Font createFontFromStringValues(java.lang.String family,
java.lang.String style,
java.lang.String size)
Creates a new Font object based on the given String specifications.
static java.lang.String[] getAllFamilies()
Obtain an array of all available font family names.
static java.lang.String[] getCommonFamilies()
Obtain an array of common font family names.
static java.lang.String[] getFontStyleStrings()
Get array containing String values for font style names.
static java.lang.String sizeIntToSizeString(int size)
Given an int representing font size, returns corresponding string.
static int sizeStringToSizeInt(java.lang.String size)
Given a String representing font size, returns corresponding int.
static java.lang.String styleIntToStyleString(int style)
Given an int that represents a font style from the Font class,
returns the corresponding String.
static int styleStringToStyleInt(java.lang.String style)
Given a string that represents a font style, returns the
corresponding final int defined in Font: PLAIN, BOLD, ITALIC.
static java.lang.String substituteSpacesForTabs(java.lang.String string)
static java.lang.String substituteSpacesForTabs(java.lang.String string,
int tabSize)
Handy utility to produce a string that substitutes spaces for all tab characters
in the given string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
DEFAULT_STYLE_STRING
public static final java.lang.String DEFAULT_STYLE_STRING
DEFAULT_STYLE_INT
public static final int DEFAULT_STYLE_INT
MIN_SIZE
public static final int MIN_SIZE
See Also:
Constant Field Values
MAX_SIZE
public static final int MAX_SIZE
See Also:
Constant Field Values
DEFAULT_SIZE
public static final int DEFAULT_SIZE
See Also:
Constant Field Values
Constructor Detail
EditorFont
public EditorFont()
Method Detail
getCommonFamilies
public static java.lang.String[] getCommonFamilies()
Obtain an array of common font family names. These are guaranteed to
be available at runtime, as they were checked against the local
GraphicsEnvironment.
Returns:
Array of strings, each is a common and available font family name.
getAllFamilies
public static java.lang.String[] getAllFamilies()
Obtain an array of all available font family names. These are guaranteed to
be available at runtime, as they come from the local GraphicsEnvironment.
Returns:
Array of strings, each is an available font family name.
getFontStyleStrings
public static java.lang.String[] getFontStyleStrings()
Get array containing String values for font style names.
styleStringToStyleInt
public static int styleStringToStyleInt(java.lang.String style)
Given a string that represents a font style, returns the
corresponding final int defined in Font: PLAIN, BOLD, ITALIC. It
is not case-sensitive.
Parameters:
style – String representing the font style name
Returns:
The int value of the corresponding Font style constant. If the
string does not match any style name, returns Font.PLAIN.
styleIntToStyleString
public static java.lang.String styleIntToStyleString(int style)
Given an int that represents a font style from the Font class,
returns the corresponding String.
Parameters:
style – Must be one of Font.PLAIN, Font.BOLD, Font.ITALIC.
Returns:
The String representation of that style. If the parameter
is not one of the above, returns “Plain”.
sizeIntToSizeString
public static java.lang.String sizeIntToSizeString(int size)
Given an int representing font size, returns corresponding string.
Parameters:
size – Int representing size.
Returns:
String value of parameter, unless it is less than MIN_SIZE (returns MIN_SIZE
as String) or greater than MAX_SIZE (returns MAX_SIZE as String).
sizeStringToSizeInt
public static int sizeStringToSizeInt(java.lang.String size)
Given a String representing font size, returns corresponding int.
Parameters:
size – String representing size.
Returns:
int value of parameter, unless it is less than MIN_SIZE (returns
MIN_SIZE) or greater than MAX_SIZE (returns MAX_SIZE). If the string
cannot be parsed as a decimal integer, it returns DEFAULT_SIZE.
createFontFromStringValues
public static java.awt.Font createFontFromStringValues(java.lang.String family,
java.lang.String style,
java.lang.String size)
Creates a new Font object based on the given String specifications. This
is different than Font’s constructor, which requires ints for style and size.
It assures that defaults and size limits are applied when necessary.
Parameters:
family – String containing font family.
style – String containing font style. A list of available styles can
be obtained from getFontStyleStrings(). The default of styleStringToStyleInt()
is substituted if necessary.
size – String containing font size. The defaults and limits of
sizeStringToSizeInt() are substituted if necessary.
substituteSpacesForTabs
public static java.lang.String substituteSpacesForTabs(java.lang.String string)
substituteSpacesForTabs
public static java.lang.String substituteSpacesForTabs(java.lang.String string,
int tabSize)
Handy utility to produce a string that substitutes spaces for all tab characters
in the given string. The number of spaces generated is based on the position of
the tab character and the specified tab size.
Parameters:
string – The original string
tabSize – The number of spaces each tab character represents
Returns:
New string in which spaces are substituted for tabs
Throws:
java.lang.NullPointerException – if string is null
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.util
Class Summary
Binary Some utility methods for working with binary representations.
EditorFont Specialized Font class designed to be used by both the
settings menu methods and the Settings class.
FilenameFinder Utility class to perform necessary file-related search
operations.
MemoryDump
PropertiesFile Provides means to work with “.properties” files which are used to store
various MARS settings.
SystemIO Provides standard i/o services needed to simulate the MIPS syscall
routines.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
mars.util Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.util
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.util.Binary
mars.util.EditorFont
mars.util.FilenameFinder
mars.util.MemoryDump
mars.util.PropertiesFile
mars.util.SystemIO
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
SystemIO
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class SystemIO
java.lang.Object
mars.util.SystemIO
public class SystemIO
extends java.lang.Object
Provides standard i/o services needed to simulate the MIPS syscall
routines. These methods will detect whether the simulator is being
run from the command line or through the GUI, then do I/O to
System.in and System.out in the former situation, and interact with
the GUI in the latter.
Author:
Pete Sanderson and Ken Vollmar
Field Summary
static java.lang.String fileErrorString
String used for description of file error
static int SYSCALL_BUFSIZE
Buffer size for syscalls for file I/O
static int SYSCALL_MAXFILES
Maximum number of files that can be open
Constructor Summary
SystemIO()
Method Summary
static void closeFile(int fd)
Close the file with specified file descriptor
static java.lang.String getFileErrorMessage()
Retrieve file operation or error message
static int openFile(java.lang.String filename,
int flags)
Open a file for either reading or writing.
static void printString(java.lang.String string)
Implements syscall having 4 in $v0, to print a string.
static int readChar(int serviceNumber)
Implements syscall having 12 in $v0, to read a char value.
static double readDouble(int serviceNumber)
Implements syscall to read a double value.
static float readFloat(int serviceNumber)
Implements syscall to read a float value.
static int readFromFile(int fd,
byte[] myBuffer,
int lengthRequested)
Read bytes from file.
static int readInteger(int serviceNumber)
Implements syscall to read an integer value.
static java.lang.String readString(int serviceNumber,
int maxLength)
Implements syscall to read a string.
static void resetFiles()
Reset all files — clears out the file descriptor table.
static int writeToFile(int fd,
byte[] myBuffer,
int lengthRequested)
Write bytes to file.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
SYSCALL_BUFSIZE
public static final int SYSCALL_BUFSIZE
Buffer size for syscalls for file I/O
See Also:
Constant Field Values
SYSCALL_MAXFILES
public static final int SYSCALL_MAXFILES
Maximum number of files that can be open
See Also:
Constant Field Values
fileErrorString
public static java.lang.String fileErrorString
String used for description of file error
Constructor Detail
SystemIO
public SystemIO()
Method Detail
readInteger
public static int readInteger(int serviceNumber)
Implements syscall to read an integer value.
Client is responsible for catching NumberFormatException.
Parameters:
serviceNumber – the number assigned to Read Int syscall (default 5)
Returns:
int value corresponding to user input
readFloat
public static float readFloat(int serviceNumber)
Implements syscall to read a float value.
Client is responsible for catching NumberFormatException.
Parameters:
serviceNumber – the number assigned to Read Float syscall (default 6)
Returns:
float value corresponding to user input
Feb 14 2005 Ken Vollmar
readDouble
public static double readDouble(int serviceNumber)
Implements syscall to read a double value.
Client is responsible for catching NumberFormatException.
Parameters:
serviceNumber – the number assigned to Read Double syscall (default 7)
Returns:
double value corresponding to user input
1 Aug 2005 DPS, based on Ken Vollmar’s readFloat
printString
public static void printString(java.lang.String string)
Implements syscall having 4 in $v0, to print a string.
readString
public static java.lang.String readString(int serviceNumber,
int maxLength)
Implements syscall to read a string.
Parameters:
serviceNumber – the number assigned to Read String syscall (default 8)
maxLength – the maximum string length
Returns:
the entered string, truncated to maximum length if necessary
readChar
public static int readChar(int serviceNumber)
Implements syscall having 12 in $v0, to read a char value.
Parameters:
serviceNumber – the number assigned to Read Char syscall (default 12)
Returns:
int value with lowest byte corresponding to user input
writeToFile
public static int writeToFile(int fd,
byte[] myBuffer,
int lengthRequested)
Write bytes to file.
Parameters:
fd – file descriptor
myBuffer – byte array containing characters to write
lengthRequested – number of bytes to write
Returns:
number of bytes written, or -1 on error
readFromFile
public static int readFromFile(int fd,
byte[] myBuffer,
int lengthRequested)
Read bytes from file.
Parameters:
fd – file descriptor
myBuffer – byte array to contain bytes read
lengthRequested – number of bytes to read
Returns:
number of bytes read, 0 on EOF, or -1 on error
openFile
public static int openFile(java.lang.String filename,
int flags)
Open a file for either reading or writing. Note that read/write flag is NOT
IMPLEMENTED. Also note that file permission modes are also NOT IMPLEMENTED.
Parameters:
filename – string containing filename
flag – 0 for read, 1 for write
Returns:
file descriptor in the range 0 to SYSCALL_MAXFILES-1, or -1 if error
closeFile
public static void closeFile(int fd)
Close the file with specified file descriptor
Parameters:
fd – the file descriptor of an open file
resetFiles
public static void resetFiles()
Reset all files — clears out the file descriptor table.
getFileErrorMessage
public static java.lang.String getFileErrorMessage()
Retrieve file operation or error message
Returns:
string containing message
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MemoryDump
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.util
Class MemoryDump
java.lang.Object
mars.util.MemoryDump
public class MemoryDump
extends java.lang.Object
Field Summary
static java.util.ArrayList dumpTriples
A list of segmentname/dumpformat/filename triples which should be dumped
Constructor Summary
MemoryDump()
Method Summary
static int getAddressOfFirstNull(int baseAddress,
int limitAddress)
Look for first “null” memory value in an address range.
static int[] getBaseAddresses(java.lang.String[] segments)
Get the MIPS memory base address(es) of the specified segment name(s).
static int[] getLimitAddresses(java.lang.String[] segments)
Get the MIPS memory limit address(es) of the specified segment name(s).
static java.lang.Integer[] getSegmentBounds(java.lang.String segment)
Return array with segment address bounds for specified segment.
static java.lang.String[] getSegmentNames()
Get the names of segments available for memory dump.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
dumpTriples
public static java.util.ArrayList dumpTriples
A list of segmentname/dumpformat/filename triples which should be dumped
Constructor Detail
MemoryDump
public MemoryDump()
Method Detail
getSegmentBounds
public static java.lang.Integer[] getSegmentBounds(java.lang.String segment)
Return array with segment address bounds for specified segment.
Parameters:
segment – String with segment name (initially “.text” and “.data”)
Returns:
array of two Integer, the base and limit address for that segment. Null if parameter
name does not match a known segment name.
getSegmentNames
public static java.lang.String[] getSegmentNames()
Get the names of segments available for memory dump.
Returns:
array of Strings, each string is segment name (e.g. “.text”, “.data”)
getBaseAddresses
public static int[] getBaseAddresses(java.lang.String[] segments)
Get the MIPS memory base address(es) of the specified segment name(s).
If invalid segment name is provided, will throw NullPointerException, so
I recommend getting segment names from getSegmentNames().
Parameters:
segments – Array of Strings containing segment names (“.text”, “.data”)
Returns:
Array of int containing corresponding base addresses.
getLimitAddresses
public static int[] getLimitAddresses(java.lang.String[] segments)
Get the MIPS memory limit address(es) of the specified segment name(s).
If invalid segment name is provided, will throw NullPointerException, so
I recommend getting segment names from getSegmentNames().
Parameters:
segments – Array of Strings containing segment names (“.text”, “.data”)
Returns:
Array of int containing corresponding limit addresses.
getAddressOfFirstNull
public static int getAddressOfFirstNull(int baseAddress,
int limitAddress)
throws AddressErrorException
Look for first “null” memory value in an address range. For text segment (binary code), this
represents a word that does not contain an instruction. Normally use this to find the end of
the program. For data segment, this represents the first block of simulated memory (block length
currently 4K words) that has not been referenced by an assembled/executing program.
Parameters:
baseAddress – lowest MIPS address to be searched; the starting point
limitAddress – highest MIPS address to be searched
Returns:
lowest address within specified range that contains “null” value as described above.
Throws:
AddressErrorException – if the base address is not on a word boundary
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MarsSplashScreen
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class MarsSplashScreen
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
javax.swing.JWindow
mars.MarsSplashScreen
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer
public class MarsSplashScreen
extends javax.swing.JWindow
Produces MARS splash screen.
Adapted from http://www.java-tips.org/content/view/1267/2/
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JWindow
javax.swing.JWindow.AccessibleJWindow
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JWindow
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MarsSplashScreen(int d)
Method Summary
void showSplash()
A simple little method to show a title screen in the center
of the screen for the amount of time given in the constructor
Methods inherited from class javax.swing.JWindow
addImpl, createRootPane, getAccessibleContext, getContentPane, getGlassPane, getGraphics, getLayeredPane, getRootPane, getTransferHandler, isRootPaneCheckingEnabled, paramString, remove, repaint, setContentPane, setGlassPane, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update, windowInit
Methods inherited from class java.awt.Window
addNotify, addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
MarsSplashScreen
public MarsSplashScreen(int d)
Method Detail
showSplash
public void showSplash()
A simple little method to show a title screen in the center
of the screen for the amount of time given in the constructor
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileStatus
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileStatus
java.lang.Object
mars.venus.FileStatus
public class FileStatus
extends java.lang.Object
Used to store and return information on the status of the current ASM file that
is being edited in the program.
Author:
Team JSpim
Field Summary
static int EDITED
open/saved edit window with unsaved edits
static int NEW_EDITED
New edit window with unsaved edits
static int NEW_NOT_EDITED
New edit window with no edits
static int NO_FILE
initial state or after close
static int NOT_EDITED
open/saved edit window with no edits
static int OPENING
file is being opened.
static int RUNNABLE
successful assembly
static int RUNNING
execution is under way
static int TERMINATED
execution terminated
Constructor Summary
FileStatus()
Create a FileStatus object with FileStatis.NO_FILE for status and null for file getters.
FileStatus(int status,
java.lang.String pathname)
Create a FileStatus object with given status and file pathname.
Method Summary
static int get()
Get file status
static java.io.File getFile()
Returns the ASM file.
java.lang.String getFilename()
Get file name with no path information.
int getFileStatus()
Get editing status of this file.
static java.lang.String getName()
Returns the name of the file.
java.lang.String getParent()
Get file parent pathname.
java.lang.String getPathname()
Get full file pathname.
boolean hasUnsavedEdits()
Determine if file has been modified since last save or, if not yet saved, since
being created using New or Open.
static boolean isAssembled()
Tells whether the file has been assembled.
static boolean isEdited()
Tells whether the file has been edited since it has been saved.
boolean isNew()
Determine if file is “new”, which means created using New but not yet saved.
static boolean isSaved()
Tells whether the file has been saved.
static void reset()
Resets all the values in FileStatus
static void set(int newStatus)
Set file status.
static void setAssembled(boolean b)
Changes the value of assenbked to the parameter given.
static void setEdited(boolean b)
Changes the value of edited to the parameter given.
static void setFile(java.io.File f)
Sets the file to the ASM file passed.
void setFileStatus(int newStatus)
Set editing status of this file.
static void setName(java.lang.String s)
Changes the value of name to the parameter given.
void setPathname(java.lang.String newPath)
Set full file pathname.
void setPathname(java.lang.String parent,
java.lang.String name)
Set full file pathname.
static void setSaved(boolean b)
Changes the value of saved to the parameter given.
void updateStaticFileStatus()
Update static FileStatus fields with values from this FileStatus object
To support legacy code that depends on the static.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
NO_FILE
public static final int NO_FILE
initial state or after close
See Also:
Constant Field Values
NEW_NOT_EDITED
public static final int NEW_NOT_EDITED
New edit window with no edits
See Also:
Constant Field Values
NEW_EDITED
public static final int NEW_EDITED
New edit window with unsaved edits
See Also:
Constant Field Values
NOT_EDITED
public static final int NOT_EDITED
open/saved edit window with no edits
See Also:
Constant Field Values
EDITED
public static final int EDITED
open/saved edit window with unsaved edits
See Also:
Constant Field Values
RUNNABLE
public static final int RUNNABLE
successful assembly
See Also:
Constant Field Values
RUNNING
public static final int RUNNING
execution is under way
See Also:
Constant Field Values
TERMINATED
public static final int TERMINATED
execution terminated
See Also:
Constant Field Values
OPENING
public static final int OPENING
file is being opened. DPS 9-Aug-2011
See Also:
Constant Field Values
Constructor Detail
FileStatus
public FileStatus()
Create a FileStatus object with FileStatis.NO_FILE for status and null for file getters.
FileStatus
public FileStatus(int status,
java.lang.String pathname)
Create a FileStatus object with given status and file pathname.
Parameters:
status – Initial file status. See FileStatus static constants.
pathname – Full file pathname. See setPathname(String newPath) below.
Method Detail
set
public static void set(int newStatus)
Set file status. Also updates menu state accordingly.
Parameters:
newStatus – New status: EDITED, RUNNABLE, etc, see list above.
get
public static int get()
Get file status
Returns:
file status EDITED, RUNNABLE, etc, see list above
setAssembled
public static void setAssembled(boolean b)
Changes the value of assenbked to the parameter given.
Parameters:
b – boolean variable that tells what to set assembled to.
setSaved
public static void setSaved(boolean b)
Changes the value of saved to the parameter given.
Parameters:
b – boolean variable that tells what to set saved to .
setEdited
public static void setEdited(boolean b)
Changes the value of edited to the parameter given.
Parameters:
b – boolean variable that tells what to set edited to.
setName
public static void setName(java.lang.String s)
Changes the value of name to the parameter given.
Parameters:
s – string variable tells what to set the name of the file to .
setFile
public static void setFile(java.io.File f)
Sets the file to the ASM file passed.
Parameters:
f – file object variable that stores the ASM file.
getFile
public static java.io.File getFile()
Returns the ASM file.
Returns:
The ASM file.
getName
public static java.lang.String getName()
Returns the name of the file.
Returns:
The name of the ASM file.
isAssembled
public static boolean isAssembled()
Tells whether the file has been assembled.
Returns:
Boolean value that is true if the ASM file has been assembled.
isSaved
public static boolean isSaved()
Tells whether the file has been saved.
Returns:
Boolean variable that is true if the ASM file has been saved
isEdited
public static boolean isEdited()
Tells whether the file has been edited since it has been saved.
Returns:
Boolean value that returns true if the ASM file has been edited.
reset
public static void reset()
Resets all the values in FileStatus
setFileStatus
public void setFileStatus(int newStatus)
Set editing status of this file. See FileStatus static constants.
Parameters:
newStatus – the new status
getFileStatus
public int getFileStatus()
Get editing status of this file.
Returns:
current editing status. See FileStatus static constants.
isNew
public boolean isNew()
Determine if file is “new”, which means created using New but not yet saved.
If created using Open, it is not new.
Returns:
true if file was created using New and has not yet been saved, false otherwise.
hasUnsavedEdits
public boolean hasUnsavedEdits()
Determine if file has been modified since last save or, if not yet saved, since
being created using New or Open.
Returns:
true if file has been modified since save or creation, false otherwise.
setPathname
public void setPathname(java.lang.String newPath)
Set full file pathname. See java.io.File(String pathname) for parameter specs.
Parameters:
newPath – the new pathname. If no directory path, getParent() will return null.
setPathname
public void setPathname(java.lang.String parent,
java.lang.String name)
Set full file pathname. See java.io.File(String parent, String child) for parameter specs.
Parameters:
parent – the parent directory of the file. If null, getParent() will return null.
name – the name of the file (no directory path)
getPathname
public java.lang.String getPathname()
Get full file pathname. See java.io.File.getPath()
Returns:
full pathname as a String. Null if
getFilename
public java.lang.String getFilename()
Get file name with no path information. See java.io.File.getName()
Returns:
filename as a String
getParent
public java.lang.String getParent()
Get file parent pathname. See java.io.File.getParent()
Returns:
parent full pathname as a String
updateStaticFileStatus
public void updateStaticFileStatus()
Update static FileStatus fields with values from this FileStatus object
To support legacy code that depends on the static.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsAssembleAllAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsAssembleAllAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsAssembleAllAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsAssembleAllAction
extends GuiAction
Action class for the Settings menu item to determine whether assemble operation applies
only to current file or to all files in its directory.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsAssembleAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsAssembleAllAction
public SettingsAssembleAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FilePrintAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FilePrintAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FilePrintAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FilePrintAction
extends GuiAction
Action for the File -> Print menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FilePrintAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Uses the HardcopyWriter class developed by David Flanagan for the book
“Java Examples in a Nutshell”.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FilePrintAction
public FilePrintAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Uses the HardcopyWriter class developed by David Flanagan for the book
“Java Examples in a Nutshell”. It will do basic printing of multipage
text documents. It displays a print dialog but does not act on any
changes the user may have specified there, such as number of copies.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Parameters:
e – component triggering this call
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileExitAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileExitAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileExitAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileExitAction
extends GuiAction
Action for the File -> Exit menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileExitAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Exit MARS, unless one or more files have unsaved edits and user cancels.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileExitAction
public FileExitAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Exit MARS, unless one or more files have unsaved edits and user cancels.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditSelectAllAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditSelectAllAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditSelectAllAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditSelectAllAction
extends GuiAction
Action for the Edit -> Copy menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditSelectAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditSelectAllAction
public EditSelectAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunToggleBreakpointsAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunToggleBreakpointsAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunToggleBreakpointsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunToggleBreakpointsAction
extends GuiAction
Action class for the Run menu item to clear execution breakpoints that have been set.
It is a listener and is notified whenever a breakpoint is added or removed, thus will
set its enabled status true or false depending on whether breakpoints remain after that action.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunToggleBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create the object and register with text segment window as a listener on its table model.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
When this option is selected, tell text segment window to clear breakpoints in its table model.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunToggleBreakpointsAction
public RunToggleBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create the object and register with text segment window as a listener on its table model.
The table model has not been created yet, so text segment window will hang onto this
registration info and transfer it to the table model upon creation (which happens with
each successful assembly).
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
When this option is selected, tell text segment window to clear breakpoints in its table model.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
HelpAboutAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class HelpAboutAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.HelpAboutAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class HelpAboutAction
extends GuiAction
Action for the Help -> About menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
HelpAboutAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
HelpAboutAction
public HelpAboutAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TextSegmentWindow
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class TextSegmentWindow
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
mars.venus.TextSegmentWindow
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public class TextSegmentWindow
extends javax.swing.JInternalFrame
Creates the Text Segment window in the Execute tab of the UI
Author:
Team JSpim
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
TextSegmentWindow()
Constructor, sets up a new JInternalFrame.
Method Summary
void addProgramArgumentsPanel()
void clearAllBreakpoints()
Clears all breakpoints that have been set since last assemble, and
updates the display of the breakpoint column.
void clearWindow()
remove all components
int getBreakpointCount()
Returns number of breakpoints currently set.
boolean getCodeHighlighting()
Get code highlighting status.
java.lang.String getProgramArguments()
Get program arguments from text field in south border of text segment window.
int[] getSortedBreakPointsArray()
Returns array of current breakpoints, each represented by a MIPS program counter address.
void highlightStepAtAddress(int address)
Highlights the source code line whose address matches the given
text segment address.
void highlightStepAtAddress(int address,
boolean inDelaySlot)
Highlights the source code line whose address matches the given
text segment address.
void highlightStepAtPC()
Highlights the source code line whose address matches the current
program counter value.
void highlightStepAtPC(boolean inDelaySlot)
Highlights the source code line whose address matches the current
program counter value.
void registerTableModelListener(javax.swing.event.TableModelListener tml)
Assign listener to Table model.
void removeProgramArgumentsPanel()
void setCodeHighlighting(boolean highlightSetting)
Used to enable or disable source code highlighting.
void setupTable()
Method to be called once the user compiles the program.
void toggleBreakpoints()
Enable or disable all items in the Breakpoints column.
void unhighlightAllSteps()
If any steps are highlighted, this erases the highlighting.
void updateBasicStatements()
Redisplay the basic statements.
void updateCodeAddresses()
Redisplay the addresses.
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
TextSegmentWindow
public TextSegmentWindow()
Constructor, sets up a new JInternalFrame.
Method Detail
setupTable
public void setupTable()
Method to be called once the user compiles the program.
Should convert the lines of code over to the table rows and columns.
getProgramArguments
public java.lang.String getProgramArguments()
Get program arguments from text field in south border of text segment window.
Returns:
String containing program arguments
addProgramArgumentsPanel
public void addProgramArgumentsPanel()
removeProgramArgumentsPanel
public void removeProgramArgumentsPanel()
clearWindow
public void clearWindow()
remove all components
registerTableModelListener
public void registerTableModelListener(javax.swing.event.TableModelListener tml)
Assign listener to Table model. Used for breakpoints, since that is the only editable
column in the table. Since table model objects are transient (get a new one with each
successful assemble), this method will simply keep the identity of the listener then
add it as a listener each time a new table model object is created. Limit 1 listener.
updateCodeAddresses
public void updateCodeAddresses()
Redisplay the addresses. This should only be done when address display base is
modified (e.g. between base 16 hex and base 10 dec).
updateBasicStatements
public void updateBasicStatements()
Redisplay the basic statements. This should only be done when address or value display base is
modified (e.g. between base 16 hex and base 10 dec).
getBreakpointCount
public int getBreakpointCount()
Returns number of breakpoints currently set.
Returns:
number of current breakpoints
getSortedBreakPointsArray
public int[] getSortedBreakPointsArray()
Returns array of current breakpoints, each represented by a MIPS program counter address.
These are stored in the BREAK_COLUMN of the table model.
Returns:
int array of breakpoints, sorted by PC address, or null if there are none.
clearAllBreakpoints
public void clearAllBreakpoints()
Clears all breakpoints that have been set since last assemble, and
updates the display of the breakpoint column.
highlightStepAtPC
public void highlightStepAtPC()
Highlights the source code line whose address matches the current
program counter value. This is used for stepping through code
execution and when reaching breakpoints.
highlightStepAtPC
public void highlightStepAtPC(boolean inDelaySlot)
Highlights the source code line whose address matches the current
program counter value. This is used for stepping through code
execution and when reaching breakpoints.
Parameters:
inDelaySlot – Set true if delayed branching is enabled and the
instruction at this address is executing in the delay slot, false
otherwise.
highlightStepAtAddress
public void highlightStepAtAddress(int address)
Highlights the source code line whose address matches the given
text segment address.
Parameters:
address – text segment address of instruction to be highlighted.
highlightStepAtAddress
public void highlightStepAtAddress(int address,
boolean inDelaySlot)
Highlights the source code line whose address matches the given
text segment address.
Parameters:
address – Text segment address of instruction to be highlighted.
inDelaySlot – Set true if delayed branching is enabled and the
instruction at this address is executing in the delay slot, false
otherwise.
setCodeHighlighting
public void setCodeHighlighting(boolean highlightSetting)
Used to enable or disable source code highlighting. If true (normally while
stepping through execution) then MIPS statement at current program counter
is highlighted. The code column’s cell renderer tests this variable.
Parameters:
highlightSetting – true to enable highlighting, false to disable.
getCodeHighlighting
public boolean getCodeHighlighting()
Get code highlighting status.
Returns:
true if code highlighting currently enabled, false otherwise.
unhighlightAllSteps
public void unhighlightAllSteps()
If any steps are highlighted, this erases the highlighting.
toggleBreakpoints
public void toggleBreakpoints()
Enable or disable all items in the Breakpoints column.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunGoAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunGoAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunGoAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunGoAction
extends GuiAction
Action class for the Run -> Go menu item (and toolbar icon)
See Also:
Serialized Form
Field Summary
static int defaultMaxSteps
static int maxSteps
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunGoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Action to take when GO is selected — run the MIPS program!
void paused(boolean done,
int pauseReason,
ProcessingException pe)
Method to be called when Pause is selected through menu/toolbar/shortcut.
static void resetMaxSteps()
Reset max steps limit to default value at termination of a simulated execution.
void stopped(ProcessingException pe,
int reason)
Method to be called when Stop is selected through menu/toolbar/shortcut.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
defaultMaxSteps
public static int defaultMaxSteps
maxSteps
public static int maxSteps
Constructor Detail
RunGoAction
public RunGoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Action to take when GO is selected — run the MIPS program!
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
paused
public void paused(boolean done,
int pauseReason,
ProcessingException pe)
Method to be called when Pause is selected through menu/toolbar/shortcut. This should only
happen when MIPS program is running (FileStatus.RUNNING). See VenusUI.java for enabled
status of menu items based on FileStatus. Set GUI as if at breakpoint or executing
step by step.
stopped
public void stopped(ProcessingException pe,
int reason)
Method to be called when Stop is selected through menu/toolbar/shortcut. This should only
happen when MIPS program is running (FileStatus.RUNNING). See VenusUI.java for enabled
status of menu items based on FileStatus. Display finalized values as if execution
terminated due to completion or exception.
resetMaxSteps
public static void resetMaxSteps()
Reset max steps limit to default value at termination of a simulated execution.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ToolAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class ToolAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.ToolAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class ToolAction
extends javax.swing.AbstractAction
Connects a MarsTool class (class that implements MarsTool interface) to
the Mars menu system by supplying the response to that tool’s menu item
selection.
Author:
Pete Sanderson
See Also:
Serialized Form
Field Summary
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
ToolAction(java.lang.Class toolClass,
java.lang.String toolName)
Simple constructor.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Response when tool’s item selected from menu.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ToolAction
public ToolAction(java.lang.Class toolClass,
java.lang.String toolName)
Simple constructor.
Parameters:
toolClass – Class object for the associated MarsTool subclass
toolName – Name of this tool, for the menu.
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Response when tool’s item selected from menu. Invokes tool’s action() method.
Parameters:
e – the ActionEvent that triggered this call
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Coprocessor1Window
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class Coprocessor1Window
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.venus.Coprocessor1Window
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, java.util.Observer, javax.accessibility.Accessible
public class Coprocessor1Window
extends javax.swing.JPanel
implements java.awt.event.ActionListener, java.util.Observer
Sets up a window to display Coprocessor 1 registers in the Registers pane of the UI.
Author:
Pete Sanderson 2005
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Coprocessor1Window()
Constructor which sets up a fresh window with a table that contains the register values.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Called when user clicks on a condition flag checkbox.
void clearHighlighting()
Clear highlight background color from any row currently highlighted.
void clearWindow()
Reset and redisplay registers.
void refresh()
Refresh the table, triggering re-rendering.
java.lang.Object[][] setupWindow()
Sets up the data for the window.
void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface.
void updateDoubleRegisterValue(int number,
int base)
This method handles the updating of the GUI.
void updateFloatRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI.
void updateRegisters()
Redisplay registers using current display number base (10 or 16)
void updateRegisters(int base)
Redisplay registers using specified display number base (10 or 16)
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
Coprocessor1Window
public Coprocessor1Window()
Constructor which sets up a fresh window with a table that contains the register values.
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Called when user clicks on a condition flag checkbox.
Updates both the display and the underlying Coprocessor 1 flag.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e – component that triggered this call
setupWindow
public java.lang.Object[][] setupWindow()
Sets up the data for the window.
Returns:
The array object with the data for the window.
clearWindow
public void clearWindow()
Reset and redisplay registers.
clearHighlighting
public void clearHighlighting()
Clear highlight background color from any row currently highlighted.
refresh
public void refresh()
Refresh the table, triggering re-rendering.
updateRegisters
public void updateRegisters()
Redisplay registers using current display number base (10 or 16)
updateRegisters
public void updateRegisters(int base)
Redisplay registers using specified display number base (10 or 16)
Parameters:
base – number base for display (10 or 16)
updateFloatRegisterValue
public void updateFloatRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI. Does not affect actual register.
Parameters:
number – The number of the float register whose display to update.
val – New value.
base – the number base for display (e.g. 10, 16)
updateDoubleRegisterValue
public void updateDoubleRegisterValue(int number,
int base)
This method handles the updating of the GUI. Does not affect actual register.
Parameters:
number – The number of the double register to update.
base – the number base for display (e.g. 10, 16)
update
public void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface. Called when notified by an Observable that we are registered with.
Observables include:
The Simulator object, which lets us know when it starts and stops running
A register object, which lets us know of register operations
The Simulator keeps us informed of when simulated MIPS execution is active.
This is the only time we care about register operations.
Specified by:
update in interface java.util.Observer
Parameters:
observable – The Observable object who is notifying us
obj – Auxiliary object with additional information.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DataSegmentWindow
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class DataSegmentWindow
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
mars.venus.DataSegmentWindow
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public class DataSegmentWindow
extends javax.swing.JInternalFrame
implements java.util.Observer
Represents the Data Segment window, which is a type of JInternalFrame.
Author:
Sanderson and Bumgarner
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
DataSegmentWindow(NumberDisplayBaseChooser[] choosers)
Constructor for the Data Segment window.
Method Summary
void clearHighlighting()
Clear highlight background color from any cell currently highlighted.
void clearWindow()
Removes the table from its frame, typically done when a file is closed.
void resetMemoryRange()
Reset range of memory addresses to base address of currently selected segment and update display.
void resetValues()
Reset all data display values to 0
void setupTable()
Generates and displays fresh table, typically done upon successful assembly.
void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface.
void updateBaseAddressComboBox()
void updateCell(int address,
int value)
Update data display to show this value (I’m not sure it is being called).
void updateDataAddresses()
Redisplay the addresses.
void updateModelForMemoryRange(int firstAddr)
Update table model with contents of new memory “chunk”.
void updateValues()
Update data display to show all values
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
DataSegmentWindow
public DataSegmentWindow(NumberDisplayBaseChooser[] choosers)
Constructor for the Data Segment window.
Parameters:
choosers – an array of objects used by user to select number display base (10 or 16)
Method Detail
updateBaseAddressComboBox
public void updateBaseAddressComboBox()
setupTable
public void setupTable()
Generates and displays fresh table, typically done upon successful assembly.
clearWindow
public void clearWindow()
Removes the table from its frame, typically done when a file is closed.
clearHighlighting
public void clearHighlighting()
Clear highlight background color from any cell currently highlighted.
updateModelForMemoryRange
public void updateModelForMemoryRange(int firstAddr)
Update table model with contents of new memory “chunk”. Mars supports megabytes of
data segment space so we only plug a “chunk” at a time into the table.
Parameters:
firstAddr – the first address in the memory range to be placed in the model.
updateCell
public void updateCell(int address,
int value)
Update data display to show this value (I’m not sure it is being called).
updateDataAddresses
public void updateDataAddresses()
Redisplay the addresses. This should only be done when address display base is
modified (e.g. between base 16, hex, and base 10, dec).
updateValues
public void updateValues()
Update data display to show all values
resetMemoryRange
public void resetMemoryRange()
Reset range of memory addresses to base address of currently selected segment and update display.
resetValues
public void resetValues()
Reset all data display values to 0
update
public void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface. Called when notified by an Observable that we are registered with.
Observables include:
The Simulator object, which lets us know when it starts and stops running
A delegate of the Memory object, which lets us know of memory operations
The Simulator keeps us informed of when simulated MIPS execution is active.
This is the only time we care about memory operations.
Specified by:
update in interface java.util.Observer
Parameters:
observable – The Observable object who is notifying us
obj – Auxiliary object with additional information.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileNewAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileNewAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileNewAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileNewAction
extends GuiAction
Action for the File -> New menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileNewAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Code to create a new document.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileNewAction
public FileNewAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Code to create a new document. It clears the source code window.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Parameters:
e – component triggering this call
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunAssembleAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunAssembleAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunAssembleAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunAssembleAction
extends GuiAction
Action class for the Run -> Assemble menu item (and toolbar icon)
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunAssembleAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunAssembleAction
public RunAssembleAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditRedoAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditRedoAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditRedoAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditRedoAction
extends GuiAction
Action for the Edit -> Redo menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditRedoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditRedoAction
public EditRedoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsStartAtMainAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsStartAtMainAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsStartAtMainAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsStartAtMainAction
extends GuiAction
Action class for the Settings menu item to control whether or not
assembler warnings are considered errors. If so, a program generating
warnings but not errors will not assemble.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsStartAtMainAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsStartAtMainAction
public SettingsStartAtMainAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditTabbedPane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditTabbedPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
mars.venus.EditTabbedPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class EditTabbedPane
extends javax.swing.JTabbedPane
Tabbed pane for the editor. Each of its tabs represents an open file.
Author:
Sanderson
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
EditTabbedPane(VenusUI appFrame,
Editor editor,
MainPane mainPane)
Constructor for the EditTabbedPane class.
Method Summary
boolean closeAllFiles()
Carries out all necessary operations to implement
the Close All operation from the File menu.
boolean closeCurrentFile()
Carries out all necessary operations to implement
the Close operation from the File menu.
boolean editsSavedOrAbandoned()
Check whether file has unsaved edits and, if so, check with user about saving them.
EditPane getCurrentEditTab()
The current EditPane representing a file.
EditPane getCurrentEditTabForFile(java.io.File file)
If the given file is open in the tabbed pane, make it the
current tab.
EditPane getEditPaneForFile(java.lang.String pathname)
If there is an EditPane for the given file pathname, return it else return null.
void newFile()
Carries out all necessary operations to implement
the New operation from the File menu.
boolean openFile()
Carries out all necessary operations to implement
the Open operation from the File menu.
boolean openFile(java.io.File file)
Carries out all necessary operations to open the
specified file in the editor.
void remove(EditPane editPane)
Remove the pane and update menu status
boolean saveAllFiles()
Saves all files currently open in the editor.
boolean saveAsCurrentFile()
Pops up a dialog box to do “Save As” operation.
boolean saveCurrentFile()
Saves file under existing name.
void setCurrentEditTab(EditPane editPane)
Select the specified EditPane to be the current tab.
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
EditTabbedPane
public EditTabbedPane(VenusUI appFrame,
Editor editor,
MainPane mainPane)
Constructor for the EditTabbedPane class.
Method Detail
getCurrentEditTab
public EditPane getCurrentEditTab()
The current EditPane representing a file. Returns null if
no files open.
Returns:
the current editor pane
setCurrentEditTab
public void setCurrentEditTab(EditPane editPane)
Select the specified EditPane to be the current tab.
Parameters:
editPane – The EditPane tab to become current.
getCurrentEditTabForFile
public EditPane getCurrentEditTabForFile(java.io.File file)
If the given file is open in the tabbed pane, make it the
current tab. If not opened, open it in a new tab and make
it the current tab. If file is unable to be opened,
leave current tab as is.
Parameters:
file – File object for the desired file.
Returns:
EditPane for the specified file, or null if file is unable to be opened in an EditPane
newFile
public void newFile()
Carries out all necessary operations to implement
the New operation from the File menu.
openFile
public boolean openFile()
Carries out all necessary operations to implement
the Open operation from the File menu. This
begins with an Open File dialog.
Returns:
true if file was opened, false otherwise.
openFile
public boolean openFile(java.io.File file)
Carries out all necessary operations to open the
specified file in the editor.
Returns:
true if file was opened, false otherwise.
closeCurrentFile
public boolean closeCurrentFile()
Carries out all necessary operations to implement
the Close operation from the File menu. May return
false, for instance when file has unsaved changes
and user selects Cancel from the warning dialog.
Returns:
true if file was closed, false otherwise.
closeAllFiles
public boolean closeAllFiles()
Carries out all necessary operations to implement
the Close All operation from the File menu.
Returns:
true if files closed, false otherwise.
saveCurrentFile
public boolean saveCurrentFile()
Saves file under existing name. If no name, will invoke Save As.
Returns:
true if the file was actually saved.
saveAsCurrentFile
public boolean saveAsCurrentFile()
Pops up a dialog box to do “Save As” operation. If necessary
an additional overwrite dialog is performed.
Returns:
true if the file was actually saved.
saveAllFiles
public boolean saveAllFiles()
Saves all files currently open in the editor.
Returns:
true if operation succeeded otherwise false.
remove
public void remove(EditPane editPane)
Remove the pane and update menu status
getEditPaneForFile
public EditPane getEditPaneForFile(java.lang.String pathname)
If there is an EditPane for the given file pathname, return it else return null.
Parameters:
pathname – Pathname for desired file
Returns:
the EditPane for this file if it is open in the editor, or null if not.
editsSavedOrAbandoned
public boolean editsSavedOrAbandoned()
Check whether file has unsaved edits and, if so, check with user about saving them.
Returns:
true if no unsaved edits or if user chooses to save them or not; false
if there are unsaved edits and user cancels the operation.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
HardcopyWriter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class HardcopyWriter
java.lang.Object
java.io.Writer
mars.venus.HardcopyWriter
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
public class HardcopyWriter
extends java.io.Writer
Nested Class Summary
static class HardcopyWriter.PrintCanceledException
This is the exception class that the HardcopyWriter constructor
throws when the user clicks “Cancel” in the print dialog box.
Field Summary
protected int charnum
protected int chars_per_line
protected int chars_per_tab
protected int charwidth
protected java.awt.Font font
protected int fontsize
protected java.awt.Font headerfont
protected java.awt.FontMetrics headermetrics
protected int headery
protected int height
protected java.awt.PrintJob job
protected java.lang.String jobname
protected int lineascent
protected int lineheight
protected int linenum
protected int lines_per_page
protected java.awt.FontMetrics metrics
protected java.awt.Graphics page
protected int pagedpi
protected int pagenum
protected java.awt.Dimension pagesize
protected static java.util.Properties printprops
protected java.lang.String time
protected int width
protected int x0
protected int y0
Fields inherited from class java.io.Writer
lock
Constructor Summary
HardcopyWriter(java.awt.Frame frame,
java.lang.String jobname,
int fontsize,
double leftmargin,
double rightmargin,
double topmargin,
double bottommargin)
The constructor for this class has a bunch of arguments:
The frame argument is required for all printing in Java.
Method Summary
void close()
This is the close( ) method that all Writer subclasses must implement.
void flush()
This is the flush( ) method that all Writer subclasses must implement.
int getCharactersPerLine()
Return the number of columns of characters that fit on the page
int getLinesPerPage()
Return the number of lines that fit on a page
static void main(java.lang.String[] args)
A program that prints the specified file using HardcopyWriter
protected void newline()
This internal method begins a new line
protected void newpage()
This internal method begins a new page and prints the header.
void pageBreak()
End the current page.
void setFontStyle(int style)
Set the font style.
void write(char[] buffer,
int index,
int len)
This is the write( ) method of the stream.
Methods inherited from class java.io.Writer
append, append, append, write, write, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
job
protected java.awt.PrintJob job
page
protected java.awt.Graphics page
jobname
protected java.lang.String jobname
fontsize
protected int fontsize
time
protected java.lang.String time
pagesize
protected java.awt.Dimension pagesize
pagedpi
protected int pagedpi
font
protected java.awt.Font font
headerfont
protected java.awt.Font headerfont
metrics
protected java.awt.FontMetrics metrics
headermetrics
protected java.awt.FontMetrics headermetrics
x0
protected int x0
y0
protected int y0
width
protected int width
height
protected int height
headery
protected int headery
charwidth
protected int charwidth
lineheight
protected int lineheight
lineascent
protected int lineascent
chars_per_line
protected int chars_per_line
lines_per_page
protected int lines_per_page
chars_per_tab
protected int chars_per_tab
charnum
protected int charnum
linenum
protected int linenum
pagenum
protected int pagenum
printprops
protected static java.util.Properties printprops
Constructor Detail
HardcopyWriter
public HardcopyWriter(java.awt.Frame frame,
java.lang.String jobname,
int fontsize,
double leftmargin,
double rightmargin,
double topmargin,
double bottommargin)
throws HardcopyWriter.PrintCanceledException
The constructor for this class has a bunch of arguments:
The frame argument is required for all printing in Java.
The jobname appears left justified at the top of each printed page.
The font size is specified in points, as on-screen font sizes are.
The margins are specified in inches (or fractions of inches).
Throws:
HardcopyWriter.PrintCanceledException
Method Detail
write
public void write(char[] buffer,
int index,
int len)
This is the write( ) method of the stream. All Writer subclasses
implement this. All other versions of write( ) are variants of this one
Specified by:
write in class java.io.Writer
flush
public void flush()
This is the flush( ) method that all Writer subclasses must implement.
There is no way to flush a PrintJob without prematurely printing the
page, so we don’t do anything.
Specified by:
flush in interface java.io.Flushable
Specified by:
flush in class java.io.Writer
close
public void close()
This is the close( ) method that all Writer subclasses must implement.
Print the pending page (if any) and terminate the PrintJob.
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Writer
setFontStyle
public void setFontStyle(int style)
Set the font style. The argument should be one of the font style
constants defined by the java.awt.Font class. All subsequent output
will be in that style. This method relies on all styles of the
Monospaced font having the same metrics.
pageBreak
public void pageBreak()
End the current page. Subsequent output will be on a new page.
getCharactersPerLine
public int getCharactersPerLine()
Return the number of columns of characters that fit on the page
getLinesPerPage
public int getLinesPerPage()
Return the number of lines that fit on a page
newline
protected void newline()
This internal method begins a new line
newpage
protected void newpage()
This internal method begins a new page and prints the header.
main
public static void main(java.lang.String[] args)
A program that prints the specified file using HardcopyWriter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsEditorAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsEditorAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsEditorAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsEditorAction
extends GuiAction
Action class for the Settings menu item for text editor settings.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsEditorAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsEditorAction
public SettingsEditorAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction. Has all the GuiAction parameters.
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsMemoryConfigurationAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsMemoryConfigurationAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsMemoryConfigurationAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsMemoryConfigurationAction
extends GuiAction
Action class for the Settings menu item for text editor settings.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsMemoryConfigurationAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsMemoryConfigurationAction
public SettingsMemoryConfigurationAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction. Has all the GuiAction parameters.
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsAddressDisplayBaseAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsAddressDisplayBaseAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsAddressDisplayBaseAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsAddressDisplayBaseAction
extends GuiAction
Action class for the Settings menu item to control number base (10 or 16) of memory addresses.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsAddressDisplayBaseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsAddressDisplayBaseAction
public SettingsAddressDisplayBaseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunResetAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunResetAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunResetAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunResetAction
extends GuiAction
Action for the Run -> Reset menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunResetAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
reset GUI components and MIPS resources
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunResetAction
public RunResetAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
reset GUI components and MIPS resources
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditPasteAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditPasteAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditPasteAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditPasteAction
extends GuiAction
Action for the Edit -> Paste menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditPasteAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditPasteAction
public EditPasteAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileOpenAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileOpenAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileOpenAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileOpenAction
extends GuiAction
Action for the File -> Open menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileOpenAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Launch a file chooser for name of file to open
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileOpenAction
public FileOpenAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Launch a file chooser for name of file to open
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Parameters:
e – component triggering this call
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunPauseAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunPauseAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunPauseAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunPauseAction
extends GuiAction
Action class for the Run -> Pause menu item (and toolbar icon)
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunPauseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunPauseAction
public RunPauseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors
mars.venus.editors
Interfaces
MARSTextEditingArea
TextAreaPainter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class TextAreaPainter
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
mars.venus.editors.jeditsyntax.TextAreaPainter
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.swing.text.TabExpander
public class TextAreaPainter
extends javax.swing.JComponent
implements javax.swing.text.TabExpander
The text area repaint manager. It performs double buffering and paints
lines of text.
Author:
Slava Pestov
See Also:
Serialized Form
Nested Class Summary
static interface TextAreaPainter.Highlight
Highlight interface.
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected boolean blockCaret
protected boolean bracketHighlight
protected java.awt.Color bracketHighlightColor
protected java.awt.Color caretColor
protected int cols
protected java.awt.Color eolMarkerColor
protected boolean eolMarkers
protected java.awt.FontMetrics fm
protected TextAreaPainter.Highlight highlights
protected boolean lineHighlight
protected java.awt.Color lineHighlightColor
protected boolean paintInvalid
protected int rows
protected java.awt.Color selectionColor
protected SyntaxStyle[] styles
protected int tabSize
protected int tabSizeChars
protected JEditTextArea textArea
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
TextAreaPainter(JEditTextArea textArea,
TextAreaDefaults defaults)
Creates a new repaint manager.
Method Summary
void addCustomHighlight(TextAreaPainter.Highlight highlight)
Adds a custom highlight painter.
java.awt.Color getBracketHighlightColor()
Returns the bracket highlight color.
java.awt.Color getCaretColor()
Returns the caret color.
java.awt.Color getEOLMarkerColor()
Returns the EOL marker color.
boolean getEOLMarkersPainted()
Returns true if EOL markers are drawn, false otherwise.
java.awt.FontMetrics getFontMetrics()
Returns the font metrics used by this component.
boolean getInvalidLinesPainted()
Returns true if invalid lines are painted as red tildes (~),
false otherwise.
java.awt.Color getLineHighlightColor()
Returns the line highlight color.
java.awt.Dimension getMinimumSize()
Returns the painter’s minimum size.
java.awt.Dimension getPreferredSize()
Returns the painter’s preferred size.
java.awt.Color getSelectionColor()
Returns the selection color.
SyntaxStyle[] getStyles()
Returns the syntax styles used to paint colorized text.
int getTabSize()
Fetch the tab size in characters.
java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
Returns the tool tip to display at the specified location.
void invalidateLine(int line)
Marks a line as needing a repaint.
void invalidateLineRange(int firstLine,
int lastLine)
Marks a range of lines as needing a repaint.
void invalidateSelectedLines()
Repaints the lines containing the selection.
boolean isBlockCaretEnabled()
Returns true if the caret should be drawn as a block, false otherwise.
boolean isBracketHighlightEnabled()
Returns true if bracket highlighting is enabled, false otherwise.
boolean isLineHighlightEnabled()
Returns true if line highlight is enabled, false otherwise.
boolean isManagingFocus()
Returns if this component can be traversed by pressing the
Tab key.
float nextTabStop(float x,
int tabOffset)
Implementation of TabExpander interface.
void paint(java.awt.Graphics gfx)
Repaints the text.
protected void paintBracketHighlight(java.awt.Graphics gfx,
int line,
int y)
protected void paintCaret(java.awt.Graphics gfx,
int line,
int y)
protected void paintHighlight(java.awt.Graphics gfx,
int line,
int y)
protected void paintLine(java.awt.Graphics gfx,
TokenMarker tokenMarker,
int line,
int x)
protected void paintLineHighlight(java.awt.Graphics gfx,
int line,
int y)
protected void paintPlainLine(java.awt.Graphics gfx,
int line,
java.awt.Font defaultFont,
java.awt.Color defaultColor,
int x,
int y)
protected void paintSyntaxLine(java.awt.Graphics gfx,
TokenMarker tokenMarker,
int line,
java.awt.Font defaultFont,
java.awt.Color defaultColor,
int x,
int y)
void setBlockCaretEnabled(boolean blockCaret)
Sets if the caret should be drawn as a block, false otherwise.
void setBracketHighlightColor(java.awt.Color bracketHighlightColor)
Sets the bracket highlight color.
void setBracketHighlightEnabled(boolean bracketHighlight)
Enables or disables bracket highlighting.
void setCaretColor(java.awt.Color caretColor)
Sets the caret color.
void setEOLMarkerColor(java.awt.Color eolMarkerColor)
Sets the EOL marker color.
void setEOLMarkersPainted(boolean eolMarkers)
Sets if EOL markers are to be drawn.
void setFont(java.awt.Font font)
Sets the font for this component.
void setInvalidLinesPainted(boolean paintInvalid)
Sets if invalid lines are to be painted as red tildes.
void setLineHighlightColor(java.awt.Color lineHighlightColor)
Sets the line highlight color.
void setLineHighlightEnabled(boolean lineHighlight)
Enables or disables current line highlighting.
void setSelectionColor(java.awt.Color selectionColor)
Sets the selection color.
void setStyles(SyntaxStyle[] styles)
Sets the syntax styles used to paint colorized text.
void setTabSize(int size)
Set the tab size in characters.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
textArea
protected JEditTextArea textArea
styles
protected SyntaxStyle[] styles
caretColor
protected java.awt.Color caretColor
selectionColor
protected java.awt.Color selectionColor
lineHighlightColor
protected java.awt.Color lineHighlightColor
bracketHighlightColor
protected java.awt.Color bracketHighlightColor
eolMarkerColor
protected java.awt.Color eolMarkerColor
blockCaret
protected boolean blockCaret
lineHighlight
protected boolean lineHighlight
bracketHighlight
protected boolean bracketHighlight
paintInvalid
protected boolean paintInvalid
eolMarkers
protected boolean eolMarkers
cols
protected int cols
rows
protected int rows
tabSize
protected int tabSize
tabSizeChars
protected int tabSizeChars
fm
protected java.awt.FontMetrics fm
highlights
protected TextAreaPainter.Highlight highlights
Constructor Detail
TextAreaPainter
public TextAreaPainter(JEditTextArea textArea,
TextAreaDefaults defaults)
Creates a new repaint manager. This should be not be called
directly.
Method Detail
isManagingFocus
public final boolean isManagingFocus()
Returns if this component can be traversed by pressing the
Tab key. This returns false.
NOTE: as of Java 1.4 this method is deprecated and no longer
has the desired effect because the focus subsystem does not
call it. I’ve implemented a KeyEventDispatcher in JEditTextArea
to handle Tabs. DPS 12-May-2010
Overrides:
isManagingFocus in class javax.swing.JComponent
getTabSize
public int getTabSize()
Fetch the tab size in characters. DPS 12-May-2010.
Returns:
int tab size in characters
setTabSize
public void setTabSize(int size)
Set the tab size in characters. DPS 12-May-2010.
Originally it was fixed at PlainDocument property
value (8).
Parameters:
size – tab size in characters
getStyles
public final SyntaxStyle[] getStyles()
Returns the syntax styles used to paint colorized text. Entry n
will be used to paint tokens with id = n.
See Also:
org.syntax.jedit.Token
setStyles
public final void setStyles(SyntaxStyle[] styles)
Sets the syntax styles used to paint colorized text. Entry n
will be used to paint tokens with id = n.
Parameters:
styles – The syntax styles
See Also:
org.syntax.jedit.Token
getCaretColor
public final java.awt.Color getCaretColor()
Returns the caret color.
setCaretColor
public final void setCaretColor(java.awt.Color caretColor)
Sets the caret color.
Parameters:
caretColor – The caret color
getSelectionColor
public final java.awt.Color getSelectionColor()
Returns the selection color.
setSelectionColor
public final void setSelectionColor(java.awt.Color selectionColor)
Sets the selection color.
Parameters:
selectionColor – The selection color
getLineHighlightColor
public final java.awt.Color getLineHighlightColor()
Returns the line highlight color.
setLineHighlightColor
public final void setLineHighlightColor(java.awt.Color lineHighlightColor)
Sets the line highlight color.
Parameters:
lineHighlightColor – The line highlight color
isLineHighlightEnabled
public final boolean isLineHighlightEnabled()
Returns true if line highlight is enabled, false otherwise.
setLineHighlightEnabled
public final void setLineHighlightEnabled(boolean lineHighlight)
Enables or disables current line highlighting.
Parameters:
lineHighlight – True if current line highlight should be enabled,
false otherwise
getBracketHighlightColor
public final java.awt.Color getBracketHighlightColor()
Returns the bracket highlight color.
setBracketHighlightColor
public final void setBracketHighlightColor(java.awt.Color bracketHighlightColor)
Sets the bracket highlight color.
Parameters:
bracketHighlightColor – The bracket highlight color
isBracketHighlightEnabled
public final boolean isBracketHighlightEnabled()
Returns true if bracket highlighting is enabled, false otherwise.
When bracket highlighting is enabled, the bracket matching the
one before the caret (if any) is highlighted.
setBracketHighlightEnabled
public final void setBracketHighlightEnabled(boolean bracketHighlight)
Enables or disables bracket highlighting.
When bracket highlighting is enabled, the bracket matching the
one before the caret (if any) is highlighted.
Parameters:
bracketHighlight – True if bracket highlighting should be
enabled, false otherwise
isBlockCaretEnabled
public final boolean isBlockCaretEnabled()
Returns true if the caret should be drawn as a block, false otherwise.
setBlockCaretEnabled
public final void setBlockCaretEnabled(boolean blockCaret)
Sets if the caret should be drawn as a block, false otherwise.
Parameters:
blockCaret – True if the caret should be drawn as a block,
false otherwise.
getEOLMarkerColor
public final java.awt.Color getEOLMarkerColor()
Returns the EOL marker color.
setEOLMarkerColor
public final void setEOLMarkerColor(java.awt.Color eolMarkerColor)
Sets the EOL marker color.
Parameters:
eolMarkerColor – The EOL marker color
getEOLMarkersPainted
public final boolean getEOLMarkersPainted()
Returns true if EOL markers are drawn, false otherwise.
setEOLMarkersPainted
public final void setEOLMarkersPainted(boolean eolMarkers)
Sets if EOL markers are to be drawn.
Parameters:
eolMarkers – True if EOL markers should be drawn, false otherwise
getInvalidLinesPainted
public boolean getInvalidLinesPainted()
Returns true if invalid lines are painted as red tildes (~),
false otherwise.
setInvalidLinesPainted
public void setInvalidLinesPainted(boolean paintInvalid)
Sets if invalid lines are to be painted as red tildes.
Parameters:
paintInvalid – True if invalid lines should be drawn, false otherwise
addCustomHighlight
public void addCustomHighlight(TextAreaPainter.Highlight highlight)
Adds a custom highlight painter.
Parameters:
highlight – The highlight
getToolTipText
public java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
Returns the tool tip to display at the specified location.
Overrides:
getToolTipText in class javax.swing.JComponent
Parameters:
evt – The mouse event
getFontMetrics
public java.awt.FontMetrics getFontMetrics()
Returns the font metrics used by this component.
setFont
public void setFont(java.awt.Font font)
Sets the font for this component. This is overridden to update the
cached font metrics and to recalculate which lines are visible.
Overrides:
setFont in class javax.swing.JComponent
Parameters:
font – The font
paint
public void paint(java.awt.Graphics gfx)
Repaints the text.
Overrides:
paint in class javax.swing.JComponent
Parameters:
gfx – The graphics context
invalidateLine
public final void invalidateLine(int line)
Marks a line as needing a repaint.
Parameters:
line – The line to invalidate
invalidateLineRange
public final void invalidateLineRange(int firstLine,
int lastLine)
Marks a range of lines as needing a repaint.
Parameters:
firstLine – The first line to invalidate
lastLine – The last line to invalidate
invalidateSelectedLines
public final void invalidateSelectedLines()
Repaints the lines containing the selection.
nextTabStop
public float nextTabStop(float x,
int tabOffset)
Implementation of TabExpander interface. Returns next tab stop after
a specified point.
Specified by:
nextTabStop in interface javax.swing.text.TabExpander
Parameters:
x – The x co-ordinate
tabOffset – Ignored
Returns:
The next tab stop after x
getPreferredSize
public java.awt.Dimension getPreferredSize()
Returns the painter’s preferred size.
Overrides:
getPreferredSize in class javax.swing.JComponent
getMinimumSize
public java.awt.Dimension getMinimumSize()
Returns the painter’s minimum size.
Overrides:
getMinimumSize in class javax.swing.JComponent
paintLine
protected void paintLine(java.awt.Graphics gfx,
TokenMarker tokenMarker,
int line,
int x)
paintPlainLine
protected void paintPlainLine(java.awt.Graphics gfx,
int line,
java.awt.Font defaultFont,
java.awt.Color defaultColor,
int x,
int y)
paintSyntaxLine
protected void paintSyntaxLine(java.awt.Graphics gfx,
TokenMarker tokenMarker,
int line,
java.awt.Font defaultFont,
java.awt.Color defaultColor,
int x,
int y)
paintHighlight
protected void paintHighlight(java.awt.Graphics gfx,
int line,
int y)
paintLineHighlight
protected void paintLineHighlight(java.awt.Graphics gfx,
int line,
int y)
paintBracketHighlight
protected void paintBracketHighlight(java.awt.Graphics gfx,
int line,
int y)
paintCaret
protected void paintCaret(java.awt.Graphics gfx,
int line,
int y)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.next_line
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.next_line
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.next_line
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.next_line
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.next_line(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.next_line
public InputHandler.next_line(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.overwrite
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.overwrite
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.overwrite
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.overwrite
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.overwrite()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.overwrite
public InputHandler.overwrite()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyntaxDocument
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class SyntaxDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.PlainDocument
mars.venus.editors.jeditsyntax.SyntaxDocument
All Implemented Interfaces:
java.io.Serializable, javax.swing.text.Document
public class SyntaxDocument
extends javax.swing.text.PlainDocument
A document implementation that can be tokenized by the syntax highlighting
system.
Author:
Slava Pestov
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement
Field Summary
protected TokenMarker tokenMarker
Fields inherited from class javax.swing.text.PlainDocument
lineLimitAttribute, tabSizeAttribute
Fields inherited from class javax.swing.text.AbstractDocument
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName
Fields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
Constructor Summary
SyntaxDocument()
Method Summary
void addUndoableEdit(javax.swing.undo.UndoableEdit edit)
Adds an undoable edit to this document’s undo list.
void beginCompoundEdit()
Starts a compound edit that can be undone in one operation.
void endCompoundEdit()
Ends a compound edit that can be undone in one operation.
protected void fireInsertUpdate(javax.swing.event.DocumentEvent evt)
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
protected void fireRemoveUpdate(javax.swing.event.DocumentEvent evt)
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
TokenMarker getTokenMarker()
Returns the token marker that is to be used to split lines
of this document up into tokens.
void setTokenMarker(TokenMarker tm)
Sets the token marker that is to be used to split lines of
this document up into tokens.
void tokenizeLines()
Reparses the document, by passing all lines to the token
marker.
void tokenizeLines(int start,
int len)
Reparses the document, by passing the specified lines to the
token marker.
Methods inherited from class javax.swing.text.PlainDocument
createDefaultRoot, getDefaultRootElement, getParagraphElement, insertString, insertUpdate, removeUpdate
Methods inherited from class javax.swing.text.AbstractDocument
addDocumentListener, addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, remove, removeDocumentListener, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
tokenMarker
protected TokenMarker tokenMarker
Constructor Detail
SyntaxDocument
public SyntaxDocument()
Method Detail
getTokenMarker
public TokenMarker getTokenMarker()
Returns the token marker that is to be used to split lines
of this document up into tokens. May return null if this
document is not to be colorized.
setTokenMarker
public void setTokenMarker(TokenMarker tm)
Sets the token marker that is to be used to split lines of
this document up into tokens. May throw an exception if
this is not supported for this type of document.
Parameters:
tm – The new token marker
tokenizeLines
public void tokenizeLines()
Reparses the document, by passing all lines to the token
marker. This should be called after the document is first
loaded.
tokenizeLines
public void tokenizeLines(int start,
int len)
Reparses the document, by passing the specified lines to the
token marker. This should be called after a large quantity of
text is first inserted.
Parameters:
start – The first line to parse
len – The number of lines, after the first one to parse
beginCompoundEdit
public void beginCompoundEdit()
Starts a compound edit that can be undone in one operation.
Subclasses that implement undo should override this method;
this class has no undo functionality so this method is
empty.
endCompoundEdit
public void endCompoundEdit()
Ends a compound edit that can be undone in one operation.
Subclasses that implement undo should override this method;
this class has no undo functionality so this method is
empty.
addUndoableEdit
public void addUndoableEdit(javax.swing.undo.UndoableEdit edit)
Adds an undoable edit to this document’s undo list. The edit
should be ignored if something is currently being undone.
Parameters:
edit – The undoable edit
Since:
jEdit 2.2pre1
fireInsertUpdate
protected void fireInsertUpdate(javax.swing.event.DocumentEvent evt)
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
Overrides:
fireInsertUpdate in class javax.swing.text.AbstractDocument
fireRemoveUpdate
protected void fireRemoveUpdate(javax.swing.event.DocumentEvent evt)
We overwrite this method to update the token marker
state immediately so that any event listeners get a
consistent token marker.
Overrides:
fireRemoveUpdate in class javax.swing.text.AbstractDocument
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.backspace_word
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.backspace_word
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.backspace_word
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.backspace_word
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.backspace_word()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.backspace_word
public InputHandler.backspace_word()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
KeywordMap
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class KeywordMap
java.lang.Object
mars.venus.editors.jeditsyntax.KeywordMap
public class KeywordMap
extends java.lang.Object
A KeywordMap is similar to a hashtable in that it maps keys
to values. However, the `keys’ are Swing segments. This allows lookups of
text substrings without the overhead of creating a new string object.
This class is used by CTokenMarker to map keywords to ids.
Author:
Slava Pestov, Mike Dillon
Field Summary
protected int mapLength
Constructor Summary
KeywordMap(boolean ignoreCase)
Creates a new KeywordMap.
KeywordMap(boolean ignoreCase,
int mapLength)
Creates a new KeywordMap.
Method Summary
void add(java.lang.String keyword,
byte id)
Adds a key-value mapping.
boolean getIgnoreCase()
Returns true if the keyword map is set to be case insensitive,
false otherwise.
protected int getSegmentMapKey(javax.swing.text.Segment s,
int off,
int len)
protected int getStringMapKey(java.lang.String s)
byte lookup(javax.swing.text.Segment text,
int offset,
int length)
Looks up a key.
void setIgnoreCase(boolean ignoreCase)
Sets if the keyword map should be case insensitive.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
mapLength
protected int mapLength
Constructor Detail
KeywordMap
public KeywordMap(boolean ignoreCase)
Creates a new KeywordMap.
Parameters:
ignoreCase – True if keys are case insensitive
KeywordMap
public KeywordMap(boolean ignoreCase,
int mapLength)
Creates a new KeywordMap.
Parameters:
ignoreCase – True if the keys are case insensitive
mapLength – The number of `buckets’ to create.
A value of 52 will give good performance for most maps.
Method Detail
lookup
public byte lookup(javax.swing.text.Segment text,
int offset,
int length)
Looks up a key.
Parameters:
text – The text segment
offset – The offset of the substring within the text segment
length – The length of the substring
add
public void add(java.lang.String keyword,
byte id)
Adds a key-value mapping.
Parameters:
keyword – The key
getIgnoreCase
public boolean getIgnoreCase()
Returns true if the keyword map is set to be case insensitive,
false otherwise.
setIgnoreCase
public void setIgnoreCase(boolean ignoreCase)
Sets if the keyword map should be case insensitive.
Parameters:
ignoreCase – True if the keyword map should be case
insensitive, false otherwise
getStringMapKey
protected int getStringMapKey(java.lang.String s)
getSegmentMapKey
protected int getSegmentMapKey(javax.swing.text.Segment s,
int off,
int len)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.prev_page
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.prev_page
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.prev_page
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.prev_page
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.prev_page(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.prev_page
public InputHandler.prev_page(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.insert_tab
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.insert_tab
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.insert_tab
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.insert_tab
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.insert_tab()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.insert_tab
public InputHandler.insert_tab()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
JEditTextArea
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class JEditTextArea
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
mars.venus.editors.jeditsyntax.JEditTextArea
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable
Direct Known Subclasses:
JEditBasedTextArea
public class JEditTextArea
extends javax.swing.JComponent
jEdit’s text area component. It is more suited for editing program
source code than JEditorPane, because it drops the unnecessary features
(images, variable-width lines, and so on) and adds a whole bunch of
useful goodies such as:
More flexible key binding scheme
Supports macro recorders
Rectangular selection
Bracket highlighting
Syntax highlighting
Command repetition
Block caret can be enabled
It is also faster and doesn’t have as many problems. It can be used
in other applications; the only other part of jEdit it depends on is
the syntax package.
To use it in your app, treat it like any other component, for example:
JEditTextArea ta = new JEditTextArea();
ta.setTokenMarker(new JavaTokenMarker());
ta.setText(“public class Test {\n”
+ ” public static void main(String[] args) {\n”
+ ” System.out.println(\”Hello World\”);\n”
+ ” }\n”
+ “}”);
Author:
Slava Pestov
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected boolean biasLeft
protected boolean blink
protected static java.lang.String BOTTOM
protected int bracketLine
protected int bracketPosition
protected int caretBlinkRate
protected boolean caretBlinks
protected mars.venus.editors.jeditsyntax.JEditTextArea.MutableCaretEvent caretEvent
protected static javax.swing.Timer caretTimer
protected boolean caretVisible
protected static java.lang.String CENTER
protected SyntaxDocument document
protected mars.venus.editors.jeditsyntax.JEditTextArea.DocumentHandler documentHandler
protected boolean editable
protected int electricScroll
protected int firstLine
protected static JEditTextArea focusedComponent
protected javax.swing.JScrollBar horizontal
protected int horizontalOffset
protected InputHandler inputHandler
static java.lang.String LEFT_OF_SCROLLBAR
Adding components with this name to the text area will place
them left of the horizontal scroll bar.
protected javax.swing.text.Segment lineSegment
protected javax.swing.event.EventListenerList listenerList
protected int magicCaret
protected boolean overwrite
protected TextAreaPainter painter
protected javax.swing.JPopupMenu popup
protected boolean rectSelect
protected static java.lang.String RIGHT
protected boolean scrollBarsInitialized
protected int selectionEnd
protected int selectionEndLine
protected int selectionStart
protected int selectionStartLine
protected boolean unredoing
protected javax.swing.JScrollBar vertical
protected int visibleLines
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JEditTextArea(javax.swing.JComponent lineNumbers)
Creates a new JEditTextArea with the default settings.
JEditTextArea(TextAreaDefaults defaults,
javax.swing.JComponent lineNumbers)
Method Summary
int _offsetToX(int line,
int offset)
Converts an offset in a line into an x co-ordinate.
void addCaretListener(javax.swing.event.CaretListener listener)
Adds a caret change listener to this text area.
void blinkCaret()
Blinks the caret.
void copy()
Places the selected text into the clipboard.
void cut()
Deletes the selected text from the text area and places it
into the clipboard.
protected void documentChanged(javax.swing.event.DocumentEvent evt)
protected void fireCaretEvent()
java.lang.String getAutoIndent()
Constructs string for auto-indent feature.
int getBracketLine()
Returns the line of the highlighted bracket (the bracket
matching the one before the caret)
int getBracketPosition()
Returns the position of the highlighted bracket (the bracket
matching the one before the caret)
int getCaretLine()
Returns the caret line.
int getCaretPosition()
Returns the caret position.
javax.swing.text.Document getDocument()
Returns the document this text area is editing.
int getDocumentLength()
Returns the length of the document.
int getElectricScroll()
Returns the number of lines from the top and button of the
text area that are always visible.
int getFirstLine()
Returns the line displayed at the text area’s origin.
int getHorizontalOffset()
Returns the horizontal offset of drawn lines.
InputHandler getInputHandler()
Returns the input handler.
java.lang.String getLeadingWhiteSpace()
Makes a copy of leading white space (tab or space) from the current line and
returns it.
int getLineCount()
Returns the number of lines in the document.
int getLineEndOffset(int line)
Returns the end offset of the specified line.
int getLineLength(int line)
Returns the length of the specified line.
int getLineOfOffset(int offset)
Returns the line containing the specified offset.
int getLineStartOffset(int line)
Returns the start offset of the specified line.
java.lang.String getLineText(int lineIndex)
Returns the text on the specified line.
void getLineText(int lineIndex,
javax.swing.text.Segment segment)
Copies the text on the specified line into a segment.
int getMagicCaretPosition()
Returns the `magic’ caret position.
int getMarkLine()
Returns the mark line.
int getMarkPosition()
Returns the mark position.
TextAreaPainter getPainter()
Returns the object responsible for painting this text area.
javax.swing.JPopupMenu getRightClickPopup()
Returns the right click popup menu.
java.lang.String getSelectedText()
Returns the selected text, or null if no selection is active.
int getSelectionEnd()
Returns the selection end offset.
int getSelectionEnd(int line)
Returns the offset where the selection ends on the specified
line.
int getSelectionEndLine()
Returns the selection end line.
int getSelectionStart()
Returns the selection start offset.
int getSelectionStart(int line)
Returns the offset where the selection starts on the specified
line.
int getSelectionStartLine()
Returns the selection start line.
java.lang.String getSyntaxSensitiveToolTipText(int x,
int y)
Return any relevant tool tip text for token at specified position.
java.lang.String getText()
Returns the entire text of this text area.
java.lang.String getText(int start,
int len)
Returns the specified substring of the document.
void getText(int start,
int len,
javax.swing.text.Segment segment)
Copies the specified substring of the document into a segment.
TokenMarker getTokenMarker()
Returns the document’s token marker.
int getVisibleLines()
Returns the number of lines visible in this text area.
boolean isCaretBlinkEnabled()
Returns true if the caret is blinking, false otherwise.
boolean isCaretVisible()
Returns true if the caret is visible, false otherwise.
boolean isEditable()
Returns true if this text area is editable, false otherwise.
boolean isOverwriteEnabled()
Returns true if overwrite mode is enabled, false otherwise.
boolean isSelectionRectangular()
Returns true if the selection is rectangular, false otherwise.
int lineToY(int line)
Converts a line index to a y co-ordinate.
int offsetToX(int line,
int offset)
Converts an offset in a line into an x co-ordinate.
void overwriteSetSelectedText(java.lang.String str)
Similar to setSelectedText(), but overstrikes the
appropriate number of characters if overwrite mode is enabled.
void paste()
Inserts the clipboard contents into the text.
void processKeyEvent(java.awt.event.KeyEvent evt)
Forwards key events directly to the input handler.
void recalculateVisibleLines()
Recalculates the number of visible lines.
void removeCaretListener(javax.swing.event.CaretListener listener)
Removes a caret change listener from this text area.
void removeNotify()
Called by the AWT when this component is removed from it’s parent.
boolean scrollTo(int line,
int offset)
Ensures that the specified line and offset is visible by scrolling
the text area if necessary.
boolean scrollToCaret()
Ensures that the caret is visible by scrolling the text area if
necessary.
void select(int start,
int end)
Selects from the start offset to the end offset.
void selectAll()
Selects all text in the document.
void selectNone()
Moves the mark to the caret position.
void setCaretBlinkEnabled(boolean caretBlinks)
Toggles caret blinking.
void setCaretPosition(int caret)
Sets the caret position.
void setCaretVisible(boolean caretVisible)
Sets if the caret should be visible.
void setDocument(SyntaxDocument document)
Sets the document this text area is editing.
void setEditable(boolean editable)
Sets if this component is editable.
void setElectricScroll(int electricScroll)
Sets the number of lines from the top and bottom of the text
area that are always visible
void setFirstLine(int firstLine)
Sets the line displayed at the text area’s origin and
updates the scroll bars.
void setHorizontalOffset(int horizontalOffset)
Sets the horizontal offset of drawn lines.
void setInputHandler(InputHandler inputHandler)
Sets the input handler.
void setMagicCaretPosition(int magicCaret)
Sets the `magic’ caret position.
boolean setOrigin(int firstLine,
int horizontalOffset)
A fast way of changing both the first line and horizontal
offset.
void setOverwriteEnabled(boolean overwrite)
Sets if overwrite mode should be enabled.
void setRightClickPopup(javax.swing.JPopupMenu popup)
Sets the right click popup menu.
void setSelectedText(java.lang.String selectedText)
Replaces the selection with the specified text.
void setSelectionEnd(int selectionEnd)
Sets the selection end.
void setSelectionRectangular(boolean rectSelect)
Sets if the selection should be rectangular.
void setSelectionStart(int selectionStart)
Sets the selection start.
void setText(java.lang.String text)
Sets the entire text of this text area.
void setTokenMarker(TokenMarker tokenMarker)
Sets the document’s token marker.
protected void updateBracketHighlight(int newCaretPosition)
void updateScrollBars()
Updates the state of the scroll bars.
int xToOffset(int line,
int x)
Converts an x co-ordinate to an offset within a line.
int xyToOffset(int x,
int y)
Converts a point to an offset, from the start of the text.
int yToLine(int y)
Converts a y co-ordinate to a line index.
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
LEFT_OF_SCROLLBAR
public static java.lang.String LEFT_OF_SCROLLBAR
Adding components with this name to the text area will place
them left of the horizontal scroll bar. In jEdit, the status
bar is added this way.
CENTER
protected static java.lang.String CENTER
RIGHT
protected static java.lang.String RIGHT
BOTTOM
protected static java.lang.String BOTTOM
focusedComponent
protected static JEditTextArea focusedComponent
caretTimer
protected static javax.swing.Timer caretTimer
painter
protected TextAreaPainter painter
popup
protected javax.swing.JPopupMenu popup
listenerList
protected javax.swing.event.EventListenerList listenerList
caretEvent
protected mars.venus.editors.jeditsyntax.JEditTextArea.MutableCaretEvent caretEvent
caretBlinks
protected boolean caretBlinks
caretVisible
protected boolean caretVisible
blink
protected boolean blink
editable
protected boolean editable
caretBlinkRate
protected int caretBlinkRate
firstLine
protected int firstLine
visibleLines
protected int visibleLines
electricScroll
protected int electricScroll
horizontalOffset
protected int horizontalOffset
vertical
protected javax.swing.JScrollBar vertical
horizontal
protected javax.swing.JScrollBar horizontal
scrollBarsInitialized
protected boolean scrollBarsInitialized
inputHandler
protected InputHandler inputHandler
document
protected SyntaxDocument document
documentHandler
protected mars.venus.editors.jeditsyntax.JEditTextArea.DocumentHandler documentHandler
lineSegment
protected javax.swing.text.Segment lineSegment
selectionStart
protected int selectionStart
selectionStartLine
protected int selectionStartLine
selectionEnd
protected int selectionEnd
selectionEndLine
protected int selectionEndLine
biasLeft
protected boolean biasLeft
bracketPosition
protected int bracketPosition
bracketLine
protected int bracketLine
magicCaret
protected int magicCaret
overwrite
protected boolean overwrite
rectSelect
protected boolean rectSelect
unredoing
protected boolean unredoing
Constructor Detail
JEditTextArea
public JEditTextArea(javax.swing.JComponent lineNumbers)
Creates a new JEditTextArea with the default settings.
JEditTextArea
public JEditTextArea(TextAreaDefaults defaults,
javax.swing.JComponent lineNumbers)
Method Detail
getPainter
public final TextAreaPainter getPainter()
Returns the object responsible for painting this text area.
getInputHandler
public final InputHandler getInputHandler()
Returns the input handler.
setInputHandler
public void setInputHandler(InputHandler inputHandler)
Sets the input handler.
Parameters:
inputHandler – The new input handler
isCaretBlinkEnabled
public final boolean isCaretBlinkEnabled()
Returns true if the caret is blinking, false otherwise.
setCaretBlinkEnabled
public void setCaretBlinkEnabled(boolean caretBlinks)
Toggles caret blinking.
Parameters:
caretBlinks – True if the caret should blink, false otherwise
isCaretVisible
public final boolean isCaretVisible()
Returns true if the caret is visible, false otherwise.
setCaretVisible
public void setCaretVisible(boolean caretVisible)
Sets if the caret should be visible.
Parameters:
caretVisible – True if the caret should be visible, false
otherwise
blinkCaret
public final void blinkCaret()
Blinks the caret.
getElectricScroll
public final int getElectricScroll()
Returns the number of lines from the top and button of the
text area that are always visible.
setElectricScroll
public final void setElectricScroll(int electricScroll)
Sets the number of lines from the top and bottom of the text
area that are always visible
Parameters:
electricScroll – The number of lines always visible from
the top or bottom
updateScrollBars
public void updateScrollBars()
Updates the state of the scroll bars. This should be called
if the number of lines in the document changes, or when the
size of the text are changes.
getFirstLine
public final int getFirstLine()
Returns the line displayed at the text area’s origin.
setFirstLine
public void setFirstLine(int firstLine)
Sets the line displayed at the text area’s origin and
updates the scroll bars.
getVisibleLines
public final int getVisibleLines()
Returns the number of lines visible in this text area.
recalculateVisibleLines
public final void recalculateVisibleLines()
Recalculates the number of visible lines. This should not
be called directly.
getHorizontalOffset
public final int getHorizontalOffset()
Returns the horizontal offset of drawn lines.
setHorizontalOffset
public void setHorizontalOffset(int horizontalOffset)
Sets the horizontal offset of drawn lines. This can be used to
implement horizontal scrolling.
Parameters:
horizontalOffset – offset The new horizontal offset
setOrigin
public boolean setOrigin(int firstLine,
int horizontalOffset)
A fast way of changing both the first line and horizontal
offset.
Parameters:
firstLine – The new first line
horizontalOffset – The new horizontal offset
Returns:
True if any of the values were changed, false otherwise
scrollToCaret
public boolean scrollToCaret()
Ensures that the caret is visible by scrolling the text area if
necessary.
Returns:
True if scrolling was actually performed, false if the
caret was already visible
scrollTo
public boolean scrollTo(int line,
int offset)
Ensures that the specified line and offset is visible by scrolling
the text area if necessary.
Parameters:
line – The line to scroll to
offset – The offset in the line to scroll to
Returns:
True if scrolling was actually performed, false if the
line and offset was already visible
lineToY
public int lineToY(int line)
Converts a line index to a y co-ordinate.
Parameters:
line – The line
yToLine
public int yToLine(int y)
Converts a y co-ordinate to a line index.
Parameters:
y – The y co-ordinate
offsetToX
public final int offsetToX(int line,
int offset)
Converts an offset in a line into an x co-ordinate. This is a
slow version that can be used any time.
Parameters:
line – The line
offset – The offset, from the start of the line
_offsetToX
public int _offsetToX(int line,
int offset)
Converts an offset in a line into an x co-ordinate. This is a
fast version that should only be used if no changes were made
to the text since the last repaint.
Parameters:
line – The line
offset – The offset, from the start of the line
xToOffset
public int xToOffset(int line,
int x)
Converts an x co-ordinate to an offset within a line.
Parameters:
line – The line
x – The x co-ordinate
xyToOffset
public int xyToOffset(int x,
int y)
Converts a point to an offset, from the start of the text.
Parameters:
x – The x co-ordinate of the point
y – The y co-ordinate of the point
getDocument
public final javax.swing.text.Document getDocument()
Returns the document this text area is editing.
setDocument
public void setDocument(SyntaxDocument document)
Sets the document this text area is editing.
Parameters:
document – The document
getTokenMarker
public final TokenMarker getTokenMarker()
Returns the document’s token marker. Equivalent to calling
getDocument().getTokenMarker().
setTokenMarker
public final void setTokenMarker(TokenMarker tokenMarker)
Sets the document’s token marker. Equivalent to caling
getDocument().setTokenMarker().
Parameters:
tokenMarker – The token marker
getDocumentLength
public final int getDocumentLength()
Returns the length of the document. Equivalent to calling
getDocument().getLength().
getLineCount
public final int getLineCount()
Returns the number of lines in the document.
getLineOfOffset
public final int getLineOfOffset(int offset)
Returns the line containing the specified offset.
Parameters:
offset – The offset
getLineStartOffset
public int getLineStartOffset(int line)
Returns the start offset of the specified line.
Parameters:
line – The line
Returns:
The start offset of the specified line, or -1 if the line is
invalid
getLineEndOffset
public int getLineEndOffset(int line)
Returns the end offset of the specified line.
Parameters:
line – The line
Returns:
The end offset of the specified line, or -1 if the line is
invalid.
getLineLength
public int getLineLength(int line)
Returns the length of the specified line.
Parameters:
line – The line
getText
public java.lang.String getText()
Returns the entire text of this text area.
setText
public void setText(java.lang.String text)
Sets the entire text of this text area.
getText
public final java.lang.String getText(int start,
int len)
Returns the specified substring of the document.
Parameters:
start – The start offset
len – The length of the substring
Returns:
The substring, or null if the offsets are invalid
getText
public final void getText(int start,
int len,
javax.swing.text.Segment segment)
Copies the specified substring of the document into a segment.
If the offsets are invalid, the segment will contain a null string.
Parameters:
start – The start offset
len – The length of the substring
segment – The segment
getLineText
public final java.lang.String getLineText(int lineIndex)
Returns the text on the specified line.
Parameters:
lineIndex – The line
Returns:
The text, or null if the line is invalid
getLineText
public final void getLineText(int lineIndex,
javax.swing.text.Segment segment)
Copies the text on the specified line into a segment. If the line
is invalid, the segment will contain a null string.
Parameters:
lineIndex – The line
getSelectionStart
public final int getSelectionStart()
Returns the selection start offset.
getSelectionStart
public int getSelectionStart(int line)
Returns the offset where the selection starts on the specified
line.
getSelectionStartLine
public final int getSelectionStartLine()
Returns the selection start line.
setSelectionStart
public final void setSelectionStart(int selectionStart)
Sets the selection start. The new selection will be the new
selection start and the old selection end.
Parameters:
selectionStart – The selection start
See Also:
select(int,int)
getSelectionEnd
public final int getSelectionEnd()
Returns the selection end offset.
getSelectionEnd
public int getSelectionEnd(int line)
Returns the offset where the selection ends on the specified
line.
getSelectionEndLine
public final int getSelectionEndLine()
Returns the selection end line.
setSelectionEnd
public final void setSelectionEnd(int selectionEnd)
Sets the selection end. The new selection will be the old
selection start and the new selection end.
Parameters:
selectionEnd – The selection end
See Also:
select(int,int)
getCaretPosition
public final int getCaretPosition()
Returns the caret position. This will either be the selection
start or the selection end, depending on which direction the
selection was made in.
getCaretLine
public final int getCaretLine()
Returns the caret line.
getMarkPosition
public final int getMarkPosition()
Returns the mark position. This will be the opposite selection
bound to the caret position.
See Also:
getCaretPosition()
getMarkLine
public final int getMarkLine()
Returns the mark line.
setCaretPosition
public final void setCaretPosition(int caret)
Sets the caret position. The new selection will consist of the
caret position only (hence no text will be selected)
Parameters:
caret – The caret position
See Also:
select(int,int)
selectAll
public final void selectAll()
Selects all text in the document.
selectNone
public final void selectNone()
Moves the mark to the caret position.
select
public void select(int start,
int end)
Selects from the start offset to the end offset. This is the
general selection method used by all other selecting methods.
The caret position will be start if start < end, and end
if end > start.
Parameters:
start – The start offset
end – The end offset
getSelectedText
public final java.lang.String getSelectedText()
Returns the selected text, or null if no selection is active.
setSelectedText
public void setSelectedText(java.lang.String selectedText)
Replaces the selection with the specified text.
Parameters:
selectedText – The replacement text for the selection
isEditable
public final boolean isEditable()
Returns true if this text area is editable, false otherwise.
setEditable
public final void setEditable(boolean editable)
Sets if this component is editable.
Parameters:
editable – True if this text area should be editable,
false otherwise
getRightClickPopup
public final javax.swing.JPopupMenu getRightClickPopup()
Returns the right click popup menu.
setRightClickPopup
public final void setRightClickPopup(javax.swing.JPopupMenu popup)
Sets the right click popup menu.
Parameters:
popup – The popup
getMagicCaretPosition
public final int getMagicCaretPosition()
Returns the `magic’ caret position. This can be used to preserve
the column position when moving up and down lines.
setMagicCaretPosition
public final void setMagicCaretPosition(int magicCaret)
Sets the `magic’ caret position. This can be used to preserve
the column position when moving up and down lines.
Parameters:
magicCaret – The magic caret position
overwriteSetSelectedText
public void overwriteSetSelectedText(java.lang.String str)
Similar to setSelectedText(), but overstrikes the
appropriate number of characters if overwrite mode is enabled.
Parameters:
str – The string
See Also:
setSelectedText(String),
isOverwriteEnabled()
isOverwriteEnabled
public final boolean isOverwriteEnabled()
Returns true if overwrite mode is enabled, false otherwise.
setOverwriteEnabled
public final void setOverwriteEnabled(boolean overwrite)
Sets if overwrite mode should be enabled.
Parameters:
overwrite – True if overwrite mode should be enabled,
false otherwise.
isSelectionRectangular
public final boolean isSelectionRectangular()
Returns true if the selection is rectangular, false otherwise.
setSelectionRectangular
public final void setSelectionRectangular(boolean rectSelect)
Sets if the selection should be rectangular.
Parameters:
overwrite – True if the selection should be rectangular,
false otherwise.
getBracketPosition
public final int getBracketPosition()
Returns the position of the highlighted bracket (the bracket
matching the one before the caret)
getBracketLine
public final int getBracketLine()
Returns the line of the highlighted bracket (the bracket
matching the one before the caret)
addCaretListener
public final void addCaretListener(javax.swing.event.CaretListener listener)
Adds a caret change listener to this text area.
Parameters:
listener – The listener
removeCaretListener
public final void removeCaretListener(javax.swing.event.CaretListener listener)
Removes a caret change listener from this text area.
Parameters:
listener – The listener
cut
public void cut()
Deletes the selected text from the text area and places it
into the clipboard.
copy
public void copy()
Places the selected text into the clipboard.
paste
public void paste()
Inserts the clipboard contents into the text.
removeNotify
public void removeNotify()
Called by the AWT when this component is removed from it’s parent.
This stops clears the currently focused component.
Overrides:
removeNotify in class javax.swing.JComponent
processKeyEvent
public void processKeyEvent(java.awt.event.KeyEvent evt)
Forwards key events directly to the input handler.
This is slightly faster than using a KeyListener
because some Swing overhead is avoided.
Overrides:
processKeyEvent in class javax.swing.JComponent
fireCaretEvent
protected void fireCaretEvent()
updateBracketHighlight
protected void updateBracketHighlight(int newCaretPosition)
documentChanged
protected void documentChanged(javax.swing.event.DocumentEvent evt)
getSyntaxSensitiveToolTipText
public java.lang.String getSyntaxSensitiveToolTipText(int x,
int y)
Return any relevant tool tip text for token at specified position. Keyword match
must be exact. DPS 24-May-2010
Parameters:
x – x-coordinate of current position
y – y-coordinate of current position
Returns:
String containing appropriate tool tip text. Possibly HTML-encoded.
getAutoIndent
public java.lang.String getAutoIndent()
Constructs string for auto-indent feature. Returns empty string
if auto-intent is disabled or if line has no leading white space.
Uses getLeadingWhiteSpace(). Is used by InputHandler when processing
key press for Enter key. DPS 31-Dec-2010
Returns:
String containing auto-indent characters to be inserted into text
getLeadingWhiteSpace
public java.lang.String getLeadingWhiteSpace()
Makes a copy of leading white space (tab or space) from the current line and
returns it. DPS 31-Dec-2010
Returns:
String containing leading white space of current line. Empty string if none.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.repeat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.repeat
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.repeat
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, InputHandler.NonRecordable
Enclosing class:
InputHandler
public static class InputHandler.repeat
extends java.lang.Object
implements java.awt.event.ActionListener, InputHandler.NonRecordable
Constructor Summary
InputHandler.repeat()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.repeat
public InputHandler.repeat()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.end
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.end
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.end
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.end
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.end(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.end
public InputHandler.end(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.prev_word
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.prev_word
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.prev_word
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.prev_word
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.prev_word(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.prev_word
public InputHandler.prev_word(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TextAreaPainter.Highlight
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Interface TextAreaPainter.Highlight
Enclosing class:
TextAreaPainter
public static interface TextAreaPainter.Highlight
Highlight interface.
Method Summary
java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
Returns the tool tip to display at the specified
location.
void init(JEditTextArea textArea,
TextAreaPainter.Highlight next)
Called after the highlight painter has been added.
void paintHighlight(java.awt.Graphics gfx,
int line,
int y)
This should paint the highlight and delgate to the
next highlight painter.
Method Detail
init
void init(JEditTextArea textArea,
TextAreaPainter.Highlight next)
Called after the highlight painter has been added.
Parameters:
textArea – The text area
next – The painter this one should delegate to
paintHighlight
void paintHighlight(java.awt.Graphics gfx,
int line,
int y)
This should paint the highlight and delgate to the
next highlight painter.
Parameters:
gfx – The graphics context
line – The line number
y – The y co-ordinate of the line
getToolTipText
java.lang.String getToolTipText(java.awt.event.MouseEvent evt)
Returns the tool tip to display at the specified
location. If this highlighter doesn’t know what to
display, it should delegate to the next highlight
painter.
Parameters:
evt – The mouse event
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.backspace
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.backspace
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.backspace
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.backspace
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.backspace()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.backspace
public InputHandler.backspace()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
JEditBasedTextArea
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class JEditBasedTextArea
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
mars.venus.editors.jeditsyntax.JEditTextArea
mars.venus.editors.jeditsyntax.JEditBasedTextArea
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.swing.event.CaretListener, MARSTextEditingArea
public class JEditBasedTextArea
extends JEditTextArea
implements MARSTextEditingArea, javax.swing.event.CaretListener
Adaptor subclass for JEditTextArea
Provides those methods required by the MARSTextEditingArea interface
that are not defined by JEditTextArea. This permits JEditTextArea
to be used within MARS largely without modification. DPS 4-20-2010
Since:
4.0
Author:
Pete Sanderson
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class mars.venus.editors.jeditsyntax.JEditTextArea
biasLeft, blink, BOTTOM, bracketLine, bracketPosition, caretBlinkRate, caretBlinks, caretEvent, caretTimer, caretVisible, CENTER, document, documentHandler, editable, electricScroll, firstLine, focusedComponent, horizontal, horizontalOffset, inputHandler, LEFT_OF_SCROLLBAR, lineSegment, listenerList, magicCaret, overwrite, painter, popup, rectSelect, RIGHT, scrollBarsInitialized, selectionEnd, selectionEndLine, selectionStart, selectionStartLine, unredoing, vertical, visibleLines
Fields inherited from class javax.swing.JComponent
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface mars.venus.editors.MARSTextEditingArea
TEXT_FOUND, TEXT_NOT_FOUND, TEXT_REPLACED_FOUND_NEXT, TEXT_REPLACED_NOT_FOUND_NEXT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
JEditBasedTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
Method Summary
void caretUpdate(javax.swing.event.CaretEvent e)
Display caret position on the edit pane.
void discardAllUndoableEdits()
Get rid of any accumulated undoable edits.
int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string.
int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
java.awt.Font getFont()
java.awt.Component getOuterComponent()
javax.swing.undo.UndoManager getUndoManager()
Returns the undo manager for this editing area
int nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
Returns next posn of word in text – forward search.
void redo()
Redo previous edit
void replaceSelection(java.lang.String replacementText)
Same as setSelectedText but named for compatibility with
JTextComponent method replaceSelection.
void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds.
void setFont(java.awt.Font f)
void setLineHighlightEnabled(boolean highlight)
Use for highlighting the line currently being edited.
void setSelectionVisible(boolean vis)
void setSourceCode(java.lang.String s,
boolean editable)
void setTabSize(int chars)
Set the number of characters a tab will expand to.
void undo()
Undo previous edit
void updateSyntaxStyles()
Update the syntax style table, which is obtained from
SyntaxUtilities.
Methods inherited from class mars.venus.editors.jeditsyntax.JEditTextArea
_offsetToX, addCaretListener, blinkCaret, copy, cut, documentChanged, fireCaretEvent, getAutoIndent, getBracketLine, getBracketPosition, getCaretLine, getCaretPosition, getDocument, getDocumentLength, getElectricScroll, getFirstLine, getHorizontalOffset, getInputHandler, getLeadingWhiteSpace, getLineCount, getLineEndOffset, getLineLength, getLineOfOffset, getLineStartOffset, getLineText, getLineText, getMagicCaretPosition, getMarkLine, getMarkPosition, getPainter, getRightClickPopup, getSelectedText, getSelectionEnd, getSelectionEnd, getSelectionEndLine, getSelectionStart, getSelectionStart, getSelectionStartLine, getSyntaxSensitiveToolTipText, getText, getText, getText, getTokenMarker, getVisibleLines, isCaretBlinkEnabled, isCaretVisible, isEditable, isOverwriteEnabled, isSelectionRectangular, lineToY, offsetToX, overwriteSetSelectedText, paste, processKeyEvent, recalculateVisibleLines, removeCaretListener, removeNotify, scrollTo, scrollToCaret, select, selectAll, selectNone, setCaretBlinkEnabled, setCaretPosition, setCaretVisible, setDocument, setEditable, setElectricScroll, setFirstLine, setHorizontalOffset, setInputHandler, setMagicCaretPosition, setOrigin, setOverwriteEnabled, setRightClickPopup, setSelectedText, setSelectionEnd, setSelectionRectangular, setSelectionStart, setText, setTokenMarker, updateBracketHighlight, updateScrollBars, xToOffset, xyToOffset, yToLine
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mars.venus.editors.MARSTextEditingArea
copy, cut, getCaretPosition, getDocument, getFontMetrics, getSelectedText, getSelectionEnd, getSelectionStart, getText, grabFocus, paste, requestFocusInWindow, revalidate, select, selectAll, setBackground, setCaretPosition, setCaretVisible, setEditable, setEnabled, setSelectionEnd, setSelectionStart, setText
Constructor Detail
JEditBasedTextArea
public JEditBasedTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
Method Detail
setFont
public void setFont(java.awt.Font f)
Specified by:
setFont in interface MARSTextEditingArea
Overrides:
setFont in class javax.swing.JComponent
getFont
public java.awt.Font getFont()
Specified by:
getFont in interface java.awt.MenuContainer
Specified by:
getFont in interface MARSTextEditingArea
Overrides:
getFont in class java.awt.Component
setLineHighlightEnabled
public void setLineHighlightEnabled(boolean highlight)
Use for highlighting the line currently being edited.
Specified by:
setLineHighlightEnabled in interface MARSTextEditingArea
Parameters:
highlight – true to enable line highlighting, false to disable.
setCaretBlinkRate
public void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds. If rate is 0
will disable blinking. If negative, do nothing.
Specified by:
setCaretBlinkRate in interface MARSTextEditingArea
Parameters:
rate – blinking rate in milliseconds
setTabSize
public void setTabSize(int chars)
Set the number of characters a tab will expand to.
Specified by:
setTabSize in interface MARSTextEditingArea
Parameters:
chars – number of characters
updateSyntaxStyles
public void updateSyntaxStyles()
Update the syntax style table, which is obtained from
SyntaxUtilities.
Specified by:
updateSyntaxStyles in interface MARSTextEditingArea
getOuterComponent
public java.awt.Component getOuterComponent()
Specified by:
getOuterComponent in interface MARSTextEditingArea
discardAllUndoableEdits
public void discardAllUndoableEdits()
Get rid of any accumulated undoable edits. It is useful to call
this method after opening a file into the text area. The
act of setting its text content upon reading the file will generate
an undoable edit. Normally you don’t want a freshly-opened file
to appear with its Undo action enabled. But it will unless you
call this after setting the text.
Specified by:
discardAllUndoableEdits in interface MARSTextEditingArea
caretUpdate
public void caretUpdate(javax.swing.event.CaretEvent e)
Display caret position on the edit pane.
Specified by:
caretUpdate in interface javax.swing.event.CaretListener
Parameters:
e – A CaretEvent
replaceSelection
public void replaceSelection(java.lang.String replacementText)
Same as setSelectedText but named for compatibility with
JTextComponent method replaceSelection.
DPS, 14 Apr 2010
Specified by:
replaceSelection in interface MARSTextEditingArea
Parameters:
replacementText – The replacement text for the selection
setSelectionVisible
public void setSelectionVisible(boolean vis)
Specified by:
setSelectionVisible in interface MARSTextEditingArea
setSourceCode
public void setSourceCode(java.lang.String s,
boolean editable)
Specified by:
setSourceCode in interface MARSTextEditingArea
getUndoManager
public javax.swing.undo.UndoManager getUndoManager()
Returns the undo manager for this editing area
Specified by:
getUndoManager in interface MARSTextEditingArea
Returns:
the undo manager
undo
public void undo()
Undo previous edit
Specified by:
undo in interface MARSTextEditingArea
redo
public void redo()
Redo previous edit
Specified by:
redo in interface MARSTextEditingArea
doFindText
public int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string. Search begins
at the current cursor location, and wraps around when the end of the string
is reached.
Specified by:
doFindText in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
caseSensitive – true if search is to be case-sensitive, false otherwise
Returns:
TEXT_FOUND or TEXT_NOT_FOUND, depending on the result.
nextIndex
public int nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
Returns next posn of word in text – forward search. If end of string is
reached during the search, will wrap around to the beginning one time.
Parameters:
input – the string to search
find – the string to find
start – the character position to start the search
caseSensitive – true for case sensitive. false to ignore case
Returns:
next indexed position of found text or -1 if not found
doReplace
public int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
If cursor is initially at end
of matching selection, will immediately replace then find and select the
next occurrence if any. Otherwise it performs a find operation. The replace
can be undone with one undo operation.
Specified by:
doReplace in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
Returns TEXT_FOUND if not initially at end of selected match and matching
occurrence is found. Returns TEXT_NOT_FOUND if the text is not matched.
Returns TEXT_REPLACED_NOT_FOUND_NEXT if replacement is successful but there are
no additional matches. Returns TEXT_REPLACED_FOUND_NEXT if reaplacement is
successful and there is at least one additional match.
doReplaceAll
public int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
All replacements are bundled into one CompoundEdit, so one Undo operation will
undo all of them.
Specified by:
doReplaceAll in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
the number of occurrences that were matched and replaced.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
PopupHelpItem
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class PopupHelpItem
java.lang.Object
mars.venus.editors.jeditsyntax.PopupHelpItem
public class PopupHelpItem
extends java.lang.Object
Handly little class to contain help information for a popupMenu or
tool tip item.
Constructor Summary
PopupHelpItem(java.lang.String tokenText,
java.lang.String example,
java.lang.String description)
Create popup help item, where match is result of an exact-match search.
PopupHelpItem(java.lang.String tokenText,
java.lang.String example,
java.lang.String description,
boolean exact)
Create popup help item.
Method Summary
java.lang.String getDescription()
boolean getExact()
Determines whether match occurred in an exact-match or prefix-match search.
java.lang.String getExample()
int getExampleLength()
java.lang.String getExamplePaddedToLength(int length)
java.lang.String getTokenText()
The document text that mached this item
static int maxExampleLength(java.util.ArrayList matches)
void setDescription(java.lang.String description)
void setExample(java.lang.String example)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
PopupHelpItem
public PopupHelpItem(java.lang.String tokenText,
java.lang.String example,
java.lang.String description,
boolean exact)
Create popup help item. This is created as result of either an exact-match or
prefix-match search. Note that prefix-match search includes exact as well as partial matches.
Parameters:
tokenText – The document text that matched
example – An example instruction
description – A textual description of the instruction
exact – True if match occurred as result of exact-match search, false otherwise.
PopupHelpItem
public PopupHelpItem(java.lang.String tokenText,
java.lang.String example,
java.lang.String description)
Create popup help item, where match is result of an exact-match search.
Parameters:
tokenText – The document text that matched
example – An example instruction
description – A textual description of the instruction
Method Detail
getTokenText
public java.lang.String getTokenText()
The document text that mached this item
getExample
public java.lang.String getExample()
getDescription
public java.lang.String getDescription()
getExact
public boolean getExact()
Determines whether match occurred in an exact-match or prefix-match search.
Note this can return false even if the match is exact because prefix-match also
includes exact match results. E.g. prefix match on “lw” will match both “lwl” and “lw”.
Returns:
True if exact-match search, false otherwise.
getExampleLength
public int getExampleLength()
getExamplePaddedToLength
public java.lang.String getExamplePaddedToLength(int length)
setExample
public void setExample(java.lang.String example)
setDescription
public void setDescription(java.lang.String description)
maxExampleLength
public static int maxExampleLength(java.util.ArrayList matches)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DefaultInputHandler
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class DefaultInputHandler
java.lang.Object
java.awt.event.KeyAdapter
mars.venus.editors.jeditsyntax.InputHandler
mars.venus.editors.jeditsyntax.DefaultInputHandler
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener
public class DefaultInputHandler
extends InputHandler
The default input handler. It maps sequences of keystrokes into actions
and inserts key typed events into the text area.
Author:
Slava Pestov
Nested Class Summary
Nested classes/interfaces inherited from class mars.venus.editors.jeditsyntax.InputHandler
InputHandler.backspace, InputHandler.backspace_word, InputHandler.clip_copy, InputHandler.clip_cut, InputHandler.clip_paste, InputHandler.delete, InputHandler.delete_word, InputHandler.document_end, InputHandler.document_home, InputHandler.end, InputHandler.home, InputHandler.insert_break, InputHandler.insert_char, InputHandler.insert_tab, InputHandler.MacroRecorder, InputHandler.next_char, InputHandler.next_line, InputHandler.next_page, InputHandler.next_word, InputHandler.NonRecordable, InputHandler.NonRepeatable, InputHandler.overwrite, InputHandler.prev_char, InputHandler.prev_line, InputHandler.prev_page, InputHandler.prev_word, InputHandler.repeat, InputHandler.select_all, InputHandler.toggle_rect, InputHandler.Wrapper
Field Summary
Fields inherited from class mars.venus.editors.jeditsyntax.InputHandler
BACKSPACE, BACKSPACE_WORD, CLIP_COPY, CLIP_CUT, CLIP_PASTE, DELETE, DELETE_WORD, DOCUMENT_END, DOCUMENT_HOME, END, grabAction, HOME, INSERT_BREAK, INSERT_CHAR, INSERT_TAB, NEXT_CHAR, NEXT_LINE, NEXT_PAGE, NEXT_WORD, OVERWRITE, PREV_CHAR, PREV_LINE, PREV_PAGE, PREV_WORD, recorder, repeat, REPEAT, repeatCount, SELECT_ALL, SELECT_DOC_END, SELECT_DOC_HOME, SELECT_END, SELECT_HOME, SELECT_NEXT_CHAR, SELECT_NEXT_LINE, SELECT_NEXT_PAGE, SELECT_NEXT_WORD, SELECT_PREV_CHAR, SELECT_PREV_LINE, SELECT_PREV_PAGE, SELECT_PREV_WORD, SMART_HOME_END_PROPERTY, TOGGLE_RECT
Constructor Summary
DefaultInputHandler()
Creates a new input handler with no key bindings defined.
Method Summary
void addDefaultKeyBindings()
Sets up the default key bindings.
void addKeyBinding(java.lang.String keyBinding,
java.awt.event.ActionListener action)
Adds a key binding to this input handler.
InputHandler copy()
Returns a copy of this input handler that shares the same
key bindings.
void keyPressed(java.awt.event.KeyEvent evt)
Handle a key pressed event.
void keyTyped(java.awt.event.KeyEvent evt)
Handle a key typed event.
static javax.swing.KeyStroke parseKeyStroke(java.lang.String keyStroke)
Converts a string to a keystroke.
void removeAllKeyBindings()
Removes all key bindings from this input handler.
void removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler.
Methods inherited from class mars.venus.editors.jeditsyntax.InputHandler
executeAction, getAction, getActionName, getActions, getMacroRecorder, getRepeatCount, getTextArea, grabNextKeyStroke, handleGrabAction, isRepeatEnabled, setMacroRecorder, setRepeatCount, setRepeatEnabled
Methods inherited from class java.awt.event.KeyAdapter
keyReleased
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
DefaultInputHandler
public DefaultInputHandler()
Creates a new input handler with no key bindings defined.
Method Detail
addDefaultKeyBindings
public void addDefaultKeyBindings()
Sets up the default key bindings.
Specified by:
addDefaultKeyBindings in class InputHandler
addKeyBinding
public void addKeyBinding(java.lang.String keyBinding,
java.awt.event.ActionListener action)
Adds a key binding to this input handler. The key binding is
a list of white space separated key strokes of the form
[modifiers+]key where modifier is C for Control, A for Alt,
or S for Shift, and key is either a character (a-z) or a field
name in the KeyEvent class prefixed with VK_ (e.g., BACK_SPACE)
Specified by:
addKeyBinding in class InputHandler
Parameters:
keyBinding – The key binding
action – The action
removeKeyBinding
public void removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler. This is not yet
implemented.
Specified by:
removeKeyBinding in class InputHandler
Parameters:
keyBinding – The key binding
removeAllKeyBindings
public void removeAllKeyBindings()
Removes all key bindings from this input handler.
Specified by:
removeAllKeyBindings in class InputHandler
copy
public InputHandler copy()
Returns a copy of this input handler that shares the same
key bindings. Setting key bindings in the copy will also
set them in the original.
Specified by:
copy in class InputHandler
keyPressed
public void keyPressed(java.awt.event.KeyEvent evt)
Handle a key pressed event. This will look up the binding for
the key stroke and execute it.
Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class java.awt.event.KeyAdapter
keyTyped
public void keyTyped(java.awt.event.KeyEvent evt)
Handle a key typed event. This inserts the key into the text area.
Specified by:
keyTyped in interface java.awt.event.KeyListener
Overrides:
keyTyped in class java.awt.event.KeyAdapter
parseKeyStroke
public static javax.swing.KeyStroke parseKeyStroke(java.lang.String keyStroke)
Converts a string to a keystroke. The string should be of the
form modifiers+shortcut where modifiers
is any combination of A for Alt, C for Control, S for Shift
or M for Meta, and shortcut is either a single character,
or a keycode name from the KeyEvent class, without
the VK_ prefix.
Parameters:
keyStroke – A string description of the key stroke
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TokenMarker
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker
Class TokenMarker
java.lang.Object
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
Direct Known Subclasses:
MIPSTokenMarker
public abstract class TokenMarker
extends java.lang.Object
A token marker that splits lines of text into tokens. Each token carries
a length field and an indentification tag that can be mapped to a color
for painting that token.
For performance reasons, the linked list of tokens is reused after each
line is tokenized. Therefore, the return value of markTokens
should only be used for immediate painting. Notably, it cannot be
cached.
Author:
Slava Pestov
See Also:
org.syntax.jedit.Token
Nested Class Summary
class TokenMarker.LineInfo
Inner class for storing information about tokenized lines.
Field Summary
protected Token firstToken
The first token in the list.
protected int lastLine
The last tokenized line.
protected Token lastToken
The last token in the list.
protected int length
The number of lines in the model being tokenized.
protected TokenMarker.LineInfo[] lineInfo
An array for storing information about lines.
protected boolean nextLineRequested
True if the next line should be painted.
Constructor Summary
protected TokenMarker()
Creates a new TokenMarker.
Method Summary
protected void addToken(int length,
byte id)
Adds a token to the token list.
void deleteLines(int index,
int lines)
Informs the token marker that line have been deleted from
the document.
protected void ensureCapacity(int index)
Ensures that the lineInfo array can contain the
specified index.
int getLineCount()
Returns the number of lines in this token marker.
java.util.ArrayList getTokenExactMatchHelp(Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token.
java.util.ArrayList getTokenPrefixMatchHelp(java.lang.String line,
Token tokenList,
Token tokenAtOffset,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token or “token prefix”.
void insertLines(int index,
int lines)
Informs the token marker that lines have been inserted into
the document.
boolean isNextLineRequested()
Returns true if the next line should be repainted.
Token markTokens(javax.swing.text.Segment line,
int lineIndex)
A wrapper for the lower-level markTokensImpl method
that is called to split a line up into tokens.
protected abstract byte markTokensImpl(byte token,
javax.swing.text.Segment line,
int lineIndex)
An abstract method that splits a line up into tokens.
boolean supportsMultilineTokens()
Returns if the token marker supports tokens that span multiple
lines.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
firstToken
protected Token firstToken
The first token in the list. This should be used as the return
value from markTokens().
lastToken
protected Token lastToken
The last token in the list. New tokens are added here.
This should be set to null before a new line is to be tokenized.
lineInfo
protected TokenMarker.LineInfo[] lineInfo
An array for storing information about lines. It is enlarged and
shrunk automatically by the insertLines() and
deleteLines() methods.
length
protected int length
The number of lines in the model being tokenized. This can be
less than the length of the lineInfo array.
lastLine
protected int lastLine
The last tokenized line.
nextLineRequested
protected boolean nextLineRequested
True if the next line should be painted.
Constructor Detail
TokenMarker
protected TokenMarker()
Creates a new TokenMarker. This DOES NOT create
a lineInfo array; an initial call to insertLines()
does that.
Method Detail
markTokens
public Token markTokens(javax.swing.text.Segment line,
int lineIndex)
A wrapper for the lower-level markTokensImpl method
that is called to split a line up into tokens.
Parameters:
line – The line
lineIndex – The line number
markTokensImpl
protected abstract byte markTokensImpl(byte token,
javax.swing.text.Segment line,
int lineIndex)
An abstract method that splits a line up into tokens. It
should parse the line, and call addToken() to
add syntax tokens to the token list. Then, it should return
the initial token type for the next line.
For example if the current line contains the start of a
multiline comment that doesn’t end on that line, this method
should return the comment token type so that it continues on
the next line.
Parameters:
token – The initial token type for this line
line – The line to be tokenized
lineIndex – The index of the line in the document, starting at 0
Returns:
The initial token type for the next line
supportsMultilineTokens
public boolean supportsMultilineTokens()
Returns if the token marker supports tokens that span multiple
lines. If this is true, the object using this token marker is
required to pass all lines in the document to the
markTokens() method (in turn).
The default implementation returns true; it should be overridden
to return false on simpler token markers for increased speed.
insertLines
public void insertLines(int index,
int lines)
Informs the token marker that lines have been inserted into
the document. This inserts a gap in the lineInfo
array.
Parameters:
index – The first line number
lines – The number of lines
deleteLines
public void deleteLines(int index,
int lines)
Informs the token marker that line have been deleted from
the document. This removes the lines in question from the
lineInfo array.
Parameters:
index – The first line number
lines – The number of lines
getLineCount
public int getLineCount()
Returns the number of lines in this token marker.
isNextLineRequested
public boolean isNextLineRequested()
Returns true if the next line should be repainted. This
will return true after a line has been tokenized that starts
a multiline token that continues onto the next line.
getTokenExactMatchHelp
public java.util.ArrayList getTokenExactMatchHelp(Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token. This default definition returns null;
override it in language-specific subclasses.
Parameters:
token – the pertinent Token object
tokenText – the source String that matched to the token
Returns:
ArrayList containing PopupHelpItem objects, one per match.
getTokenPrefixMatchHelp
public java.util.ArrayList getTokenPrefixMatchHelp(java.lang.String line,
Token tokenList,
Token tokenAtOffset,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token or “token prefix”. Will match instruction prefixes, e.g. “s” matches “sw”.
This default definition returns null;
override it in language-specific subclasses.
Parameters:
line – String containing current line
tokenList – first Token on the current line
token – the pertinent Token object
tokenText – the source String that matched to the token
Returns:
ArrayList containing PopupHelpItem objects, one per match.
ensureCapacity
protected void ensureCapacity(int index)
Ensures that the lineInfo array can contain the
specified index. This enlarges it if necessary. No action is
taken if the array is large enough already.
It should be unnecessary to call this under normal
circumstances; insertLine() should take care of
enlarging the line info array automatically.
Parameters:
index – The array index
addToken
protected void addToken(int length,
byte id)
Adds a token to the token list.
Parameters:
length – The length of the token
id – The id of the token
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MIPSTokenMarker
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker
Class MIPSTokenMarker
java.lang.Object
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
public class MIPSTokenMarker
extends TokenMarker
MIPS token marker.
Author:
Pete Sanderson (2010) and Slava Pestov (1999)
Nested Class Summary
Nested classes/interfaces inherited from class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
TokenMarker.LineInfo
Field Summary
Fields inherited from class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
firstToken, lastLine, lastToken, length, lineInfo, nextLineRequested
Constructor Summary
MIPSTokenMarker()
MIPSTokenMarker(KeywordMap keywords)
Method Summary
static KeywordMap getKeywords()
Get KeywordMap containing all MIPS key words.
static java.lang.String[] getMIPSTokenExamples()
static java.lang.String[] getMIPSTokenLabels()
java.util.ArrayList getTokenExactMatchHelp(Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token.
java.util.ArrayList getTokenPrefixMatchHelp(java.lang.String line,
Token tokenList,
Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
prefix match based on current line’s token list.
byte markTokensImpl(byte token,
javax.swing.text.Segment line,
int lineIndex)
An abstract method that splits a line up into tokens.
Methods inherited from class mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker
addToken, deleteLines, ensureCapacity, getLineCount, insertLines, isNextLineRequested, markTokens, supportsMultilineTokens
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MIPSTokenMarker
public MIPSTokenMarker()
MIPSTokenMarker
public MIPSTokenMarker(KeywordMap keywords)
Method Detail
getMIPSTokenLabels
public static java.lang.String[] getMIPSTokenLabels()
getMIPSTokenExamples
public static java.lang.String[] getMIPSTokenExamples()
markTokensImpl
public byte markTokensImpl(byte token,
javax.swing.text.Segment line,
int lineIndex)
Description copied from class: TokenMarker
An abstract method that splits a line up into tokens. It
should parse the line, and call addToken() to
add syntax tokens to the token list. Then, it should return
the initial token type for the next line.
For example if the current line contains the start of a
multiline comment that doesn’t end on that line, this method
should return the comment token type so that it continues on
the next line.
Specified by:
markTokensImpl in class TokenMarker
Parameters:
token – The initial token type for this line
line – The line to be tokenized
lineIndex – The index of the line in the document, starting at 0
Returns:
The initial token type for the next line
getTokenExactMatchHelp
public java.util.ArrayList getTokenExactMatchHelp(Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
the given token.
Overrides:
getTokenExactMatchHelp in class TokenMarker
Parameters:
token – the pertinent Token object
tokenText – the source String that matched to the token
Returns:
ArrayList of PopupHelpItem objects, one per match.
getTokenPrefixMatchHelp
public java.util.ArrayList getTokenPrefixMatchHelp(java.lang.String line,
Token tokenList,
Token token,
java.lang.String tokenText)
Construct and return any appropriate help information for
prefix match based on current line’s token list.
Overrides:
getTokenPrefixMatchHelp in class TokenMarker
Parameters:
line – String containing current line
tokenList – first Token on current line (head of linked list)
token – the pertinent Token object
tokenText – the source String that matched to the token in previous parameter
Returns:
ArrayList of PopupHelpItem objects, one per match.
getKeywords
public static KeywordMap getKeywords()
Get KeywordMap containing all MIPS key words. This includes all instruction mnemonics,
assembler directives, and register names.
Returns:
KeywordMap where key is the keyword and associated value is the token type (e.g. Token.KEYWORD1).
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker
mars.venus.editors.jeditsyntax.tokenmarker
Classes
MIPSTokenMarker
Token
TokenMarker
mars.venus.editors.jeditsyntax.tokenmarker
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.venus.editors.jeditsyntax.tokenmarker
Class Summary
MIPSTokenMarker MIPS token marker.
Token A linked list of tokens.
TokenMarker A token marker that splits lines of text into tokens.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
TokenMarker.LineInfo
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker
Class TokenMarker.LineInfo
java.lang.Object
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
Enclosing class:
TokenMarker
public class TokenMarker.LineInfo
extends java.lang.Object
Inner class for storing information about tokenized lines.
Field Summary
java.lang.Object obj
This is for use by the token marker implementations
themselves.
byte token
The id of the last token of the line.
Constructor Summary
TokenMarker.LineInfo()
Creates a new LineInfo object with token = Token.NULL
and obj = null.
TokenMarker.LineInfo(byte token,
java.lang.Object obj)
Creates a new LineInfo object with the specified
parameters.
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
token
public byte token
The id of the last token of the line.
obj
public java.lang.Object obj
This is for use by the token marker implementations
themselves. It can be used to store anything that
is an object and that needs to exist on a per-line
basis.
Constructor Detail
TokenMarker.LineInfo
public TokenMarker.LineInfo()
Creates a new LineInfo object with token = Token.NULL
and obj = null.
TokenMarker.LineInfo
public TokenMarker.LineInfo(byte token,
java.lang.Object obj)
Creates a new LineInfo object with the specified
parameters.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.venus.editors.jeditsyntax.tokenmarker
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.venus.editors.jeditsyntax.tokenmarker.Token
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker mars.venus.editors.jeditsyntax.tokenmarker.MIPSTokenMarker
mars.venus.editors.jeditsyntax.tokenmarker.TokenMarker.LineInfo
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Token
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax.tokenmarker
Class Token
java.lang.Object
mars.venus.editors.jeditsyntax.tokenmarker.Token
public class Token
extends java.lang.Object
A linked list of tokens. Each token has three fields – a token
identifier, which is a byte value that can be looked up in the
array returned by SyntaxDocument.getColors()
to get a color value, a length value which is the length of the
token in the text, and a pointer to the next token in the list.
Author:
Slava Pestov
Field Summary
static byte COMMENT1
Comment 1 token id.
static byte COMMENT2
Comment 2 token id.
static byte END
The token type, that along with a length of 0
marks the end of the token list.
byte id
The id of this token.
static byte ID_COUNT
The total number of defined token ids.
static byte INTERNAL_FIRST
The first id that can be used for internal state
in a token marker.
static byte INTERNAL_LAST
The last id that can be used for internal state
in a token marker.
static byte INVALID
Invalid token id.
static byte KEYWORD1
Keyword 1 token id.
static byte KEYWORD2
Keyword 2 token id.
static byte KEYWORD3
Keyword 3 token id.
static byte LABEL
Label token id.
int length
The length of this token.
static byte LITERAL1
Literal 1 token id.
static byte LITERAL2
Literal 2 token id.
static byte MACRO_ARG
Macro parameter token.
Token next
The next token in the linked list.
static byte NULL
Normal text token id.
static byte OPERATOR
Operator token id.
Constructor Summary
Token(int length,
byte id)
Creates a new token.
Method Summary
java.lang.String toString()
Returns a string representation of this token.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
NULL
public static final byte NULL
Normal text token id. This should be used to mark
normal text.
See Also:
Constant Field Values
COMMENT1
public static final byte COMMENT1
Comment 1 token id. This can be used to mark a comment.
See Also:
Constant Field Values
COMMENT2
public static final byte COMMENT2
Comment 2 token id. This can be used to mark a comment.
See Also:
Constant Field Values
LITERAL1
public static final byte LITERAL1
Literal 1 token id. This can be used to mark a string
literal (eg, C mode uses this to mark “…” literals)
See Also:
Constant Field Values
LITERAL2
public static final byte LITERAL2
Literal 2 token id. This can be used to mark an object
literal (eg, Java mode uses this to mark true, false, etc)
See Also:
Constant Field Values
LABEL
public static final byte LABEL
Label token id. This can be used to mark labels
(eg, C mode uses this to mark …: sequences)
See Also:
Constant Field Values
KEYWORD1
public static final byte KEYWORD1
Keyword 1 token id. This can be used to mark a
keyword. This should be used for general language
constructs.
See Also:
Constant Field Values
KEYWORD2
public static final byte KEYWORD2
Keyword 2 token id. This can be used to mark a
keyword. This should be used for preprocessor
commands, or variables.
See Also:
Constant Field Values
KEYWORD3
public static final byte KEYWORD3
Keyword 3 token id. This can be used to mark a
keyword. This should be used for data types.
See Also:
Constant Field Values
OPERATOR
public static final byte OPERATOR
Operator token id. This can be used to mark an
operator. (eg, SQL mode marks +, -, etc with this
token type)
See Also:
Constant Field Values
INVALID
public static final byte INVALID
Invalid token id. This can be used to mark invalid
or incomplete tokens, so the user can easily spot
syntax errors.
See Also:
Constant Field Values
MACRO_ARG
public static final byte MACRO_ARG
Macro parameter token. Added for MARS 4.3.
See Also:
Constant Field Values
ID_COUNT
public static final byte ID_COUNT
The total number of defined token ids.
See Also:
Constant Field Values
INTERNAL_FIRST
public static final byte INTERNAL_FIRST
The first id that can be used for internal state
in a token marker.
See Also:
Constant Field Values
INTERNAL_LAST
public static final byte INTERNAL_LAST
The last id that can be used for internal state
in a token marker.
See Also:
Constant Field Values
END
public static final byte END
The token type, that along with a length of 0
marks the end of the token list.
See Also:
Constant Field Values
length
public int length
The length of this token.
id
public byte id
The id of this token.
next
public Token next
The next token in the linked list.
Constructor Detail
Token
public Token(int length,
byte id)
Creates a new token.
Parameters:
length – The length of the token
id – The id of the token
Method Detail
toString
public java.lang.String toString()
Returns a string representation of this token.
Overrides:
toString in class java.lang.Object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.NonRepeatable
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Interface InputHandler.NonRepeatable
All Known Implementing Classes:
InputHandler.insert_char
Enclosing class:
InputHandler
public static interface InputHandler.NonRepeatable
If an action implements this interface, it should not be repeated.
Instead, it will handle the repetition itself.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.next_char
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.next_char
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.next_char
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.next_char
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.next_char(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.next_char
public InputHandler.next_char(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.prev_char
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.prev_char
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.prev_char
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.prev_char
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.prev_char(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.prev_char
public InputHandler.prev_char(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.clip_paste
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.clip_paste
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.clip_paste
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.clip_paste
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.clip_paste()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.clip_paste
public InputHandler.clip_paste()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler
java.lang.Object
java.awt.event.KeyAdapter
mars.venus.editors.jeditsyntax.InputHandler
All Implemented Interfaces:
java.awt.event.KeyListener, java.util.EventListener
Direct Known Subclasses:
DefaultInputHandler
public abstract class InputHandler
extends java.awt.event.KeyAdapter
An input handler converts the user’s key strokes into concrete actions.
It also takes care of macro recording and action repetition.
This class provides all the necessary support code for an input
handler, but doesn’t actually do any key binding logic. It is up
to the implementations of this class to do so.
Author:
Slava Pestov
See Also:
08/12/2002 Clipboard actions (Oliver Henning)
Nested Class Summary
static class InputHandler.backspace
static class InputHandler.backspace_word
static class InputHandler.clip_copy
static class InputHandler.clip_cut
static class InputHandler.clip_paste
static class InputHandler.delete
static class InputHandler.delete_word
static class InputHandler.document_end
static class InputHandler.document_home
static class InputHandler.end
static class InputHandler.home
static class InputHandler.insert_break
static class InputHandler.insert_char
static class InputHandler.insert_tab
static interface InputHandler.MacroRecorder
Macro recorder.
static class InputHandler.next_char
static class InputHandler.next_line
static class InputHandler.next_page
static class InputHandler.next_word
static interface InputHandler.NonRecordable
If an action implements this interface, it should not be recorded
by the macro recorder.
static interface InputHandler.NonRepeatable
If an action implements this interface, it should not be repeated.
static class InputHandler.overwrite
static class InputHandler.prev_char
static class InputHandler.prev_line
static class InputHandler.prev_page
static class InputHandler.prev_word
static class InputHandler.repeat
static class InputHandler.select_all
static class InputHandler.toggle_rect
static interface InputHandler.Wrapper
For use by EditAction.Wrapper only.
Field Summary
static java.awt.event.ActionListener BACKSPACE
static java.awt.event.ActionListener BACKSPACE_WORD
static java.awt.event.ActionListener CLIP_COPY
static java.awt.event.ActionListener CLIP_CUT
static java.awt.event.ActionListener CLIP_PASTE
static java.awt.event.ActionListener DELETE
static java.awt.event.ActionListener DELETE_WORD
static java.awt.event.ActionListener DOCUMENT_END
static java.awt.event.ActionListener DOCUMENT_HOME
static java.awt.event.ActionListener END
protected java.awt.event.ActionListener grabAction
static java.awt.event.ActionListener HOME
static java.awt.event.ActionListener INSERT_BREAK
static java.awt.event.ActionListener INSERT_CHAR
static java.awt.event.ActionListener INSERT_TAB
static java.awt.event.ActionListener NEXT_CHAR
static java.awt.event.ActionListener NEXT_LINE
static java.awt.event.ActionListener NEXT_PAGE
static java.awt.event.ActionListener NEXT_WORD
static java.awt.event.ActionListener OVERWRITE
static java.awt.event.ActionListener PREV_CHAR
static java.awt.event.ActionListener PREV_LINE
static java.awt.event.ActionListener PREV_PAGE
static java.awt.event.ActionListener PREV_WORD
protected InputHandler.MacroRecorder recorder
protected boolean repeat
static java.awt.event.ActionListener REPEAT
protected int repeatCount
static java.awt.event.ActionListener SELECT_ALL
static java.awt.event.ActionListener SELECT_DOC_END
static java.awt.event.ActionListener SELECT_DOC_HOME
static java.awt.event.ActionListener SELECT_END
static java.awt.event.ActionListener SELECT_HOME
static java.awt.event.ActionListener SELECT_NEXT_CHAR
static java.awt.event.ActionListener SELECT_NEXT_LINE
static java.awt.event.ActionListener SELECT_NEXT_PAGE
static java.awt.event.ActionListener SELECT_NEXT_WORD
static java.awt.event.ActionListener SELECT_PREV_CHAR
static java.awt.event.ActionListener SELECT_PREV_LINE
static java.awt.event.ActionListener SELECT_PREV_PAGE
static java.awt.event.ActionListener SELECT_PREV_WORD
static java.lang.String SMART_HOME_END_PROPERTY
If this client property is set to Boolean.TRUE on the text area,
the home/end keys will support ‘smart’ BRIEF-like behaviour
(one press = start/end of line, two presses = start/end of
viewscreen, three presses = start/end of document).
static java.awt.event.ActionListener TOGGLE_RECT
Constructor Summary
InputHandler()
Method Summary
abstract void addDefaultKeyBindings()
Adds the default key bindings to this input handler.
abstract void addKeyBinding(java.lang.String keyBinding,
java.awt.event.ActionListener action)
Adds a key binding to this input handler.
abstract InputHandler copy()
Returns a copy of this input handler that shares the same
key bindings.
void executeAction(java.awt.event.ActionListener listener,
java.lang.Object source,
java.lang.String actionCommand)
Executes the specified action, repeating and recording it as
necessary.
static java.awt.event.ActionListener getAction(java.lang.String name)
Returns a named text area action.
static java.lang.String getActionName(java.awt.event.ActionListener listener)
Returns the name of the specified text area action.
static java.util.Enumeration getActions()
Returns an enumeration of all available actions.
InputHandler.MacroRecorder getMacroRecorder()
Returns the macro recorder.
int getRepeatCount()
Returns the number of times the next action will be repeated.
static JEditTextArea getTextArea(java.util.EventObject evt)
Returns the text area that fired the specified event.
void grabNextKeyStroke(java.awt.event.ActionListener listener)
Grabs the next key typed event and invokes the specified
action with the key as a the action command.
protected void handleGrabAction(java.awt.event.KeyEvent evt)
If a key is being grabbed, this method should be called with
the appropriate key event.
boolean isRepeatEnabled()
Returns if repeating is enabled.
abstract void removeAllKeyBindings()
Removes all key bindings from this input handler.
abstract void removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler.
void setMacroRecorder(InputHandler.MacroRecorder recorder)
Sets the macro recorder.
void setRepeatCount(int repeatCount)
Sets the number of times the next action will be repeated.
void setRepeatEnabled(boolean repeat)
Enables repeating.
Methods inherited from class java.awt.event.KeyAdapter
keyPressed, keyReleased, keyTyped
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
SMART_HOME_END_PROPERTY
public static final java.lang.String SMART_HOME_END_PROPERTY
If this client property is set to Boolean.TRUE on the text area,
the home/end keys will support ‘smart’ BRIEF-like behaviour
(one press = start/end of line, two presses = start/end of
viewscreen, three presses = start/end of document). By default,
this property is not set.
See Also:
Constant Field Values
BACKSPACE
public static final java.awt.event.ActionListener BACKSPACE
BACKSPACE_WORD
public static final java.awt.event.ActionListener BACKSPACE_WORD
DELETE
public static final java.awt.event.ActionListener DELETE
DELETE_WORD
public static final java.awt.event.ActionListener DELETE_WORD
END
public static final java.awt.event.ActionListener END
DOCUMENT_END
public static final java.awt.event.ActionListener DOCUMENT_END
SELECT_ALL
public static final java.awt.event.ActionListener SELECT_ALL
SELECT_END
public static final java.awt.event.ActionListener SELECT_END
SELECT_DOC_END
public static final java.awt.event.ActionListener SELECT_DOC_END
INSERT_BREAK
public static final java.awt.event.ActionListener INSERT_BREAK
INSERT_TAB
public static final java.awt.event.ActionListener INSERT_TAB
HOME
public static final java.awt.event.ActionListener HOME
DOCUMENT_HOME
public static final java.awt.event.ActionListener DOCUMENT_HOME
SELECT_HOME
public static final java.awt.event.ActionListener SELECT_HOME
SELECT_DOC_HOME
public static final java.awt.event.ActionListener SELECT_DOC_HOME
NEXT_CHAR
public static final java.awt.event.ActionListener NEXT_CHAR
NEXT_LINE
public static final java.awt.event.ActionListener NEXT_LINE
NEXT_PAGE
public static final java.awt.event.ActionListener NEXT_PAGE
NEXT_WORD
public static final java.awt.event.ActionListener NEXT_WORD
SELECT_NEXT_CHAR
public static final java.awt.event.ActionListener SELECT_NEXT_CHAR
SELECT_NEXT_LINE
public static final java.awt.event.ActionListener SELECT_NEXT_LINE
SELECT_NEXT_PAGE
public static final java.awt.event.ActionListener SELECT_NEXT_PAGE
SELECT_NEXT_WORD
public static final java.awt.event.ActionListener SELECT_NEXT_WORD
OVERWRITE
public static final java.awt.event.ActionListener OVERWRITE
PREV_CHAR
public static final java.awt.event.ActionListener PREV_CHAR
PREV_LINE
public static final java.awt.event.ActionListener PREV_LINE
PREV_PAGE
public static final java.awt.event.ActionListener PREV_PAGE
PREV_WORD
public static final java.awt.event.ActionListener PREV_WORD
SELECT_PREV_CHAR
public static final java.awt.event.ActionListener SELECT_PREV_CHAR
SELECT_PREV_LINE
public static final java.awt.event.ActionListener SELECT_PREV_LINE
SELECT_PREV_PAGE
public static final java.awt.event.ActionListener SELECT_PREV_PAGE
SELECT_PREV_WORD
public static final java.awt.event.ActionListener SELECT_PREV_WORD
REPEAT
public static final java.awt.event.ActionListener REPEAT
TOGGLE_RECT
public static final java.awt.event.ActionListener TOGGLE_RECT
CLIP_COPY
public static final java.awt.event.ActionListener CLIP_COPY
CLIP_PASTE
public static final java.awt.event.ActionListener CLIP_PASTE
CLIP_CUT
public static final java.awt.event.ActionListener CLIP_CUT
INSERT_CHAR
public static final java.awt.event.ActionListener INSERT_CHAR
grabAction
protected java.awt.event.ActionListener grabAction
repeat
protected boolean repeat
repeatCount
protected int repeatCount
recorder
protected InputHandler.MacroRecorder recorder
Constructor Detail
InputHandler
public InputHandler()
Method Detail
getAction
public static java.awt.event.ActionListener getAction(java.lang.String name)
Returns a named text area action.
Parameters:
name – The action name
getActionName
public static java.lang.String getActionName(java.awt.event.ActionListener listener)
Returns the name of the specified text area action.
Parameters:
listener – The action
getActions
public static java.util.Enumeration getActions()
Returns an enumeration of all available actions.
addDefaultKeyBindings
public abstract void addDefaultKeyBindings()
Adds the default key bindings to this input handler.
This should not be called in the constructor of this
input handler, because applications might load the
key bindings from a file, etc.
addKeyBinding
public abstract void addKeyBinding(java.lang.String keyBinding,
java.awt.event.ActionListener action)
Adds a key binding to this input handler.
Parameters:
keyBinding – The key binding (the format of this is
input-handler specific)
action – The action
removeKeyBinding
public abstract void removeKeyBinding(java.lang.String keyBinding)
Removes a key binding from this input handler.
Parameters:
keyBinding – The key binding
removeAllKeyBindings
public abstract void removeAllKeyBindings()
Removes all key bindings from this input handler.
grabNextKeyStroke
public void grabNextKeyStroke(java.awt.event.ActionListener listener)
Grabs the next key typed event and invokes the specified
action with the key as a the action command.
Parameters:
action – The action
isRepeatEnabled
public boolean isRepeatEnabled()
Returns if repeating is enabled. When repeating is enabled,
actions will be executed multiple times. This is usually
invoked with a special key stroke in the input handler.
setRepeatEnabled
public void setRepeatEnabled(boolean repeat)
Enables repeating. When repeating is enabled, actions will be
executed multiple times. Once repeating is enabled, the input
handler should read a number from the keyboard.
getRepeatCount
public int getRepeatCount()
Returns the number of times the next action will be repeated.
setRepeatCount
public void setRepeatCount(int repeatCount)
Sets the number of times the next action will be repeated.
Parameters:
repeatCount – The repeat count
getMacroRecorder
public InputHandler.MacroRecorder getMacroRecorder()
Returns the macro recorder. If this is non-null, all executed
actions should be forwarded to the recorder.
setMacroRecorder
public void setMacroRecorder(InputHandler.MacroRecorder recorder)
Sets the macro recorder. If this is non-null, all executed
actions should be forwarded to the recorder.
Parameters:
recorder – The macro recorder
copy
public abstract InputHandler copy()
Returns a copy of this input handler that shares the same
key bindings. Setting key bindings in the copy will also
set them in the original.
executeAction
public void executeAction(java.awt.event.ActionListener listener,
java.lang.Object source,
java.lang.String actionCommand)
Executes the specified action, repeating and recording it as
necessary.
Parameters:
listener – The action listener
source – The event source
actionCommand – The action command
getTextArea
public static JEditTextArea getTextArea(java.util.EventObject evt)
Returns the text area that fired the specified event.
Parameters:
evt – The event
handleGrabAction
protected void handleGrabAction(java.awt.event.KeyEvent evt)
If a key is being grabbed, this method should be called with
the appropriate key event. It executes the grab action with
the typed character as the parameter.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.clip_copy
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.clip_copy
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.clip_copy
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.clip_copy
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.clip_copy()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.clip_copy
public InputHandler.clip_copy()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TextAreaDefaults
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class TextAreaDefaults
java.lang.Object
mars.venus.editors.jeditsyntax.TextAreaDefaults
public class TextAreaDefaults
extends java.lang.Object
Encapsulates default settings for a text area. This can be passed
to the constructor once the necessary fields have been filled out.
The advantage of doing this over calling lots of set() methods after
creating the text area is that this method is faster.
Field Summary
boolean blockCaret
boolean bracketHighlight
java.awt.Color bracketHighlightColor
int caretBlinkRate
boolean caretBlinks
java.awt.Color caretColor
boolean caretVisible
int cols
SyntaxDocument document
boolean editable
int electricScroll
java.awt.Color eolMarkerColor
boolean eolMarkers
InputHandler inputHandler
boolean lineHighlight
java.awt.Color lineHighlightColor
boolean paintInvalid
javax.swing.JPopupMenu popup
int rows
java.awt.Color selectionColor
SyntaxStyle[] styles
int tabSize
Constructor Summary
TextAreaDefaults()
Method Summary
static TextAreaDefaults getDefaults()
Returns a new TextAreaDefaults object with the default values filled
in.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
inputHandler
public InputHandler inputHandler
document
public SyntaxDocument document
editable
public boolean editable
caretVisible
public boolean caretVisible
caretBlinks
public boolean caretBlinks
blockCaret
public boolean blockCaret
caretBlinkRate
public int caretBlinkRate
electricScroll
public int electricScroll
tabSize
public int tabSize
cols
public int cols
rows
public int rows
styles
public SyntaxStyle[] styles
caretColor
public java.awt.Color caretColor
selectionColor
public java.awt.Color selectionColor
lineHighlightColor
public java.awt.Color lineHighlightColor
lineHighlight
public boolean lineHighlight
bracketHighlightColor
public java.awt.Color bracketHighlightColor
bracketHighlight
public boolean bracketHighlight
eolMarkerColor
public java.awt.Color eolMarkerColor
eolMarkers
public boolean eolMarkers
paintInvalid
public boolean paintInvalid
popup
public javax.swing.JPopupMenu popup
Constructor Detail
TextAreaDefaults
public TextAreaDefaults()
Method Detail
getDefaults
public static TextAreaDefaults getDefaults()
Returns a new TextAreaDefaults object with the default values filled
in.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
mars.venus.editors.jeditsyntax
Interfaces
InputHandler.MacroRecorder
InputHandler.NonRecordable
InputHandler.NonRepeatable
InputHandler.Wrapper
TextAreaPainter.Highlight
Classes
DefaultInputHandler
InputHandler
InputHandler.backspace
InputHandler.backspace_word
InputHandler.clip_copy
InputHandler.clip_cut
InputHandler.clip_paste
InputHandler.delete
InputHandler.delete_word
InputHandler.document_end
InputHandler.document_home
InputHandler.end
InputHandler.home
InputHandler.insert_break
InputHandler.insert_char
InputHandler.insert_tab
InputHandler.next_char
InputHandler.next_line
InputHandler.next_page
InputHandler.next_word
InputHandler.overwrite
InputHandler.prev_char
InputHandler.prev_line
InputHandler.prev_page
InputHandler.prev_word
InputHandler.repeat
InputHandler.select_all
InputHandler.toggle_rect
JEditBasedTextArea
JEditTextArea
KeywordMap
PopupHelpItem
SyntaxDocument
SyntaxStyle
SyntaxUtilities
TextAreaDefaults
TextAreaPainter
TextUtilities
SyntaxStyle
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class SyntaxStyle
java.lang.Object
mars.venus.editors.jeditsyntax.SyntaxStyle
public class SyntaxStyle
extends java.lang.Object
A simple text style class. It can specify the color, italic flag,
and bold flag of a run of text.
Author:
Slava Pestov
Constructor Summary
SyntaxStyle(java.awt.Color color,
boolean italic,
boolean bold)
Creates a new SyntaxStyle.
Method Summary
java.awt.Color getColor()
Returns the color specified in this style.
java.lang.String getColorAsHexString()
Returns the color coded as Stringified 32-bit hex with
Red in bits 16-23, Green in bits 8-15, Blue in bits 0-7
e.g.
java.awt.FontMetrics getFontMetrics(java.awt.Font font)
Returns the font metrics for the styled font.
java.awt.Font getStyledFont(java.awt.Font font)
Returns the specified font, but with the style’s bold and
italic flags applied.
boolean isBold()
Returns true if boldface is enabled for this style.
boolean isItalic()
Returns true if italics is enabled for this style.
boolean isPlain()
Returns true if no font styles are enabled.
void setGraphicsFlags(java.awt.Graphics gfx,
java.awt.Font font)
Sets the foreground color and font of the specified graphics
context to that specified in this style.
java.lang.String toString()
Returns a string representation of this object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
SyntaxStyle
public SyntaxStyle(java.awt.Color color,
boolean italic,
boolean bold)
Creates a new SyntaxStyle.
Parameters:
color – The text color
italic – True if the text should be italics
bold – True if the text should be bold
Method Detail
getColor
public java.awt.Color getColor()
Returns the color specified in this style.
getColorAsHexString
public java.lang.String getColorAsHexString()
Returns the color coded as Stringified 32-bit hex with
Red in bits 16-23, Green in bits 8-15, Blue in bits 0-7
e.g. “0x00FF3366” where Red is FF, Green is 33, Blue is 66.
This is used by Settings initialization to avoid direct
use of Color class. Long story. DPS 13-May-2010
Returns:
String containing hex-coded color value.
isPlain
public boolean isPlain()
Returns true if no font styles are enabled.
isItalic
public boolean isItalic()
Returns true if italics is enabled for this style.
isBold
public boolean isBold()
Returns true if boldface is enabled for this style.
getStyledFont
public java.awt.Font getStyledFont(java.awt.Font font)
Returns the specified font, but with the style’s bold and
italic flags applied.
getFontMetrics
public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
Returns the font metrics for the styled font.
setGraphicsFlags
public void setGraphicsFlags(java.awt.Graphics gfx,
java.awt.Font font)
Sets the foreground color and font of the specified graphics
context to that specified in this style.
Parameters:
gfx – The graphics context
font – The font to add the styles to
toString
public java.lang.String toString()
Returns a string representation of this object.
Overrides:
toString in class java.lang.Object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.insert_break
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.insert_break
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.insert_break
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.insert_break
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.insert_break()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.insert_break
public InputHandler.insert_break()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.venus.editors.jeditsyntax
Interface Summary
InputHandler.MacroRecorder Macro recorder.
InputHandler.NonRecordable If an action implements this interface, it should not be recorded
by the macro recorder.
InputHandler.NonRepeatable If an action implements this interface, it should not be repeated.
InputHandler.Wrapper For use by EditAction.Wrapper only.
TextAreaPainter.Highlight Highlight interface.
Class Summary
DefaultInputHandler The default input handler.
InputHandler An input handler converts the user’s key strokes into concrete actions.
InputHandler.backspace
InputHandler.backspace_word
InputHandler.clip_copy
InputHandler.clip_cut
InputHandler.clip_paste
InputHandler.delete
InputHandler.delete_word
InputHandler.document_end
InputHandler.document_home
InputHandler.end
InputHandler.home
InputHandler.insert_break
InputHandler.insert_char
InputHandler.insert_tab
InputHandler.next_char
InputHandler.next_line
InputHandler.next_page
InputHandler.next_word
InputHandler.overwrite
InputHandler.prev_char
InputHandler.prev_line
InputHandler.prev_page
InputHandler.prev_word
InputHandler.repeat
InputHandler.select_all
InputHandler.toggle_rect
JEditBasedTextArea Adaptor subclass for JEditTextArea
Provides those methods required by the MARSTextEditingArea interface
that are not defined by JEditTextArea.
JEditTextArea jEdit’s text area component.
KeywordMap A KeywordMap is similar to a hashtable in that it maps keys
to values.
PopupHelpItem Handly little class to contain help information for a popupMenu or
tool tip item.
SyntaxDocument A document implementation that can be tokenized by the syntax highlighting
system.
SyntaxStyle A simple text style class.
SyntaxUtilities Class with several utility functions used by jEdit’s syntax colorizing
subsystem.
TextAreaDefaults Encapsulates default settings for a text area.
TextAreaPainter The text area repaint manager.
TextUtilities Class with several utility functions used by the text area component.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
InputHandler.select_all
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.select_all
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.select_all
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.select_all
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.select_all()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.select_all
public InputHandler.select_all()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.delete_word
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.delete_word
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.delete_word
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.delete_word
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.delete_word()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.delete_word
public InputHandler.delete_word()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
TextUtilities
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class TextUtilities
java.lang.Object
mars.venus.editors.jeditsyntax.TextUtilities
public class TextUtilities
extends java.lang.Object
Class with several utility functions used by the text area component.
Author:
Slava Pestov
Constructor Summary
TextUtilities()
Method Summary
static int findMatchingBracket(javax.swing.text.Document doc,
int offset)
Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket).
static int findWordEnd(java.lang.String line,
int pos,
java.lang.String noWordSep)
Locates the end of the word at the specified position.
static int findWordStart(java.lang.String line,
int pos,
java.lang.String noWordSep)
Locates the start of the word at the specified position.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
TextUtilities
public TextUtilities()
Method Detail
findMatchingBracket
public static int findMatchingBracket(javax.swing.text.Document doc,
int offset)
throws javax.swing.text.BadLocationException
Returns the offset of the bracket matching the one at the
specified offset of the document, or -1 if the bracket is
unmatched (or if the character is not a bracket).
Parameters:
doc – The document
offset – The offset
Throws:
javax.swing.text.BadLocationException – If an out-of-bounds access
was attempted on the document text
findWordStart
public static int findWordStart(java.lang.String line,
int pos,
java.lang.String noWordSep)
Locates the start of the word at the specified position.
Parameters:
line – The text
pos – The position
findWordEnd
public static int findWordEnd(java.lang.String line,
int pos,
java.lang.String noWordSep)
Locates the end of the word at the specified position.
Parameters:
line – The text
pos – The position
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.next_word
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.next_word
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.next_word
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.next_word
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.next_word(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.next_word
public InputHandler.next_word(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.venus.editors.jeditsyntax
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object javax.swing.text.AbstractDocument (implements javax.swing.text.Document, java.io.Serializable)
javax.swing.text.PlainDocument mars.venus.editors.jeditsyntax.SyntaxDocument
java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container javax.swing.JComponent (implements java.io.Serializable)
mars.venus.editors.jeditsyntax.JEditTextArea mars.venus.editors.jeditsyntax.JEditBasedTextArea (implements javax.swing.event.CaretListener, mars.venus.editors.MARSTextEditingArea)
mars.venus.editors.jeditsyntax.TextAreaPainter (implements javax.swing.text.TabExpander)
mars.venus.editors.jeditsyntax.InputHandler.backspace (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.backspace_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_copy (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_cut (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.clip_paste (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.delete (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.delete_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.document_end (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.document_home (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.end (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.home (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.insert_break (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.insert_char (implements java.awt.event.ActionListener, mars.venus.editors.jeditsyntax.InputHandler.NonRepeatable)
mars.venus.editors.jeditsyntax.InputHandler.insert_tab (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_char (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_line (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_page (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.next_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.overwrite (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_char (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_line (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_page (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.prev_word (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.repeat (implements java.awt.event.ActionListener, mars.venus.editors.jeditsyntax.InputHandler.NonRecordable)
mars.venus.editors.jeditsyntax.InputHandler.select_all (implements java.awt.event.ActionListener)
mars.venus.editors.jeditsyntax.InputHandler.toggle_rect (implements java.awt.event.ActionListener)
java.awt.event.KeyAdapter (implements java.awt.event.KeyListener)
mars.venus.editors.jeditsyntax.InputHandler mars.venus.editors.jeditsyntax.DefaultInputHandler
mars.venus.editors.jeditsyntax.KeywordMap
mars.venus.editors.jeditsyntax.PopupHelpItem
mars.venus.editors.jeditsyntax.SyntaxStyle
mars.venus.editors.jeditsyntax.SyntaxUtilities
mars.venus.editors.jeditsyntax.TextAreaDefaults
mars.venus.editors.jeditsyntax.TextUtilities
Interface Hierarchy
mars.venus.editors.jeditsyntax.InputHandler.MacroRecorder
mars.venus.editors.jeditsyntax.InputHandler.NonRecordable
mars.venus.editors.jeditsyntax.InputHandler.NonRepeatable
mars.venus.editors.jeditsyntax.InputHandler.Wrapper
mars.venus.editors.jeditsyntax.TextAreaPainter.Highlight
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
SyntaxUtilities
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class SyntaxUtilities
java.lang.Object
mars.venus.editors.jeditsyntax.SyntaxUtilities
public class SyntaxUtilities
extends java.lang.Object
Class with several utility functions used by jEdit’s syntax colorizing
subsystem.
Author:
Slava Pestov
Field Summary
static javax.swing.Popup popup
static boolean popupShowing
Paints the specified line onto the graphics context.
Method Summary
static SyntaxStyle[] getCurrentSyntaxStyles()
Returns the CURRENT style table.
static SyntaxStyle[] getDefaultSyntaxStyles()
Returns the default style table.
static int paintSyntaxLine(javax.swing.text.Segment line,
Token tokens,
SyntaxStyle[] styles,
javax.swing.text.TabExpander expander,
java.awt.Graphics gfx,
int x,
int y)
static boolean regionMatches(boolean ignoreCase,
javax.swing.text.Segment text,
int offset,
char[] match)
Checks if a subregion of a Segment is equal to a
character array.
static boolean regionMatches(boolean ignoreCase,
javax.swing.text.Segment text,
int offset,
java.lang.String match)
Checks if a subregion of a Segment is equal to a
string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
popupShowing
public static boolean popupShowing
Paints the specified line onto the graphics context. Note that this
method munges the offset and count values of the segment.
popup
public static javax.swing.Popup popup
Method Detail
regionMatches
public static boolean regionMatches(boolean ignoreCase,
javax.swing.text.Segment text,
int offset,
java.lang.String match)
Checks if a subregion of a Segment is equal to a
string.
Parameters:
ignoreCase – True if case should be ignored, false otherwise
text – The segment
offset – The offset into the segment
match – The string to match
regionMatches
public static boolean regionMatches(boolean ignoreCase,
javax.swing.text.Segment text,
int offset,
char[] match)
Checks if a subregion of a Segment is equal to a
character array.
Parameters:
ignoreCase – True if case should be ignored, false otherwise
text – The segment
offset – The offset into the segment
match – The character array to match
getDefaultSyntaxStyles
public static SyntaxStyle[] getDefaultSyntaxStyles()
Returns the default style table. This can be passed to the
setStyles() method of SyntaxDocument
to use the default syntax styles.
getCurrentSyntaxStyles
public static SyntaxStyle[] getCurrentSyntaxStyles()
Returns the CURRENT style table. This can be passed to the
setStyles() method of SyntaxDocument
to use the current syntax styles. If changes have been made
via MARS Settings menu, the current settings will not be the
same as the default settings.
paintSyntaxLine
public static int paintSyntaxLine(javax.swing.text.Segment line,
Token tokens,
SyntaxStyle[] styles,
javax.swing.text.TabExpander expander,
java.awt.Graphics gfx,
int x,
int y)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.Wrapper
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Interface InputHandler.Wrapper
Enclosing class:
InputHandler
public static interface InputHandler.Wrapper
For use by EditAction.Wrapper only.
Since:
jEdit 2.2final
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.next_page
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.next_page
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.next_page
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.next_page
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.next_page(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.next_page
public InputHandler.next_page(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.prev_line
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.prev_line
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.prev_line
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.prev_line
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.prev_line(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.prev_line
public InputHandler.prev_line(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.MacroRecorder
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Interface InputHandler.MacroRecorder
Enclosing class:
InputHandler
public static interface InputHandler.MacroRecorder
Macro recorder.
Method Summary
void actionPerformed(java.awt.event.ActionListener listener,
java.lang.String actionCommand)
Method Detail
actionPerformed
void actionPerformed(java.awt.event.ActionListener listener,
java.lang.String actionCommand)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.document_home
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.document_home
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.document_home
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.document_home
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.document_home(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.document_home
public InputHandler.document_home(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.delete
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.delete
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.delete
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.delete
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.delete()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.delete
public InputHandler.delete()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.home
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.home
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.home
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.home
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.home(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.home
public InputHandler.home(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.insert_char
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.insert_char
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.insert_char
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener, InputHandler.NonRepeatable
Enclosing class:
InputHandler
public static class InputHandler.insert_char
extends java.lang.Object
implements java.awt.event.ActionListener, InputHandler.NonRepeatable
Constructor Summary
InputHandler.insert_char()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.insert_char
public InputHandler.insert_char()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.clip_cut
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.clip_cut
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.clip_cut
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.clip_cut
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.clip_cut()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.clip_cut
public InputHandler.clip_cut()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.NonRecordable
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Interface InputHandler.NonRecordable
All Known Implementing Classes:
InputHandler.repeat
Enclosing class:
InputHandler
public static interface InputHandler.NonRecordable
If an action implements this interface, it should not be recorded
by the macro recorder. Instead, it will do its own recording.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.toggle_rect
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.toggle_rect
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.toggle_rect
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.toggle_rect
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.toggle_rect()
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.toggle_rect
public InputHandler.toggle_rect()
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InputHandler.document_end
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.jeditsyntax
Class InputHandler.document_end
java.lang.Object
mars.venus.editors.jeditsyntax.InputHandler.document_end
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener
Enclosing class:
InputHandler
public static class InputHandler.document_end
extends java.lang.Object
implements java.awt.event.ActionListener
Constructor Summary
InputHandler.document_end(boolean select)
Method Summary
void actionPerformed(java.awt.event.ActionEvent evt)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InputHandler.document_end
public InputHandler.document_end(boolean select)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.venus.editors
Interface Summary
MARSTextEditingArea Specifies capabilities that any test editor used in MARS must have.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
mars.venus.editors.generic
mars.venus.editors.generic
Classes
GenericTextArea
mars.venus.editors.generic
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.venus.editors.generic
Class Summary
GenericTextArea
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
mars.venus.editors.generic Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.venus.editors.generic
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container javax.swing.JComponent (implements java.io.Serializable)
javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)
javax.swing.JTextArea mars.venus.editors.generic.GenericTextArea (implements mars.venus.editors.MARSTextEditingArea)
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
GenericTextArea
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors.generic
Class GenericTextArea
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.text.JTextComponent
javax.swing.JTextArea
mars.venus.editors.generic.GenericTextArea
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.Scrollable, MARSTextEditingArea
public class GenericTextArea
extends javax.swing.JTextArea
implements MARSTextEditingArea
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTextArea
javax.swing.JTextArea.AccessibleJTextArea
Nested classes/interfaces inherited from class javax.swing.text.JTextComponent
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.DropLocation, javax.swing.text.JTextComponent.KeyBinding
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.text.JTextComponent
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface mars.venus.editors.MARSTextEditingArea
TEXT_FOUND, TEXT_NOT_FOUND, TEXT_REPLACED_FOUND_NEXT, TEXT_REPLACED_NOT_FOUND_NEXT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
GenericTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
Method Summary
void discardAllUndoableEdits()
Tell UndoManager to discard all its collected undoable edits.
int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string.
int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
java.awt.Component getOuterComponent()
javax.swing.undo.UndoManager getUndoManager()
Returns the undo manager for this editing area
int nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
Returns next posn of word in text – forward search.
void redo()
Redo previous edit
void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds.
void setCaretVisible(boolean vis)
Control caret visibility
void setLineHighlightEnabled(boolean highlight)
Does nothing, but required by the interface.
void setSelectionVisible(boolean vis)
Control selection visibility
void setSourceCode(java.lang.String s,
boolean editable)
For initalizing the source code when opening an ASM file
void setText(java.lang.String s)
Override inherited setText to temporarily remove UndoableEditListener because this
operation is not undoable.
void undo()
Undo previous edit
void updateSyntaxStyles()
Does nothing, but required by the interface.
Methods inherited from class javax.swing.JTextArea
append, createDefaultModel, getAccessibleContext, getColumns, getColumnWidth, getLineCount, getLineEndOffset, getLineOfOffset, getLineStartOffset, getLineWrap, getPreferredScrollableViewportSize, getPreferredSize, getRowHeight, getRows, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getTabSize, getUIClassID, getWrapStyleWord, insert, paramString, replaceRange, setColumns, setFont, setLineWrap, setRows, setTabSize, setWrapStyleWord
Methods inherited from class javax.swing.text.JTextComponent
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getActions, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDocument, setDragEnabled, setDropMode, setEditable, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setUI, updateUI, viewToModel, write
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface mars.venus.editors.MARSTextEditingArea
copy, cut, getCaretPosition, getDocument, getFont, getFontMetrics, getSelectedText, getSelectionEnd, getSelectionStart, getText, grabFocus, paste, replaceSelection, requestFocusInWindow, revalidate, select, selectAll, setBackground, setCaretPosition, setEditable, setEnabled, setFont, setSelectionEnd, setSelectionStart, setTabSize
Constructor Detail
GenericTextArea
public GenericTextArea(EditPane editPain,
javax.swing.JComponent lineNumbers)
Method Detail
setLineHighlightEnabled
public void setLineHighlightEnabled(boolean highlight)
Does nothing, but required by the interface. This editor does not support
highlighting of the line currently being edited.
Specified by:
setLineHighlightEnabled in interface MARSTextEditingArea
updateSyntaxStyles
public void updateSyntaxStyles()
Does nothing, but required by the interface. This editor does not support
syntax styling (colors, bold/italic).
Specified by:
updateSyntaxStyles in interface MARSTextEditingArea
setCaretBlinkRate
public void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds. If rate is 0
it will not blink. If negative, do nothing.
Specified by:
setCaretBlinkRate in interface MARSTextEditingArea
Parameters:
rate – blinking rate in milliseconds
getOuterComponent
public java.awt.Component getOuterComponent()
Specified by:
getOuterComponent in interface MARSTextEditingArea
setSourceCode
public void setSourceCode(java.lang.String s,
boolean editable)
For initalizing the source code when opening an ASM file
Specified by:
setSourceCode in interface MARSTextEditingArea
Parameters:
s – String containing text
editable – set true if code is editable else false
discardAllUndoableEdits
public void discardAllUndoableEdits()
Tell UndoManager to discard all its collected undoable edits.
Specified by:
discardAllUndoableEdits in interface MARSTextEditingArea
setText
public void setText(java.lang.String s)
Override inherited setText to temporarily remove UndoableEditListener because this
operation is not undoable.
Specified by:
setText in interface MARSTextEditingArea
Overrides:
setText in class javax.swing.text.JTextComponent
Parameters:
s – String with new contents for the editing area. Replaces current content.
setCaretVisible
public void setCaretVisible(boolean vis)
Control caret visibility
Specified by:
setCaretVisible in interface MARSTextEditingArea
Parameters:
vis – true to display caret, false to hide it
setSelectionVisible
public void setSelectionVisible(boolean vis)
Control selection visibility
Specified by:
setSelectionVisible in interface MARSTextEditingArea
Parameters:
vis – true to display selection, false to hide it
getUndoManager
public javax.swing.undo.UndoManager getUndoManager()
Returns the undo manager for this editing area
Specified by:
getUndoManager in interface MARSTextEditingArea
Returns:
the undo manager
undo
public void undo()
Undo previous edit
Specified by:
undo in interface MARSTextEditingArea
redo
public void redo()
Redo previous edit
Specified by:
redo in interface MARSTextEditingArea
doFindText
public int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string. Search begins
at the current cursor location, and wraps around when the end of the string
is reached.
Specified by:
doFindText in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
caseSensitive – true if search is to be case-sensitive, false otherwise
Returns:
TEXT_FOUND or TEXT_NOT_FOUND, depending on the result.
nextIndex
public int nextIndex(java.lang.String input,
java.lang.String find,
int start,
boolean caseSensitive)
Returns next posn of word in text – forward search. If end of string is
reached during the search, will wrap around to the beginning one time.
Parameters:
input – the string to search
find – the string to find
start – the character position to start the search
caseSensitive – true for case sensitive. false to ignore case
Returns:
next indexed position of found text or -1 if not found
doReplace
public int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
If cursor is initially at end
of matching selection, will immediately replace then find and select the
next occurrence if any. Otherwise it performs a find operation. The replace
can be undone with one undo operation.
Specified by:
doReplace in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
Returns TEXT_FOUND if not initially at end of selected match and matching
occurrence is found. Returns TEXT_NOT_FOUND if the text is not matched.
Returns TEXT_REPLACED_NOT_FOUND_NEXT if replacement is successful but there are
no additional matches. Returns TEXT_REPLACED_FOUND_NEXT if reaplacement is
successful and there is at least one additional match.
doReplaceAll
public int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
All replacements are bundled into one CompoundEdit, so one Undo operation will
undo all of them.
Specified by:
doReplaceAll in interface MARSTextEditingArea
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
the number of occurrences that were matched and replaced.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.venus.editors
Package Hierarchies:
All Packages
Interface Hierarchy
mars.venus.editors.MARSTextEditingArea
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
MARSTextEditingArea
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus.editors
Interface MARSTextEditingArea
All Known Implementing Classes:
GenericTextArea, JEditBasedTextArea
public interface MARSTextEditingArea
Specifies capabilities that any test editor used in MARS must have.
Field Summary
static int TEXT_FOUND
static int TEXT_NOT_FOUND
static int TEXT_REPLACED_FOUND_NEXT
static int TEXT_REPLACED_NOT_FOUND_NEXT
Method Summary
void copy()
void cut()
void discardAllUndoableEdits()
int doFindText(java.lang.String find,
boolean caseSensitive)
int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
int getCaretPosition()
javax.swing.text.Document getDocument()
java.awt.Font getFont()
java.awt.FontMetrics getFontMetrics(java.awt.Font f)
java.awt.Component getOuterComponent()
java.lang.String getSelectedText()
int getSelectionEnd()
int getSelectionStart()
java.lang.String getText()
javax.swing.undo.UndoManager getUndoManager()
void grabFocus()
void paste()
void redo()
void replaceSelection(java.lang.String str)
boolean requestFocusInWindow()
void revalidate()
void select(int selectionStart,
int selectionEnd)
void selectAll()
void setBackground(java.awt.Color c)
void setCaretBlinkRate(int rate)
void setCaretPosition(int position)
void setCaretVisible(boolean vis)
void setEditable(boolean editable)
void setEnabled(boolean enabled)
void setFont(java.awt.Font f)
void setLineHighlightEnabled(boolean highlight)
void setSelectionEnd(int pos)
void setSelectionStart(int pos)
void setSelectionVisible(boolean vis)
void setSourceCode(java.lang.String code,
boolean editable)
void setTabSize(int chars)
void setText(java.lang.String text)
void undo()
void updateSyntaxStyles()
Field Detail
TEXT_NOT_FOUND
static final int TEXT_NOT_FOUND
See Also:
Constant Field Values
TEXT_FOUND
static final int TEXT_FOUND
See Also:
Constant Field Values
TEXT_REPLACED_FOUND_NEXT
static final int TEXT_REPLACED_FOUND_NEXT
See Also:
Constant Field Values
TEXT_REPLACED_NOT_FOUND_NEXT
static final int TEXT_REPLACED_NOT_FOUND_NEXT
See Also:
Constant Field Values
Method Detail
copy
void copy()
cut
void cut()
doFindText
int doFindText(java.lang.String find,
boolean caseSensitive)
doReplace
int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
doReplaceAll
int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
getCaretPosition
int getCaretPosition()
getDocument
javax.swing.text.Document getDocument()
getSelectedText
java.lang.String getSelectedText()
getSelectionEnd
int getSelectionEnd()
getSelectionStart
int getSelectionStart()
select
void select(int selectionStart,
int selectionEnd)
selectAll
void selectAll()
getText
java.lang.String getText()
getUndoManager
javax.swing.undo.UndoManager getUndoManager()
paste
void paste()
replaceSelection
void replaceSelection(java.lang.String str)
setCaretPosition
void setCaretPosition(int position)
setEditable
void setEditable(boolean editable)
setSelectionEnd
void setSelectionEnd(int pos)
setSelectionStart
void setSelectionStart(int pos)
setText
void setText(java.lang.String text)
setFont
void setFont(java.awt.Font f)
getFont
java.awt.Font getFont()
requestFocusInWindow
boolean requestFocusInWindow()
getFontMetrics
java.awt.FontMetrics getFontMetrics(java.awt.Font f)
setBackground
void setBackground(java.awt.Color c)
setEnabled
void setEnabled(boolean enabled)
grabFocus
void grabFocus()
redo
void redo()
revalidate
void revalidate()
setSourceCode
void setSourceCode(java.lang.String code,
boolean editable)
setCaretVisible
void setCaretVisible(boolean vis)
setSelectionVisible
void setSelectionVisible(boolean vis)
undo
void undo()
discardAllUndoableEdits
void discardAllUndoableEdits()
setLineHighlightEnabled
void setLineHighlightEnabled(boolean highlight)
setCaretBlinkRate
void setCaretBlinkRate(int rate)
setTabSize
void setTabSize(int chars)
updateSyntaxStyles
void updateSyntaxStyles()
getOuterComponent
java.awt.Component getOuterComponent()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RegistersWindow
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RegistersWindow
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.venus.RegistersWindow
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible
public class RegistersWindow
extends javax.swing.JPanel
implements java.util.Observer
Sets up a window to display registers in the UI.
Author:
Sanderson, Bumgarner
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
RegistersWindow()
Constructor which sets up a fresh window with a table that contains the register values.
Method Summary
void clearHighlighting()
Clear highlight background color from any cell currently highlighted.
void clearWindow()
clear and redisplay registers
void refresh()
Refresh the table, triggering re-rendering.
java.lang.Object[][] setupWindow()
Sets up the data for the window.
void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface.
void updateRegisters()
update register display using current number base (10 or 16)
void updateRegisters(int base)
update register display using specified number base (10 or 16)
void updateRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI.
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
RegistersWindow
public RegistersWindow()
Constructor which sets up a fresh window with a table that contains the register values.
Method Detail
setupWindow
public java.lang.Object[][] setupWindow()
Sets up the data for the window.
Returns:
The array object with the data for the window.
clearWindow
public void clearWindow()
clear and redisplay registers
clearHighlighting
public void clearHighlighting()
Clear highlight background color from any cell currently highlighted.
refresh
public void refresh()
Refresh the table, triggering re-rendering.
updateRegisters
public void updateRegisters()
update register display using current number base (10 or 16)
updateRegisters
public void updateRegisters(int base)
update register display using specified number base (10 or 16)
Parameters:
base – desired number base
updateRegisterValue
public void updateRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI.
Parameters:
number – The number of the register to update.
val – New value.
update
public void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface. Called when notified by an Observable that we are registered with.
Observables include:
The Simulator object, which lets us know when it starts and stops running
A register object, which lets us know of register operations
The Simulator keeps us informed of when simulated MIPS execution is active.
This is the only time we care about register operations.
Specified by:
update in interface java.util.Observer
Parameters:
observable – The Observable object who is notifying us
obj – Auxiliary object with additional information.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditUndoAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditUndoAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditUndoAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditUndoAction
extends GuiAction
Action for the Edit -> Undo menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditUndoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditUndoAction
public EditUndoAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Adapted from TextComponentDemo.java in the
Java Tutorial “Text Component Features”
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileSaveAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileSaveAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileSaveAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileSaveAction
extends GuiAction
Action for the File -> Save menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileSaveAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
saves the file, if not alredy saved it will do a saveAs
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileSaveAction
public FileSaveAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
saves the file, if not alredy saved it will do a saveAs
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
PopupListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class PopupListener
java.lang.Object
java.awt.event.MouseAdapter
mars.venus.PopupListener
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener, java.util.EventListener
public class PopupListener
extends java.awt.event.MouseAdapter
Constructor Summary
PopupListener(javax.swing.JPopupMenu p)
Method Summary
void mousePressed(java.awt.event.MouseEvent e)
void mouseReleased(java.awt.event.MouseEvent e)
Methods inherited from class java.awt.event.MouseAdapter
mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
PopupListener
public PopupListener(javax.swing.JPopupMenu p)
Method Detail
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class java.awt.event.MouseAdapter
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class java.awt.event.MouseAdapter
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsExtendedAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsExtendedAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsExtendedAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsExtendedAction
extends GuiAction
Action class for the Settings menu item to control use of extended (pseudo) instructions or formats.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsExtendedAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsExtendedAction
public SettingsExtendedAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditFindReplaceAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditFindReplaceAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditFindReplaceAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditFindReplaceAction
extends GuiAction
Action for the Edit -> Find/Replace menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditFindReplaceAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditFindReplaceAction
public EditFindReplaceAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Editor
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class Editor
java.lang.Object
mars.venus.Editor
public class Editor
extends java.lang.Object
Manage the file being edited.
Currently only manages one file at a time, but can be expanded.
Field Summary
static int MAX_BLINK_RATE
static int MAX_TAB_SIZE
static int MIN_BLINK_RATE
static int MIN_TAB_SIZE
Constructor Summary
Editor(VenusUI ui)
Create editor.
Method Summary
boolean close()
Perform “close” operation on current tab’s file.
boolean closeAll()
Close all currently open files.
boolean editsSavedOrAbandoned()
Called by several of the Action objects when there is potential
loss of editing changes.
java.lang.String getCurrentOpenDirectory()
Get name of current directory for Open operation.
java.lang.String getCurrentSaveDirectory()
Get name of current directory for Save or Save As operation.
java.lang.String getNextDefaultFilename()
Generates a default file name
void newFile()
Perform “new” operation to create an empty tab.
boolean open()
Open file in a new tab.
boolean save()
Perform “save” operation on current tab’s file.
boolean saveAll()
Perform save operation on all open files (tabs).
boolean saveAs()
Perform “save as” operation on current tab’s file.
void setEditTabbedPane(EditTabbedPane editTabbedPane)
Set associated EditTabbedPane.
void setTitle(java.lang.String path,
java.lang.String name,
int status)
Places name of file currently being edited into its edit tab and
the application’s title bar.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
MIN_TAB_SIZE
public static final int MIN_TAB_SIZE
See Also:
Constant Field Values
MAX_TAB_SIZE
public static final int MAX_TAB_SIZE
See Also:
Constant Field Values
MIN_BLINK_RATE
public static final int MIN_BLINK_RATE
See Also:
Constant Field Values
MAX_BLINK_RATE
public static final int MAX_BLINK_RATE
See Also:
Constant Field Values
Constructor Detail
Editor
public Editor(VenusUI ui)
Create editor.
Parameters:
ui – the GUI that owns this editor
Method Detail
setEditTabbedPane
public void setEditTabbedPane(EditTabbedPane editTabbedPane)
Set associated EditTabbedPane. This is container for any/all open files.
Parameters:
editTabbedPane – an existing editTabbedPane object
getCurrentOpenDirectory
public java.lang.String getCurrentOpenDirectory()
Get name of current directory for Open operation.
Returns:
String containing directory pathname. Returns null if there is
no EditTabbedPane. Returns default, directory MARS is launched from, if
no Opens have been performed.
getCurrentSaveDirectory
public java.lang.String getCurrentSaveDirectory()
Get name of current directory for Save or Save As operation.
Returns:
String containing directory pathname. Returns null if there is
no EditTabbedPane. Returns default, directory MARS is launched from, if
no Save or Save As operations have been performed.
getNextDefaultFilename
public java.lang.String getNextDefaultFilename()
Generates a default file name
Returns:
returns string mipsN.asm, where N is 1,2,3,…
setTitle
public void setTitle(java.lang.String path,
java.lang.String name,
int status)
Places name of file currently being edited into its edit tab and
the application’s title bar. The edit tab will contain only
the filename, the title bar will contain full pathname.
If file has been modified since created, opened or saved, as
indicated by value of the status parameter, the name and path
will be followed with an ‘*’. If newly-created file has not
yet been saved, the title bar will show (temporary) file name
but not path.
Parameters:
path – Full pathname for file
name – Name of file (last component of path)
status – Edit status of file. See FileStatus static constants.
newFile
public void newFile()
Perform “new” operation to create an empty tab.
close
public boolean close()
Perform “close” operation on current tab’s file.
Returns:
true if succeeded, else false.
closeAll
public boolean closeAll()
Close all currently open files.
Returns:
true if succeeded, else false.
save
public boolean save()
Perform “save” operation on current tab’s file.
Returns:
true if succeeded, else false.
saveAs
public boolean saveAs()
Perform “save as” operation on current tab’s file.
Returns:
true if succeeded, else false.
saveAll
public boolean saveAll()
Perform save operation on all open files (tabs).
Returns:
true if succeeded, else false.
open
public boolean open()
Open file in a new tab.
Returns:
true if succeeded, else false.
editsSavedOrAbandoned
public boolean editsSavedOrAbandoned()
Called by several of the Action objects when there is potential
loss of editing changes. Specifically: if there is a current
file open for editing and its modify flag is true, then give user
a dialog box with choice to save, discard edits, or cancel and
carry out the decision. This applies to File->New, File->Open,
File->Close, and File->Exit.
Returns:
false means user selected Cancel so caller should do that.
Return of true means caller can proceed (edits were saved or discarded).
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileCloseAllAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileCloseAllAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileCloseAllAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileCloseAllAction
extends GuiAction
Action for the File -> Close All menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileCloseAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileCloseAllAction
public FileCloseAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsLabelAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsLabelAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsLabelAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsLabelAction
extends GuiAction
Action class for the Settings menu item to control display of Labels window (symbol table).
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsLabelAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsLabelAction
public SettingsLabelAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsDelayedBranchingAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsDelayedBranchingAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsDelayedBranchingAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsDelayedBranchingAction
extends GuiAction
Action class for the Settings menu item to control delayed branching.
Note: Changing this setting while the current program is runnable
(assembled, or stepped execution) or terminated triggers a re-assembly.
This is necessary to maintain consistency because the machine
code assembled for branch instructions differs depending on
this setting — would branch to incorrect address if setting
were changed between assembly and execution.
Note: This action is disabled while the MIPS program is running.
The user need only pause or stop execution to re-enable it.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsDelayedBranchingAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsDelayedBranchingAction
public SettingsDelayedBranchingAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
HardcopyWriter.PrintCanceledException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class HardcopyWriter.PrintCanceledException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.venus.HardcopyWriter.PrintCanceledException
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
HardcopyWriter
public static class HardcopyWriter.PrintCanceledException
extends java.lang.Exception
This is the exception class that the HardcopyWriter constructor
throws when the user clicks “Cancel” in the print dialog box.
See Also:
Serialized Form
Constructor Summary
HardcopyWriter.PrintCanceledException(java.lang.String msg)
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
HardcopyWriter.PrintCanceledException
public HardcopyWriter.PrintCanceledException(java.lang.String msg)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ExecutePane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class ExecutePane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLayeredPane
javax.swing.JDesktopPane
mars.venus.ExecutePane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class ExecutePane
extends javax.swing.JDesktopPane
Container for the execution-related windows. Currently displayed as a tabbed pane.
Author:
Sanderson and Team JSpim
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JDesktopPane
javax.swing.JDesktopPane.AccessibleJDesktopPane
Nested classes/interfaces inherited from class javax.swing.JLayeredPane
javax.swing.JLayeredPane.AccessibleJLayeredPane
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JDesktopPane
LIVE_DRAG_MODE, OUTLINE_DRAG_MODE
Fields inherited from class javax.swing.JLayeredPane
DEFAULT_LAYER, DRAG_LAYER, FRAME_CONTENT_LAYER, LAYER_PROPERTY, MODAL_LAYER, PALETTE_LAYER, POPUP_LAYER
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
ExecutePane(VenusUI mainUI,
RegistersWindow regs,
Coprocessor1Window cop1Regs,
Coprocessor0Window cop0Regs)
initialize the Execute pane with major components
Method Summary
void clearPane()
Clears out all components of the Execute tab: text segment
display, data segment display, label display and register display.
int getAddressDisplayBase()
Retrieve the number system base for displaying memory addresses
NumberDisplayBaseChooser getAddressDisplayBaseChooser()
Retrieve component used to set numerical base (10 or 16) of address display.
Coprocessor0Window getCoprocessor0Window()
Access the coprocessor0 values window.
Coprocessor1Window getCoprocessor1Window()
Access the coprocessor1 values window.
DataSegmentWindow getDataSegmentWindow()
Access the data segment window.
LabelsWindow getLabelsWindow()
Access the label values window.
RegistersWindow getRegistersWindow()
Access the register values window.
TextSegmentWindow getTextSegmentWindow()
Access the text segment window.
int getValueDisplayBase()
Retrieve the number system base for displaying values (mem/register contents)
NumberDisplayBaseChooser getValueDisplayBaseChooser()
Retrieve component used to set numerical base (10 or 16) of data value display.
void numberDisplayBaseChanged(NumberDisplayBaseChooser chooser)
Update display of columns based on state of given chooser.
void setLabelWindowVisibility(boolean visibility)
Show or hide the label window (symbol table).
void setWindowBounds()
This method will set the bounds of this JDesktopPane’s internal windows
relative to the current size of this JDesktopPane.
Methods inherited from class javax.swing.JDesktopPane
addImpl, getAccessibleContext, getAllFrames, getAllFramesInLayer, getDesktopManager, getDragMode, getSelectedFrame, getUI, getUIClassID, paramString, remove, removeAll, selectFrame, setComponentZOrder, setDesktopManager, setDragMode, setSelectedFrame, setUI, updateUI
Methods inherited from class javax.swing.JLayeredPane
getComponentCountInLayer, getComponentsInLayer, getComponentToLayer, getIndexOf, getLayer, getLayer, getLayeredPaneAbove, getObjectForLayer, getPosition, highestLayer, insertIndexForLayer, isOptimizedDrawingEnabled, lowestLayer, moveToBack, moveToFront, paint, putLayer, setLayer, setLayer, setPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeContainerListener, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
ExecutePane
public ExecutePane(VenusUI mainUI,
RegistersWindow regs,
Coprocessor1Window cop1Regs,
Coprocessor0Window cop0Regs)
initialize the Execute pane with major components
Parameters:
mainUI – the parent GUI
regs – window containing integer register set
cop1Regs – window containing Coprocessor 1 register set
cop0Regs – window containing Coprocessor 0 register set
Method Detail
setWindowBounds
public void setWindowBounds()
This method will set the bounds of this JDesktopPane’s internal windows
relative to the current size of this JDesktopPane. Such an operation
cannot be adequately done at constructor time because the actual
size of the desktop pane window is not yet established. Layout manager
is not a good option here because JDesktopPane does not work well with
them (the whole idea of using JDesktopPane with internal frames is to
have mini-frames that you can resize, move around, minimize, etc). This
method should be invoked only once: the first time the Execute tab is
selected (a change listener invokes it). We do not want it invoked
on subsequent tab selections; otherwise, user manipulations of the
internal frames would be lost the next time execute tab is selected.
setLabelWindowVisibility
public void setLabelWindowVisibility(boolean visibility)
Show or hide the label window (symbol table). If visible, it is displayed
to the right of the text segment and the latter is shrunk accordingly.
Parameters:
visibility – set to true or false
clearPane
public void clearPane()
Clears out all components of the Execute tab: text segment
display, data segment display, label display and register display.
This will typically be done upon File->Close, Open, New.
getTextSegmentWindow
public TextSegmentWindow getTextSegmentWindow()
Access the text segment window.
getDataSegmentWindow
public DataSegmentWindow getDataSegmentWindow()
Access the data segment window.
getRegistersWindow
public RegistersWindow getRegistersWindow()
Access the register values window.
getCoprocessor1Window
public Coprocessor1Window getCoprocessor1Window()
Access the coprocessor1 values window.
getCoprocessor0Window
public Coprocessor0Window getCoprocessor0Window()
Access the coprocessor0 values window.
getLabelsWindow
public LabelsWindow getLabelsWindow()
Access the label values window.
getValueDisplayBase
public int getValueDisplayBase()
Retrieve the number system base for displaying values (mem/register contents)
getAddressDisplayBase
public int getAddressDisplayBase()
Retrieve the number system base for displaying memory addresses
getValueDisplayBaseChooser
public NumberDisplayBaseChooser getValueDisplayBaseChooser()
Retrieve component used to set numerical base (10 or 16) of data value display.
Returns:
the chooser
getAddressDisplayBaseChooser
public NumberDisplayBaseChooser getAddressDisplayBaseChooser()
Retrieve component used to set numerical base (10 or 16) of address display.
Returns:
the chooser
numberDisplayBaseChanged
public void numberDisplayBaseChanged(NumberDisplayBaseChooser chooser)
Update display of columns based on state of given chooser. Normally
called only by the chooser’s ItemListener.
Parameters:
chooser – the GUI object manipulated by the user to change number base
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunClearBreakpointsAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunClearBreakpointsAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunClearBreakpointsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action, javax.swing.event.TableModelListener
public class RunClearBreakpointsAction
extends GuiAction
implements javax.swing.event.TableModelListener
Action class for the Run menu item to clear execution breakpoints that have been set.
It is a listener and is notified whenever a breakpoint is added or removed, thus will
set its enabled status true or false depending on whether breakpoints remain after that action.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunClearBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create the object and register with text segment window as a listener on its table model.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
When this option is selected, tell text segment window to clear breakpoints in its table model.
void tableChanged(javax.swing.event.TableModelEvent e)
Required TableModelListener method.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunClearBreakpointsAction
public RunClearBreakpointsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create the object and register with text segment window as a listener on its table model.
The table model has not been created yet, so text segment window will hang onto this
registration info and transfer it to the table model upon creation (which happens with
each successful assembly).
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
When this option is selected, tell text segment window to clear breakpoints in its table model.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
tableChanged
public void tableChanged(javax.swing.event.TableModelEvent e)
Required TableModelListener method. This is response upon editing of text segment table
model. The only editable column is breakpoints so this method is called only when user
adds or removes a breakpoint. Gets new breakpoint count and sets enabled status
accordingly.
Specified by:
tableChanged in interface javax.swing.event.TableModelListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Coprocessor0Window
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class Coprocessor0Window
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.venus.Coprocessor0Window
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible
public class Coprocessor0Window
extends javax.swing.JPanel
implements java.util.Observer
Sets up a window to display registers in the UI.
Author:
Sanderson, Bumgarner
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
Coprocessor0Window()
Constructor which sets up a fresh window with a table that contains the register values.
Method Summary
void clearHighlighting()
Clear highlight background color from any row currently highlighted.
void clearWindow()
Reset and redisplay registers
void refresh()
Refresh the table, triggering re-rendering.
java.lang.Object[][] setupWindow()
Sets up the data for the window.
void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface.
void updateRegisters()
Update register display using current display base (10 or 16)
void updateRegisters(int base)
Update register display using specified display base
void updateRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI.
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
Coprocessor0Window
public Coprocessor0Window()
Constructor which sets up a fresh window with a table that contains the register values.
Method Detail
setupWindow
public java.lang.Object[][] setupWindow()
Sets up the data for the window.
Returns:
The array object with the data for the window.
clearWindow
public void clearWindow()
Reset and redisplay registers
clearHighlighting
public void clearHighlighting()
Clear highlight background color from any row currently highlighted.
refresh
public void refresh()
Refresh the table, triggering re-rendering.
updateRegisters
public void updateRegisters()
Update register display using current display base (10 or 16)
updateRegisters
public void updateRegisters(int base)
Update register display using specified display base
Parameters:
base – number base for display (10 or 16)
updateRegisterValue
public void updateRegisterValue(int number,
int val,
int base)
This method handles the updating of the GUI.
Parameters:
number – The number of the register to update.
val – New value.
update
public void update(java.util.Observable observable,
java.lang.Object obj)
Required by Observer interface. Called when notified by an Observable that we are registered with.
Observables include:
The Simulator object, which lets us know when it starts and stops running
A register object, which lets us know of register operations
The Simulator keeps us informed of when simulated MIPS execution is active.
This is the only time we care about register operations.
Specified by:
update in interface java.util.Observer
Parameters:
observable – The Observable object who is notifying us
obj – Auxiliary object with additional information.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RegistersPane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RegistersPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
mars.venus.RegistersPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class RegistersPane
extends javax.swing.JTabbedPane
Contains tabbed areas in the UI to display register contents
Author:
Sanderson
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
RegistersPane(VenusUI appFrame,
RegistersWindow regs,
Coprocessor1Window cop1,
Coprocessor0Window cop0)
Constructor for the RegistersPane class.
Method Summary
Coprocessor0Window getCoprocessor0Window()
Return component containing coprocessor 0 (exceptions) register set.
Coprocessor1Window getCoprocessor1Window()
Return component containing coprocessor 1 (floating point) register set.
RegistersWindow getRegistersWindow()
Return component containing integer register set.
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
RegistersPane
public RegistersPane(VenusUI appFrame,
RegistersWindow regs,
Coprocessor1Window cop1,
Coprocessor0Window cop0)
Constructor for the RegistersPane class.
Method Detail
getRegistersWindow
public RegistersWindow getRegistersWindow()
Return component containing integer register set.
Returns:
integer register window
getCoprocessor1Window
public Coprocessor1Window getCoprocessor1Window()
Return component containing coprocessor 1 (floating point) register set.
Returns:
floating point register window
getCoprocessor0Window
public Coprocessor0Window getCoprocessor0Window()
Return component containing coprocessor 0 (exceptions) register set.
Returns:
exceptions register window
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
mars.venus
Classes
AbstractFontSettingDialog
Coprocessor0Window
Coprocessor1Window
DataSegmentWindow
EditCopyAction
EditCutAction
EditFindReplaceAction
Editor
EditPane
EditPasteAction
EditRedoAction
EditSelectAllAction
EditTabbedPane
EditUndoAction
ExecutePane
FileCloseAction
FileCloseAllAction
FileDumpMemoryAction
FileExitAction
FileNewAction
FileOpenAction
FilePrintAction
FileSaveAction
FileSaveAllAction
FileSaveAsAction
FileStatus
GuiAction
HardcopyWriter
HelpAboutAction
HelpHelpAction
LabelsWindow
MainPane
MessagesPane
NumberDisplayBaseChooser
PopupListener
RegistersPane
RegistersWindow
RepeatButton
RunAssembleAction
RunBackstepAction
RunClearBreakpointsAction
RunGoAction
RunPauseAction
RunResetAction
RunSpeedPanel
RunStepAction
RunStopAction
RunToggleBreakpointsAction
SettingsAddressDisplayBaseAction
SettingsAssembleAllAction
SettingsAssembleOnOpenAction
SettingsDelayedBranchingAction
SettingsEditorAction
SettingsExceptionHandlerAction
SettingsExtendedAction
SettingsHighlightingAction
SettingsLabelAction
SettingsMemoryConfigurationAction
SettingsPopupInputAction
SettingsProgramArgumentsAction
SettingsStartAtMainAction
SettingsValueDisplayBaseAction
SettingsWarningsAreErrorsAction
TextSegmentWindow
ToolAction
ToolLoader
VenusUI
Exceptions
HardcopyWriter.PrintCanceledException
HelpHelpAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class HelpHelpAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.HelpHelpAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class HelpHelpAction
extends GuiAction
Action for the Help -> Help menu item
See Also:
Serialized Form
Field Summary
static java.lang.String descriptionDetailSeparator
Separates Instruction name descriptor from detailed (operation) description
in help string.
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
HelpHelpAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
Displays tabs with categories of information
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
descriptionDetailSeparator
public static final java.lang.String descriptionDetailSeparator
Separates Instruction name descriptor from detailed (operation) description
in help string.
See Also:
Constant Field Values
Constructor Detail
HelpHelpAction
public HelpHelpAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Displays tabs with categories of information
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditCutAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditCutAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditCutAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditCutAction
extends GuiAction
Action for the Edit -> Cut menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditCutAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditCutAction
public EditCutAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileDumpMemoryAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileDumpMemoryAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileDumpMemoryAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileDumpMemoryAction
extends GuiAction
Action for the File -> Save For Dump Memory menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileDumpMemoryAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileDumpMemoryAction
public FileDumpMemoryAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.venus
Class Summary
AbstractFontSettingDialog Abstract class for a font selection dialog.
Coprocessor0Window Sets up a window to display registers in the UI.
Coprocessor1Window Sets up a window to display Coprocessor 1 registers in the Registers pane of the UI.
DataSegmentWindow Represents the Data Segment window, which is a type of JInternalFrame.
EditCopyAction Action for the Edit -> Copy menu item
EditCutAction Action for the Edit -> Cut menu item
EditFindReplaceAction Action for the Edit -> Find/Replace menu item
Editor Manage the file being edited.
EditPane Represents one file opened for editing.
EditPasteAction Action for the Edit -> Paste menu item
EditRedoAction Action for the Edit -> Redo menu item
EditSelectAllAction Action for the Edit -> Copy menu item
EditTabbedPane Tabbed pane for the editor.
EditUndoAction Action for the Edit -> Undo menu item
ExecutePane Container for the execution-related windows.
FileCloseAction Action for the File -> Close menu item
FileCloseAllAction Action for the File -> Close All menu item
FileDumpMemoryAction Action for the File -> Save For Dump Memory menu item
FileExitAction Action for the File -> Exit menu item
FileNewAction Action for the File -> New menu item
FileOpenAction Action for the File -> Open menu item
FilePrintAction Action for the File -> Print menu item
FileSaveAction Action for the File -> Save menu item
FileSaveAllAction Action for the File -> Close All menu item
FileSaveAsAction Action for the File -> Save As menu item
FileStatus Used to store and return information on the status of the current ASM file that
is being edited in the program.
GuiAction parent class for Action subclasses to be defined for every menu/toolbar
option.
HardcopyWriter
HelpAboutAction Action for the Help -> About menu item
HelpHelpAction Action for the Help -> Help menu item
LabelsWindow Represents the Labels window, which is a type of JInternalFrame.
MainPane Creates the tabbed areas in the UI and also created the internal windows that
exist in them.
MessagesPane Creates the message window at the bottom of the UI.
NumberDisplayBaseChooser Use to select base for displaying numbers.
PopupListener
RegistersPane Contains tabbed areas in the UI to display register contents
RegistersWindow Sets up a window to display registers in the UI.
RepeatButton RepeatButton is a JButton which contains a timer
for firing events while the button is held down.
RunAssembleAction Action class for the Run -> Assemble menu item (and toolbar icon)
RunBackstepAction Action for the Run -> Backstep menu item
RunClearBreakpointsAction Action class for the Run menu item to clear execution breakpoints that have been set.
RunGoAction Action class for the Run -> Go menu item (and toolbar icon)
RunPauseAction Action class for the Run -> Pause menu item (and toolbar icon)
RunResetAction Action for the Run -> Reset menu item
RunSpeedPanel Class for the Run speed slider control.
RunStepAction Action for the Run -> Step menu item
RunStopAction Action class for the Run -> Stop menu item (and toolbar icon)
RunToggleBreakpointsAction Action class for the Run menu item to clear execution breakpoints that have been set.
SettingsAddressDisplayBaseAction Action class for the Settings menu item to control number base (10 or 16) of memory addresses.
SettingsAssembleAllAction Action class for the Settings menu item to determine whether assemble operation applies
only to current file or to all files in its directory.
SettingsAssembleOnOpenAction Action class for the Settings menu item to control automatic assemble of file upon opening.
SettingsDelayedBranchingAction Action class for the Settings menu item to control delayed branching.
SettingsEditorAction Action class for the Settings menu item for text editor settings.
SettingsExceptionHandlerAction Action class for the Settings menu item for optionally loading a MIPS exception handler.
SettingsExtendedAction Action class for the Settings menu item to control use of extended (pseudo) instructions or formats.
SettingsHighlightingAction Action class for the Settings menu item for text editor settings.
SettingsLabelAction Action class for the Settings menu item to control display of Labels window (symbol table).
SettingsMemoryConfigurationAction Action class for the Settings menu item for text editor settings.
SettingsPopupInputAction Action class for the Settings menu item to control use of popup dialog for input syscalls.
SettingsProgramArgumentsAction Action class for the Settings menu item to control whether or not
program arguments can be entered and used.
SettingsStartAtMainAction Action class for the Settings menu item to control whether or not
assembler warnings are considered errors.
SettingsValueDisplayBaseAction Action class for the Settings menu item to control number base (10 or 16) of memory/register contents.
SettingsWarningsAreErrorsAction Action class for the Settings menu item to control whether or not
assembler warnings are considered errors.
TextSegmentWindow Creates the Text Segment window in the Execute tab of the UI
ToolAction Connects a MarsTool class (class that implements MarsTool interface) to
the Mars menu system by supplying the response to that tool’s menu item
selection.
ToolLoader This class provides functionality to bring external Mars tools into the Mars
system by adding them to its Tools menu.
VenusUI Top level container for Venus GUI.
Exception Summary
HardcopyWriter.PrintCanceledException This is the exception class that the HardcopyWriter constructor
throws when the user clicks “Cancel” in the print dialog box.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
RepeatButton
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RepeatButton
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
mars.venus.RepeatButton
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.SwingConstants
public class RepeatButton
extends javax.swing.JButton
implements java.awt.event.ActionListener, java.awt.event.MouseListener
RepeatButton is a JButton which contains a timer
for firing events while the button is held down. There is a default
initial delay of 300ms before the first event is fired and a 60ms delay
between subsequent events. When the user holds the button down and moves
the mouse out from over the button, the timer stops, but if the user moves
the mouse back over the button without having released the mouse button,
the timer starts up again at the same delay rate. If the enabled state is
changed while the timer is active, it will be stopped.
NOTE: The normal button behavior is that the action event is fired after
the button is released. It may be important to konw then that this is
still the case. So in effect, listeners will get 1 more event then what
the internal timer fires. It’s not a “bug”, per se, just something to be
aware of. There seems to be no way to suppress the final event from
firing anyway, except to process all ActionListeners internally. But
realistically, it probably doesn’t matter.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JButton
javax.swing.JButton.AccessibleJButton
Nested classes/interfaces inherited from class javax.swing.AbstractButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
RepeatButton()
Creates a button with no set text or icon.
RepeatButton(javax.swing.Action a)
Creates a button where properties are taken from the Action supplied.
RepeatButton(javax.swing.Icon icon)
Creates a button with an icon.
RepeatButton(java.lang.String text)
Creates a button with text.
RepeatButton(java.lang.String text,
javax.swing.Icon icon)
Creates a button with initial text and an icon.
Method Summary
void actionPerformed(java.awt.event.ActionEvent ae)
Handle action events.
int getDelay()
Gets the delay for the timer of this button.
int getInitialDelay()
Gets the initial delay for the timer of this button.
boolean isRepeatEnabled()
Checks if the button should fire events when held.
static void main(java.lang.String[] args)
Main method, for testing.
void mouseClicked(java.awt.event.MouseEvent me)
Handle mouse clicked events.
void mouseEntered(java.awt.event.MouseEvent me)
Handle mouse entered events.
void mouseExited(java.awt.event.MouseEvent me)
Handle mouse exited events.
void mousePressed(java.awt.event.MouseEvent me)
Handle mouse pressed events.
void mouseReleased(java.awt.event.MouseEvent me)
Handle mouse released events.
void setDelay(int d)
Set the delay for the timer of this button.
void setEnabled(boolean en)
Sets the enabled state of this button.
void setInitialDelay(int d)
Sets the initial delay for the timer of this button.
void setRepeatEnabled(boolean en)
Sets if the button should fire events when held.
Methods inherited from class javax.swing.JButton
getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI
Methods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
RepeatButton
public RepeatButton()
Creates a button with no set text or icon.
RepeatButton
public RepeatButton(javax.swing.Action a)
Creates a button where properties are taken from the Action supplied.
Parameters:
a – the button action
RepeatButton
public RepeatButton(javax.swing.Icon icon)
Creates a button with an icon.
Parameters:
icon – the button icon
RepeatButton
public RepeatButton(java.lang.String text)
Creates a button with text.
Parameters:
text – the button text
RepeatButton
public RepeatButton(java.lang.String text,
javax.swing.Icon icon)
Creates a button with initial text and an icon.
Parameters:
text – the button text
icon – the button icon
Method Detail
getDelay
public int getDelay()
Gets the delay for the timer of this button.
Returns:
the delay
setDelay
public void setDelay(int d)
Set the delay for the timer of this button.
Parameters:
d – the delay
getInitialDelay
public int getInitialDelay()
Gets the initial delay for the timer of this button.
Returns:
the initial delay
setInitialDelay
public void setInitialDelay(int d)
Sets the initial delay for the timer of this button.
Parameters:
d – the initial delay
isRepeatEnabled
public boolean isRepeatEnabled()
Checks if the button should fire events when held. If false, the
button is effectively a plain old JButton, but there may be times
when this feature might wish to be disabled.
Returns:
if true, the button should fire events when held
setRepeatEnabled
public void setRepeatEnabled(boolean en)
Sets if the button should fire events when held. If false, the
button is effectively a plain old JButton, but there may be times
when this feature might wish to be disabled. If false, it will
also stop the timer if it’s running.
Parameters:
en – if true, the button should fire events when held
setEnabled
public void setEnabled(boolean en)
Sets the enabled state of this button. Overridden to stop the timer
if it’s running.
Overrides:
setEnabled in class javax.swing.AbstractButton
Parameters:
en – if true, enables the button
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
Handle action events. OVERRIDE THIS IN SUBCLASS!
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
ae – the action event
mouseClicked
public void mouseClicked(java.awt.event.MouseEvent me)
Handle mouse clicked events.
Specified by:
mouseClicked in interface java.awt.event.MouseListener
Parameters:
me – the mouse event
mousePressed
public void mousePressed(java.awt.event.MouseEvent me)
Handle mouse pressed events.
Specified by:
mousePressed in interface java.awt.event.MouseListener
Parameters:
me – the mouse event
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent me)
Handle mouse released events.
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Parameters:
me – the mouse event
mouseEntered
public void mouseEntered(java.awt.event.MouseEvent me)
Handle mouse entered events.
Specified by:
mouseEntered in interface java.awt.event.MouseListener
Parameters:
me – the mouse event
mouseExited
public void mouseExited(java.awt.event.MouseEvent me)
Handle mouse exited events.
Specified by:
mouseExited in interface java.awt.event.MouseListener
Parameters:
me – the mouse event
main
public static void main(java.lang.String[] args)
Main method, for testing. Creates a frame with both styles of menu.
Parameters:
args – the command-line arguments
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditCopyAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditCopyAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.EditCopyAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class EditCopyAction
extends GuiAction
Action for the Edit -> Copy menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
EditCopyAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
EditCopyAction
public EditCopyAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileSaveAllAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileSaveAllAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileSaveAllAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileSaveAllAction
extends GuiAction
Action for the File -> Close All menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileSaveAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileSaveAllAction
public FileSaveAllAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MessagesPane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class MessagesPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
mars.venus.MessagesPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class MessagesPane
extends javax.swing.JTabbedPane
Creates the message window at the bottom of the UI.
Author:
Team JSpim
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static int MAXIMUM_SCROLLED_CHARACTERS
static int NUMBER_OF_CHARACTERS_TO_CUT
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MessagesPane()
Constructor for the class, sets up two fresh tabbed text areas for program feedback.
Method Summary
javax.swing.JTextArea getAssembleTextArea()
Returns component used to display assembler messages
java.lang.String getInputString(int maxLen)
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g.
java.lang.String getInputString(java.lang.String prompt)
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g.
javax.swing.JTextArea getRunTextArea()
Returns component used to display runtime messages
void postMarsMessage(java.lang.String message)
Post a message to the assembler display
void postRunMessage(java.lang.String message)
Post a message to the runtime display
void selectEditorTextLine(java.lang.String fileName,
int line,
int column)
Will select the specified line in an editor tab.
void selectErrorMessage(java.lang.String fileName,
int line,
int column)
Will select the Mars Messages tab error message that matches the given
specifications, if it is found.
void selectMarsMessageTab()
Make the assembler message tab current (up front)
void selectRunMessageTab()
Make the runtime message tab current (up front)
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
MAXIMUM_SCROLLED_CHARACTERS
public static final int MAXIMUM_SCROLLED_CHARACTERS
NUMBER_OF_CHARACTERS_TO_CUT
public static final int NUMBER_OF_CHARACTERS_TO_CUT
Constructor Detail
MessagesPane
public MessagesPane()
Constructor for the class, sets up two fresh tabbed text areas for program feedback.
Method Detail
selectErrorMessage
public void selectErrorMessage(java.lang.String fileName,
int line,
int column)
Will select the Mars Messages tab error message that matches the given
specifications, if it is found. Matching is done by constructing
a string using the parameter values and searching the text area for the last
occurrance of that string.
Parameters:
fileName – A String containing the file path name.
line – Line number for error message
column – Column number for error message
selectEditorTextLine
public void selectEditorTextLine(java.lang.String fileName,
int line,
int column)
Will select the specified line in an editor tab. If the file is open
but not current, its tab will be made current. If the file is not open,
it will be opened in a new tab and made current, however the line will
not be selected (apparent apparent problem with JEditTextArea).
Parameters:
fileName – A String containing the file path name.
line – Line number for error message
column – Column number for error message
getAssembleTextArea
public javax.swing.JTextArea getAssembleTextArea()
Returns component used to display assembler messages
Returns:
assembler message text component
getRunTextArea
public javax.swing.JTextArea getRunTextArea()
Returns component used to display runtime messages
Returns:
runtime message text component
postMarsMessage
public void postMarsMessage(java.lang.String message)
Post a message to the assembler display
Parameters:
message – String to append to assembler display text
postRunMessage
public void postRunMessage(java.lang.String message)
Post a message to the runtime display
Parameters:
message – String to append to runtime display text
selectMarsMessageTab
public void selectMarsMessageTab()
Make the assembler message tab current (up front)
selectRunMessageTab
public void selectRunMessageTab()
Make the runtime message tab current (up front)
getInputString
public java.lang.String getInputString(java.lang.String prompt)
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g. syscall #5 to read an
integer). SystemIO knows whether simulator is being run at
command line by the user, or by the GUI. If run at command line,
it gets input from System.in rather than here.
This is an overloaded method. This version, with the String parameter,
is used to get input from a popup dialog.
Parameters:
prompt – Prompt to display to the user.
Returns:
User input.
getInputString
public java.lang.String getInputString(int maxLen)
Method used by the SystemIO class to get interactive user input
requested by a running MIPS program (e.g. syscall #5 to read an
integer). SystemIO knows whether simulator is being run at
command line by the user, or by the GUI. If run at command line,
it gets input from System.in rather than here.
This is an overloaded method. This version, with the int parameter,
is used to get input from the MARS Run I/O window.
Parameters:
maxLen: – maximum length of input. This method returns when maxLen characters have been read. Use -1 for no length restrictions.
Returns:
User input.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsWarningsAreErrorsAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsWarningsAreErrorsAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsWarningsAreErrorsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsWarningsAreErrorsAction
extends GuiAction
Action class for the Settings menu item to control whether or not
assembler warnings are considered errors. If so, a program generating
warnings but not errors will not assemble.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsWarningsAreErrorsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsWarningsAreErrorsAction
public SettingsWarningsAreErrorsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
NumberDisplayBaseChooser
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class NumberDisplayBaseChooser
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JToggleButton
javax.swing.JCheckBox
mars.venus.NumberDisplayBaseChooser
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.ItemSelectable, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class NumberDisplayBaseChooser
extends javax.swing.JCheckBox
Use to select base for displaying numbers. Initially the
choices are only 10 (decimal) and 16 (hex), so I’m using
a check box where checked means hex. If base 8 (octal)
is added later, the Component will need to change.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JCheckBox
javax.swing.JCheckBox.AccessibleJCheckBox
Nested classes/interfaces inherited from class javax.swing.JToggleButton
javax.swing.JToggleButton.AccessibleJToggleButton, javax.swing.JToggleButton.ToggleButtonModel
Nested classes/interfaces inherited from class javax.swing.AbstractButton
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static int ASCII
static int DECIMAL
static int HEXADECIMAL
Fields inherited from class javax.swing.JCheckBox
BORDER_PAINTED_FLAT_CHANGED_PROPERTY
Fields inherited from class javax.swing.AbstractButton
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
NumberDisplayBaseChooser(java.lang.String text,
boolean displayInHex)
constructor.
Method Summary
static java.lang.String formatDoubleNumber(long value,
int base)
Produces a string form of a double given a long containing
the 64 bit pattern and the numerical base to use (10 or 16).
static java.lang.String formatFloatNumber(int value,
int base)
Produces a string form of a float given an integer containing
the 32 bit pattern and the numerical base to use (10 or 16).
static java.lang.String formatNumber(double value,
int base)
Produces a string form of a double given the value and the
numerical base to convert it to.
static java.lang.String formatNumber(float value,
int base)
Produces a string form of a float given the value and the
numerical base to convert it to.
java.lang.String formatNumber(int value)
Produces a string form of a number given the value.
static java.lang.String formatNumber(int value,
int base)
Produces a string form of an integer given the value and the
numerical base to convert it to.
java.lang.String formatUnsignedInteger(int value)
Produces a string form of an unsigned integer given the value.
static java.lang.String formatUnsignedInteger(int value,
int base)
Produces a string form of an unsigned given the value and the
numerical base to convert it to.
int getBase()
Retrieve the current number base.
static int getBase(boolean setting)
Return the number base corresponding to the specified setting.
void setBase(int newBase)
Set the current number base.
void setSettingsMenuItem(javax.swing.JCheckBoxMenuItem setter)
Set the menu item from Settings menu that corresponds to this chooser.
Methods inherited from class javax.swing.JCheckBox
getAccessibleContext, getUIClassID, isBorderPaintedFlat, paramString, setBorderPaintedFlat, updateUI
Methods inherited from class javax.swing.AbstractButton
actionPropertyChanged, addActionListener, addChangeListener, addImpl, addItemListener, checkHorizontalKey, checkVerticalKey, configurePropertiesFromAction, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHideActionText, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getSelectedObjects, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, removeItemListener, removeNotify, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setEnabled, setFocusPainted, setHideActionText, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setLayout, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
DECIMAL
public static final int DECIMAL
See Also:
Constant Field Values
HEXADECIMAL
public static final int HEXADECIMAL
See Also:
Constant Field Values
ASCII
public static final int ASCII
See Also:
Constant Field Values
Constructor Detail
NumberDisplayBaseChooser
public NumberDisplayBaseChooser(java.lang.String text,
boolean displayInHex)
constructor. It assumes the text will be worded
so that a checked box means hexadecimal!
Parameters:
text – Text to accompany the check box.
defaultBase – Currently either DECIMAL or HEXADECIMAL
Method Detail
getBase
public int getBase()
Retrieve the current number base.
Returns:
current number base, currently DECIMAL or HEXADECIMAL
setBase
public void setBase(int newBase)
Set the current number base.
Parameters:
newBase – The new number base. Currently, if it is
neither DECIMAL nor HEXADECIMAL, the base will not be changed.
formatUnsignedInteger
public static java.lang.String formatUnsignedInteger(int value,
int base)
Produces a string form of an unsigned given the value and the
numerical base to convert it to. This class
method can be used by anyone anytime. If base is 16, result
is same as for formatNumber(). If base is 10, will produce
string version of unsigned value. E.g. 0xffffffff will produce
“4294967295” instead of “-1”.
Parameters:
value – the number to be converted
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
formatNumber
public static java.lang.String formatNumber(int value,
int base)
Produces a string form of an integer given the value and the
numerical base to convert it to. There is an instance
method that uses the internally stored base. This class
method can be used by anyone anytime.
Parameters:
value – the number to be converted
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
formatNumber
public static java.lang.String formatNumber(float value,
int base)
Produces a string form of a float given the value and the
numerical base to convert it to. There is an instance
method that uses the internally stored base. This class
method can be used by anyone anytime.
Parameters:
value – the number to be converted
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
formatNumber
public static java.lang.String formatNumber(double value,
int base)
Produces a string form of a double given the value and the
numerical base to convert it to. There is an instance
method that uses the internally stored base. This class
method can be used by anyone anytime.
Parameters:
value – the number to be converted
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
formatNumber
public java.lang.String formatNumber(int value)
Produces a string form of a number given the value. There
is also an class (static method) that uses a specified
base.
Parameters:
value – the number to be converted
Returns:
a String equivalent of the value rendered appropriately.
formatUnsignedInteger
public java.lang.String formatUnsignedInteger(int value)
Produces a string form of an unsigned integer given the value. There
is also an class (static method) that uses a specified base.
If the current base is 16, this produces the same result as formatNumber().
Parameters:
value – the number to be converted
Returns:
a String equivalent of the value rendered appropriately.
formatFloatNumber
public static java.lang.String formatFloatNumber(int value,
int base)
Produces a string form of a float given an integer containing
the 32 bit pattern and the numerical base to use (10 or 16). If the
base is 16, the string will be built from the 32 bits. If the
base is 10, the int bits will be converted to float and the
string constructed from that. Seems an odd distinction to make,
except that contents of floating point registers are stored
internally as int bits. If the int bits represent a NaN value
(of which there are many!), converting them to float then calling
formatNumber(float, int) above, causes the float value to become
the canonical NaN value 0x7fc00000. It does not preserve the bit
pattern! Then converting it to hex string yields the canonical NaN.
Not an issue if display base is 10 since result string will be NaN
no matter what the internal NaN value is.
Parameters:
value – the int bits to be converted to string of corresponding float.
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
formatDoubleNumber
public static java.lang.String formatDoubleNumber(long value,
int base)
Produces a string form of a double given a long containing
the 64 bit pattern and the numerical base to use (10 or 16). If the
base is 16, the string will be built from the 64 bits. If the
base is 10, the long bits will be converted to double and the
string constructed from that. Seems an odd distinction to make,
except that contents of floating point registers are stored
internally as int bits. If the int bits represent a NaN value
(of which there are many!), converting them to double then calling
formatNumber(double, int) above, causes the double value to become
the canonical NaN value. It does not preserve the bit
pattern! Then converting it to hex string yields the canonical NaN.
Not an issue if display base is 10 since result string will be NaN
no matter what the internal NaN value is.
Parameters:
value – the long bits to be converted to string of corresponding double.
base – the numerical base to use (currently 10 or 16)
Returns:
a String equivalent of the value rendered appropriately.
setSettingsMenuItem
public void setSettingsMenuItem(javax.swing.JCheckBoxMenuItem setter)
Set the menu item from Settings menu that corresponds to this chooser.
It is the responsibility of that item to register here, because this
one is created first (before the menu item). They need to communicate
with each other so that whenever one changes, so does the other. They
cannot be the same object (one is JCheckBox, the other is JCheckBoxMenuItem).
getBase
public static int getBase(boolean setting)
Return the number base corresponding to the specified setting.
Returns:
HEXADECIMAL if setting is true, DECIMAL otherwise.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunStepAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunStepAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunStepAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunStepAction
extends GuiAction
Action for the Run -> Step menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunStepAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
perform next simulated instruction step.
void stepped(boolean done,
int reason,
ProcessingException pe)
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunStepAction
public RunStepAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
perform next simulated instruction step.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
stepped
public void stepped(boolean done,
int reason,
ProcessingException pe)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsHighlightingAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsHighlightingAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsHighlightingAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsHighlightingAction
extends GuiAction
Action class for the Settings menu item for text editor settings.
See Also:
Serialized Form
Field Summary
static java.lang.String APPLY_TOOL_TIP_TEXT
static java.lang.String CANCEL_TOOL_TIP_TEXT
static java.lang.String CLOSE_TOOL_TIP_TEXT
static java.lang.String RESET_TOOL_TIP_TEXT
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsHighlightingAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction.
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
CLOSE_TOOL_TIP_TEXT
public static final java.lang.String CLOSE_TOOL_TIP_TEXT
See Also:
Constant Field Values
APPLY_TOOL_TIP_TEXT
public static final java.lang.String APPLY_TOOL_TIP_TEXT
See Also:
Constant Field Values
RESET_TOOL_TIP_TEXT
public static final java.lang.String RESET_TOOL_TIP_TEXT
See Also:
Constant Field Values
CANCEL_TOOL_TIP_TEXT
public static final java.lang.String CANCEL_TOOL_TIP_TEXT
See Also:
Constant Field Values
Constructor Detail
SettingsHighlightingAction
public SettingsHighlightingAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Create a new SettingsEditorAction. Has all the GuiAction parameters.
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
When this action is triggered, launch a dialog to view and modify
editor settings.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
EditPane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class EditPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.venus.EditPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.Observer, javax.accessibility.Accessible
public class EditPane
extends javax.swing.JPanel
implements java.util.Observer
Represents one file opened for editing. Maintains required internal structures.
Before Mars 4.0, there was only one editor pane, a tab, and only one file could
be open at a time. With 4.0 came the multifile (pane, tab) editor, and existing
duties were split between EditPane and the new EditTabbedPane class.
Author:
Sanderson and Bumgarner
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
EditPane(VenusUI appFrame)
Constructor for the EditPane class.
Method Summary
int convertLineColumnToStreamPosition(int line,
int column)
Given line and column (position in the line) numbers, calculate
its byte stream position in text being edited.
java.awt.Point convertStreamPositionToLineColumn(int position)
void copyText()
copy currently-selected text into clipboard
void cutText()
cut currently-selected text into clipboard
void discardAllUndoableEdits()
Get rid of any accumulated undoable edits.
void displayCaretPosition(int pos)
Update the caret position label on the editor’s border to
display the current line and column.
void displayCaretPosition(java.awt.Point p)
Display cursor coordinates
int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string.
int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
java.lang.String getFilename()
Delegates to corresponding FileStatus method
int getFileStatus()
Get the editing status for this EditPane’s associated document.
java.lang.String getLineNumbersList(javax.swing.text.Document doc)
java.lang.String getPathname()
Delegates to corresponding FileStatus method
java.lang.String getSource()
Get source code text
int getSourceLineCount()
Calculate and return number of lines in source code text.
javax.swing.undo.UndoManager getUndoManager()
get the manager in charge of Undo and Redo operations
boolean hasUnsavedEdits()
Delegates to corresponding FileStatus method
boolean isNew()
Delegates to corresponding FileStatus method
void pasteText()
paste clipboard contents at cursor position
void redo()
Redo previous edit
void selectAllText()
select all text
void selectLine(int line)
Select the specified editor text line.
void selectLine(int line,
int column)
Select the specified editor text line.
void setFileStatus(int fileStatus)
Set the editing status for this EditPane’s associated document.
void setPathname(java.lang.String pathname)
Delegates to corresponding FileStatus method
void setShowLineNumbersEnabled(boolean enabled)
enable or disable checkbox that controls display of line numbers
void setSourceCode(java.lang.String s,
boolean editable)
For initalizing the source code when opening an ASM file
boolean showingLineNumbers()
get editor’s line number display status
void tellEditingComponentToRequestFocusInWindow()
Delegates to text area’s requestFocusInWindow method.
void undo()
Undo previous edit
void update(java.util.Observable fontChanger,
java.lang.Object arg)
Update, if source code is visible, when Font setting changes.
void updateRedoState()
Update state of Edit menu’s Redo menu item.
void updateStaticFileStatus()
Delegates to corresponding FileStatus method
void updateUndoState()
Update state of Edit menu’s Undo menu item.
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
EditPane
public EditPane(VenusUI appFrame)
Constructor for the EditPane class.
Method Detail
setSourceCode
public void setSourceCode(java.lang.String s,
boolean editable)
For initalizing the source code when opening an ASM file
Parameters:
s – String containing text
editable – set true if code is editable else false
discardAllUndoableEdits
public void discardAllUndoableEdits()
Get rid of any accumulated undoable edits. It is useful to call
this method after opening a file into the text area. The
act of setting its text content upon reading the file will generate
an undoable edit. Normally you don’t want a freshly-opened file
to appear with its Undo action enabled. But it will unless you
call this after setting the text.
getLineNumbersList
public java.lang.String getLineNumbersList(javax.swing.text.Document doc)
getSourceLineCount
public int getSourceLineCount()
Calculate and return number of lines in source code text.
Do this by counting newline characters then adding one if last line does
not end with newline character.
getSource
public java.lang.String getSource()
Get source code text
Returns:
Sting containing source code
setFileStatus
public void setFileStatus(int fileStatus)
Set the editing status for this EditPane’s associated document.
For the argument, use one of the constants from class FileStatus.
Parameters:
FileStatus – the status constant from class FileStatus
getFileStatus
public int getFileStatus()
Get the editing status for this EditPane’s associated document.
This will be one of the constants from class FileStatus.
getFilename
public java.lang.String getFilename()
Delegates to corresponding FileStatus method
getPathname
public java.lang.String getPathname()
Delegates to corresponding FileStatus method
setPathname
public void setPathname(java.lang.String pathname)
Delegates to corresponding FileStatus method
hasUnsavedEdits
public boolean hasUnsavedEdits()
Delegates to corresponding FileStatus method
isNew
public boolean isNew()
Delegates to corresponding FileStatus method
tellEditingComponentToRequestFocusInWindow
public void tellEditingComponentToRequestFocusInWindow()
Delegates to text area’s requestFocusInWindow method.
updateStaticFileStatus
public void updateStaticFileStatus()
Delegates to corresponding FileStatus method
getUndoManager
public javax.swing.undo.UndoManager getUndoManager()
get the manager in charge of Undo and Redo operations
Returns:
the UnDo manager
copyText
public void copyText()
copy currently-selected text into clipboard
cutText
public void cutText()
cut currently-selected text into clipboard
pasteText
public void pasteText()
paste clipboard contents at cursor position
selectAllText
public void selectAllText()
select all text
undo
public void undo()
Undo previous edit
redo
public void redo()
Redo previous edit
updateUndoState
public void updateUndoState()
Update state of Edit menu’s Undo menu item.
updateRedoState
public void updateRedoState()
Update state of Edit menu’s Redo menu item.
showingLineNumbers
public boolean showingLineNumbers()
get editor’s line number display status
Returns:
true if editor is current displaying line numbers, false otherwise.
setShowLineNumbersEnabled
public void setShowLineNumbersEnabled(boolean enabled)
enable or disable checkbox that controls display of line numbers
Parameters:
enable – True to enable box, false to disable.
displayCaretPosition
public void displayCaretPosition(int pos)
Update the caret position label on the editor’s border to
display the current line and column. The position is given
as text stream offset and will be converted into line and column.
Parameters:
pos – Offset into the text stream of caret.
displayCaretPosition
public void displayCaretPosition(java.awt.Point p)
Display cursor coordinates
Parameters:
p – Point object with x-y (column, line number) coordinates of cursor
convertStreamPositionToLineColumn
public java.awt.Point convertStreamPositionToLineColumn(int position)
convertLineColumnToStreamPosition
public int convertLineColumnToStreamPosition(int line,
int column)
Given line and column (position in the line) numbers, calculate
its byte stream position in text being edited.
Parameters:
line – Line number in file (starts with 1)
column – Position within that line (starts with 1)
Returns:
corresponding stream position. Returns -1 if there is no corresponding position.
selectLine
public void selectLine(int line)
Select the specified editor text line. Lines are numbered starting with 1, consistent
with line numbers displayed by the editor.
Parameters:
line – The desired line number of this TextPane’s text. Numbering starts at 1, and
nothing will happen if the parameter value is less than 1
selectLine
public void selectLine(int line,
int column)
Select the specified editor text line. Lines are numbered starting with 1, consistent
with line numbers displayed by the editor.
Parameters:
line – The desired line number of this TextPane’s text. Numbering starts at 1, and
nothing will happen if the parameter value is less than 1
column – Desired column at which to place the cursor.
doFindText
public int doFindText(java.lang.String find,
boolean caseSensitive)
Finds next occurrence of text in a forward search of a string. Search begins
at the current cursor location, and wraps around when the end of the string
is reached.
Parameters:
find – the text to locate in the string
caseSensitive – true if search is to be case-sensitive, false otherwise
Returns:
TEXT_FOUND or TEXT_NOT_FOUND, depending on the result.
doReplace
public int doReplace(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces next occurrence of text in a string in a forward search.
If cursor is initially at end
of matching selection, will immediately replace then find and select the
next occurrence if any. Otherwise it performs a find operation. The replace
can be undone with one undo operation.
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
Returns TEXT_FOUND if not initially at end of selected match and matching
occurrence is found. Returns TEXT_NOT_FOUND if the text is not matched.
Returns TEXT_REPLACED_NOT_FOUND_NEXT if replacement is successful but there are
no additional matches. Returns TEXT_REPLACED_FOUND_NEXT if reaplacement is
successful and there is at least one additional match.
doReplaceAll
public int doReplaceAll(java.lang.String find,
java.lang.String replace,
boolean caseSensitive)
Finds and replaces ALL occurrences of text in a string in a forward search.
All replacements are bundled into one CompoundEdit, so one Undo operation will
undo all of them.
Parameters:
find – the text to locate in the string
replace – the text to replace the find text with – if the find text exists
caseSensitive – true for case sensitive. false to ignore case
Returns:
the number of occurrences that were matched and replaced.
update
public void update(java.util.Observable fontChanger,
java.lang.Object arg)
Update, if source code is visible, when Font setting changes.
This method is specified by the Observer interface.
Specified by:
update in interface java.util.Observer
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ToolLoader
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class ToolLoader
java.lang.Object
mars.venus.ToolLoader
public class ToolLoader
extends java.lang.Object
This class provides functionality to bring external Mars tools into the Mars
system by adding them to its Tools menu. This permits anyone with knowledge
of the Mars public interfaces, in particular of the Memory and Register
classes, to write applications which can interact with a MIPS program
executing under Mars. The execution is of course simulated. The
private method for loading tool classes is adapted from Bret Barker’s
GameServer class from the book “Developing Games In Java”.
Author:
Pete Sanderson with help from Bret Barker
Constructor Summary
ToolLoader()
Method Summary
javax.swing.JMenu buildToolsMenu()
Called in VenusUI to build its Tools menu.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ToolLoader
public ToolLoader()
Method Detail
buildToolsMenu
public javax.swing.JMenu buildToolsMenu()
Called in VenusUI to build its Tools menu. If there are no qualifying tools
or any problems accessing those tools, it returns null. A qualifying tool
must be a class in the Tools package that implements MarsTool, must be compiled
into a .class file, and its .class file must be in the same Tools folder as
MarsTool.class.
Returns:
a Tools JMenu if qualifying tool classes are found, otherwise null
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsProgramArgumentsAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsProgramArgumentsAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsProgramArgumentsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsProgramArgumentsAction
extends GuiAction
Action class for the Settings menu item to control whether or not
program arguments can be entered and used. If so, a text field
will be displayed where they can be interactively entered.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsProgramArgumentsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsProgramArgumentsAction
public SettingsProgramArgumentsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.venus
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object javax.swing.AbstractAction (implements javax.swing.Action, java.lang.Cloneable, java.io.Serializable)
mars.venus.GuiAction mars.venus.EditCopyAction
mars.venus.EditCutAction
mars.venus.EditFindReplaceAction
mars.venus.EditPasteAction
mars.venus.EditRedoAction
mars.venus.EditSelectAllAction
mars.venus.EditUndoAction
mars.venus.FileCloseAction
mars.venus.FileCloseAllAction
mars.venus.FileDumpMemoryAction
mars.venus.FileExitAction
mars.venus.FileNewAction
mars.venus.FileOpenAction
mars.venus.FilePrintAction
mars.venus.FileSaveAction
mars.venus.FileSaveAllAction
mars.venus.FileSaveAsAction
mars.venus.HelpAboutAction
mars.venus.HelpHelpAction
mars.venus.RunAssembleAction
mars.venus.RunBackstepAction
mars.venus.RunClearBreakpointsAction (implements javax.swing.event.TableModelListener)
mars.venus.RunGoAction
mars.venus.RunPauseAction
mars.venus.RunResetAction
mars.venus.RunStepAction
mars.venus.RunStopAction
mars.venus.RunToggleBreakpointsAction
mars.venus.SettingsAddressDisplayBaseAction
mars.venus.SettingsAssembleAllAction
mars.venus.SettingsAssembleOnOpenAction
mars.venus.SettingsDelayedBranchingAction
mars.venus.SettingsEditorAction
mars.venus.SettingsExceptionHandlerAction
mars.venus.SettingsExtendedAction
mars.venus.SettingsHighlightingAction
mars.venus.SettingsLabelAction
mars.venus.SettingsMemoryConfigurationAction
mars.venus.SettingsPopupInputAction
mars.venus.SettingsProgramArgumentsAction
mars.venus.SettingsStartAtMainAction
mars.venus.SettingsValueDisplayBaseAction
mars.venus.SettingsWarningsAreErrorsAction
mars.venus.ToolAction
java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container javax.swing.JComponent (implements java.io.Serializable)
javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)
javax.swing.JButton (implements javax.accessibility.Accessible)
mars.venus.RepeatButton (implements java.awt.event.ActionListener, java.awt.event.MouseListener)
javax.swing.JToggleButton (implements javax.accessibility.Accessible)
javax.swing.JCheckBox (implements javax.accessibility.Accessible)
mars.venus.NumberDisplayBaseChooser
javax.swing.JInternalFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.venus.DataSegmentWindow (implements java.util.Observer)
mars.venus.LabelsWindow
mars.venus.TextSegmentWindow
javax.swing.JLayeredPane (implements javax.accessibility.Accessible)
javax.swing.JDesktopPane (implements javax.accessibility.Accessible)
mars.venus.ExecutePane
javax.swing.JPanel (implements javax.accessibility.Accessible)
mars.venus.Coprocessor0Window (implements java.util.Observer)
mars.venus.Coprocessor1Window (implements java.awt.event.ActionListener, java.util.Observer)
mars.venus.EditPane (implements java.util.Observer)
mars.venus.RegistersWindow (implements java.util.Observer)
mars.venus.RunSpeedPanel
javax.swing.JTabbedPane (implements javax.accessibility.Accessible, java.io.Serializable, javax.swing.SwingConstants)
mars.venus.EditTabbedPane
mars.venus.MainPane
mars.venus.MessagesPane
mars.venus.RegistersPane
java.awt.Window (implements javax.accessibility.Accessible)
java.awt.Dialog javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.venus.AbstractFontSettingDialog
java.awt.Frame (implements java.awt.MenuContainer)
javax.swing.JFrame (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)
mars.venus.VenusUI
mars.venus.Editor
mars.venus.FileStatus
java.awt.event.MouseAdapter (implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener)
mars.venus.PopupListener
java.lang.Throwable (implements java.io.Serializable)
java.lang.Exception mars.venus.HardcopyWriter.PrintCanceledException
mars.venus.ToolLoader
java.io.Writer (implements java.lang.Appendable, java.io.Closeable, java.io.Flushable)
mars.venus.HardcopyWriter
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
RunSpeedPanel
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunSpeedPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
mars.venus.RunSpeedPanel
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible
public class RunSpeedPanel
extends javax.swing.JPanel
Class for the Run speed slider control. One is created and can be obtained using
getInstance().
Author:
Pete Sanderson
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
static double UNLIMITED_SPEED
Constant that represents unlimited run speed.
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Method Summary
static RunSpeedPanel getInstance()
Retrieve the run speed panel object
double getRunSpeed()
returns current run speed setting, in instructions/second.
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
UNLIMITED_SPEED
public static final double UNLIMITED_SPEED
Constant that represents unlimited run speed. Compare with return value of
getRunSpeed() to determine if set to unlimited. At the unlimited setting, the GUI
will not attempt to update register and memory contents as each instruction
is executed. This is the only possible value for command-line use of Mars.
See Also:
Constant Field Values
Method Detail
getInstance
public static RunSpeedPanel getInstance()
Retrieve the run speed panel object
Returns:
the run speed panel
getRunSpeed
public double getRunSpeed()
returns current run speed setting, in instructions/second. Unlimited speed
setting is equal to RunSpeedPanel.UNLIMITED_SPEED
Returns:
run speed setting in instructions/second.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class GuiAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
Direct Known Subclasses:
EditCopyAction, EditCutAction, EditFindReplaceAction, EditPasteAction, EditRedoAction, EditSelectAllAction, EditUndoAction, FileCloseAction, FileCloseAllAction, FileDumpMemoryAction, FileExitAction, FileNewAction, FileOpenAction, FilePrintAction, FileSaveAction, FileSaveAllAction, FileSaveAsAction, HelpAboutAction, HelpHelpAction, RunAssembleAction, RunBackstepAction, RunClearBreakpointsAction, RunGoAction, RunPauseAction, RunResetAction, RunStepAction, RunStopAction, RunToggleBreakpointsAction, SettingsAddressDisplayBaseAction, SettingsAssembleAllAction, SettingsAssembleOnOpenAction, SettingsDelayedBranchingAction, SettingsEditorAction, SettingsExceptionHandlerAction, SettingsExtendedAction, SettingsHighlightingAction, SettingsLabelAction, SettingsMemoryConfigurationAction, SettingsPopupInputAction, SettingsProgramArgumentsAction, SettingsStartAtMainAction, SettingsValueDisplayBaseAction, SettingsWarningsAreErrorsAction
public class GuiAction
extends javax.swing.AbstractAction
parent class for Action subclasses to be defined for every menu/toolbar
option.
See Also:
Serialized Form
Field Summary
protected VenusUI mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
protected GuiAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
mainUI
protected VenusUI mainUI
Constructor Detail
GuiAction
protected GuiAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default. Should be over-ridden by subclass
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileSaveAsAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileSaveAsAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileSaveAsAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileSaveAsAction
extends GuiAction
Action for the File -> Save As menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileSaveAsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileSaveAsAction
public FileSaveAsAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
VenusUI
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class VenusUI
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
mars.venus.VenusUI
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public class VenusUI
extends javax.swing.JFrame
Top level container for Venus GUI.
Author:
Sanderson and Team JSpim
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JFrame
javax.swing.JFrame.AccessibleJFrame
Nested classes/interfaces inherited from class java.awt.Frame
java.awt.Frame.AccessibleAWTFrame
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
javax.swing.JMenuBar menu
Fields inherited from class javax.swing.JFrame
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Frame
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
VenusUI(java.lang.String s)
Constructor for the Class.
Method Summary
void dispatchEventToMenu(java.awt.event.KeyEvent evt)
Send keyboard event to menu for possible processing.
javax.swing.JCheckBoxMenuItem getAddressDisplayBaseMenuItem()
Get reference to settings menu item for display base of memory/register values.
Editor getEditor()
Get reference to Editor object associated with this GUI.
MainPane getMainPane()
Get reference to messages pane associated with this GUI.
static int getMenuState()
Get current menu state.
MessagesPane getMessagesPane()
Get reference to messages pane associated with this GUI.
RegistersPane getRegistersPane()
Get reference to registers pane associated with this GUI.
static boolean getReset()
To find out whether the register values are reset.
javax.swing.Action getRunAssembleAction()
Return reference tothe Run->Assemble item’s action.
static boolean getStarted()
To find out whether MIPS program is currently executing.
javax.swing.JCheckBoxMenuItem getValueDisplayBaseMenuItem()
Get reference to settings menu item for display base of memory/register values.
void haveMenuRequestFocus()
Have the menu request keyboard focus.
static void setReset(boolean b)
To set whether the register values are reset.
static void setStarted(boolean b)
To set whether MIPS program execution has started.
Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.awt.MenuContainer
getFont, postEvent
Field Detail
menu
public javax.swing.JMenuBar menu
Constructor Detail
VenusUI
public VenusUI(java.lang.String s)
Constructor for the Class. Sets up a window object for the UI
Parameters:
s – Name of the window to be created.
Method Detail
getMenuState
public static int getMenuState()
Get current menu state. State values are constants in FileStatus class. DPS 23 July 2008
Returns:
current menu state.
setReset
public static void setReset(boolean b)
To set whether the register values are reset.
Parameters:
b – Boolean true if the register values have been reset.
setStarted
public static void setStarted(boolean b)
To set whether MIPS program execution has started.
Parameters:
b – true if the MIPS program execution has started.
getReset
public static boolean getReset()
To find out whether the register values are reset.
Returns:
Boolean true if the register values have been reset.
getStarted
public static boolean getStarted()
To find out whether MIPS program is currently executing.
Returns:
true if MIPS program is currently executing.
getEditor
public Editor getEditor()
Get reference to Editor object associated with this GUI.
Returns:
Editor for the GUI.
getMainPane
public MainPane getMainPane()
Get reference to messages pane associated with this GUI.
Returns:
MessagesPane object associated with the GUI.
getMessagesPane
public MessagesPane getMessagesPane()
Get reference to messages pane associated with this GUI.
Returns:
MessagesPane object associated with the GUI.
getRegistersPane
public RegistersPane getRegistersPane()
Get reference to registers pane associated with this GUI.
Returns:
RegistersPane object associated with the GUI.
getValueDisplayBaseMenuItem
public javax.swing.JCheckBoxMenuItem getValueDisplayBaseMenuItem()
Get reference to settings menu item for display base of memory/register values.
Returns:
the menu item
getAddressDisplayBaseMenuItem
public javax.swing.JCheckBoxMenuItem getAddressDisplayBaseMenuItem()
Get reference to settings menu item for display base of memory/register values.
Returns:
the menu item
getRunAssembleAction
public javax.swing.Action getRunAssembleAction()
Return reference tothe Run->Assemble item’s action. Needed by File->Open in case
assemble-upon-open flag is set.
Returns:
the Action object for the Run->Assemble operation.
haveMenuRequestFocus
public void haveMenuRequestFocus()
Have the menu request keyboard focus. DPS 5-4-10
dispatchEventToMenu
public void dispatchEventToMenu(java.awt.event.KeyEvent evt)
Send keyboard event to menu for possible processing. DPS 5-4-10
Parameters:
evt – KeyEvent for menu component to consider for processing.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MainPane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class MainPane
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JTabbedPane
mars.venus.MainPane
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.SwingConstants
public class MainPane
extends javax.swing.JTabbedPane
Creates the tabbed areas in the UI and also created the internal windows that
exist in them.
Author:
Sanderson and Bumgarner
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JTabbedPane
javax.swing.JTabbedPane.AccessibleJTabbedPane, javax.swing.JTabbedPane.ModelListener
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JTabbedPane
changeEvent, changeListener, model, SCROLL_TAB_LAYOUT, tabPlacement, WRAP_TAB_LAYOUT
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
MainPane(VenusUI appFrame,
Editor editor,
RegistersWindow regs,
Coprocessor1Window cop1Regs,
Coprocessor0Window cop0Regs)
Constructor for the MainPane class.
Method Summary
EditPane getEditPane()
Returns current edit pane.
javax.swing.JComponent getEditTabbedPane()
Returns component containing editor display
ExecutePane getExecutePane()
returns component containing execution-time display
ExecutePane getExecuteTab()
returns component containing execution-time display.
Methods inherited from class javax.swing.JTabbedPane
add, add, add, add, add, addChangeListener, addTab, addTab, addTab, createChangeListener, fireStateChanged, getAccessibleContext, getBackgroundAt, getBoundsAt, getChangeListeners, getComponentAt, getDisabledIconAt, getDisplayedMnemonicIndexAt, getForegroundAt, getIconAt, getMnemonicAt, getModel, getSelectedComponent, getSelectedIndex, getTabComponentAt, getTabCount, getTabLayoutPolicy, getTabPlacement, getTabRunCount, getTitleAt, getToolTipText, getToolTipTextAt, getUI, getUIClassID, indexAtLocation, indexOfComponent, indexOfTab, indexOfTab, indexOfTabComponent, insertTab, isEnabledAt, paramString, remove, remove, removeAll, removeChangeListener, removeTabAt, setBackgroundAt, setComponentAt, setDisabledIconAt, setDisplayedMnemonicIndexAt, setEnabledAt, setForegroundAt, setIconAt, setMnemonicAt, setModel, setSelectedComponent, setSelectedIndex, setTabComponentAt, setTabLayoutPolicy, setTabPlacement, setTitleAt, setToolTipTextAt, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
MainPane
public MainPane(VenusUI appFrame,
Editor editor,
RegistersWindow regs,
Coprocessor1Window cop1Regs,
Coprocessor0Window cop0Regs)
Constructor for the MainPane class.
Method Detail
getEditPane
public EditPane getEditPane()
Returns current edit pane. Implementation changed for MARS 4.0 support
for multiple panes, but specification is same.
Returns:
the editor pane
getEditTabbedPane
public javax.swing.JComponent getEditTabbedPane()
Returns component containing editor display
Returns:
the editor tabbed pane
getExecutePane
public ExecutePane getExecutePane()
returns component containing execution-time display
Returns:
the execute pane
getExecuteTab
public ExecutePane getExecuteTab()
returns component containing execution-time display.
Same as getExecutePane().
Returns:
the execute pane
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunBackstepAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunBackstepAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunBackstepAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunBackstepAction
extends GuiAction
Action for the Run -> Backstep menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunBackstepAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
perform next simulated instruction step.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunBackstepAction
public RunBackstepAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
perform next simulated instruction step.
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
FileCloseAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class FileCloseAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.FileCloseAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class FileCloseAction
extends GuiAction
Action for the File -> Close menu item
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
FileCloseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
FileCloseAction
public FileCloseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsPopupInputAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsPopupInputAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsPopupInputAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsPopupInputAction
extends GuiAction
Action class for the Settings menu item to control use of popup dialog for input syscalls.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsPopupInputAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsPopupInputAction
public SettingsPopupInputAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RunStopAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class RunStopAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.RunStopAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class RunStopAction
extends GuiAction
Action class for the Run -> Stop menu item (and toolbar icon)
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
RunStopAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RunStopAction
public RunStopAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsAssembleOnOpenAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsAssembleOnOpenAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsAssembleOnOpenAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsAssembleOnOpenAction
extends GuiAction
Action class for the Settings menu item to control automatic assemble of file upon opening.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsAssembleOnOpenAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsAssembleOnOpenAction
public SettingsAssembleOnOpenAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsExceptionHandlerAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsExceptionHandlerAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsExceptionHandlerAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsExceptionHandlerAction
extends GuiAction
Action class for the Settings menu item for optionally loading a MIPS exception handler.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsExceptionHandlerAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsExceptionHandlerAction
public SettingsExceptionHandlerAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SettingsValueDisplayBaseAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class SettingsValueDisplayBaseAction
java.lang.Object
javax.swing.AbstractAction
mars.venus.GuiAction
mars.venus.SettingsValueDisplayBaseAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class SettingsValueDisplayBaseAction
extends GuiAction
Action class for the Settings menu item to control number base (10 or 16) of memory/register contents.
See Also:
Serialized Form
Field Summary
Fields inherited from class mars.venus.GuiAction
mainUI
Fields inherited from class javax.swing.AbstractAction
changeSupport, enabled
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON
Constructor Summary
SettingsValueDisplayBaseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
does nothing by default.
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SettingsValueDisplayBaseAction
public SettingsValueDisplayBaseAction(java.lang.String name,
javax.swing.Icon icon,
java.lang.String descrip,
java.lang.Integer mnemonic,
javax.swing.KeyStroke accel,
VenusUI gui)
Method Detail
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from class: GuiAction
does nothing by default. Should be over-ridden by subclass
Specified by:
actionPerformed in interface java.awt.event.ActionListener
Overrides:
actionPerformed in class GuiAction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AbstractFontSettingDialog
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class AbstractFontSettingDialog
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
mars.venus.AbstractFontSettingDialog
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public abstract class AbstractFontSettingDialog
extends javax.swing.JDialog
Abstract class for a font selection dialog.
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
protected java.awt.Font currentFont
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
Fields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPE
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
AbstractFontSettingDialog(java.awt.Frame owner,
java.lang.String title,
boolean modality,
java.awt.Font currentFont)
Create a new font chooser.
Method Summary
protected abstract void apply(java.awt.Font font)
Apply the given font.
protected abstract java.awt.Component buildControlPanel()
protected javax.swing.JPanel buildDialogPanel()
protected void closeDialog()
java.awt.Font getFont()
protected void performApply()
protected void reset()
Methods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setModalityType, setResizable, setTitle, setUndecorated, setVisible, show, toBack
Methods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, toFront
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
currentFont
protected java.awt.Font currentFont
Constructor Detail
AbstractFontSettingDialog
public AbstractFontSettingDialog(java.awt.Frame owner,
java.lang.String title,
boolean modality,
java.awt.Font currentFont)
Create a new font chooser. Has pertinent JDialog parameters.
Will do everything except make it visible.
Method Detail
buildDialogPanel
protected javax.swing.JPanel buildDialogPanel()
buildControlPanel
protected abstract java.awt.Component buildControlPanel()
getFont
public java.awt.Font getFont()
Specified by:
getFont in interface java.awt.MenuContainer
Overrides:
getFont in class java.awt.Component
performApply
protected void performApply()
closeDialog
protected void closeDialog()
reset
protected void reset()
apply
protected abstract void apply(java.awt.Font font)
Apply the given font. Left for the client to define.
Parameters:
font – a font to be applied by the client.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
LabelsWindow
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.venus
Class LabelsWindow
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JInternalFrame
mars.venus.LabelsWindow
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants
public class LabelsWindow
extends javax.swing.JInternalFrame
Represents the Labels window, which is a type of JInternalFrame. Venus user
can view MIPS program labels.
Author:
Sanderson and Team JSpim
See Also:
Serialized Form
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JInternalFrame
javax.swing.JInternalFrame.AccessibleJInternalFrame, javax.swing.JInternalFrame.JDesktopIcon
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
Field Summary
Fields inherited from class javax.swing.JInternalFrame
closable, CONTENT_PANE_PROPERTY, desktopIcon, FRAME_ICON_PROPERTY, frameIcon, GLASS_PANE_PROPERTY, iconable, IS_CLOSED_PROPERTY, IS_ICON_PROPERTY, IS_MAXIMUM_PROPERTY, IS_SELECTED_PROPERTY, isClosed, isIcon, isMaximum, isSelected, LAYERED_PANE_PROPERTY, maximizable, MENU_BAR_PROPERTY, resizable, ROOT_PANE_PROPERTY, rootPane, rootPaneCheckingEnabled, title, TITLE_PROPERTY
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor Summary
LabelsWindow()
Constructor for the Labels (symbol table) window.
Method Summary
void clearWindow()
Clear the window
void setupTable()
Initialize table of labels (symbol table)
void updateLabelAddresses()
Method to update display of label addresses.
Methods inherited from class javax.swing.JInternalFrame
addImpl, addInternalFrameListener, createRootPane, dispose, doDefaultCloseAction, fireInternalFrameEvent, getAccessibleContext, getContentPane, getDefaultCloseOperation, getDesktopIcon, getDesktopPane, getFocusCycleRootAncestor, getFocusOwner, getFrameIcon, getGlassPane, getInternalFrameListeners, getJMenuBar, getLastCursor, getLayer, getLayeredPane, getMenuBar, getMostRecentFocusOwner, getNormalBounds, getRootPane, getTitle, getUI, getUIClassID, getWarningString, hide, isClosable, isClosed, isFocusCycleRoot, isIcon, isIconifiable, isMaximizable, isMaximum, isResizable, isRootPaneCheckingEnabled, isSelected, moveToBack, moveToFront, pack, paintComponent, paramString, remove, removeInternalFrameListener, reshape, restoreSubcomponentFocus, setClosable, setClosed, setContentPane, setCursor, setDefaultCloseOperation, setDesktopIcon, setFocusCycleRoot, setFrameIcon, setGlassPane, setIcon, setIconifiable, setJMenuBar, setLayer, setLayer, setLayeredPane, setLayout, setMaximizable, setMaximum, setMenuBar, setNormalBounds, setResizable, setRootPane, setRootPaneCheckingEnabled, setSelected, setTitle, setUI, show, toBack, toFront, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusBackward, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, size, toString, transferFocus, transferFocusUpCycle
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
LabelsWindow
public LabelsWindow()
Constructor for the Labels (symbol table) window.
Method Detail
setupTable
public void setupTable()
Initialize table of labels (symbol table)
clearWindow
public void clearWindow()
Clear the window
updateLabelAddresses
public void updateLabelAddresses()
Method to update display of label addresses. Since label information doesn’t change,
this should only be done when address base is changed.
(e.g. between base 16 hex and base 10 dec).
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class ProcessingException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.ProcessingException
All Implemented Interfaces:
java.io.Serializable
public class ProcessingException
extends java.lang.Exception
Class to represent error that occurs while assembling or running a MIPS program.
Author:
Pete Sanderson
See Also:
Serialized Form
Constructor Summary
ProcessingException()
Constructor for ProcessingException.
ProcessingException(ErrorList e)
Constructor for ProcessingException.
ProcessingException(ProgramStatement ps,
AddressErrorException aee)
Constructor for ProcessingException to handle address runtime exceptions
ProcessingException(ProgramStatement ps,
java.lang.String m)
Constructor for ProcessingException to handle runtime exceptions
ProcessingException(ProgramStatement ps,
java.lang.String m,
int cause)
Constructor for ProcessingException to handle runtime exceptions
Method Summary
ErrorList errors()
Produce the list of error messages.
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
ProcessingException
public ProcessingException(ErrorList e)
Constructor for ProcessingException.
Parameters:
e – An ErrorList which is an ArrayList of ErrorMessage objects. Each ErrorMessage
represents one processing error.
ProcessingException
public ProcessingException(ProgramStatement ps,
java.lang.String m)
Constructor for ProcessingException to handle runtime exceptions
Parameters:
ps – a ProgramStatement of statement causing runtime exception
m – a String containing specialized error message
ProcessingException
public ProcessingException(ProgramStatement ps,
java.lang.String m,
int cause)
Constructor for ProcessingException to handle runtime exceptions
Parameters:
ps – a ProgramStatement of statement causing runtime exception
m – a String containing specialized error message
cause – exception cause (see Exceptions class for list)
ProcessingException
public ProcessingException(ProgramStatement ps,
AddressErrorException aee)
Constructor for ProcessingException to handle address runtime exceptions
Parameters:
ps – a ProgramStatement of statement causing runtime exception
aee – AddressErrorException object containing specialized error message, cause, address
ProcessingException
public ProcessingException()
Constructor for ProcessingException.
No parameter and thus no error list. Use this for normal MIPS
program termination (e.g. syscall 10 for exit).
Method Detail
errors
public ErrorList errors()
Produce the list of error messages.
Returns:
Returns ErrorList of error messages.
See Also:
ErrorList,
ErrorMessage
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ErrorList
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class ErrorList
java.lang.Object
mars.ErrorList
public class ErrorList
extends java.lang.Object
Maintains list of generated error messages, regardless of source (tokenizing, parsing,
assembly, execution).
Author:
Pete Sanderson
Field Summary
static java.lang.String ERROR_MESSAGE_PREFIX
static java.lang.String FILENAME_PREFIX
static java.lang.String LINE_PREFIX
static java.lang.String MESSAGE_SEPARATOR
static java.lang.String POSITION_PREFIX
static java.lang.String WARNING_MESSAGE_PREFIX
Constructor Summary
ErrorList()
Constructor for ErrorList
Method Summary
void add(ErrorMessage mess)
Add new error message to end of list.
void add(ErrorMessage mess,
int index)
Add new error message at specified index position.
int errorCount()
Count of number of error messages in list.
boolean errorLimitExceeded()
Check to see if error limit has been exceeded.
boolean errorsOccurred()
Determine whether error has occured or not.
java.lang.String generateErrorAndWarningReport()
Produce report containing both warnings and errors, warnings first.
java.lang.String generateErrorReport()
Produce error report.
java.lang.String generateWarningReport()
Produce warning report.
int getErrorLimit()
Get limit on number of error messages to be generated
by one assemble operation.
java.util.ArrayList getErrorMessages()
Get ArrayList of error messages.
int warningCount()
Count of number of warning messages in list.
boolean warningsOccurred()
Determine whether warning has occured or not.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
ERROR_MESSAGE_PREFIX
public static final java.lang.String ERROR_MESSAGE_PREFIX
See Also:
Constant Field Values
WARNING_MESSAGE_PREFIX
public static final java.lang.String WARNING_MESSAGE_PREFIX
See Also:
Constant Field Values
FILENAME_PREFIX
public static final java.lang.String FILENAME_PREFIX
See Also:
Constant Field Values
LINE_PREFIX
public static final java.lang.String LINE_PREFIX
See Also:
Constant Field Values
POSITION_PREFIX
public static final java.lang.String POSITION_PREFIX
See Also:
Constant Field Values
MESSAGE_SEPARATOR
public static final java.lang.String MESSAGE_SEPARATOR
See Also:
Constant Field Values
Constructor Detail
ErrorList
public ErrorList()
Constructor for ErrorList
Method Detail
getErrorMessages
public java.util.ArrayList getErrorMessages()
Get ArrayList of error messages.
Returns:
ArrayList of ErrorMessage objects
errorsOccurred
public boolean errorsOccurred()
Determine whether error has occured or not.
Returns:
true if an error has occurred (does not include warnings), false otherwise.
warningsOccurred
public boolean warningsOccurred()
Determine whether warning has occured or not.
Returns:
true if an warning has occurred, false otherwise.
add
public void add(ErrorMessage mess)
Add new error message to end of list.
Parameters:
mess – ErrorMessage object to be added to end of error list.
add
public void add(ErrorMessage mess,
int index)
Add new error message at specified index position.
Parameters:
mess – ErrorMessage object to be added to end of error list.
index – position in error list
errorCount
public int errorCount()
Count of number of error messages in list.
Returns:
Number of error messages in list.
warningCount
public int warningCount()
Count of number of warning messages in list.
Returns:
Number of warning messages in list.
errorLimitExceeded
public boolean errorLimitExceeded()
Check to see if error limit has been exceeded.
Returns:
True if error limit exceeded, false otherwise.
getErrorLimit
public int getErrorLimit()
Get limit on number of error messages to be generated
by one assemble operation.
Returns:
error limit.
generateErrorReport
public java.lang.String generateErrorReport()
Produce error report.
Returns:
String containing report.
generateWarningReport
public java.lang.String generateWarningReport()
Produce warning report.
Returns:
String containing report.
generateErrorAndWarningReport
public java.lang.String generateErrorAndWarningReport()
Produce report containing both warnings and errors, warnings first.
Returns:
String containing report.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SimulationCode
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Interface SimulationCode
public interface SimulationCode
Interface to represent the method for simulating the execution of a specific MIPS basic
instruction. It will be implemented by the anonymous class created in the last
argument to the BasicInstruction constructor.
Author:
Pete Sanderson
Method Summary
void simulate(ProgramStatement statement)
Method to simulate the execution of a specific MIPS basic instruction.
Method Detail
simulate
void simulate(ProgramStatement statement)
throws ProcessingException
Method to simulate the execution of a specific MIPS basic instruction.
Parameters:
statement – A ProgramStatement representing the MIPS instruction to simulate.
Throws:
ProcessingException – This is a run-time exception generated during simulation.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ExtendedInstruction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Class ExtendedInstruction
java.lang.Object
mars.mips.instructions.Instruction
mars.mips.instructions.ExtendedInstruction
public class ExtendedInstruction
extends Instruction
ExtendedInstruction represents a MIPS extended (a.k.a pseudo) instruction. This
assembly language instruction does not have a corresponding machine instruction. Instead
it is translated by the extended assembler into one or more basic instructions (operations
that have a corresponding machine instruction). The TranslationCode object is
responsible for performing the translation.
Author:
Pete Sanderson
Field Summary
Fields inherited from class mars.mips.instructions.Instruction
description, exampleFormat, INSTRUCTION_LENGTH, INSTRUCTION_LENGTH_BITS, mnemonic, operandMask, tokenList
Constructor Summary
ExtendedInstruction(java.lang.String example,
java.lang.String translation)
Constructor for ExtendedInstruction, where no instruction description or
compact translation is provided.
ExtendedInstruction(java.lang.String example,
java.lang.String translation,
java.lang.String description)
Constructor for ExtendedInstruction.
ExtendedInstruction(java.lang.String example,
java.lang.String translation,
java.lang.String compactTranslation,
java.lang.String description)
Constructor for ExtendedInstruction.
Method Summary
java.util.ArrayList getBasicIntructionTemplateList()
Get ArrayList of Strings that represent list of templates for
basic instructions generated by this extended instruction.
java.util.ArrayList getCompactBasicIntructionTemplateList()
Get ArrayList of Strings that represent list of templates for
basic instructions generated by the “compact” or 16-bit version
of this extended instruction.
int getCompactInstructionLength()
Get length in bytes that this extended instruction requires in its
binary form if it includes an alternative expansion for compact
memory (16 bit addressing) configuration.
int getInstructionLength()
Get length in bytes that this extended instruction requires in its
binary form.
boolean hasCompactTranslation()
Determine whether or not this pseudo-instruction has a second
translation optimized for 16 bit address space: a compact version.
static java.lang.String makeTemplateSubstitutions(MIPSprogram program,
java.lang.String template,
TokenList theTokenList)
Given a basic instruction template and the list of tokens from an extended
instruction statement, substitute operands from the token list appropriately into the
template to generate the basic statement.
Methods inherited from class mars.mips.instructions.Instruction
createExampleTokenList, extractOperator, getDescription, getExampleFormat, getName, getTokenList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ExtendedInstruction
public ExtendedInstruction(java.lang.String example,
java.lang.String translation,
java.lang.String compactTranslation,
java.lang.String description)
Constructor for ExtendedInstruction.
Parameters:
example – A String containing example use of the MIPS extended instruction.
translation – Specifications for translating this instruction into a sequence
of one or more MIPS basic instructions.
compactTranslation – Alternative translation that can be used if running under
a compact (16 bit) memory configuration.
description – a helpful description to be included on help requests
The presence of an alternative “compact translation” can optimize code generation
by assuming that data label addresses are 16 bits instead of 32
ExtendedInstruction
public ExtendedInstruction(java.lang.String example,
java.lang.String translation,
java.lang.String description)
Constructor for ExtendedInstruction. No compact translation is provided.
Parameters:
example – A String containing example use of the MIPS extended instruction.
translation – Specifications for translating this instruction into a sequence
of one or more MIPS basic instructions.
description – a helpful description to be included on help requests
ExtendedInstruction
public ExtendedInstruction(java.lang.String example,
java.lang.String translation)
Constructor for ExtendedInstruction, where no instruction description or
compact translation is provided.
Parameters:
example – A String containing example use of the MIPS extended instruction.
translation – Specifications for translating this instruction into a sequence
of one or more MIPS basic instructions.
Method Detail
getInstructionLength
public int getInstructionLength()
Get length in bytes that this extended instruction requires in its
binary form. The answer depends on how many basic instructions it
expands to. This may vary, if expansion includes a nop, depending on
whether or not delayed branches are enabled. Each requires 4 bytes.
Overrides:
getInstructionLength in class Instruction
Returns:
int length in bytes of corresponding binary instruction(s).
getBasicIntructionTemplateList
public java.util.ArrayList getBasicIntructionTemplateList()
Get ArrayList of Strings that represent list of templates for
basic instructions generated by this extended instruction.
Returns:
ArrayList of Strings.
getCompactInstructionLength
public int getCompactInstructionLength()
Get length in bytes that this extended instruction requires in its
binary form if it includes an alternative expansion for compact
memory (16 bit addressing) configuration. The answer depends on
how many basic instructions it expands to. This may vary, if
expansion includes a nop, depending on whether or not delayed
branches are enabled. Each requires 4 bytes.
Returns:
int length in bytes of corresponding binary instruction(s).
Returns 0 if an alternative expansion is not defined for this
instruction.
hasCompactTranslation
public boolean hasCompactTranslation()
Determine whether or not this pseudo-instruction has a second
translation optimized for 16 bit address space: a compact version.
getCompactBasicIntructionTemplateList
public java.util.ArrayList getCompactBasicIntructionTemplateList()
Get ArrayList of Strings that represent list of templates for
basic instructions generated by the “compact” or 16-bit version
of this extended instruction.
Returns:
ArrayList of Strings. Returns null if the instruction does not
have a compact alternative.
makeTemplateSubstitutions
public static java.lang.String makeTemplateSubstitutions(MIPSprogram program,
java.lang.String template,
TokenList theTokenList)
Given a basic instruction template and the list of tokens from an extended
instruction statement, substitute operands from the token list appropriately into the
template to generate the basic statement. Assumes the extended instruction statement has
been translated from source form to basic assembly form (e.g. register mnemonics
translated to corresponding register numbers).
Operand format of source statement is already verified correct.
Assume the template has correct number and positions of operands.
Template is String with special markers. In the list below, n represents token position (1,2,3,etc)
in source statement (operator is token 0, parentheses count but commas don’t):
RGn means substitute register found in n’th token of source statement
NRn means substitute next higher register than the one in n’th token of source code
OPn means substitute n’th token of source code as is
LLn means substitute low order 16 bits from label address in source token n.
LLnU means substitute low order 16 bits (unsigned) from label address in source token n.
LLnPm (m=1,2,3,4) means substitute low order 16 bits from label address in source token n, after adding m.
LHn means substitute high order 16 bits from label address in source token n. Must add 1 if address bit 15 is 1.
LHnPm (m=1,2,3,4) means substitute high order 16 bits from label address in source token n, after adding m. Must then add 1 if bit 15 is 1.
VLn means substitute low order 16 bits from 32 bit value in source token n.
VLnU means substitute low order 16 bits (unsigned) from 32 bit value in source token n.
VLnPm (m=1,2,3,4) means substitute low order 16 bits from 32 bit value in source token n, after adding m to value.
VLnPmU (m=1,2,3,4) means substitute low order 16 bits (unsigned) from 32 bit value in source token n, after adding m to value.
VHLn means substitute high order 16 bits from 32 bit value in source token n. Use this if later combined with low order 16 bits using “ori $1,$1,VLn”. See logical and branch operations.
VHn means substitute high order 16 bits from 32 bit value in source token n, then add 1 if value’s bit 15 is 1. Use this only if later instruction uses VLn($1) to calculate 32 bit address. See loads and stores.
VHLnPm (m=1,2,3,4) means substitute high order 16 bits from 32 bit value in source token n, after adding m. See VHLn.
VHnPm (m=1,2,3,4) means substitute high order 16 bits from 32 bit value in source token n, after adding m. Must then add 1 if bit 15 is 1. See VHn.
LLP is similar to LLn, but is needed for “label+100000” address offset. Immediate is added before taking low order 16.
LLPU is similar to LLnU, but is needed for “label+100000” address offset. Immediate is added before taking low order 16 (unsigned).
LLPPm (m=1,2,3,4) is similar to LLP except m is added along with mmediate before taking low order 16.
LHPA is similar to LHn, but is needed for “label+100000” address offset. Immediate is added before taking high order 16.
LHPN is similar to LHPA, used only by “la” instruction. Address resolved by “ori” so do not add 1 if bit 15 is 1.
LHPAPm (m=1,2,3,4) is similar to LHPA except value m is added along with immediate before taking high order 16.
LHL means substitute high order 16 bits from label address in token 2 of “la” (load address) source statement.
LAB means substitute textual label from last token of source statement. Used for various branches.
S32 means substitute the result of subtracting the constant value in last token from 32. Used by “ror”, “rol”.
DBNOP means Delayed Branching NOP – generate a “nop” instruction but only if delayed branching is enabled. Added in 3.4.1 release.
BROFFnm means substitute n if delayed branching is NOT enabled otherwise substitute m. n and m are single digit numbers indicating constant branch offset (in words). Added in 3.4.1 release.
Parameters:
template – a String containing template for basic statement.
tokenList – a TokenList containing tokens from extended instruction.
Returns:
String representing basic assembler statement.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
mars.mips.instructions
Interfaces
SimulationCode
Classes
BasicInstruction
BasicInstructionFormat
ExtendedInstruction
Instruction
InstructionSet
BasicInstructionFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Class BasicInstructionFormat
java.lang.Object
mars.mips.instructions.BasicInstructionFormat
public class BasicInstructionFormat
extends java.lang.Object
These are the MIPS-defined formats of basic machine instructions. The R-format indicates
the instruction works only with registers. The I-format indicates the instruction
works with an immediate value (e.g. constant). The J-format indicates this is a Jump
instruction. The I-branch-format is defined by me, not MIPS, to to indicate this is
a Branch instruction, specifically to distinguish immediate
values used as target addresses.
Author:
Pete Sanderson
Field Summary
static BasicInstructionFormat I_BRANCH_FORMAT
static BasicInstructionFormat I_FORMAT
static BasicInstructionFormat J_FORMAT
static BasicInstructionFormat R_FORMAT
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
R_FORMAT
public static final BasicInstructionFormat R_FORMAT
I_FORMAT
public static final BasicInstructionFormat I_FORMAT
I_BRANCH_FORMAT
public static final BasicInstructionFormat I_BRANCH_FORMAT
J_FORMAT
public static final BasicInstructionFormat J_FORMAT
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.mips.instructions
Interface Summary
SimulationCode Interface to represent the method for simulating the execution of a specific MIPS basic
instruction.
Class Summary
BasicInstruction Class to represent a basic instruction in the MIPS instruction set.
BasicInstructionFormat These are the MIPS-defined formats of basic machine instructions.
ExtendedInstruction ExtendedInstruction represents a MIPS extended (a.k.a pseudo) instruction.
Instruction Base class to represent member of MIPS instruction set.
InstructionSet The list of Instruction objects, each of which represents a MIPS instruction.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
mars.mips.instructions Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.mips.instructions
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.mips.instructions.BasicInstructionFormat
mars.mips.instructions.Instruction mars.mips.instructions.BasicInstruction
mars.mips.instructions.ExtendedInstruction
mars.mips.instructions.InstructionSet
Interface Hierarchy
mars.mips.instructions.SimulationCode
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Instruction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Class Instruction
java.lang.Object
mars.mips.instructions.Instruction
Direct Known Subclasses:
BasicInstruction, ExtendedInstruction
public abstract class Instruction
extends java.lang.Object
Base class to represent member of MIPS instruction set.
Author:
Pete Sanderson and Ken Vollmar
Field Summary
protected java.lang.String description
Description of instruction for display to user
protected java.lang.String exampleFormat
Example usage of this instruction.
static int INSTRUCTION_LENGTH
Length in bytes of a machine instruction.
static int INSTRUCTION_LENGTH_BITS
protected java.lang.String mnemonic
The instruction name.
static char[] operandMask
Characters used in instruction mask to indicate bit positions
for ‘f’irst, ‘s’econd, and ‘t’hird operands.
protected TokenList tokenList
List of tokens generated by tokenizing example usage (see exampleFormat).
Constructor Summary
Instruction()
Method Summary
protected void createExampleTokenList()
Used to build a token list from the example instruction
provided as constructor argument.
protected java.lang.String extractOperator(java.lang.String example)
Used by subclass constructors to extract operator mnemonic from the
instruction example.
java.lang.String getDescription()
Get string describing the instruction.
java.lang.String getExampleFormat()
Get string descriptor of instruction’s format.
int getInstructionLength()
Get length in bytes that this instruction requires in its binary form.
java.lang.String getName()
Get operation mnemonic
TokenList getTokenList()
Get TokenList corresponding to correct instruction syntax.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
INSTRUCTION_LENGTH
public static final int INSTRUCTION_LENGTH
Length in bytes of a machine instruction. MIPS is a RISC architecture
so all instructions are the same length. Currently set to 4.
See Also:
Constant Field Values
INSTRUCTION_LENGTH_BITS
public static final int INSTRUCTION_LENGTH_BITS
See Also:
Constant Field Values
operandMask
public static char[] operandMask
Characters used in instruction mask to indicate bit positions
for ‘f’irst, ‘s’econd, and ‘t’hird operands.
mnemonic
protected java.lang.String mnemonic
The instruction name.
exampleFormat
protected java.lang.String exampleFormat
Example usage of this instruction. Is provided as subclass constructor argument.
description
protected java.lang.String description
Description of instruction for display to user
tokenList
protected TokenList tokenList
List of tokens generated by tokenizing example usage (see exampleFormat).
Constructor Detail
Instruction
public Instruction()
Method Detail
getName
public java.lang.String getName()
Get operation mnemonic
Returns:
operation mnemonic (e.g. addi, sw)
getExampleFormat
public java.lang.String getExampleFormat()
Get string descriptor of instruction’s format. This is an example MIPS
assembler instruction usage which contains the operator and all operands.
Operands are separated by commas, an operand that begins with a ‘$’
represents a register, and an integer operand represents an immediate value
or address. Here are two examples: “nor $1,$2,$3” and “sw $1,100($2)”
Returns:
String representing example instruction format.
getDescription
public java.lang.String getDescription()
Get string describing the instruction. This is not used internally by
MARS, but is for display to the user.
Returns:
String describing the instruction.
getTokenList
public TokenList getTokenList()
Get TokenList corresponding to correct instruction syntax.
For example, the instruction with format “sw $1,100($2)” yields token list
Returns:
TokenList object representing correct instruction usage.
getInstructionLength
public int getInstructionLength()
Get length in bytes that this instruction requires in its binary form.
Default is 4 (holds for all basic instructions), but can be overridden
in subclass.
Returns:
int length in bytes of corresponding binary instruction(s).
extractOperator
protected java.lang.String extractOperator(java.lang.String example)
Used by subclass constructors to extract operator mnemonic from the
instruction example.
createExampleTokenList
protected void createExampleTokenList()
Used to build a token list from the example instruction
provided as constructor argument. Parser uses this for syntax checking.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
InstructionSet
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Class InstructionSet
java.lang.Object
mars.mips.instructions.InstructionSet
public class InstructionSet
extends java.lang.Object
The list of Instruction objects, each of which represents a MIPS instruction.
The instruction may either be basic (translates into binary machine code) or
extended (translates into sequence of one or more basic instructions).
Author:
Pete Sanderson and Ken Vollmar
Constructor Summary
InstructionSet()
Creates a new InstructionSet object.
Method Summary
java.util.ArrayList getInstructionList()
Retrieve the current instruction set.
java.util.ArrayList matchOperator(java.lang.String name)
Given an operator mnemonic, will return the corresponding Instruction object(s)
from the instruction set.
void populate()
Adds all instructions to the set.
java.util.ArrayList prefixMatchOperator(java.lang.String name)
Given a string, will return the Instruction object(s) from the instruction
set whose operator mnemonic prefix matches it.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
InstructionSet
public InstructionSet()
Creates a new InstructionSet object.
Method Detail
getInstructionList
public java.util.ArrayList getInstructionList()
Retrieve the current instruction set.
populate
public void populate()
Adds all instructions to the set. A given extended instruction may have
more than one Instruction object, depending on how many formats it can have.
See Also:
Instruction,
BasicInstruction,
ExtendedInstruction
matchOperator
public java.util.ArrayList matchOperator(java.lang.String name)
Given an operator mnemonic, will return the corresponding Instruction object(s)
from the instruction set. Uses straight linear search technique.
Parameters:
name – operator mnemonic (e.g. addi, sw,…)
Returns:
list of corresponding Instruction object(s), or null if not found.
prefixMatchOperator
public java.util.ArrayList prefixMatchOperator(java.lang.String name)
Given a string, will return the Instruction object(s) from the instruction
set whose operator mnemonic prefix matches it. Case-insensitive. For example
“s” will match “sw”, “sh”, “sb”, etc. Uses straight linear search technique.
Parameters:
name – a string
Returns:
list of matching Instruction object(s), or null if none match.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintString
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintString
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintString
All Implemented Interfaces:
Syscall
public class SyscallPrintString
extends AbstractSyscall
Service to display string stored starting at address in $a0 onto the console.
Constructor Summary
SyscallPrintString()
Build an instance of the Print String syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print string stored starting at address in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintString
public SyscallPrintString()
Build an instance of the Print String syscall. Default service number
is 4 and name is “PrintString”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print string stored starting at address in $a0.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintIntBinary
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintIntBinary
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintIntBinary
All Implemented Interfaces:
Syscall
public class SyscallPrintIntBinary
extends AbstractSyscall
Service to display integer stored in $a0 on the console.
Constructor Summary
SyscallPrintIntBinary()
Build an instance of the Print Integer syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintIntBinary
public SyscallPrintIntBinary()
Build an instance of the Print Integer syscall. Default service number
is 1 and name is “PrintInt”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMidiOut
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMidiOut
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMidiOut
All Implemented Interfaces:
Syscall
public class SyscallMidiOut
extends AbstractSyscall
Service to output simulated MIDI tone to sound card. The call returns
immediately upon generating the tone. By contrast, syscall 33
(MidiOutSync) does not return until tone duration has elapsed.
Constructor Summary
SyscallMidiOut()
Build an instance of the MIDI (simulated) out syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to send MIDI output to sound card.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMidiOut
public SyscallMidiOut()
Build an instance of the MIDI (simulated) out syscall. Default service number
is 31 and name is “MidiOut”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to send MIDI output to sound card. This requires
four arguments in registers $a0 through $a3.
$a0 – pitch (note). Integer value from 0 to 127, with 60 being middle-C on a piano.
$a1 – duration. Integer value in milliseconds.
$a2 – instrument. Integer value from 0 to 127, with 0 being acoustic grand piano.
$a3 – volume. Integer value from 0 to 127.
Default values, in case any parameters are outside the above ranges, are $a0=60, $a1=1000,
$a2=0, $a3=100.
See MARS documentation elsewhere or www.midi.org for more information. Note that the pitch,
instrument and volume value ranges 0-127 are from javax.sound.midi; actual MIDI instruments
use the range 1-128.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMessageDialogInt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMessageDialogInt
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMessageDialogInt
All Implemented Interfaces:
Syscall
public class SyscallMessageDialogInt
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallMessageDialogInt()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMessageDialogInt
public SyscallMessageDialogInt()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallExit
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallExit
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallExit
All Implemented Interfaces:
Syscall
public class SyscallExit
extends AbstractSyscall
Service to exit the MIPS program.
Constructor Summary
SyscallExit()
Build an instance of the Exit syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to exit the MIPS program.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallExit
public SyscallExit()
Build an instance of the Exit syscall. Default service number
is 10 and name is “Exit”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to exit the MIPS program.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallInputDialogInt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallInputDialogInt
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallInputDialogInt
All Implemented Interfaces:
Syscall
public class SyscallInputDialogInt
extends AbstractSyscall
Service to input data.
Constructor Summary
SyscallInputDialogInt()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to input data.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallInputDialogInt
public SyscallInputDialogInt()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to input data.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallReadFloat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallReadFloat
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallReadFloat
All Implemented Interfaces:
Syscall
public class SyscallReadFloat
extends AbstractSyscall
Service to read the bits of input float into $f0
Constructor Summary
SyscallReadFloat()
Build an instance of the Read Float syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read the bits of input float into $f0
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallReadFloat
public SyscallReadFloat()
Build an instance of the Read Float syscall. Default service number
is 6 and name is “ReadFloat”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read the bits of input float into $f0
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallOpen
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallOpen
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallOpen
All Implemented Interfaces:
Syscall
public class SyscallOpen
extends AbstractSyscall
Service to open file name specified by $a0. File descriptor returned in $v0.
(this was changed from $a0 in MARS 3.7 for SPIM compatibility. The table
in COD erroneously shows $a0).
Constructor Summary
SyscallOpen()
Build an instance of the Open file syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to open file name specified by $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallOpen
public SyscallOpen()
Build an instance of the Open file syscall. Default service number
is 13 and name is “Open”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to open file name specified by $a0. File descriptor returned
in $v0. Only supported flags ($a1) are read-only (0), write-only (1) and
write-append (9). write-only flag creates file if it does not exist, so it is technically
write-create. write-append will start writing at end of existing file.
Mode ($a2) is ignored.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallReadChar
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallReadChar
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallReadChar
All Implemented Interfaces:
Syscall
public class SyscallReadChar
extends AbstractSyscall
Service to read a character from input console into $a0.
Constructor Summary
SyscallReadChar()
Build an instance of the Read Char syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read a character from input console into $a0
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallReadChar
public SyscallReadChar()
Build an instance of the Read Char syscall. Default service number
is 12 and name is “ReadChar”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read a character from input console into $a0
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMessageDialog
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMessageDialog
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMessageDialog
All Implemented Interfaces:
Syscall
public class SyscallMessageDialog
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallMessageDialog()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMessageDialog
public SyscallMessageDialog()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintFloat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintFloat
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintFloat
All Implemented Interfaces:
Syscall
public class SyscallPrintFloat
extends AbstractSyscall
Service to display on the console float whose bits are stored in $f12
Constructor Summary
SyscallPrintFloat()
Build an instance of the Print Float syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to display float whose bits are stored in $f12
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintFloat
public SyscallPrintFloat()
Build an instance of the Print Float syscall. Default service number
is 2 and name is “PrintFloat”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to display float whose bits are stored in $f12
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallSbrk
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallSbrk
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallSbrk
All Implemented Interfaces:
Syscall
public class SyscallSbrk
extends AbstractSyscall
Service to allocate amount of heap memory specified in $a0, putting address into $v0.
Constructor Summary
SyscallSbrk()
Build an instance of the Sbrk syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to allocate amount of heap memory specified in $a0, putting address into $v0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallSbrk
public SyscallSbrk()
Build an instance of the Sbrk syscall. Default service number
is 9 and name is “Sbrk”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to allocate amount of heap memory specified in $a0, putting address into $v0.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRandDouble
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRandDouble
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRandDouble
All Implemented Interfaces:
Syscall
public class SyscallRandDouble
extends AbstractSyscall
Service to return a random floating point value.
Constructor Summary
SyscallRandDouble()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to the random number generator.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRandDouble
public SyscallRandDouble()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to the random number generator.
Return in $f0 the next pseudorandom, uniformly distributed double value between 0.0 and 1.0
from this random number generator’s sequence.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintIntUnsigned
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintIntUnsigned
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintIntUnsigned
All Implemented Interfaces:
Syscall
public class SyscallPrintIntUnsigned
extends AbstractSyscall
Service to display integer stored in $a0 on the console as unsigned decimal.
Constructor Summary
SyscallPrintIntUnsigned()
Build an instance of the Print Integer Unsigned syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print on the console the integer stored in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintIntUnsigned
public SyscallPrintIntUnsigned()
Build an instance of the Print Integer Unsigned syscall. Default service number
is 36 and name is “PrintIntUnsigned”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print on the console the integer stored in $a0.
The value is treated as unsigned.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMessageDialogString
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMessageDialogString
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMessageDialogString
All Implemented Interfaces:
Syscall
public class SyscallMessageDialogString
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallMessageDialogString()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMessageDialogString
public SyscallMessageDialogString()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AbstractSyscall
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class AbstractSyscall
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
All Implemented Interfaces:
Syscall
Direct Known Subclasses:
SyscallClose, SyscallConfirmDialog, SyscallExit, SyscallExit2, SyscallInputDialogDouble, SyscallInputDialogFloat, SyscallInputDialogInt, SyscallInputDialogString, SyscallMessageDialog, SyscallMessageDialogDouble, SyscallMessageDialogFloat, SyscallMessageDialogInt, SyscallMessageDialogString, SyscallMidiOut, SyscallMidiOutSync, SyscallOpen, SyscallPrintChar, SyscallPrintDouble, SyscallPrintFloat, SyscallPrintInt, SyscallPrintIntBinary, SyscallPrintIntHex, SyscallPrintIntUnsigned, SyscallPrintString, SyscallRandDouble, SyscallRandFloat, SyscallRandInt, SyscallRandIntRange, SyscallRandSeed, SyscallRead, SyscallReadChar, SyscallReadDouble, SyscallReadFloat, SyscallReadInt, SyscallReadString, SyscallSbrk, SyscallSleep, SyscallTime, SyscallWrite
public abstract class AbstractSyscall
extends java.lang.Object
implements Syscall
Abstract class that a MIPS syscall system service may extend. A qualifying service
must be a class in the mars.mips.instructions.syscalls package that
implements the Syscall interface, must be compiled into a .class file,
and its .class file must be in the same folder as Syscall.class.
Mars will detect a qualifying syscall upon startup, create an instance
using its no-argument constructor and add it to its syscall list.
When its service is invoked at runtime (“syscall” instruction
with its service number stored in register $v0), its simulate()
method will be invoked.
Constructor Summary
AbstractSyscall(int number,
java.lang.String name)
Constructor is provided so subclass may initialize instance variables.
Method Summary
java.lang.String getName()
Return the name you have chosen for this syscall.
int getNumber()
Return the assigned service number.
void setNumber(int num)
Set the service number.
abstract void simulate(ProgramStatement statement)
Performs syscall function.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
AbstractSyscall
public AbstractSyscall(int number,
java.lang.String name)
Constructor is provided so subclass may initialize instance variables.
Parameters:
number – default assigned service number
name – service name which may be used for reference independent of number
Method Detail
getName
public java.lang.String getName()
Return the name you have chosen for this syscall. This can be used by a MARS
user to refer to the service when choosing to override its default service
number in the configuration file.
Specified by:
getName in interface Syscall
Returns:
service name as a string
setNumber
public void setNumber(int num)
Set the service number. This is provided to allow MARS implementer or user
to override the default service number.
Specified by:
setNumber in interface Syscall
Parameters:
num – specified service number to override the default.
getNumber
public int getNumber()
Return the assigned service number. This is the number the MIPS programmer
must store into $v0 before issuing the SYSCALL instruction.
Specified by:
getNumber in interface Syscall
Returns:
assigned service number
simulate
public abstract void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function. It will be invoked when the service is invoked
at simulation time. Service is identified by value stored in $v0.
Specified by:
simulate in interface Syscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallInputDialogFloat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallInputDialogFloat
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallInputDialogFloat
All Implemented Interfaces:
Syscall
public class SyscallInputDialogFloat
extends AbstractSyscall
Service to input data.
Constructor Summary
SyscallInputDialogFloat()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to input data.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallInputDialogFloat
public SyscallInputDialogFloat()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to input data.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RandomStreams
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class RandomStreams
java.lang.Object
mars.mips.instructions.syscalls.RandomStreams
public class RandomStreams
extends java.lang.Object
This small class serves only to hold a static HashMap for storing
random number generators for use by all the random number generator
syscalls.
Constructor Summary
RandomStreams()
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
RandomStreams
public RandomStreams()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallInputDialogString
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallInputDialogString
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallInputDialogString
All Implemented Interfaces:
Syscall
public class SyscallInputDialogString
extends AbstractSyscall
Service to input data.
Constructor Summary
SyscallInputDialogString()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to input data.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallInputDialogString
public SyscallInputDialogString()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to input data.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallReadString
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallReadString
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallReadString
All Implemented Interfaces:
Syscall
public class SyscallReadString
extends AbstractSyscall
Service to read console input string into buffer starting at address in $a0.
Constructor Summary
SyscallReadString()
Build an instance of the Read String syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read console input string into buffer starting at address in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallReadString
public SyscallReadString()
Build an instance of the Read String syscall. Default service number
is 8 and name is “ReadString”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read console input string into buffer starting at address in $a0.
Follows semantics of UNIX ‘fgets’. For specified length n,
string can be no longer than n-1. If less than that, add
newline to end. In either case, then pad with null byte.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintChar
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintChar
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintChar
All Implemented Interfaces:
Syscall
public class SyscallPrintChar
extends AbstractSyscall
Service to display character stored in $a0 on the console.
Constructor Summary
SyscallPrintChar()
Build an instance of the Print Char syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print on the console the character stored in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintChar
public SyscallPrintChar()
Build an instance of the Print Char syscall. Default service number
is 11 and name is “PrintChar”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print on the console the character stored in $a0.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRandIntRange
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRandIntRange
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRandIntRange
All Implemented Interfaces:
Syscall
public class SyscallRandIntRange
extends AbstractSyscall
Service to return a random integer in a specified range.
Constructor Summary
SyscallRandIntRange()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to the random number generator, with an upper range specified.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRandIntRange
public SyscallRandIntRange()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to the random number generator, with an upper range specified.
Return in $a0 the next pseudorandom, uniformly distributed int value between 0 (inclusive)
and the specified value (exclusive), drawn from this random number generator’s sequence.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Syscall
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Interface Syscall
All Known Implementing Classes:
AbstractSyscall, SyscallClose, SyscallConfirmDialog, SyscallExit, SyscallExit2, SyscallInputDialogDouble, SyscallInputDialogFloat, SyscallInputDialogInt, SyscallInputDialogString, SyscallMessageDialog, SyscallMessageDialogDouble, SyscallMessageDialogFloat, SyscallMessageDialogInt, SyscallMessageDialogString, SyscallMidiOut, SyscallMidiOutSync, SyscallOpen, SyscallPrintChar, SyscallPrintDouble, SyscallPrintFloat, SyscallPrintInt, SyscallPrintIntBinary, SyscallPrintIntHex, SyscallPrintIntUnsigned, SyscallPrintString, SyscallRandDouble, SyscallRandFloat, SyscallRandInt, SyscallRandIntRange, SyscallRandSeed, SyscallRead, SyscallReadChar, SyscallReadDouble, SyscallReadFloat, SyscallReadInt, SyscallReadString, SyscallSbrk, SyscallSleep, SyscallTime, SyscallWrite
public interface Syscall
Interface for any MIPS syscall system service. A qualifying service
must be a class in the mars.mips.instructions.syscalls package that
implements the Syscall interface, must be compiled into a .class file,
and its .class file must be in the same folder as Syscall.class.
Mars will detect a qualifying syscall upon startup, create an instance
using its no-argument constructor and add it to its syscall list.
When its service is invoked at runtime (“syscall” instruction
with its service number stored in register $v0), its simulate()
method will be invoked.
Method Summary
java.lang.String getName()
Return a name you have chosen for this syscall.
int getNumber()
Return the assigned service number.
void setNumber(int num)
Set the service number.
void simulate(ProgramStatement statement)
Performs syscall function.
Method Detail
getName
java.lang.String getName()
Return a name you have chosen for this syscall. This can be used by a MARS
user to refer to the service when choosing to override its default service
number in the configuration file.
Returns:
service name as a string
setNumber
void setNumber(int num)
Set the service number. This is provided to allow MARS implementer or user
to override the default service number.
Parameters:
num – specified service number to override the default.
getNumber
int getNumber()
Return the assigned service number. This is the number the MIPS programmer
must store into $v0 before issuing the SYSCALL instruction.
Returns:
assigned service number
simulate
void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function. It will be invoked when the service is invoked
at simulation time. Service is identified by value stored in $v0.
Parameters:
statement – ProgramStatement for this syscall statement.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallTime
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallTime
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallTime
All Implemented Interfaces:
Syscall
public class SyscallTime
extends AbstractSyscall
Service to read a character from input console into $a0.
Constructor Summary
SyscallTime()
Build an instance of the Read Char syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to place current system time into $a0 (low order 32 bits)
and $a1 (high order 32 bits).
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallTime
public SyscallTime()
Build an instance of the Read Char syscall. Default service number
is 12 and name is “ReadChar”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to place current system time into $a0 (low order 32 bits)
and $a1 (high order 32 bits).
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRandSeed
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRandSeed
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRandSeed
All Implemented Interfaces:
Syscall
public class SyscallRandSeed
extends AbstractSyscall
Service to set seed for the underlying Java pseudorandom number generator. No values are returned.
Constructor Summary
SyscallRandSeed()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
Set the seed of the underlying Java pseudorandom number generator.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRandSeed
public SyscallRandSeed()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Set the seed of the underlying Java pseudorandom number generator.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintIntHex
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintIntHex
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintIntHex
All Implemented Interfaces:
Syscall
public class SyscallPrintIntHex
extends AbstractSyscall
Service to display integer stored in $a0 on the console.
Constructor Summary
SyscallPrintIntHex()
Build an instance of the Print Integer syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintIntHex
public SyscallPrintIntHex()
Build an instance of the Print Integer syscall. Default service number
is 1 and name is “PrintInt”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print on the console the integer stored in $a0, in hexadecimal format.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
mars.mips.instructions.syscalls
Interfaces
Syscall
Classes
AbstractSyscall
RandomStreams
SyscallClose
SyscallConfirmDialog
SyscallExit
SyscallExit2
SyscallInputDialogDouble
SyscallInputDialogFloat
SyscallInputDialogInt
SyscallInputDialogString
SyscallMessageDialog
SyscallMessageDialogDouble
SyscallMessageDialogFloat
SyscallMessageDialogInt
SyscallMessageDialogString
SyscallMidiOut
SyscallMidiOutSync
SyscallNumberOverride
SyscallOpen
SyscallPrintChar
SyscallPrintDouble
SyscallPrintFloat
SyscallPrintInt
SyscallPrintIntBinary
SyscallPrintIntHex
SyscallPrintIntUnsigned
SyscallPrintString
SyscallRandDouble
SyscallRandFloat
SyscallRandInt
SyscallRandIntRange
SyscallRandSeed
SyscallRead
SyscallReadChar
SyscallReadDouble
SyscallReadFloat
SyscallReadInt
SyscallReadString
SyscallSbrk
SyscallSleep
SyscallTime
SyscallWrite
SyscallPrintInt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintInt
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintInt
All Implemented Interfaces:
Syscall
public class SyscallPrintInt
extends AbstractSyscall
Service to display integer stored in $a0 on the console.
Constructor Summary
SyscallPrintInt()
Build an instance of the Print Integer syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print on the console the integer stored in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintInt
public SyscallPrintInt()
Build an instance of the Print Integer syscall. Default service number
is 1 and name is “PrintInt”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print on the console the integer stored in $a0.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMessageDialogDouble
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMessageDialogDouble
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMessageDialogDouble
All Implemented Interfaces:
Syscall
public class SyscallMessageDialogDouble
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallMessageDialogDouble()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMessageDialogDouble
public SyscallMessageDialogDouble()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallConfirmDialog
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallConfirmDialog
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallConfirmDialog
All Implemented Interfaces:
Syscall
public class SyscallConfirmDialog
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallConfirmDialog()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallConfirmDialog
public SyscallConfirmDialog()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.mips.instructions.syscalls
Interface Summary
Syscall Interface for any MIPS syscall system service.
Class Summary
AbstractSyscall Abstract class that a MIPS syscall system service may extend.
RandomStreams This small class serves only to hold a static HashMap for storing
random number generators for use by all the random number generator
syscalls.
SyscallClose Service to close file descriptor given in $a0.
SyscallConfirmDialog Service to display a message to user.
SyscallExit Service to exit the MIPS program.
SyscallExit2 Service to exit the MIPS program with return value given in $a0.
SyscallInputDialogDouble Service to input data.
SyscallInputDialogFloat Service to input data.
SyscallInputDialogInt Service to input data.
SyscallInputDialogString Service to input data.
SyscallMessageDialog Service to display a message to user.
SyscallMessageDialogDouble Service to display a message to user.
SyscallMessageDialogFloat Service to display a message to user.
SyscallMessageDialogInt Service to display a message to user.
SyscallMessageDialogString Service to display a message to user.
SyscallMidiOut Service to output simulated MIDI tone to sound card.
SyscallMidiOutSync Service to output simulated MIDI tone to sound card.
SyscallNumberOverride Represents User override of default syscall number assignment.
SyscallOpen Service to open file name specified by $a0.
SyscallPrintChar Service to display character stored in $a0 on the console.
SyscallPrintDouble Service to display double whose bits are stored in $f12 & $f13 onto the console.
SyscallPrintFloat Service to display on the console float whose bits are stored in $f12
SyscallPrintInt Service to display integer stored in $a0 on the console.
SyscallPrintIntBinary Service to display integer stored in $a0 on the console.
SyscallPrintIntHex Service to display integer stored in $a0 on the console.
SyscallPrintIntUnsigned Service to display integer stored in $a0 on the console as unsigned decimal.
SyscallPrintString Service to display string stored starting at address in $a0 onto the console.
SyscallRandDouble Service to return a random floating point value.
SyscallRandFloat Service to return a random floating point value.
SyscallRandInt Service to return a random integer.
SyscallRandIntRange Service to return a random integer in a specified range.
SyscallRandSeed Service to set seed for the underlying Java pseudorandom number generator.
SyscallRead Service to read from file descriptor given in $a0.
SyscallReadChar Service to read a character from input console into $a0.
SyscallReadDouble Service to read the bits of console input double into $f0 and $f1.
SyscallReadFloat Service to read the bits of input float into $f0
SyscallReadInt Service to read an integer from input console into $v0.
SyscallReadString Service to read console input string into buffer starting at address in $a0.
SyscallSbrk Service to allocate amount of heap memory specified in $a0, putting address into $v0.
SyscallSleep Service to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
SyscallTime Service to read a character from input console into $a0.
SyscallWrite Service to write to file descriptor given in $a0.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
SyscallReadInt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallReadInt
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallReadInt
All Implemented Interfaces:
Syscall
public class SyscallReadInt
extends AbstractSyscall
Service to read an integer from input console into $v0.
Constructor Summary
SyscallReadInt()
Build an instance of the Read Integer syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read an integer from input console into $v0
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallReadInt
public SyscallReadInt()
Build an instance of the Read Integer syscall. Default service number
is 5 and name is “ReadInt”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read an integer from input console into $v0
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallExit2
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallExit2
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallExit2
All Implemented Interfaces:
Syscall
public class SyscallExit2
extends AbstractSyscall
Service to exit the MIPS program with return value given in $a0. Ignored if running from GUI.
Constructor Summary
SyscallExit2()
Build an instance of the Exit2 syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to exit the MIPS program with return value given in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallExit2
public SyscallExit2()
Build an instance of the Exit2 syscall. Default service number
is 17 and name is “Exit2”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to exit the MIPS program with return value given in $a0.
If running in command mode, MARS will exit with that value. If running under GUI,
return value is ignored.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallReadDouble
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallReadDouble
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallReadDouble
All Implemented Interfaces:
Syscall
public class SyscallReadDouble
extends AbstractSyscall
Service to read the bits of console input double into $f0 and $f1.
$f1 contains high order word of the double.
Constructor Summary
SyscallReadDouble()
Build an instance of the Read Double syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read the bits of input double into $f0 and $f1.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallReadDouble
public SyscallReadDouble()
Build an instance of the Read Double syscall. Default service number
is 7 and name is “ReadDouble”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read the bits of input double into $f0 and $f1.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallInputDialogDouble
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallInputDialogDouble
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallInputDialogDouble
All Implemented Interfaces:
Syscall
public class SyscallInputDialogDouble
extends AbstractSyscall
Service to input data.
Constructor Summary
SyscallInputDialogDouble()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to input data.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallInputDialogDouble
public SyscallInputDialogDouble()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to input data.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMessageDialogFloat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMessageDialogFloat
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMessageDialogFloat
All Implemented Interfaces:
Syscall
public class SyscallMessageDialogFloat
extends AbstractSyscall
Service to display a message to user.
Constructor Summary
SyscallMessageDialogFloat()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to display a message to user.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMessageDialogFloat
public SyscallMessageDialogFloat()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to display a message to user.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallWrite
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallWrite
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallWrite
All Implemented Interfaces:
Syscall
public class SyscallWrite
extends AbstractSyscall
Service to write to file descriptor given in $a0. $a1 specifies buffer
and $a2 specifies length. Number of characters written is returned in $v0
(this was changed from $a0 in MARS 3.7 for SPIM compatibility. The table
in COD erroneously shows $a0).
Constructor Summary
SyscallWrite()
Build an instance of the Write file syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to write to file descriptor given in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallWrite
public SyscallWrite()
Build an instance of the Write file syscall. Default service number
is 15 and name is “Write”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to write to file descriptor given in $a0. $a1 specifies buffer
and $a2 specifies length. Number of characters written is returned in $v0, starting in MARS 3.7.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.mips.instructions.syscalls
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.mips.instructions.syscalls.AbstractSyscall (implements mars.mips.instructions.syscalls.Syscall)
mars.mips.instructions.syscalls.SyscallClose
mars.mips.instructions.syscalls.SyscallConfirmDialog
mars.mips.instructions.syscalls.SyscallExit
mars.mips.instructions.syscalls.SyscallExit2
mars.mips.instructions.syscalls.SyscallInputDialogDouble
mars.mips.instructions.syscalls.SyscallInputDialogFloat
mars.mips.instructions.syscalls.SyscallInputDialogInt
mars.mips.instructions.syscalls.SyscallInputDialogString
mars.mips.instructions.syscalls.SyscallMessageDialog
mars.mips.instructions.syscalls.SyscallMessageDialogDouble
mars.mips.instructions.syscalls.SyscallMessageDialogFloat
mars.mips.instructions.syscalls.SyscallMessageDialogInt
mars.mips.instructions.syscalls.SyscallMessageDialogString
mars.mips.instructions.syscalls.SyscallMidiOut
mars.mips.instructions.syscalls.SyscallMidiOutSync
mars.mips.instructions.syscalls.SyscallOpen
mars.mips.instructions.syscalls.SyscallPrintChar
mars.mips.instructions.syscalls.SyscallPrintDouble
mars.mips.instructions.syscalls.SyscallPrintFloat
mars.mips.instructions.syscalls.SyscallPrintInt
mars.mips.instructions.syscalls.SyscallPrintIntBinary
mars.mips.instructions.syscalls.SyscallPrintIntHex
mars.mips.instructions.syscalls.SyscallPrintIntUnsigned
mars.mips.instructions.syscalls.SyscallPrintString
mars.mips.instructions.syscalls.SyscallRandDouble
mars.mips.instructions.syscalls.SyscallRandFloat
mars.mips.instructions.syscalls.SyscallRandInt
mars.mips.instructions.syscalls.SyscallRandIntRange
mars.mips.instructions.syscalls.SyscallRandSeed
mars.mips.instructions.syscalls.SyscallRead
mars.mips.instructions.syscalls.SyscallReadChar
mars.mips.instructions.syscalls.SyscallReadDouble
mars.mips.instructions.syscalls.SyscallReadFloat
mars.mips.instructions.syscalls.SyscallReadInt
mars.mips.instructions.syscalls.SyscallReadString
mars.mips.instructions.syscalls.SyscallSbrk
mars.mips.instructions.syscalls.SyscallSleep
mars.mips.instructions.syscalls.SyscallTime
mars.mips.instructions.syscalls.SyscallWrite
mars.mips.instructions.syscalls.RandomStreams
mars.mips.instructions.syscalls.SyscallNumberOverride
Interface Hierarchy
mars.mips.instructions.syscalls.Syscall
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
SyscallSleep
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallSleep
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallSleep
All Implemented Interfaces:
Syscall
public class SyscallSleep
extends AbstractSyscall
Service to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
This timing will not be precise as the Java implementation will add some overhead.
Constructor Summary
SyscallSleep()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallSleep
public SyscallSleep()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to cause the MARS Java thread to sleep for (at least) the specified number of milliseconds.
This timing will not be precise as the Java implementation will add some overhead.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallClose
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallClose
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallClose
All Implemented Interfaces:
Syscall
public class SyscallClose
extends AbstractSyscall
Service to close file descriptor given in $a0.
Constructor Summary
SyscallClose()
Build an instance of the Close syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to close file descriptor given in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallClose
public SyscallClose()
Build an instance of the Close syscall. Default service number
is 16 and name is “Close”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to close file descriptor given in $a0.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRandInt
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRandInt
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRandInt
All Implemented Interfaces:
Syscall
public class SyscallRandInt
extends AbstractSyscall
Service to return a random integer.
Constructor Summary
SyscallRandInt()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to the random number generator.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRandInt
public SyscallRandInt()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to the random number generator.
Return in $a0 the next pseudorandom, uniformly distributed int value from this random number generator’s sequence.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallPrintDouble
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallPrintDouble
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallPrintDouble
All Implemented Interfaces:
Syscall
public class SyscallPrintDouble
extends AbstractSyscall
Service to display double whose bits are stored in $f12 & $f13 onto the console.
$f13 contains high order word of the double.
Constructor Summary
SyscallPrintDouble()
Build an instance of the Print Double syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to print double whose bits are stored in $f12 & $f13.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallPrintDouble
public SyscallPrintDouble()
Build an instance of the Print Double syscall. Default service number
is 3 and name is “PrintDouble”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to print double whose bits are stored in $f12 & $f13.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRead
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRead
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRead
All Implemented Interfaces:
Syscall
public class SyscallRead
extends AbstractSyscall
Service to read from file descriptor given in $a0. $a1 specifies buffer
and $a2 specifies length. Number of characters read is returned in $v0.
(this was changed from $a0 in MARS 3.7 for SPIM compatibility. The table
in COD erroneously shows $a0). *
Constructor Summary
SyscallRead()
Build an instance of the Read file syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to read from file descriptor given in $a0.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRead
public SyscallRead()
Build an instance of the Read file syscall. Default service number
is 14 and name is “Read”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to read from file descriptor given in $a0. $a1 specifies buffer
and $a2 specifies length. Number of characters read is returned in $v0 (starting MARS 3.7).
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallRandFloat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallRandFloat
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallRandFloat
All Implemented Interfaces:
Syscall
public class SyscallRandFloat
extends AbstractSyscall
Service to return a random floating point value.
Constructor Summary
SyscallRandFloat()
Build an instance of the syscall with its default service number and name.
Method Summary
void simulate(ProgramStatement statement)
System call to the random number generator.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallRandFloat
public SyscallRandFloat()
Build an instance of the syscall with its default service number and name.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
System call to the random number generator.
Return in $f0 the next pseudorandom, uniformly distributed float value between 0.0 and 1.0
from this random number generator’s sequence.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallNumberOverride
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallNumberOverride
java.lang.Object
mars.mips.instructions.syscalls.SyscallNumberOverride
public class SyscallNumberOverride
extends java.lang.Object
Represents User override of default syscall number assignment.
Such overrides are specified in the config.txt file read when
MARS starts up.
Constructor Summary
SyscallNumberOverride(java.lang.String serviceName,
java.lang.String value)
Constructor is called with two strings: service name and desired
number.
Method Summary
java.lang.String getName()
Get the service name as a String.
int getNumber()
Get the new service number as an int.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallNumberOverride
public SyscallNumberOverride(java.lang.String serviceName,
java.lang.String value)
Constructor is called with two strings: service name and desired
number. Will throw an exception is number is malformed, but does
not check validity of the service name or number.
Parameters:
serviceName – a String containing syscall service mnemonic.
value – a String containing its reassigned syscall service number.
If this number is previously assigned to a different syscall which does not
also receive a new number, then an error for duplicate numbers will
be issued at MARS launch.
Method Detail
getName
public java.lang.String getName()
Get the service name as a String.
Returns:
the service name
getNumber
public int getNumber()
Get the new service number as an int.
Returns:
the service number
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SyscallMidiOutSync
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions.syscalls
Class SyscallMidiOutSync
java.lang.Object
mars.mips.instructions.syscalls.AbstractSyscall
mars.mips.instructions.syscalls.SyscallMidiOutSync
All Implemented Interfaces:
Syscall
public class SyscallMidiOutSync
extends AbstractSyscall
Service to output simulated MIDI tone to sound card. The call does
not return until the tone duration has elapsed. By contrast, syscall 31
(MidiOut) returns immediately upon generating the tone.
Constructor Summary
SyscallMidiOutSync()
Build an instance of the MIDI (simulated) out syscall.
Method Summary
void simulate(ProgramStatement statement)
Performs syscall function to send MIDI output to sound card.
Methods inherited from class mars.mips.instructions.syscalls.AbstractSyscall
getName, getNumber, setNumber
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SyscallMidiOutSync
public SyscallMidiOutSync()
Build an instance of the MIDI (simulated) out syscall. Default service number
is 33 and name is “MidiOutSync”.
Method Detail
simulate
public void simulate(ProgramStatement statement)
throws ProcessingException
Performs syscall function to send MIDI output to sound card. The syscall does not
return until after the duration period ($a1) has elapsed. This requires
four arguments in registers $a0 through $a3.
$a0 – pitch (note). Integer value from 0 to 127, with 60 being middle-C on a piano.
$a1 – duration. Integer value in milliseconds.
$a2 – instrument. Integer value from 0 to 127, with 0 being acoustic grand piano.
$a3 – volume. Integer value from 0 to 127.
Default values, in case any parameters are outside the above ranges, are $a0=60, $a1=1000,
$a2=0, $a3=100.
See MARS documentation elsewhere or www.midi.org for more information. Note that the pitch,
instrument and volume value ranges 0-127 are from javax.sound.midi; actual MIDI instruments
use the range 1-128.
Specified by:
simulate in interface Syscall
Specified by:
simulate in class AbstractSyscall
Parameters:
statement – ProgramStatement object for this syscall instruction.
Throws:
ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BasicInstruction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.instructions
Class BasicInstruction
java.lang.Object
mars.mips.instructions.Instruction
mars.mips.instructions.BasicInstruction
public class BasicInstruction
extends Instruction
Class to represent a basic instruction in the MIPS instruction set.
Basic instruction means it translates directly to a 32-bit binary machine
instruction.
Author:
Pete Sanderson and Ken Vollmar
Field Summary
Fields inherited from class mars.mips.instructions.Instruction
description, exampleFormat, INSTRUCTION_LENGTH, INSTRUCTION_LENGTH_BITS, mnemonic, operandMask, tokenList
Constructor Summary
BasicInstruction(java.lang.String example,
BasicInstructionFormat instrFormat,
java.lang.String operMask,
SimulationCode simCode)
BasicInstruction(java.lang.String example,
java.lang.String description,
BasicInstructionFormat instrFormat,
java.lang.String operMask,
SimulationCode simCode)
BasicInstruction constructor.
Method Summary
BasicInstructionFormat getInstructionFormat()
Gets the operand format of the instruction.
java.lang.String getOperationMask()
Gets the 32-character operation mask.
SimulationCode getSimulationCode()
Gets the SimulationCode object.
Methods inherited from class mars.mips.instructions.Instruction
createExampleTokenList, extractOperator, getDescription, getExampleFormat, getInstructionLength, getName, getTokenList
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
BasicInstruction
public BasicInstruction(java.lang.String example,
java.lang.String description,
BasicInstructionFormat instrFormat,
java.lang.String operMask,
SimulationCode simCode)
BasicInstruction constructor.
Parameters:
example – An example usage of the instruction, as a String.
instrFormat – The format is R, I, I-branch or J.
operMask – The opcode mask is a 32 character string that contains the opcode in binary in the appropriate bit positions and codes for operand positions (‘f’, ‘s’, ‘t’) in the remainding positions.
simCode – The inline definition of an object and class which anonymously implements the SimulationCode interface.
See Also:
SimulationCode
BasicInstruction
public BasicInstruction(java.lang.String example,
BasicInstructionFormat instrFormat,
java.lang.String operMask,
SimulationCode simCode)
Method Detail
getOperationMask
public java.lang.String getOperationMask()
Gets the 32-character operation mask. Each mask position represents a
bit position in the 32-bit machine instruction. Operation codes and
unused bits are represented in the mask by 1’s and 0’s. Operand codes
are represented by ‘f’, ‘s’, and ‘t’ for bits occupied by first, secon
and third operand, respectively.
Returns:
The 32 bit mask, as a String
getInstructionFormat
public BasicInstructionFormat getInstructionFormat()
Gets the operand format of the instruction. MIPS defines 3 of these
R-format, I-format, and J-format. R-format is all registers. I-format
is address formed from register base with immediate offset. J-format
is for jump destination addresses. I have added one more:
I-branch-format, for branch destination addresses. These are a variation
of the I-format in that the computed value is address relative to the
Program Counter. All four formats are represented by static objects.
Returns:
The machine instruction format, R, I, J or I-branch.
getSimulationCode
public SimulationCode getSimulationCode()
Gets the SimulationCode object. It is really an object of an anonymous
class that implements the SimulationCode interface. Such an object has but one
method: Simulate().
Returns:
the SimulationCode object for this instruction.
See Also:
SimulationCode
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Coprocessor0
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class Coprocessor0
java.lang.Object
mars.mips.hardware.Coprocessor0
public class Coprocessor0
extends java.lang.Object
Represents Coprocessor 0. We will use only its interrupt/exception registers.
Author:
Pete Sanderson
Field Summary
static int CAUSE
static int DEFAULT_STATUS_VALUE
static int EPC
static int EXCEPTION_LEVEL
static int STATUS
static int VADDR
Coprocessor register names
Constructor Summary
Coprocessor0()
Method Summary
static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static int getNumber(java.lang.String n)
For getting the number representation of the register.
static Register getRegister(java.lang.String rname)
Get register object corresponding to given name.
static int getRegisterPosition(Register r)
Coprocessor0 implements only selected registers, so the register number
(8, 12, 13, 14) does not correspond to its position in the list of registers
(0, 1, 2, 3).
static Register[] getRegisters()
For returning the set of registers.
static int getValue(int num)
Returns the value of the register who’s number is num.
static void resetRegisters()
Method to reinitialize the values of the registers.
static void showRegisters()
Method for displaying the register values for debugging.
static int updateRegister(int num,
int val)
This method updates the register value who’s number is num.
static int updateRegister(java.lang.String n,
int val)
Sets the value of the register given to the value given.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
VADDR
public static final int VADDR
Coprocessor register names
See Also:
Constant Field Values
STATUS
public static final int STATUS
See Also:
Constant Field Values
CAUSE
public static final int CAUSE
See Also:
Constant Field Values
EPC
public static final int EPC
See Also:
Constant Field Values
EXCEPTION_LEVEL
public static final int EXCEPTION_LEVEL
See Also:
Constant Field Values
DEFAULT_STATUS_VALUE
public static final int DEFAULT_STATUS_VALUE
See Also:
Constant Field Values
Constructor Detail
Coprocessor0
public Coprocessor0()
Method Detail
showRegisters
public static void showRegisters()
Method for displaying the register values for debugging.
updateRegister
public static int updateRegister(java.lang.String n,
int val)
Sets the value of the register given to the value given.
Parameters:
n – name of register to set the value of ($n, where n is reg number).
val – The desired value for the register.
Returns:
old value in register prior to update
updateRegister
public static int updateRegister(int num,
int val)
This method updates the register value who’s number is num.
Parameters:
num – Number of register to set the value of.
val – The desired value for the register.
Returns:
old value in register prior to update
getValue
public static int getValue(int num)
Returns the value of the register who’s number is num.
Parameters:
num – The register number.
Returns:
The value of the given register. 0 for non-implemented registers
getNumber
public static int getNumber(java.lang.String n)
For getting the number representation of the register.
Parameters:
n – The string formatted register name to look for.
Returns:
The number of the register represented by the string. -1 if no match.
getRegisters
public static Register[] getRegisters()
For returning the set of registers.
Returns:
The set of registers.
getRegisterPosition
public static int getRegisterPosition(Register r)
Coprocessor0 implements only selected registers, so the register number
(8, 12, 13, 14) does not correspond to its position in the list of registers
(0, 1, 2, 3).
Parameters:
r – A coprocessor0 Register
Returns:
the list position of given register, -1 if not found.
getRegister
public static Register getRegister(java.lang.String rname)
Get register object corresponding to given name. If no match, return null.
Parameters:
rname – The register name, in $0 format.
Returns:
The register object,or null if not found.
resetRegisters
public static void resetRegisters()
Method to reinitialize the values of the registers.
addRegistersObserver
public static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will add the given Observer to each one.
deleteRegistersObserver
public static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will delete the given Observer from each one.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Coprocessor1
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class Coprocessor1
java.lang.Object
mars.mips.hardware.Coprocessor1
public class Coprocessor1
extends java.lang.Object
Represents Coprocessor 1, the Floating Point Unit (FPU)
Author:
Pete Sanderson
Constructor Summary
Coprocessor1()
Method Summary
static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static int clearConditionFlag(int flag)
Set condition flag to 0 (false).
static void clearConditionFlags()
Clear all condition flags (0-7).
static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static int getConditionFlag(int flag)
Get value of specified condition flag (0-7).
static int getConditionFlagCount()
Get count of condition flags.
static int getConditionFlags()
Get array of condition flags (0-7).
static double getDoubleFromRegisterPair(int reg)
Gets the double value stored in the given FPU register.
static double getDoubleFromRegisterPair(java.lang.String reg)
Gets the double value stored in the given FPU register.
static float getFloatFromRegister(int reg)
Gets the float value stored in the given FPU register.
static float getFloatFromRegister(java.lang.String reg)
Gets the float value stored in the given FPU register.
static int getIntFromRegister(int reg)
Gets the 32-bit int bit pattern stored in the given FPU register.
static int getIntFromRegister(java.lang.String reg)
Gets the 32-bit int bit pattern stored in the given FPU register.
static long getLongFromRegisterPair(int reg)
Gets a long representing the double value stored in the given double
precision FPU register.
static long getLongFromRegisterPair(java.lang.String reg)
Gets the double value stored in the given FPU register.
static Register getRegister(java.lang.String rName)
Get register object corresponding to given name.
static int getRegisterNumber(java.lang.String n)
For getting the number representation of the FPU register.
static Register[] getRegisters()
For returning the set of registers.
static int getValue(int num)
Returns the value of the FPU register who’s number is num.
static void resetRegisters()
Method to reinitialize the values of the registers.
static int setConditionFlag(int flag)
Set condition flag to 1 (true).
static void setConditionFlags()
Set all condition flags (0-7).
static void setRegisterPairToDouble(int reg,
double val)
Sets the value of the FPU register given to the double value given.
static void setRegisterPairToDouble(java.lang.String reg,
double val)
Sets the value of the FPU register given to the double value given.
static void setRegisterPairToLong(int reg,
long val)
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given.
static void setRegisterPairToLong(java.lang.String reg,
long val)
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given.
static void setRegisterToFloat(int reg,
float val)
Sets the value of the FPU register given to the value given.
static void setRegisterToFloat(java.lang.String reg,
float val)
Sets the value of the FPU register given to the value given.
static void setRegisterToInt(int reg,
int val)
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
static void setRegisterToInt(java.lang.String reg,
int val)
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
static void showRegisters()
Method for displaying the register values for debugging.
static int updateRegister(int num,
int val)
This method updates the FPU register value who’s number is num.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Coprocessor1
public Coprocessor1()
Method Detail
showRegisters
public static void showRegisters()
Method for displaying the register values for debugging.
setRegisterToFloat
public static void setRegisterToFloat(java.lang.String reg,
float val)
Sets the value of the FPU register given to the value given.
Parameters:
reg – Register to set the value of.
val – The desired float value for the register.
setRegisterToFloat
public static void setRegisterToFloat(int reg,
float val)
Sets the value of the FPU register given to the value given.
Parameters:
reg – Register to set the value of.
val – The desired float value for the register.
setRegisterToInt
public static void setRegisterToInt(java.lang.String reg,
int val)
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
Parameters:
reg – Register to set the value of.
val – The desired int bit pattern for the register.
setRegisterToInt
public static void setRegisterToInt(int reg,
int val)
Sets the value of the FPU register given to the 32-bit
pattern given by the int parameter.
Parameters:
reg – Register to set the value of.
val – The desired int bit pattern for the register.
setRegisterPairToDouble
public static void setRegisterPairToDouble(int reg,
double val)
throws InvalidRegisterAccessException
Sets the value of the FPU register given to the double value given. The register
must be even-numbered, and the low order 32 bits are placed in it. The high order
32 bits are placed in the (odd numbered) register that follows it.
Parameters:
reg – Register to set the value of.
val – The desired double value for the register.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
setRegisterPairToDouble
public static void setRegisterPairToDouble(java.lang.String reg,
double val)
throws InvalidRegisterAccessException
Sets the value of the FPU register given to the double value given. The register
must be even-numbered, and the low order 32 bits are placed in it. The high order
32 bits are placed in the (odd numbered) register that follows it.
Parameters:
reg – Register to set the value of.
val – The desired double value for the register.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
setRegisterPairToLong
public static void setRegisterPairToLong(int reg,
long val)
throws InvalidRegisterAccessException
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given. The register
must be even-numbered, and the low order 32 bits from the long are placed in it. The high order
32 bits from the long are placed in the (odd numbered) register that follows it.
Parameters:
reg – Register to set the value of. Must be even register of even/odd pair.
val – The desired double value for the register.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
setRegisterPairToLong
public static void setRegisterPairToLong(java.lang.String reg,
long val)
throws InvalidRegisterAccessException
Sets the value of the FPU register pair given to the long value containing 64 bit pattern
given. The register
must be even-numbered, and the low order 32 bits from the long are placed in it. The high order
32 bits from the long are placed in the (odd numbered) register that follows it.
Parameters:
reg – Register to set the value of. Must be even register of even/odd pair.
val – The desired long value containing the 64 bits for the register pair.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
getFloatFromRegister
public static float getFloatFromRegister(int reg)
Gets the float value stored in the given FPU register.
Parameters:
reg – Register to get the value of.
Returns:
The float value stored by that register.
getFloatFromRegister
public static float getFloatFromRegister(java.lang.String reg)
Gets the float value stored in the given FPU register.
Parameters:
reg – Register to get the value of.
Returns:
The float value stored by that register.
getIntFromRegister
public static int getIntFromRegister(int reg)
Gets the 32-bit int bit pattern stored in the given FPU register.
Parameters:
reg – Register to get the value of.
Returns:
The int bit pattern stored by that register.
getIntFromRegister
public static int getIntFromRegister(java.lang.String reg)
Gets the 32-bit int bit pattern stored in the given FPU register.
Parameters:
reg – Register to get the value of.
Returns:
The int bit pattern stored by that register.
getDoubleFromRegisterPair
public static double getDoubleFromRegisterPair(int reg)
throws InvalidRegisterAccessException
Gets the double value stored in the given FPU register. The register
must be even-numbered.
Parameters:
reg – Register to get the value of. Must be even number of even/odd pair.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
getDoubleFromRegisterPair
public static double getDoubleFromRegisterPair(java.lang.String reg)
throws InvalidRegisterAccessException
Gets the double value stored in the given FPU register. The register
must be even-numbered.
Parameters:
reg – Register to get the value of. Must be even number of even/odd pair.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
getLongFromRegisterPair
public static long getLongFromRegisterPair(int reg)
throws InvalidRegisterAccessException
Gets a long representing the double value stored in the given double
precision FPU register.
The register must be even-numbered.
Parameters:
reg – Register to get the value of. Must be even number of even/odd pair.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
getLongFromRegisterPair
public static long getLongFromRegisterPair(java.lang.String reg)
throws InvalidRegisterAccessException
Gets the double value stored in the given FPU register. The register
must be even-numbered.
Parameters:
reg – Register to get the value of. Must be even number of even/odd pair.
Throws:
InvalidRegisterAccessException – if register ID is invalid or odd-numbered.
updateRegister
public static int updateRegister(int num,
int val)
This method updates the FPU register value who’s number is num. Note the
registers themselves hold an int value. There are helper methods available
to which you can give a float or double to store.
Parameters:
num – FPU register to set the value of.
val – The desired int value for the register.
getValue
public static int getValue(int num)
Returns the value of the FPU register who’s number is num. Returns the
raw int value actually stored there. If you need a float, use
Float.intBitsToFloat() to get the equivent float.
Parameters:
num – The FPU register number.
Returns:
The int value of the given register.
getRegisterNumber
public static int getRegisterNumber(java.lang.String n)
For getting the number representation of the FPU register.
Parameters:
n – The string formatted register name to look for.
Returns:
The number of the register represented by the string.
getRegisters
public static Register[] getRegisters()
For returning the set of registers.
Returns:
The set of registers.
getRegister
public static Register getRegister(java.lang.String rName)
Get register object corresponding to given name. If no match, return null.
Parameters:
rName – The FPU register name, must be “$f0” through “$f31”.
Returns:
The register object,or null if not found.
resetRegisters
public static void resetRegisters()
Method to reinitialize the values of the registers.
addRegistersObserver
public static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will add the given Observer to each one.
deleteRegistersObserver
public static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will delete the given Observer from each one.
setConditionFlag
public static int setConditionFlag(int flag)
Set condition flag to 1 (true).
Parameters:
flag – condition flag number (0-7)
Returns:
previous flag setting (0 or 1)
clearConditionFlag
public static int clearConditionFlag(int flag)
Set condition flag to 0 (false).
Parameters:
flag – condition flag number (0-7)
Returns:
previous flag setting (0 or 1)
getConditionFlag
public static int getConditionFlag(int flag)
Get value of specified condition flag (0-7).
Parameters:
flag – condition flag number (0-7)
Returns:
0 if condition is false, 1 if condition is true
getConditionFlags
public static int getConditionFlags()
Get array of condition flags (0-7).
Returns:
array of int condition flags
clearConditionFlags
public static void clearConditionFlags()
Clear all condition flags (0-7).
setConditionFlags
public static void setConditionFlags()
Set all condition flags (0-7).
getConditionFlagCount
public static int getConditionFlagCount()
Get count of condition flags.
Returns:
number of condition flags
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AccessNotice
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class AccessNotice
java.lang.Object
mars.mips.hardware.AccessNotice
Direct Known Subclasses:
MemoryAccessNotice, RegisterAccessNotice
public abstract class AccessNotice
extends java.lang.Object
Object provided to Observers of runtime access to MIPS memory or registers.
The access types READ and WRITE defined here; use subclasses defined for
MemoryAccessNotice and RegisterAccessNotice. This is abstract class.
Author:
Pete Sanderson
Field Summary
static int READ
Indicates the purpose of access was to read.
static int WRITE
Indicates the purpose of access was to write.
Constructor Summary
protected AccessNotice(int type)
Method Summary
boolean accessIsFromGUI()
Query whether the access originated from MARS GUI (AWT event queue)
boolean accessIsFromMIPS()
Query whether the access originated from executing MIPS program
int getAccessType()
Get the access type: READ or WRITE.
java.lang.Thread getThread()
Get reference to thread that created this notice
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
READ
public static final int READ
Indicates the purpose of access was to read.
See Also:
Constant Field Values
WRITE
public static final int WRITE
Indicates the purpose of access was to write.
See Also:
Constant Field Values
Constructor Detail
AccessNotice
protected AccessNotice(int type)
Method Detail
getAccessType
public int getAccessType()
Get the access type: READ or WRITE.
Returns:
Access type, either AccessNotice.READ or AccessNotice.WRITE
getThread
public java.lang.Thread getThread()
Get reference to thread that created this notice
Returns:
Return reference to the thread that created this notice.
accessIsFromGUI
public boolean accessIsFromGUI()
Query whether the access originated from MARS GUI (AWT event queue)
Returns:
true if this access originated from MARS GUI, false otherwise
accessIsFromMIPS
public boolean accessIsFromMIPS()
Query whether the access originated from executing MIPS program
Returns:
true if this access originated from executing MIPS program, false otherwise
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MemoryConfiguration
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class MemoryConfiguration
java.lang.Object
mars.mips.hardware.MemoryConfiguration
public class MemoryConfiguration
extends java.lang.Object
Models the memory configuration for the simulated MIPS machine.
“configuration” refers to the starting memory addresses for
the various memory segments.
The default configuration is based on SPIM. Starting with MARS 3.7,
the configuration can be changed.
Author:
Pete Sanderson
Constructor Summary
MemoryConfiguration(java.lang.String ident,
java.lang.String name,
java.lang.String[] items,
int[] values)
Method Summary
java.lang.String getConfigurationIdentifier()
java.lang.String[] getConfigurationItemNames()
int[] getConfigurationItemValues()
java.lang.String getConfigurationName()
int getDataBaseAddress()
int getDataSegmentBaseAddress()
int getDataSegmentLimitAddress()
int getExceptionHandlerAddress()
int getExternBaseAddress()
int getGlobalPointer()
int getHeapBaseAddress()
int getKernelBaseAddress()
int getKernelDataBaseAddress()
int getKernelDataSegmentLimitAddress()
int getKernelHighAddress()
int getKernelTextBaseAddress()
int getKernelTextLimitAddress()
int getMemoryMapBaseAddress()
int getMemoryMapLimitAddress()
int getStackBaseAddress()
int getStackLimitAddress()
int getStackPointer()
int getTextBaseAddress()
int getTextLimitAddress()
int getUserHighAddress()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MemoryConfiguration
public MemoryConfiguration(java.lang.String ident,
java.lang.String name,
java.lang.String[] items,
int[] values)
Method Detail
getConfigurationIdentifier
public java.lang.String getConfigurationIdentifier()
getConfigurationName
public java.lang.String getConfigurationName()
getConfigurationItemValues
public int[] getConfigurationItemValues()
getConfigurationItemNames
public java.lang.String[] getConfigurationItemNames()
getTextBaseAddress
public int getTextBaseAddress()
getDataSegmentBaseAddress
public int getDataSegmentBaseAddress()
getExternBaseAddress
public int getExternBaseAddress()
getGlobalPointer
public int getGlobalPointer()
getDataBaseAddress
public int getDataBaseAddress()
getHeapBaseAddress
public int getHeapBaseAddress()
getStackPointer
public int getStackPointer()
getStackBaseAddress
public int getStackBaseAddress()
getUserHighAddress
public int getUserHighAddress()
getKernelBaseAddress
public int getKernelBaseAddress()
getKernelTextBaseAddress
public int getKernelTextBaseAddress()
getExceptionHandlerAddress
public int getExceptionHandlerAddress()
getKernelDataBaseAddress
public int getKernelDataBaseAddress()
getMemoryMapBaseAddress
public int getMemoryMapBaseAddress()
getKernelHighAddress
public int getKernelHighAddress()
getDataSegmentLimitAddress
public int getDataSegmentLimitAddress()
getTextLimitAddress
public int getTextLimitAddress()
getKernelDataSegmentLimitAddress
public int getKernelDataSegmentLimitAddress()
getKernelTextLimitAddress
public int getKernelTextLimitAddress()
getStackLimitAddress
public int getStackLimitAddress()
getMemoryMapLimitAddress
public int getMemoryMapLimitAddress()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Register
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class Register
java.lang.Object
java.util.Observable
mars.mips.hardware.Register
public class Register
extends java.util.Observable
Abstraction to represent a register of a MIPS Assembler.
Author:
Jason Bumgarner, Jason Shrewsbury, Ben Sherman
Constructor Summary
Register(java.lang.String n,
int num,
int val)
Creates a new register with specified name, number, and value.
Method Summary
void changeResetValue(int reset)
Change the register’s reset value; the value to which it will be
set when resetValue() is called.
java.lang.String getName()
Returns the name of the Register.
int getNumber()
Returns the number of the Register.
int getResetValue()
Returns the reset value of the Register.
int getValue()
Returns the value of the Register.
int getValueNoNotify()
Returns the value of the Register.
void resetValue()
Resets the value of the register to the value it was constructed with.
int setValue(int val)
Sets the value of the register to the val passed to it.
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
Register
public Register(java.lang.String n,
int num,
int val)
Creates a new register with specified name, number, and value.
Parameters:
n – The name of the register.
num – The number of the register.
val – The inital (and reset) value of the register.
Method Detail
getName
public java.lang.String getName()
Returns the name of the Register.
Returns:
name The name of the Register.
getValue
public int getValue()
Returns the value of the Register. Observers are notified
of the READ operation.
Returns:
value The value of the Register.
getValueNoNotify
public int getValueNoNotify()
Returns the value of the Register. Observers are not notified.
Added for release 3.8.
Returns:
value The value of the Register.
getResetValue
public int getResetValue()
Returns the reset value of the Register.
Returns:
The reset (initial) value of the Register.
getNumber
public int getNumber()
Returns the number of the Register.
Returns:
number The number of the Register.
setValue
public int setValue(int val)
Sets the value of the register to the val passed to it.
Observers are notified of the WRITE operation.
Parameters:
val – Value to set the Register to.
Returns:
previous value of register
resetValue
public void resetValue()
Resets the value of the register to the value it was constructed with.
Observers are not notified.
changeResetValue
public void changeResetValue(int reset)
Change the register’s reset value; the value to which it will be
set when resetValue() is called.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MemoryAccessNotice
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class MemoryAccessNotice
java.lang.Object
mars.mips.hardware.AccessNotice
mars.mips.hardware.MemoryAccessNotice
public class MemoryAccessNotice
extends AccessNotice
Object provided to Observers of runtime access to MIPS memory.
Observer can get the access type (R/W), address and length in bytes (4,2,1).
Author:
Pete Sanderson
Field Summary
Fields inherited from class mars.mips.hardware.AccessNotice
READ, WRITE
Method Summary
int getAddress()
Fetch the memory address that was accessed.
int getLength()
Fetch the length in bytes of the access operation (4,2,1).
int getValue()
Fetch the value of the access operation (the value read or written).
java.lang.String toString()
String representation indicates access type, address and length in bytes
Methods inherited from class mars.mips.hardware.AccessNotice
accessIsFromGUI, accessIsFromMIPS, getAccessType, getThread
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Method Detail
getAddress
public int getAddress()
Fetch the memory address that was accessed.
getLength
public int getLength()
Fetch the length in bytes of the access operation (4,2,1).
getValue
public int getValue()
Fetch the value of the access operation (the value read or written).
toString
public java.lang.String toString()
String representation indicates access type, address and length in bytes
Overrides:
toString in class java.lang.Object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MemoryConfigurations
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class MemoryConfigurations
java.lang.Object
mars.mips.hardware.MemoryConfigurations
public class MemoryConfigurations
extends java.lang.Object
Models the collection of MIPS memory configurations.
The default configuration is based on SPIM. Starting with MARS 3.7,
the configuration can be changed.
Author:
Pete Sanderson
Constructor Summary
MemoryConfigurations()
Method Summary
static void buildConfigurationCollection()
static MemoryConfiguration getConfigurationByName(java.lang.String name)
static java.util.Iterator getConfigurationsIterator()
static MemoryConfiguration getCurrentConfiguration()
static MemoryConfiguration getDefaultConfiguration()
static int getDefaultDataBaseAddress()
static int getDefaultDataSegmentBaseAddress()
int getDefaultDataSegmentLimitAddress()
static int getDefaultExceptionHandlerAddress()
static int getDefaultExternBaseAddress()
static int getDefaultGlobalPointer()
static int getDefaultHeapBaseAddress()
static int getDefaultKernelBaseAddress()
static int getDefaultKernelDataBaseAddress()
int getDefaultKernelDataSegmentLimitAddress()
static int getDefaultKernelHighAddress()
static int getDefaultKernelTextBaseAddress()
int getDefaultKernelTextLimitAddress()
static int getDefaultMemoryMapBaseAddress()
static int getDefaultStackBaseAddress()
int getDefaultStackLimitAddress()
static int getDefaultStackPointer()
static int getDefaultTextBaseAddress()
int getDefaultTextLimitAddress()
static int getDefaultUserHighAddress()
int getMemoryMapLimitAddress()
static boolean setCurrentConfiguration(MemoryConfiguration config)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MemoryConfigurations
public MemoryConfigurations()
Method Detail
buildConfigurationCollection
public static void buildConfigurationCollection()
getConfigurationsIterator
public static java.util.Iterator getConfigurationsIterator()
getConfigurationByName
public static MemoryConfiguration getConfigurationByName(java.lang.String name)
getDefaultConfiguration
public static MemoryConfiguration getDefaultConfiguration()
getCurrentConfiguration
public static MemoryConfiguration getCurrentConfiguration()
setCurrentConfiguration
public static boolean setCurrentConfiguration(MemoryConfiguration config)
getDefaultTextBaseAddress
public static int getDefaultTextBaseAddress()
getDefaultDataSegmentBaseAddress
public static int getDefaultDataSegmentBaseAddress()
getDefaultExternBaseAddress
public static int getDefaultExternBaseAddress()
getDefaultGlobalPointer
public static int getDefaultGlobalPointer()
getDefaultDataBaseAddress
public static int getDefaultDataBaseAddress()
getDefaultHeapBaseAddress
public static int getDefaultHeapBaseAddress()
getDefaultStackPointer
public static int getDefaultStackPointer()
getDefaultStackBaseAddress
public static int getDefaultStackBaseAddress()
getDefaultUserHighAddress
public static int getDefaultUserHighAddress()
getDefaultKernelBaseAddress
public static int getDefaultKernelBaseAddress()
getDefaultKernelTextBaseAddress
public static int getDefaultKernelTextBaseAddress()
getDefaultExceptionHandlerAddress
public static int getDefaultExceptionHandlerAddress()
getDefaultKernelDataBaseAddress
public static int getDefaultKernelDataBaseAddress()
getDefaultMemoryMapBaseAddress
public static int getDefaultMemoryMapBaseAddress()
getDefaultKernelHighAddress
public static int getDefaultKernelHighAddress()
getDefaultDataSegmentLimitAddress
public int getDefaultDataSegmentLimitAddress()
getDefaultTextLimitAddress
public int getDefaultTextLimitAddress()
getDefaultKernelDataSegmentLimitAddress
public int getDefaultKernelDataSegmentLimitAddress()
getDefaultKernelTextLimitAddress
public int getDefaultKernelTextLimitAddress()
getDefaultStackLimitAddress
public int getDefaultStackLimitAddress()
getMemoryMapLimitAddress
public int getMemoryMapLimitAddress()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AddressErrorException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class AddressErrorException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.mips.hardware.AddressErrorException
All Implemented Interfaces:
java.io.Serializable
public class AddressErrorException
extends java.lang.Exception
Represents MIPS AddressErrorException. This is generated by the assembler when the
source code references a memory address not valid for the context.
Author:
Pete Sanderson
See Also:
Serialized Form
Constructor Summary
AddressErrorException(java.lang.String message,
int exceptType,
int addr)
Constructor for the AddressErrorException class
Method Summary
int getAddress()
Get the erroneous memory address.
int getType()
Get the exception type (load or store).
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
AddressErrorException
public AddressErrorException(java.lang.String message,
int exceptType,
int addr)
Constructor for the AddressErrorException class
Parameters:
addr – The erroneous memory address.
Method Detail
getAddress
public int getAddress()
Get the erroneous memory address.
Returns:
The erroneous memory address.
getType
public int getType()
Get the exception type (load or store).
Returns:
Exception type: Exceptions.ADDRESS_EXCEPTION_LOAD, Exceptions.ADDRESS_EXCEPTION_STORE
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
mars.mips.hardware
Classes
AccessNotice
Coprocessor0
Coprocessor1
Memory
MemoryAccessNotice
MemoryConfiguration
MemoryConfigurations
Register
RegisterAccessNotice
RegisterFile
Exceptions
AddressErrorException
InvalidRegisterAccessException
InvalidRegisterAccessException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class InvalidRegisterAccessException
java.lang.Object
java.lang.Throwable
java.lang.Exception
mars.mips.hardware.InvalidRegisterAccessException
All Implemented Interfaces:
java.io.Serializable
public class InvalidRegisterAccessException
extends java.lang.Exception
Represents attempt to access double precision register using an odd
(e.g. $f1, $f23) register name.
Author:
Pete Sanderson
See Also:
Serialized Form
Constructor Summary
InvalidRegisterAccessException()
Constructor for IllegalRegisterException.
Method Summary
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
InvalidRegisterAccessException
public InvalidRegisterAccessException()
Constructor for IllegalRegisterException.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.mips.hardware
Class Summary
AccessNotice Object provided to Observers of runtime access to MIPS memory or registers.
Coprocessor0 Represents Coprocessor 0.
Coprocessor1 Represents Coprocessor 1, the Floating Point Unit (FPU)
Memory Represents MIPS memory.
MemoryAccessNotice Object provided to Observers of runtime access to MIPS memory.
MemoryConfiguration Models the memory configuration for the simulated MIPS machine.
MemoryConfigurations Models the collection of MIPS memory configurations.
Register Abstraction to represent a register of a MIPS Assembler.
RegisterAccessNotice Object provided to Observers of runtime access to MIPS register.
RegisterFile Represents the collection of MIPS registers.
Exception Summary
AddressErrorException Represents MIPS AddressErrorException.
InvalidRegisterAccessException Represents attempt to access double precision register using an odd
(e.g.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Memory
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class Memory
java.lang.Object
java.util.Observable
mars.mips.hardware.Memory
public class Memory
extends java.util.Observable
Represents MIPS memory. Different segments are represented by different data structs.
Author:
Pete Sanderson
Field Summary
static boolean BIG_ENDIAN
Constant representing byte order of each memory word.
static int dataBaseAddress
base address for storage of non-global static data in data segment: 0x10010000 (from SPIM)
static int dataSegmentBaseAddress
base address for (user) data segment: 0x10000000
static int dataSegmentLimitAddress
static int exceptionHandlerAddress
starting address for exception handlers: 0x80000180
static int externBaseAddress
base address for .extern directive: 0x10000000
static int globalPointer
base address for storing globals
static int heapAddress
static int heapBaseAddress
base address for heap: 0x10040000 (I think from SPIM not MIPS)
static int kernelBaseAddress
kernel boundary.
static int kernelDataBaseAddress
base address for kernel data segment: 0x90000000
static int kernelDataSegmentLimitAddress
static int kernelHighAddress
highest address acessible in kernel mode.
static int kernelTextBaseAddress
base address for kernel text segment: 0x80000000
static int kernelTextLimitAddress
static boolean LITTLE_ENDIAN
Constant representing byte order of each memory word.
static int memoryMapBaseAddress
starting address for memory mapped I/O: 0xffff0000 (-65536)
static int memoryMapLimitAddress
static int stackBaseAddress
base address for stack: 0x7ffffffc (this is mine – start of highest word below kernel space)
static int stackLimitAddress
static int stackPointer
starting address for stack: 0x7fffeffc (this is from SPIM not MIPS)
static int textBaseAddress
base address for (user) text segment: 0x00400000
static int textLimitAddress
static int userHighAddress
highest address accessible in user (not kernel) mode.
static int WORD_LENGTH_BYTES
MIPS word length in bytes.
Method Summary
void addObserver(java.util.Observer obs)
Method to accept registration from observer for any memory address.
void addObserver(java.util.Observer obs,
int addr)
Method to accept registration from observer for specific address.
void addObserver(java.util.Observer obs,
int startAddr,
int endAddr)
Method to accept registration from observer for specific address range.
static int alignToWordBoundary(int address)
Utility method to align given address to next full word boundary, if not already
aligned.
int allocateBytesFromHeap(int numBytes)
Returns the next available word-aligned heap address.
void clear()
Explicitly clear the contents of memory.
int countObservers()
Return number of observers
void deleteObserver(java.util.Observer obs)
Remove specified memory observers
void deleteObservers()
Remove all memory observers
static boolean doublewordAligned(int address)
Utility to determine if given address is doubleword-aligned.
int get(int address,
int length)
Starting at the given word address, read the given number of bytes (max 4).
int getAddressOfFirstNull(int baseAddress,
int limitAddress)
Look for first “null” memory value in an address range.
int getByte(int address)
Reads specified Memory byte into low order 8 bits of int.
boolean getByteOrder()
Retrieve memory byte order.
int getHalf(int address)
Starting at the given word address, read a 2 byte word into lower 16 bits of int.
static Memory getInstance()
Returns the unique Memory instance, which becomes in essence global.
int getRawWord(int address)
Starting at the given word address, read a 4 byte word as an int.
java.lang.Integer getRawWordOrNull(int address)
Starting at the given word address, read a 4 byte word as an int and return Integer.
ProgramStatement getStatement(int address)
Gets ProgramStatement from Text Segment.
ProgramStatement getStatementNoNotify(int address)
Gets ProgramStatement from Text Segment without notifying observers.
int getWord(int address)
Starting at the given word address, read a 4 byte word as an int.
int getWordNoNotify(int address)
Starting at the given word address, read a 4 byte word as an int.
static boolean inDataSegment(int address)
Handy little utility to find out if given address is in MARS data
segment (starts at Memory.dataSegmentBaseAddress).
static boolean inKernelDataSegment(int address)
Handy little utility to find out if given address is in MARS kernel data
segment (starts at Memory.kernelDataSegmentBaseAddress).
static boolean inKernelTextSegment(int address)
Handy little utility to find out if given address is in MARS kernel
text segment (starts at Memory.kernelTextBaseAddress).
static boolean inMemoryMapSegment(int address)
Handy little utility to find out if given address is in the Memory Map area
starts at Memory.memoryMapBaseAddress, range 0xffff0000 to 0xffffffff.
static boolean inTextSegment(int address)
Handy little utility to find out if given address is in MARS text
segment (starts at Memory.textBaseAddress).
void notifyObservers()
Overridden to be unavailable.
void notifyObservers(java.lang.Object obj)
Overridden to be unavailable.
int set(int address,
int value,
int length)
Starting at the given address, write the given value over the given number of bytes.
int setByte(int address,
int value)
Writes low order 8 bits of given value into specified Memory byte.
void setByteOrder(boolean order)
Set byte order to either LITTLE_ENDIAN or BIG_ENDIAN.
static void setConfiguration()
Sets current memory configuration for simulated MIPS.
double setDouble(int address,
double value)
Writes 64 bit double value starting at specified Memory address.
int setHalf(int address,
int value)
Starting at the given halfword address, write the lower 16 bits of given value
into 2 bytes (a halfword).
int setRawWord(int address,
int value)
Starting at the given word address, write the given value over 4 bytes (a word).
void setStatement(int address,
ProgramStatement statement)
Stores ProgramStatement in Text Segment.
int setWord(int address,
int value)
Starting at the given word address, write the given value over 4 bytes (a word).
boolean usingCompactMemoryConfiguration()
Determine whether the current memory configuration has a maximum address that can be stored
in 16 bits.
static boolean wordAligned(int address)
Utility to determine if given address is word-aligned.
Methods inherited from class java.util.Observable
clearChanged, hasChanged, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
textBaseAddress
public static int textBaseAddress
base address for (user) text segment: 0x00400000
dataSegmentBaseAddress
public static int dataSegmentBaseAddress
base address for (user) data segment: 0x10000000
externBaseAddress
public static int externBaseAddress
base address for .extern directive: 0x10000000
globalPointer
public static int globalPointer
base address for storing globals
dataBaseAddress
public static int dataBaseAddress
base address for storage of non-global static data in data segment: 0x10010000 (from SPIM)
heapBaseAddress
public static int heapBaseAddress
base address for heap: 0x10040000 (I think from SPIM not MIPS)
stackPointer
public static int stackPointer
starting address for stack: 0x7fffeffc (this is from SPIM not MIPS)
stackBaseAddress
public static int stackBaseAddress
base address for stack: 0x7ffffffc (this is mine – start of highest word below kernel space)
userHighAddress
public static int userHighAddress
highest address accessible in user (not kernel) mode.
kernelBaseAddress
public static int kernelBaseAddress
kernel boundary. Only OS can access this or higher address
kernelTextBaseAddress
public static int kernelTextBaseAddress
base address for kernel text segment: 0x80000000
exceptionHandlerAddress
public static int exceptionHandlerAddress
starting address for exception handlers: 0x80000180
kernelDataBaseAddress
public static int kernelDataBaseAddress
base address for kernel data segment: 0x90000000
memoryMapBaseAddress
public static int memoryMapBaseAddress
starting address for memory mapped I/O: 0xffff0000 (-65536)
kernelHighAddress
public static int kernelHighAddress
highest address acessible in kernel mode.
WORD_LENGTH_BYTES
public static final int WORD_LENGTH_BYTES
MIPS word length in bytes.
See Also:
Constant Field Values
LITTLE_ENDIAN
public static final boolean LITTLE_ENDIAN
Constant representing byte order of each memory word. Little-endian means lowest
numbered byte is right most [3][2][1][0].
See Also:
Constant Field Values
BIG_ENDIAN
public static final boolean BIG_ENDIAN
Constant representing byte order of each memory word. Big-endian means lowest
numbered byte is left most [0][1][2][3].
See Also:
Constant Field Values
heapAddress
public static int heapAddress
dataSegmentLimitAddress
public static int dataSegmentLimitAddress
textLimitAddress
public static int textLimitAddress
kernelDataSegmentLimitAddress
public static int kernelDataSegmentLimitAddress
kernelTextLimitAddress
public static int kernelTextLimitAddress
stackLimitAddress
public static int stackLimitAddress
memoryMapLimitAddress
public static int memoryMapLimitAddress
Method Detail
getInstance
public static Memory getInstance()
Returns the unique Memory instance, which becomes in essence global.
clear
public void clear()
Explicitly clear the contents of memory. Typically done at start of assembly.
setConfiguration
public static void setConfiguration()
Sets current memory configuration for simulated MIPS. Configuration is
collection of memory segment addresses. e.g. text segment starting at
address 0x00400000. Configuration can be modified starting with MARS 3.7.
usingCompactMemoryConfiguration
public boolean usingCompactMemoryConfiguration()
Determine whether the current memory configuration has a maximum address that can be stored
in 16 bits.
Returns:
true if maximum address can be stored in 16 bits or less, false otherwise
allocateBytesFromHeap
public int allocateBytesFromHeap(int numBytes)
throws java.lang.IllegalArgumentException
Returns the next available word-aligned heap address. There is no recycling and
no heap management! There is however nearly 4MB of heap space available in Mars.
Parameters:
numBytes – Number of bytes requested. Should be multiple of 4, otherwise next higher multiple of 4 allocated.
Returns:
address of allocated heap storage.
Throws:
java.lang.IllegalArgumentException – if number of requested bytes is negative or exceeds available heap storage
setByteOrder
public void setByteOrder(boolean order)
Set byte order to either LITTLE_ENDIAN or BIG_ENDIAN. Default is LITTLE_ENDIAN.
Parameters:
order – either LITTLE_ENDIAN or BIG_ENDIAN
getByteOrder
public boolean getByteOrder()
Retrieve memory byte order. Default is LITTLE_ENDIAN (like PCs).
Returns:
either LITTLE_ENDIAN or BIG_ENDIAN
set
public int set(int address,
int value,
int length)
throws AddressErrorException
Starting at the given address, write the given value over the given number of bytes.
This one does not check for word boundaries, and copies one byte at a time.
If length == 1, takes value from low order byte. If 2, takes from low order half-word.
Parameters:
address – Starting address of Memory address to be set.
value – Value to be stored starting at that address.
length – Number of bytes to be written.
Returns:
old value that was replaced by the set operation
Throws:
AddressErrorException
setRawWord
public int setRawWord(int address,
int value)
throws AddressErrorException
Starting at the given word address, write the given value over 4 bytes (a word).
It must be written as is, without adjusting for byte order (little vs big endian).
Address must be word-aligned.
Parameters:
address – Starting address of Memory address to be set.
value – Value to be stored starting at that address.
Returns:
old value that was replaced by the set operation.
Throws:
AddressErrorException – If address is not on word boundary.
setWord
public int setWord(int address,
int value)
throws AddressErrorException
Starting at the given word address, write the given value over 4 bytes (a word).
The address must be word-aligned.
Parameters:
address – Starting address of Memory address to be set.
value – Value to be stored starting at that address.
Returns:
old value that was replaced by setWord operation.
Throws:
AddressErrorException – If address is not on word boundary.
setHalf
public int setHalf(int address,
int value)
throws AddressErrorException
Starting at the given halfword address, write the lower 16 bits of given value
into 2 bytes (a halfword).
Parameters:
address – Starting address of Memory address to be set.
value – Value to be stored starting at that address. Only low order 16 bits used.
Returns:
old value that was replaced by setHalf operation.
Throws:
AddressErrorException – If address is not on halfword boundary.
setByte
public int setByte(int address,
int value)
throws AddressErrorException
Writes low order 8 bits of given value into specified Memory byte.
Parameters:
address – Address of Memory byte to be set.
value – Value to be stored at that address. Only low order 8 bits used.
Returns:
old value that was replaced by setByte operation.
Throws:
AddressErrorException
setDouble
public double setDouble(int address,
double value)
throws AddressErrorException
Writes 64 bit double value starting at specified Memory address. Note that
high-order 32 bits are stored in higher (second) memory word regardless
of “endianness”.
Parameters:
address – Starting address of Memory address to be set.
value – Value to be stored at that address.
Returns:
old value that was replaced by setDouble operation.
Throws:
AddressErrorException
setStatement
public void setStatement(int address,
ProgramStatement statement)
throws AddressErrorException
Stores ProgramStatement in Text Segment.
Parameters:
address – Starting address of Memory address to be set. Must be word boundary.
statement – Machine code to be stored starting at that address — for simulation
purposes, actually stores reference to ProgramStatement instead of 32-bit machine code.
Throws:
AddressErrorException – If address is not on word boundary or is outside Text Segment.
See Also:
ProgramStatement
get
public int get(int address,
int length)
throws AddressErrorException
Starting at the given word address, read the given number of bytes (max 4).
This one does not check for word boundaries, and copies one byte at a time.
If length == 1, puts value in low order byte. If 2, puts into low order half-word.
Parameters:
address – Starting address of Memory address to be read.
length – Number of bytes to be read.
Returns:
Value stored starting at that address.
Throws:
AddressErrorException
getRawWord
public int getRawWord(int address)
throws AddressErrorException
Starting at the given word address, read a 4 byte word as an int.
It transfers the 32 bit value “raw” as stored in memory, and does not adjust
for byte order (big or little endian). Address must be word-aligned.
Parameters:
address – Starting address of word to be read.
Returns:
Word (4-byte value) stored starting at that address.
Throws:
AddressErrorException – If address is not on word boundary.
getRawWordOrNull
public java.lang.Integer getRawWordOrNull(int address)
throws AddressErrorException
Starting at the given word address, read a 4 byte word as an int and return Integer.
It transfers the 32 bit value “raw” as stored in memory, and does not adjust
for byte order (big or little endian). Address must be word-aligned.
Returns null if reading from text segment and there is no instruction at the
requested address. Returns null if reading from data segment and this is the
first reference to the MARS 4K memory allocation block (i.e., an array to
hold the memory has not been allocated).
This method was developed by Greg Giberling of UC Berkeley to support the memory
dump feature that he implemented in Fall 2007.
Parameters:
address – Starting address of word to be read.
Returns:
Word (4-byte value) stored starting at that address as an Integer. Conditions
that cause return value null are described above.
Throws:
AddressErrorException – If address is not on word boundary.
getAddressOfFirstNull
public int getAddressOfFirstNull(int baseAddress,
int limitAddress)
throws AddressErrorException
Look for first “null” memory value in an address range. For text segment (binary code), this
represents a word that does not contain an instruction. Normally use this to find the end of
the program. For data segment, this represents the first block of simulated memory (block length
currently 4K words) that has not been referenced by an assembled/executing program.
Parameters:
baseAddress – lowest MIPS address to be searched; the starting point
limitAddress – highest MIPS address to be searched
Returns:
lowest address within specified range that contains “null” value as described above.
Throws:
AddressErrorException – if the base address is not on a word boundary
getWord
public int getWord(int address)
throws AddressErrorException
Starting at the given word address, read a 4 byte word as an int.
Does not use “get()”; we can do it faster here knowing we’re working only
with full words.
Parameters:
address – Starting address of word to be read.
Returns:
Word (4-byte value) stored starting at that address.
Throws:
AddressErrorException – If address is not on word boundary.
getWordNoNotify
public int getWordNoNotify(int address)
throws AddressErrorException
Starting at the given word address, read a 4 byte word as an int.
Does not use “get()”; we can do it faster here knowing we’re working only
with full words. Observers are NOT notified.
Parameters:
address – Starting address of word to be read.
Returns:
Word (4-byte value) stored starting at that address.
Throws:
AddressErrorException – If address is not on word boundary.
getHalf
public int getHalf(int address)
throws AddressErrorException
Starting at the given word address, read a 2 byte word into lower 16 bits of int.
Parameters:
address – Starting address of word to be read.
Returns:
Halfword (2-byte value) stored starting at that address, stored in lower 16 bits.
Throws:
AddressErrorException – If address is not on halfword boundary.
getByte
public int getByte(int address)
throws AddressErrorException
Reads specified Memory byte into low order 8 bits of int.
Parameters:
address – Address of Memory byte to be read.
Returns:
Value stored at that address. Only low order 8 bits used.
Throws:
AddressErrorException
getStatement
public ProgramStatement getStatement(int address)
throws AddressErrorException
Gets ProgramStatement from Text Segment.
Parameters:
address – Starting address of Memory address to be read. Must be word boundary.
Returns:
reference to ProgramStatement object associated with that address, or null if none.
Throws:
AddressErrorException – If address is not on word boundary or is outside Text Segment.
See Also:
ProgramStatement
getStatementNoNotify
public ProgramStatement getStatementNoNotify(int address)
throws AddressErrorException
Gets ProgramStatement from Text Segment without notifying observers.
Parameters:
address – Starting address of Memory address to be read. Must be word boundary.
Returns:
reference to ProgramStatement object associated with that address, or null if none.
Throws:
AddressErrorException – If address is not on word boundary or is outside Text Segment.
See Also:
ProgramStatement
wordAligned
public static boolean wordAligned(int address)
Utility to determine if given address is word-aligned.
Parameters:
address – the address to check
Returns:
true if address is word-aligned, false otherwise
doublewordAligned
public static boolean doublewordAligned(int address)
Utility to determine if given address is doubleword-aligned.
Parameters:
address – the address to check
Returns:
true if address is doubleword-aligned, false otherwise
alignToWordBoundary
public static int alignToWordBoundary(int address)
Utility method to align given address to next full word boundary, if not already
aligned.
Parameters:
address – a memory address (any int value is potentially valid)
Returns:
address aligned to next word boundary (divisible by 4)
inTextSegment
public static boolean inTextSegment(int address)
Handy little utility to find out if given address is in MARS text
segment (starts at Memory.textBaseAddress).
Note that MARS does not implement the entire MIPS text segment space,
but it does implement enough for hundreds of thousands of lines
of code.
Parameters:
address – integer memory address
Returns:
true if that address is within MARS-defined text segment,
false otherwise.
inKernelTextSegment
public static boolean inKernelTextSegment(int address)
Handy little utility to find out if given address is in MARS kernel
text segment (starts at Memory.kernelTextBaseAddress).
Parameters:
address – integer memory address
Returns:
true if that address is within MARS-defined kernel text segment,
false otherwise.
inDataSegment
public static boolean inDataSegment(int address)
Handy little utility to find out if given address is in MARS data
segment (starts at Memory.dataSegmentBaseAddress).
Note that MARS does not implement the entire MIPS data segment space,
but it does support at least 4MB.
Parameters:
address – integer memory address
Returns:
true if that address is within MARS-defined data segment,
false otherwise.
inKernelDataSegment
public static boolean inKernelDataSegment(int address)
Handy little utility to find out if given address is in MARS kernel data
segment (starts at Memory.kernelDataSegmentBaseAddress).
Parameters:
address – integer memory address
Returns:
true if that address is within MARS-defined kernel data segment,
false otherwise.
inMemoryMapSegment
public static boolean inMemoryMapSegment(int address)
Handy little utility to find out if given address is in the Memory Map area
starts at Memory.memoryMapBaseAddress, range 0xffff0000 to 0xffffffff.
Parameters:
address – integer memory address
Returns:
true if that address is within MARS-defined memory map (MMIO) area,
false otherwise.
addObserver
public void addObserver(java.util.Observer obs)
Method to accept registration from observer for any memory address. Overrides
inherited method. Note to observers: this class delegates Observable operations
so notices will come from the delegate, not the memory object.
Overrides:
addObserver in class java.util.Observable
Parameters:
obs – the observer
addObserver
public void addObserver(java.util.Observer obs,
int addr)
throws AddressErrorException
Method to accept registration from observer for specific address. This includes
the memory word starting at the given address. Note to observers: this class delegates Observable operations
so notices will come from the delegate, not the memory object.
Parameters:
obs – the observer
addr – the memory address which must be on word boundary
Throws:
AddressErrorException
addObserver
public void addObserver(java.util.Observer obs,
int startAddr,
int endAddr)
throws AddressErrorException
Method to accept registration from observer for specific address range. The
last byte included in the address range is the last byte of the word specified
by the ending address. Note to observers: this class delegates Observable operations
so notices will come from the delegate, not the memory object.
Parameters:
obs – the observer
startAddr – the low end of memory address range, must be on word boundary
endAddr – the high end of memory address range, must be on word boundary
Throws:
AddressErrorException
countObservers
public int countObservers()
Return number of observers
Overrides:
countObservers in class java.util.Observable
deleteObserver
public void deleteObserver(java.util.Observer obs)
Remove specified memory observers
Overrides:
deleteObserver in class java.util.Observable
Parameters:
obs – Observer to be removed
deleteObservers
public void deleteObservers()
Remove all memory observers
Overrides:
deleteObservers in class java.util.Observable
notifyObservers
public void notifyObservers()
Overridden to be unavailable. The notice that an Observer
receives does not come from the memory object itself, but
instead from a delegate.
Overrides:
notifyObservers in class java.util.Observable
Throws:
java.lang.UnsupportedOperationException
notifyObservers
public void notifyObservers(java.lang.Object obj)
Overridden to be unavailable. The notice that an Observer
receives does not come from the memory object itself, but
instead from a delegate.
Overrides:
notifyObservers in class java.util.Observable
Throws:
java.lang.UnsupportedOperationException
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
RegisterAccessNotice
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class RegisterAccessNotice
java.lang.Object
mars.mips.hardware.AccessNotice
mars.mips.hardware.RegisterAccessNotice
public class RegisterAccessNotice
extends AccessNotice
Object provided to Observers of runtime access to MIPS register.
Observer can get the access type (R/W) and register number.
Author:
Pete Sanderson
Field Summary
Fields inherited from class mars.mips.hardware.AccessNotice
READ, WRITE
Method Summary
java.lang.String getRegisterName()
Fetch the register number of register accessed.
java.lang.String toString()
String representation indicates access type and which register
Methods inherited from class mars.mips.hardware.AccessNotice
accessIsFromGUI, accessIsFromMIPS, getAccessType, getThread
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Method Detail
getRegisterName
public java.lang.String getRegisterName()
Fetch the register number of register accessed.
toString
public java.lang.String toString()
String representation indicates access type and which register
Overrides:
toString in class java.lang.Object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.mips.hardware
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.mips.hardware.AccessNotice mars.mips.hardware.MemoryAccessNotice
mars.mips.hardware.RegisterAccessNotice
mars.mips.hardware.Coprocessor0
mars.mips.hardware.Coprocessor1
mars.mips.hardware.MemoryConfiguration
mars.mips.hardware.MemoryConfigurations
java.util.Observable mars.mips.hardware.Memory
mars.mips.hardware.Register
mars.mips.hardware.RegisterFile
java.lang.Throwable (implements java.io.Serializable)
java.lang.Exception mars.mips.hardware.AddressErrorException
mars.mips.hardware.InvalidRegisterAccessException
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
RegisterFile
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.hardware
Class RegisterFile
java.lang.Object
mars.mips.hardware.RegisterFile
public class RegisterFile
extends java.lang.Object
Represents the collection of MIPS registers.
Author:
Jason Bumgarner, Jason Shrewsbury
Field Summary
static int GLOBAL_POINTER_REGISTER
static int STACK_POINTER_REGISTER
Constructor Summary
RegisterFile()
Method Summary
static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable.
static int getInitialProgramCounter()
For returning the program counter’s initial (reset) value.
static int getNumber(java.lang.String n)
For getting the number representation of the register.
static int getProgramCounter()
For returning the program counters value.
static Register getProgramCounterRegister()
Returns Register object for program counter.
static Register[] getRegisters()
For returning the set of registers.
static Register getUserRegister(java.lang.String Rname)
Get register object corresponding to given name.
static int getValue(int num)
Returns the value of the register who’s number is num.
static void incrementPC()
Method to increment the Program counter in the general case (not a jump or branch).
static void initializeProgramCounter(boolean startAtMain)
Will initialize the Program Counter to either the default reset value, or the address
associated with source program global label “main”, if it exists as a text segment label
and the global setting is set.
static void initializeProgramCounter(int value)
For initializing the Program Counter.
static void resetRegisters()
Method to reinitialize the values of the registers.
static int setProgramCounter(int value)
For setting the Program Counter.
static void showRegisters()
Method for displaying the register values for debugging.
static int updateRegister(int num,
int val)
This method updates the register value who’s number is num.
static void updateRegister(java.lang.String reg,
int val)
Sets the value of the register given to the value given.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
GLOBAL_POINTER_REGISTER
public static final int GLOBAL_POINTER_REGISTER
See Also:
Constant Field Values
STACK_POINTER_REGISTER
public static final int STACK_POINTER_REGISTER
See Also:
Constant Field Values
Constructor Detail
RegisterFile
public RegisterFile()
Method Detail
showRegisters
public static void showRegisters()
Method for displaying the register values for debugging.
updateRegister
public static int updateRegister(int num,
int val)
This method updates the register value who’s number is num. Also handles the lo and hi registers
Parameters:
num – Register to set the value of.
val – The desired value for the register.
updateRegister
public static void updateRegister(java.lang.String reg,
int val)
Sets the value of the register given to the value given.
Parameters:
reg – Name of register to set the value of.
val – The desired value for the register.
getValue
public static int getValue(int num)
Returns the value of the register who’s number is num.
Parameters:
num – The register number.
Returns:
The value of the given register.
getNumber
public static int getNumber(java.lang.String n)
For getting the number representation of the register.
Parameters:
n – The string formatted register name to look for.
Returns:
The number of the register represented by the string
or -1 if no match.
getRegisters
public static Register[] getRegisters()
For returning the set of registers.
Returns:
The set of registers.
getUserRegister
public static Register getUserRegister(java.lang.String Rname)
Get register object corresponding to given name. If no match, return null.
Parameters:
Rname – The register name, either in $0 or $zero format.
Returns:
The register object,or null if not found.
initializeProgramCounter
public static void initializeProgramCounter(int value)
For initializing the Program Counter. Do not use this to implement jumps and
branches, as it will NOT record a backstep entry with the restore value.
If you need backstepping capability, use setProgramCounter instead.
Parameters:
value – The value to set the Program Counter to.
initializeProgramCounter
public static void initializeProgramCounter(boolean startAtMain)
Will initialize the Program Counter to either the default reset value, or the address
associated with source program global label “main”, if it exists as a text segment label
and the global setting is set.
Parameters:
startAtMain – If true, will set program counter to address of statement labeled
‘main’ (or other defined start label) if defined. If not defined, or if parameter false,
will set program counter to default reset value.
setProgramCounter
public static int setProgramCounter(int value)
For setting the Program Counter. Note that ordinary PC update should be done using
incrementPC() method. Use this only when processing jumps and branches.
Parameters:
value – The value to set the Program Counter to.
Returns:
previous PC value
getProgramCounter
public static int getProgramCounter()
For returning the program counters value.
Returns:
The program counters value as an int.
getProgramCounterRegister
public static Register getProgramCounterRegister()
Returns Register object for program counter. Use with caution.
Returns:
program counter’s Register object.
getInitialProgramCounter
public static int getInitialProgramCounter()
For returning the program counter’s initial (reset) value.
Returns:
The program counter’s initial value
resetRegisters
public static void resetRegisters()
Method to reinitialize the values of the registers.
NOTE: Should not be called from command-mode MARS because this
this method uses global settings from the registry. Command-mode must operate
using only the command switches, not registry settings. It can be called
from tools running stand-alone, and this is done in
AbstractMarsToolAndApplication.
incrementPC
public static void incrementPC()
Method to increment the Program counter in the general case (not a jump or branch).
addRegistersObserver
public static void addRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will add the given Observer to each one. Currently does not apply to Program
Counter.
deleteRegistersObserver
public static void deleteRegistersObserver(java.util.Observer observer)
Each individual register is a separate object and Observable. This handy method
will delete the given Observer from each one. Currently does not apply to Program
Counter.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
AsciiTextDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class AsciiTextDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.AsciiTextDumpFormat
All Implemented Interfaces:
DumpFormat
public class AsciiTextDumpFormat
extends AbstractDumpFormat
Class that represents the “ASCII text” memory dump format. Memory contents
are interpreted as ASCII codes. The output
is a text file with one word of MIPS memory per line. The word is formatted
to leave three spaces for each character. Non-printing characters
rendered as period (.) as placeholder. Common escaped characters
rendered using backslash and single-character descriptor, e.g. \t for tab.
Author:
Pete Sanderson
Constructor Summary
AsciiTextDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Interpret MIPS memory contents as ASCII characters.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
AsciiTextDumpFormat
public AsciiTextDumpFormat()
Constructor. There is no standard file extension for this format.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Interpret MIPS memory contents as ASCII characters. Each line of
text contains one memory word written in ASCII characters. Those
corresponding to tab, newline, null, etc are rendered as backslash
followed by single-character code, e.g. \t for tab, \0 for null.
Non-printing character (control code,
values above 127) is rendered as a period (.). Written
using PrintStream’s println() method.
Adapted by Pete Sanderson from code written by Greg Gibeling.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BinaryTextDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class BinaryTextDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.BinaryTextDumpFormat
All Implemented Interfaces:
DumpFormat
public class BinaryTextDumpFormat
extends AbstractDumpFormat
Class that represents the “binary text” memory dump format. The output
is a text file with one word of MIPS memory per line. The word is formatted
using ‘0’ and ‘1’ characters, e.g. 01110101110000011111110101010011.
Author:
Pete Sanderson
Constructor Summary
BinaryTextDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents in binary text format.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
BinaryTextDumpFormat
public BinaryTextDumpFormat()
Constructor. There is no standard file extension for this format.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents in binary text format. Each line of
text contains one memory word written as 32 ‘0’ and ‘1’ characters. Written
using PrintStream’s println() method.
Adapted by Pete Sanderson from code written by Greg Gibeling.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MIFDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class MIFDumpFormat
java.lang.Object
mars.mips.dump.MIFDumpFormat
public class MIFDumpFormat
extends java.lang.Object
The Memory Initialization File (.mif) VHDL-supported file format
This is documented for the Altera platform at
www.altera.com/support/software/nativelink/quartus2/glossary/def_mif.html.
Author:
Pete Sanderson
Constructor Summary
MIFDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MIFDumpFormat
public MIFDumpFormat()
Constructor. File extention is “mif”.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Interface DumpFormat
All Known Implementing Classes:
AbstractDumpFormat, AsciiTextDumpFormat, BinaryDumpFormat, BinaryTextDumpFormat, HexTextDumpFormat, IntelHexDumpFormat, SegmentWindowDumpFormat
public interface DumpFormat
Interface for memory dump file formats. All MARS needs to be able
to do is save an assembled program or data in the specified manner for
a given format. Formats are specified through classes
that implement this interface.
Author:
Pete Sanderson
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents according to the
specification for this format.
java.lang.String getCommandDescriptor()
A short one-word descriptor that will be used by the MARS
command line parser (and the MARS command line user) to specify
that this format is to be used.
java.lang.String getDescription()
Get a short description of the format, suitable
for displaying along with the extension, if any, in the file
save dialog and also for displaying as a tool tip.
java.lang.String getFileExtension()
Get the file extension associated with this format.
java.lang.String toString()
Descriptive name for the format.
Method Detail
getFileExtension
java.lang.String getFileExtension()
Get the file extension associated with this format.
Returns:
String containing file extension — without the leading “.” — or
null if there is no standard extension.
getDescription
java.lang.String getDescription()
Get a short description of the format, suitable
for displaying along with the extension, if any, in the file
save dialog and also for displaying as a tool tip.
Returns:
String containing short description to go with the extension
or as tool tip when mouse hovers over GUI component representing
this format.
getCommandDescriptor
java.lang.String getCommandDescriptor()
A short one-word descriptor that will be used by the MARS
command line parser (and the MARS command line user) to specify
that this format is to be used.
toString
java.lang.String toString()
Descriptive name for the format.
Overrides:
toString in class java.lang.Object
Returns:
Format name.
dumpMemoryRange
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents according to the
specification for this format.
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
mars.mips.dump
Interfaces
DumpFormat
Classes
AbstractDumpFormat
AsciiTextDumpFormat
BinaryDumpFormat
BinaryTextDumpFormat
DumpFormatLoader
HexTextDumpFormat
IntelHexDumpFormat
MIFDumpFormat
SegmentWindowDumpFormat
SegmentWindowDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class SegmentWindowDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.SegmentWindowDumpFormat
All Implemented Interfaces:
DumpFormat
public class SegmentWindowDumpFormat
extends AbstractDumpFormat
Dump MIPS memory contents in Segment Window format. Each line of
text output resembles the Text Segment Window or Data Segment Window
depending on which segment is selected for the dump. Written
using PrintStream’s println() method. Each line of Text Segment
Window represents one word of text segment memory. The line
includes (1) address, (2) machine code in hex, (3) basic instruction,
(4) source line. Each line of Data Segment Window represents 8
words of data segment memory. The line includes address of first
word for that line followed by 8 32-bit values.
In either case, addresses and values are displayed in decimal or
hexadecimal representation according to the corresponding settings.
Author:
Pete Sanderson
Constructor Summary
SegmentWindowDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents in Segment Window format.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
SegmentWindowDumpFormat
public SegmentWindowDumpFormat()
Constructor. There is no standard file extension for this format.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents in Segment Window format. Each line of
text output resembles the Text Segment Window or Data Segment Window
depending on which segment is selected for the dump. Written
using PrintStream’s println() method.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
DumpFormatLoader
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class DumpFormatLoader
java.lang.Object
mars.mips.dump.DumpFormatLoader
public class DumpFormatLoader
extends java.lang.Object
Constructor Summary
DumpFormatLoader()
Method Summary
static DumpFormat findDumpFormatGivenCommandDescriptor(java.util.ArrayList formatList,
java.lang.String formatCommandDescriptor)
java.util.ArrayList loadDumpFormats()
Dynamically loads dump formats into an ArrayList.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
DumpFormatLoader
public DumpFormatLoader()
Method Detail
loadDumpFormats
public java.util.ArrayList loadDumpFormats()
Dynamically loads dump formats into an ArrayList. This method is adapted from
the loadGameControllers() method in Bret Barker’s GameServer class.
Barker ( ) is co-author of the book “Developing Games
in Java”. Also see the ToolLoader and SyscallLoader classes elsewhere in MARS.
findDumpFormatGivenCommandDescriptor
public static DumpFormat findDumpFormatGivenCommandDescriptor(java.util.ArrayList formatList,
java.lang.String formatCommandDescriptor)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.mips.dump
Interface Summary
DumpFormat Interface for memory dump file formats.
Class Summary
AbstractDumpFormat Abstract class for memory dump file formats.
AsciiTextDumpFormat Class that represents the “ASCII text” memory dump format.
BinaryDumpFormat Class that represents the “binary” memory dump format.
BinaryTextDumpFormat Class that represents the “binary text” memory dump format.
DumpFormatLoader
HexTextDumpFormat Class that represents the “hexadecimal text” memory dump format.
IntelHexDumpFormat Intel’s Hex memory initialization format
MIFDumpFormat The Memory Initialization File (.mif) VHDL-supported file format
This is documented for the Altera platform at
www.altera.com/support/software/nativelink/quartus2/glossary/def_mif.html.
SegmentWindowDumpFormat Dump MIPS memory contents in Segment Window format.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
mars.mips.dump Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.mips.dump
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.mips.dump.AbstractDumpFormat (implements mars.mips.dump.DumpFormat)
mars.mips.dump.AsciiTextDumpFormat
mars.mips.dump.BinaryDumpFormat
mars.mips.dump.BinaryTextDumpFormat
mars.mips.dump.HexTextDumpFormat
mars.mips.dump.IntelHexDumpFormat
mars.mips.dump.SegmentWindowDumpFormat
mars.mips.dump.DumpFormatLoader
mars.mips.dump.MIFDumpFormat
Interface Hierarchy
mars.mips.dump.DumpFormat
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
AbstractDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class AbstractDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
All Implemented Interfaces:
DumpFormat
Direct Known Subclasses:
AsciiTextDumpFormat, BinaryDumpFormat, BinaryTextDumpFormat, HexTextDumpFormat, IntelHexDumpFormat, SegmentWindowDumpFormat
public abstract class AbstractDumpFormat
extends java.lang.Object
implements DumpFormat
Abstract class for memory dump file formats. Provides constructors and
defaults for everything except the dumpMemoryRange method itself.
Author:
Pete Sanderson
Constructor Summary
AbstractDumpFormat(java.lang.String name,
java.lang.String commandDescriptor,
java.lang.String description,
java.lang.String extension)
Typical constructor.
Method Summary
abstract void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents according to the
specification for this format.
java.lang.String getCommandDescriptor()
One-word description of format to be used by MARS command mode parser
and user in conjunction with the “dump” option.
java.lang.String getDescription()
Get a short description of the format, suitable for displaying along with
the extension, in the file save dialog, or as a tool tip.
java.lang.String getFileExtension()
Get the file extension associated with this format.
java.lang.String toString()
String representing this object.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
AbstractDumpFormat
public AbstractDumpFormat(java.lang.String name,
java.lang.String commandDescriptor,
java.lang.String description,
java.lang.String extension)
Typical constructor. Note you cannot creates objects from this
class but subclass constructor can call this one.
Parameters:
name – Brief descriptive name to be displayed in selection list.
commandDescriptor – One-word descriptive name to be used by MARS command mode parser and user.
Any spaces in this string will be removed.
description – Description to go with standard file extension for
display in file save dialog or to be used as tool tip.
extension – Standard file extension for this format. Null if none.
Method Detail
getFileExtension
public java.lang.String getFileExtension()
Get the file extension associated with this format.
Specified by:
getFileExtension in interface DumpFormat
Returns:
String containing file extension — without the leading “.” — or
null if there is no standard extension.
getDescription
public java.lang.String getDescription()
Get a short description of the format, suitable for displaying along with
the extension, in the file save dialog, or as a tool tip.
Specified by:
getDescription in interface DumpFormat
Returns:
String containing short description to go with the extension
or for use as tool tip. Possibly null.
toString
public java.lang.String toString()
String representing this object.
Specified by:
toString in interface DumpFormat
Overrides:
toString in class java.lang.Object
Returns:
Name given for this object.
getCommandDescriptor
public java.lang.String getCommandDescriptor()
One-word description of format to be used by MARS command mode parser
and user in conjunction with the “dump” option.
Specified by:
getCommandDescriptor in interface DumpFormat
Returns:
One-word String describing the format.
dumpMemoryRange
public abstract void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents according to the
specification for this format.
Specified by:
dumpMemoryRange in interface DumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BinaryDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class BinaryDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.BinaryDumpFormat
All Implemented Interfaces:
DumpFormat
public class BinaryDumpFormat
extends AbstractDumpFormat
Class that represents the “binary” memory dump format. The output
is a binary file containing the memory words as a byte stream. Output
is produced using PrintStream’s write() method.
Author:
Pete Sanderson
Constructor Summary
BinaryDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents in pure binary format.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
BinaryDumpFormat
public BinaryDumpFormat()
Constructor. There is no standard file extension for this format.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents in pure binary format. One byte at a time
using PrintStream’s write() method. Adapted by Pete Sanderson from
code written by Greg Gibeling.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
HexTextDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class HexTextDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.HexTextDumpFormat
All Implemented Interfaces:
DumpFormat
public class HexTextDumpFormat
extends AbstractDumpFormat
Class that represents the “hexadecimal text” memory dump format. The output
is a text file with one word of MIPS memory per line. The word is formatted
using hexadecimal characters, e.g. 3F205A39.
Author:
Pete Sanderson
Constructor Summary
HexTextDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents in hexadecimal text format.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
HexTextDumpFormat
public HexTextDumpFormat()
Constructor. There is no standard file extension for this format.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents in hexadecimal text format. Each line of
text contains one memory word written in hexadecimal characters. Written
using PrintStream’s println() method.
Adapted by Pete Sanderson from code written by Greg Gibeling.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
IntelHexDumpFormat
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.mips.dump
Class IntelHexDumpFormat
java.lang.Object
mars.mips.dump.AbstractDumpFormat
mars.mips.dump.IntelHexDumpFormat
All Implemented Interfaces:
DumpFormat
public class IntelHexDumpFormat
extends AbstractDumpFormat
Intel’s Hex memory initialization format
Author:
Leo Alterman
Constructor Summary
IntelHexDumpFormat()
Constructor.
Method Summary
void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
Methods inherited from class mars.mips.dump.AbstractDumpFormat
getCommandDescriptor, getDescription, getFileExtension, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
IntelHexDumpFormat
public IntelHexDumpFormat()
Constructor. File extention is “hex”.
Method Detail
dumpMemoryRange
public void dumpMemoryRange(java.io.File file,
int firstAddress,
int lastAddress)
throws AddressErrorException,
java.io.IOException
Write MIPS memory contents according to the Memory Initialization File
(MIF) specification.
Specified by:
dumpMemoryRange in interface DumpFormat
Specified by:
dumpMemoryRange in class AbstractDumpFormat
Parameters:
file – File in which to store MIPS memory contents.
firstAddress – first (lowest) memory address to dump. In bytes but
must be on word boundary.
lastAddress – last (highest) memory address to dump. In bytes but
must be on word boundary. Will dump the word that starts at this address.
Throws:
AddressErrorException – if firstAddress is invalid or not on a word boundary.
java.io.IOException – if error occurs during file output.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
mars
Classes
ErrorList
ErrorMessage
Globals
MarsLaunch
MarsSplashScreen
MIPSprogram
ProgramStatement
Settings
Exceptions
ProcessingException
ErrorMessage
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class ErrorMessage
java.lang.Object
mars.ErrorMessage
public class ErrorMessage
extends java.lang.Object
Represents occurrance of an error detected during tokenizing, assembly or simulation.
Author:
Pete Sanderson
Field Summary
static boolean ERROR
Constant to indicate this message is error not warning
static boolean WARNING
Constant to indicate this message is warning not error
Constructor Summary
ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
java.lang.String message)
Constructor for ErrorMessage.
ErrorMessage(boolean isWarning,
java.lang.String filename,
int line,
int position,
java.lang.String message,
java.lang.String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
java.lang.String message)
Constructor for ErrorMessage.
ErrorMessage(java.lang.String filename,
int line,
int position,
java.lang.String message)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
ErrorMessage(java.lang.String filename,
int line,
int position,
java.lang.String message,
java.lang.String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
Method Summary
java.lang.String getFilename()
Produce name of file containing error.
int getLine()
Produce line number of error.
java.lang.String getMacroExpansionHistory()
Returns string describing macro expansion.
java.lang.String getMessage()
Produce error message.
int getPosition()
Produce position within erroneous line.
boolean isWarning()
Determine whether this message represents error or warning.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
WARNING
public static final boolean WARNING
Constant to indicate this message is warning not error
See Also:
Constant Field Values
ERROR
public static final boolean ERROR
Constant to indicate this message is error not warning
See Also:
Constant Field Values
Constructor Detail
ErrorMessage
@Deprecated
public ErrorMessage(java.lang.String filename,
int line,
int position,
java.lang.String message)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
Constructor for ErrorMessage.
Parameters:
filename – String containing name of source file in which this error appears.
line – Line number in source program being processed when error occurred.
position – Position within line being processed when error occurred. Normally is starting
position of source token.
message – String containing appropriate error message.
ErrorMessage
@Deprecated
public ErrorMessage(java.lang.String filename,
int line,
int position,
java.lang.String message,
java.lang.String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
Constructor for ErrorMessage.
Parameters:
filename – String containing name of source file in which this error appears.
line – Line number in source program being processed when error occurred.
position – Position within line being processed when error occurred. Normally is starting
position of source token.
message – String containing appropriate error message.
macroExpansionHistory –
ErrorMessage
@Deprecated
public ErrorMessage(boolean isWarning,
java.lang.String filename,
int line,
int position,
java.lang.String message,
java.lang.String macroExpansionHistory)
Deprecated. Newer constructors replace the String filename parameter with a MIPSprogram parameter to provide more information.
Constructor for ErrorMessage.
Parameters:
isWarning – set to WARNING if message is a warning not error, else set to ERROR or omit.
filename – String containing name of source file in which this error appears.
line – Line number in source program being processed when error occurred.
position – Position within line being processed when error occurred. Normally is starting
position of source token.
message – String containing appropriate error message.
macroExpansionHistory – provided so message for macro can include both definition and usage line numbers
ErrorMessage
public ErrorMessage(MIPSprogram sourceMIPSprogram,
int line,
int position,
java.lang.String message)
Constructor for ErrorMessage. Assumes line number is calculated after any .include files expanded, and
if there were, it will adjust filename and line number so message reflects original file and line number.
Parameters:
sourceMIPSprogram – MIPSprogram object of source file in which this error appears.
line – Line number in source program being processed when error occurred.
position – Position within line being processed when error occurred. Normally is starting
position of source token.
message – String containing appropriate error message.
ErrorMessage
public ErrorMessage(boolean isWarning,
MIPSprogram sourceMIPSprogram,
int line,
int position,
java.lang.String message)
Constructor for ErrorMessage. Assumes line number is calculated after any .include files expanded, and
if there were, it will adjust filename and line number so message reflects original file and line number.
Parameters:
isWarning – set to WARNING if message is a warning not error, else set to ERROR or omit.
sourceMIPSprogram – MIPSprogram object of source file in which this error appears.
line – Line number in source program being processed when error occurred.
position – Position within line being processed when error occurred. Normally is starting
position of source token.
message – String containing appropriate error message.
Method Detail
getFilename
public java.lang.String getFilename()
Produce name of file containing error.
Returns:
Returns String containing name of source file containing the error.
getLine
public int getLine()
Produce line number of error.
Returns:
Returns line number in source program where error occurred.
getPosition
public int getPosition()
Produce position within erroneous line.
Returns:
Returns position within line of source program where error occurred.
getMessage
public java.lang.String getMessage()
Produce error message.
Returns:
Returns String containing textual error message.
isWarning
public boolean isWarning()
Determine whether this message represents error or warning.
Returns:
Returns true if this message reflects warning, false if error.
getMacroExpansionHistory
public java.lang.String getMacroExpansionHistory()
Returns string describing macro expansion. Empty string if none.
Returns:
string describing macro expansion
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
BackStepper
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class BackStepper
java.lang.Object
mars.simulator.BackStepper
public class BackStepper
extends java.lang.Object
Used to “step backward” through execution, undoing each instruction.
Author:
Pete Sanderson
Constructor Summary
BackStepper()
Create a fresh BackStepper.
Method Summary
int addConditionFlagClear(int flag)
Add a new “back step” (the undo action) to the stack.
int addConditionFlagSet(int flag)
Add a new “back step” (the undo action) to the stack.
int addCoprocessor0Restore(int register,
int value)
Add a new “back step” (the undo action) to the stack.
int addCoprocessor1Restore(int register,
int value)
Add a new “back step” (the undo action) to the stack.
int addDoNothing(int pc)
Add a new “back step” (the undo action) to the stack.
int addMemoryRestoreByte(int address,
int value)
Add a new “back step” (the undo action) to the stack.
int addMemoryRestoreHalf(int address,
int value)
Add a new “back step” (the undo action) to the stack.
int addMemoryRestoreRawWord(int address,
int value)
Add a new “back step” (the undo action) to the stack.
int addMemoryRestoreWord(int address,
int value)
Add a new “back step” (the undo action) to the stack.
int addPCRestore(int value)
Add a new “back step” (the undo action) to the stack.
int addRegisterFileRestore(int register,
int value)
Add a new “back step” (the undo action) to the stack.
void backStep()
Carry out a “back step”, which will undo the latest execution step.
boolean empty()
Test whether there are steps that can be undone.
boolean enabled()
Determine whether execution “undo” steps are currently being recorded.
boolean inDelaySlot()
Determine whether the next back-step action occurred as the result of
an instruction that executed in the “delay slot” of a delayed branch.
void setEnabled(boolean state)
Set enable status.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
BackStepper
public BackStepper()
Create a fresh BackStepper. It is enabled, which means all
subsequent instruction executions will have their “undo” action
recorded here.
Method Detail
enabled
public boolean enabled()
Determine whether execution “undo” steps are currently being recorded.
Returns:
true if undo steps being recorded, false if not.
setEnabled
public void setEnabled(boolean state)
Set enable status.
Parameters:
state – If true, will begin (or continue) recoding “undo” steps. If false, will stop.
empty
public boolean empty()
Test whether there are steps that can be undone.
Returns:
true if there are no steps to be undone, false otherwise.
inDelaySlot
public boolean inDelaySlot()
Determine whether the next back-step action occurred as the result of
an instruction that executed in the “delay slot” of a delayed branch.
Returns:
true if next backstep is instruction that executed in delay slot,
false otherwise.
backStep
public void backStep()
Carry out a “back step”, which will undo the latest execution step.
Does nothing if backstepping not enabled or if there are no steps to undo.
addMemoryRestoreRawWord
public int addMemoryRestoreRawWord(int address,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a raw memory word value (setRawWord).
Parameters:
address – The affected memory address.
value – The “restore” value to be stored there.
Returns:
the argument value
addMemoryRestoreWord
public int addMemoryRestoreWord(int address,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a memory word value.
Parameters:
address – The affected memory address.
value – The “restore” value to be stored there.
Returns:
the argument value
addMemoryRestoreHalf
public int addMemoryRestoreHalf(int address,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a memory half-word value.
Parameters:
address – The affected memory address.
value – The “restore” value to be stored there, in low order half.
Returns:
the argument value
addMemoryRestoreByte
public int addMemoryRestoreByte(int address,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a memory byte value.
Parameters:
address – The affected memory address.
value – The “restore” value to be stored there, in low order byte.
Returns:
the argument value
addRegisterFileRestore
public int addRegisterFileRestore(int register,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a register file register value.
Parameters:
register – The affected register number.
value – The “restore” value to be stored there.
Returns:
the argument value
addPCRestore
public int addPCRestore(int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore the program counter.
Parameters:
value – The “restore” value to be stored there.
Returns:
the argument value
addCoprocessor0Restore
public int addCoprocessor0Restore(int register,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a coprocessor 0 register value.
Parameters:
register – The affected register number.
value – The “restore” value to be stored there.
Returns:
the argument value
addCoprocessor1Restore
public int addCoprocessor1Restore(int register,
int value)
Add a new “back step” (the undo action) to the stack. The action here
is to restore a coprocessor 1 register value.
Parameters:
register – The affected register number.
value – The “restore” value to be stored there.
Returns:
the argument value
addConditionFlagSet
public int addConditionFlagSet(int flag)
Add a new “back step” (the undo action) to the stack. The action here
is to set the given coprocessor 1 condition flag (to 1).
Parameters:
flag – The condition flag number.
Returns:
the argument value
addConditionFlagClear
public int addConditionFlagClear(int flag)
Add a new “back step” (the undo action) to the stack. The action here
is to clear the given coprocessor 1 condition flag (to 0).
Parameters:
flag – The condition flag number.
Returns:
the argument value
addDoNothing
public int addDoNothing(int pc)
Add a new “back step” (the undo action) to the stack. The action here
is to do nothing! This is just a place holder so when user is backstepping
through the program no instructions will be skipped. Cosmetic. If the top of the
stack has the same PC counter, the do-nothing action will not be added.
Returns:
0
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Exceptions
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class Exceptions
java.lang.Object
mars.simulator.Exceptions
public class Exceptions
extends java.lang.Object
Represents an error/interrupt that occurs during execution (simulation).
Author:
Pete Sanderson
Field Summary
static int ADDRESS_EXCEPTION_LOAD
static int ADDRESS_EXCEPTION_STORE
static int ARITHMETIC_OVERFLOW_EXCEPTION
static int BREAKPOINT_EXCEPTION
static int DIVIDE_BY_ZERO_EXCEPTION
static int EXTERNAL_INTERRUPT_DISPLAY
static int EXTERNAL_INTERRUPT_KEYBOARD
The exception number is stored in coprocessor 0 cause register ($13)
Note: the codes for External Interrupts have been modified from MIPS
specs in order to encode two pieces of information.
static int FLOATING_POINT_OVERFLOW
static int FLOATING_POINT_UNDERFLOW
static int RESERVED_INSTRUCTION_EXCEPTION
static int SYSCALL_EXCEPTION
static int TRAP_EXCEPTION
Constructor Summary
Exceptions()
Method Summary
static void setRegisters(int cause)
Given MIPS exception cause code, will place that code into
coprocessor 0 CAUSE register ($13), set the EPC register to
“current” program counter, and set Exception Level bit in STATUS register.
static void setRegisters(int cause,
int addr)
Given MIPS exception cause code and bad address, place the bad address into VADDR
register ($8) then call overloaded setRegisters with the cause code to do the rest.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
EXTERNAL_INTERRUPT_KEYBOARD
public static final int EXTERNAL_INTERRUPT_KEYBOARD
The exception number is stored in coprocessor 0 cause register ($13)
Note: the codes for External Interrupts have been modified from MIPS
specs in order to encode two pieces of information. According
to spec, there is one External Interrupt code, 0. But then
how to distinguish keyboard interrupt from display interrupt?
The Cause register has Interupt Pending bits that can be set.
Bit 8 represents keyboard, bit 9 represents display. Those
bits are included into this code, but shifted right two positions
since the interrupt code will be shifted left two positions
for inserting cause code into bit positions 2-6 in Cause register.
DPS 23 July 2008.
See Also:
Constant Field Values
EXTERNAL_INTERRUPT_DISPLAY
public static final int EXTERNAL_INTERRUPT_DISPLAY
See Also:
Constant Field Values
ADDRESS_EXCEPTION_LOAD
public static final int ADDRESS_EXCEPTION_LOAD
See Also:
Constant Field Values
ADDRESS_EXCEPTION_STORE
public static final int ADDRESS_EXCEPTION_STORE
See Also:
Constant Field Values
SYSCALL_EXCEPTION
public static final int SYSCALL_EXCEPTION
See Also:
Constant Field Values
BREAKPOINT_EXCEPTION
public static final int BREAKPOINT_EXCEPTION
See Also:
Constant Field Values
RESERVED_INSTRUCTION_EXCEPTION
public static final int RESERVED_INSTRUCTION_EXCEPTION
See Also:
Constant Field Values
ARITHMETIC_OVERFLOW_EXCEPTION
public static final int ARITHMETIC_OVERFLOW_EXCEPTION
See Also:
Constant Field Values
TRAP_EXCEPTION
public static final int TRAP_EXCEPTION
See Also:
Constant Field Values
DIVIDE_BY_ZERO_EXCEPTION
public static final int DIVIDE_BY_ZERO_EXCEPTION
See Also:
Constant Field Values
FLOATING_POINT_OVERFLOW
public static final int FLOATING_POINT_OVERFLOW
See Also:
Constant Field Values
FLOATING_POINT_UNDERFLOW
public static final int FLOATING_POINT_UNDERFLOW
See Also:
Constant Field Values
Constructor Detail
Exceptions
public Exceptions()
Method Detail
setRegisters
public static void setRegisters(int cause)
Given MIPS exception cause code, will place that code into
coprocessor 0 CAUSE register ($13), set the EPC register to
“current” program counter, and set Exception Level bit in STATUS register.
Parameters:
cause – The cause code (see Exceptions for a list)
setRegisters
public static void setRegisters(int cause,
int addr)
Given MIPS exception cause code and bad address, place the bad address into VADDR
register ($8) then call overloaded setRegisters with the cause code to do the rest.
Parameters:
cause – The cause code (see Exceptions for a list). Should be address exception.
addr – The address that caused the exception.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
mars.simulator
Interfaces
Simulator.StopListener
Classes
BackStepper
DelayedBranch
Exceptions
ProgramArgumentList
Simulator
SimulatorNotice
SwingWorker
Simulator.StopListener
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Interface Simulator.StopListener
Enclosing class:
Simulator
public static interface Simulator.StopListener
Method Summary
void stopped(Simulator s)
Method Detail
stopped
void stopped(Simulator s)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Simulator
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class Simulator
java.lang.Object
java.util.Observable
mars.simulator.Simulator
public class Simulator
extends java.util.Observable
Used to simulate the execution of an assembled MIPS program.
Author:
Pete Sanderson
Nested Class Summary
static interface Simulator.StopListener
Field Summary
static int BREAKPOINT
various reasons for simulate to end…
static int CLIFF_TERMINATION
static int EXCEPTION
static int externalInterruptingDevice
static int MAX_STEPS
static int NO_DEVICE
static int NORMAL_TERMINATION
static int PAUSE_OR_STOP
Method Summary
void addStopListener(Simulator.StopListener l)
static Simulator getInstance()
Returns the Simulator object
static boolean inDelaySlot()
Determine whether or not the next instruction to be executed is in a
“delay slot”.
void removeStopListener(Simulator.StopListener l)
boolean simulate(MIPSprogram p,
int pc,
int maxSteps,
int[] breakPoints,
javax.swing.AbstractAction actor)
Simulate execution of given MIPS program.
void stopExecution(javax.swing.AbstractAction actor)
Set the volatile stop boolean variable checked by the execution
thread at the end of each MIPS instruction execution.
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
NO_DEVICE
public static final int NO_DEVICE
See Also:
Constant Field Values
externalInterruptingDevice
public static volatile int externalInterruptingDevice
BREAKPOINT
public static final int BREAKPOINT
various reasons for simulate to end…
See Also:
Constant Field Values
EXCEPTION
public static final int EXCEPTION
See Also:
Constant Field Values
MAX_STEPS
public static final int MAX_STEPS
See Also:
Constant Field Values
NORMAL_TERMINATION
public static final int NORMAL_TERMINATION
See Also:
Constant Field Values
CLIFF_TERMINATION
public static final int CLIFF_TERMINATION
See Also:
Constant Field Values
PAUSE_OR_STOP
public static final int PAUSE_OR_STOP
See Also:
Constant Field Values
Method Detail
getInstance
public static Simulator getInstance()
Returns the Simulator object
Returns:
the Simulator object in use
inDelaySlot
public static boolean inDelaySlot()
Determine whether or not the next instruction to be executed is in a
“delay slot”. This means delayed branching is enabled, the branch
condition has evaluated true, and the next instruction executed will
be the one following the branch. It is said to occupy the “delay slot.”
Normally programmers put a nop instruction here but it can be anything.
Returns:
true if next instruction is in delay slot, false otherwise.
simulate
public boolean simulate(MIPSprogram p,
int pc,
int maxSteps,
int[] breakPoints,
javax.swing.AbstractAction actor)
throws ProcessingException
Simulate execution of given MIPS program. It must have already been assembled.
Parameters:
p – The MIPSprogram to be simulated.
pc – address of first instruction to simulate; this goes into program counter
maxSteps – maximum number of steps to perform before returning false (0 or less means no max)
breakPoints – array of breakpoint program counter values, use null if none
actor – the GUI component responsible for this call, usually GO or STEP. null if none.
Returns:
true if execution completed, false otherwise
Throws:
ProcessingException – Throws exception if run-time exception occurs.
stopExecution
public void stopExecution(javax.swing.AbstractAction actor)
Set the volatile stop boolean variable checked by the execution
thread at the end of each MIPS instruction execution. If variable
is found to be true, the execution thread will depart
gracefully so the main thread handling the GUI can take over.
This is used by both STOP and PAUSE features.
addStopListener
public void addStopListener(Simulator.StopListener l)
removeStopListener
public void removeStopListener(Simulator.StopListener l)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
SimulatorNotice
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class SimulatorNotice
java.lang.Object
mars.simulator.SimulatorNotice
public class SimulatorNotice
extends java.lang.Object
Object provided to Observers of the Simulator.
They are notified at important phases of the runtime simulator,
such as start and stop of simulation.
Author:
Pete Sanderson
Field Summary
static int SIMULATOR_START
static int SIMULATOR_STOP
Constructor Summary
SimulatorNotice(int action,
int maxSteps,
double runSpeed,
int programCounter)
Constructor will be called only within this package, so assume
address and length are in valid ranges.
Method Summary
int getAction()
Fetch the memory address that was accessed.
int getMaxSteps()
Fetch the length in bytes of the access operation (4,2,1).
int getProgramCounter()
Fetch the value of the access operation (the value read or written).
double getRunSpeed()
Fetch the value of the access operation (the value read or written).
java.lang.String toString()
String representation indicates access type, address and length in bytes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Field Detail
SIMULATOR_START
public static final int SIMULATOR_START
See Also:
Constant Field Values
SIMULATOR_STOP
public static final int SIMULATOR_STOP
See Also:
Constant Field Values
Constructor Detail
SimulatorNotice
public SimulatorNotice(int action,
int maxSteps,
double runSpeed,
int programCounter)
Constructor will be called only within this package, so assume
address and length are in valid ranges.
Method Detail
getAction
public int getAction()
Fetch the memory address that was accessed.
getMaxSteps
public int getMaxSteps()
Fetch the length in bytes of the access operation (4,2,1).
getRunSpeed
public double getRunSpeed()
Fetch the value of the access operation (the value read or written).
getProgramCounter
public int getProgramCounter()
Fetch the value of the access operation (the value read or written).
toString
public java.lang.String toString()
String representation indicates access type, address and length in bytes
Overrides:
toString in class java.lang.Object
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars.simulator
Interface Summary
Simulator.StopListener
Class Summary
BackStepper Used to “step backward” through execution, undoing each instruction.
DelayedBranch Represents a (potential) delayed branch.
Exceptions Represents an error/interrupt that occurs during execution (simulation).
ProgramArgumentList Models Program Arguments, one or more strings provided to the MIPS
program at runtime.
Simulator Used to simulate the execution of an assembled MIPS program.
SimulatorNotice Object provided to Observers of the Simulator.
SwingWorker This is the 3rd version of SwingWorker (also known as
SwingWorker 3), an abstract class that you subclass to
perform GUI-related work in a dedicated thread.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
SwingWorker
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class SwingWorker
java.lang.Object
mars.simulator.SwingWorker
public abstract class SwingWorker
extends java.lang.Object
This is the 3rd version of SwingWorker (also known as
SwingWorker 3), an abstract class that you subclass to
perform GUI-related work in a dedicated thread. For
instructions on and examples of using this class, see:
http://java.sun.com/docs/books/tutorial/uiswing/misc/threads.html
Note that the API changed slightly in the 3rd version:
You must now invoke start() on the SwingWorker after
creating it.
Constructor Summary
SwingWorker(boolean useSwing)
Start a thread that will call the construct method
and then exit.
Method Summary
abstract java.lang.Object construct()
Compute the value to be returned by the get method.
void finished()
Called on the event dispatching thread (not on the worker thread)
after the construct method has returned.
java.lang.Object get()
Return the value created by the construct method.
protected java.lang.Object getValue()
Get the value produced by the worker thread, or null if it
hasn’t been constructed yet.
void interrupt()
A new method that interrupts the worker thread.
void start()
Start the worker thread.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
SwingWorker
public SwingWorker(boolean useSwing)
Start a thread that will call the construct method
and then exit.
Parameters:
useSwing – Set true if MARS is running from GUI, false otherwise.
Method Detail
getValue
protected java.lang.Object getValue()
Get the value produced by the worker thread, or null if it
hasn’t been constructed yet.
construct
public abstract java.lang.Object construct()
Compute the value to be returned by the get method.
finished
public void finished()
Called on the event dispatching thread (not on the worker thread)
after the construct method has returned.
interrupt
public void interrupt()
A new method that interrupts the worker thread. Call this method
to force the worker to stop what it’s doing.
get
public java.lang.Object get()
Return the value created by the construct method.
Returns null if either the constructing thread or the current
thread was interrupted before a value was produced.
Returns:
the value created by the construct method
start
public void start()
Start the worker thread.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
ProgramArgumentList
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class ProgramArgumentList
java.lang.Object
mars.simulator.ProgramArgumentList
public class ProgramArgumentList
extends java.lang.Object
Models Program Arguments, one or more strings provided to the MIPS
program at runtime. Equivalent to C’s main(int argc, char **argv) or
Java’s main(String[] args).
Author:
Pete Sanderson
Constructor Summary
ProgramArgumentList(java.util.ArrayList list)
Constructor that gets list from ArrayList of String, one argument per element.
ProgramArgumentList(java.util.ArrayList list,
int startPosition)
Constructor that gets list from section of String ArrayList, one
argument per element.
ProgramArgumentList(java.lang.String args)
Constructor that parses string to produce list.
ProgramArgumentList(java.lang.String[] list)
Constructor that gets list from String array, one argument per element.
ProgramArgumentList(java.lang.String[] list,
int startPosition)
Constructor that gets list from section of String array, one
argument per element.
Method Summary
void storeProgramArguments()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
ProgramArgumentList
public ProgramArgumentList(java.lang.String args)
Constructor that parses string to produce list. Delimiters
are the default Java StringTokenizer delimiters (space, tab,
newline, return, formfeed)
Parameters:
args – String containing delimiter-separated arguments
ProgramArgumentList
public ProgramArgumentList(java.lang.String[] list)
Constructor that gets list from String array, one argument per element.
Parameters:
list – Array of String, each element containing one argument
ProgramArgumentList
public ProgramArgumentList(java.lang.String[] list,
int startPosition)
Constructor that gets list from section of String array, one
argument per element.
Parameters:
args – Array of String, each element containing one argument
startPosition – Index of array element containing the first argument; all remaining
elements are assumed to contain an argument.
ProgramArgumentList
public ProgramArgumentList(java.util.ArrayList list)
Constructor that gets list from ArrayList of String, one argument per element.
Parameters:
list – ArrayList of String, each element containing one argument
ProgramArgumentList
public ProgramArgumentList(java.util.ArrayList list,
int startPosition)
Constructor that gets list from section of String ArrayList, one
argument per element.
Parameters:
args – ArrayList of String, each element containing one argument
startPosition – Index of array element containing the first argument; all remaining
elements are assumed to contain an argument.
Method Detail
storeProgramArguments
public void storeProgramArguments()
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars.simulator
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object mars.simulator.BackStepper
mars.simulator.DelayedBranch
mars.simulator.Exceptions
java.util.Observable mars.simulator.Simulator
mars.simulator.ProgramArgumentList
mars.simulator.SimulatorNotice
mars.simulator.SwingWorker
Interface Hierarchy
mars.simulator.Simulator.StopListener
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
DelayedBranch
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars.simulator
Class DelayedBranch
java.lang.Object
mars.simulator.DelayedBranch
public class DelayedBranch
extends java.lang.Object
Represents a (potential) delayed branch. Note it is necessary only when
delayed branching is enabled. Here’s the protocol for using it:
(1) When a runtime decision to branch is made (by either a branch or jump
instruction’s simulate() method in InstructionSet), then if delayed branching
is enabled, the register() method is called with the branch target address but
the program counter is NOT set to the branch target address.
(2) At the end of that instruction cycle, the simulate() method in Simulator
will detect the registered branch, and set its trigger. Don’t do anything yet
because the next instruction cycle is the delay slot and needs to complete.
(3) At the end of the next (delay slot) instruction cycle, the simulate()
method in Simulator will detect the triggered branch, set the program
counter to its target value and clear the delayed branch.
The only interesting situation is when the delay slot itself contains a
successful branch! I tried this with SPIM (e.g. beq followed by b)
and it treats it as if nothing was there and continues the delay slot
into the next cycle. The eventual branch taken is the original one (as one
would hope) but in the meantime the first statement following the sequence
of successful branches will constitute the delay slot and will be executed!
Since only one pending delayed branch can be taken at a time, everything
here is done with statics. The class itself represents the potential branch.
Author:
Pete Sanderson
Constructor Summary
DelayedBranch()
Method Summary
static void register(int targetAddress)
Register the fact that a successful branch is to occur.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
DelayedBranch
public DelayedBranch()
Method Detail
register
public static void register(int targetAddress)
Register the fact that a successful branch is to occur. This is called in
the instruction’s simulated execution (its simulate() method in InstructionSet).
If a branch is registered but not triggered, this registration will be ignored
(cannot happen if class usage protocol is followed). If a branch is currently
registered and triggered, reset the state back to registered (but not triggered)
in order to carry over the delay slot for another execution cycle. This is the
only public member of the class.
Parameters:
targetAddress – The address to branch to after executing the next instruction
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
Package mars
Class Summary
ErrorList Maintains list of generated error messages, regardless of source (tokenizing, parsing,
assembly, execution).
ErrorMessage Represents occurrance of an error detected during tokenizing, assembly or simulation.
Globals Collection of globally-available data structures.
MarsLaunch Launch the Mars application
MarsSplashScreen Produces MARS splash screen.
Adapted from http://www.java-tips.org/content/view/1267/2/
MIPSprogram Internal representations of MIPS program.
ProgramStatement Represents one assembly/machine statement.
Settings Contains various IDE settings.
Exception Summary
ProcessingException Class to represent error that occurs while assembling or running a MIPS program.
Overview Package Class Tree Deprecated Index Help
PREV PACKAGE
NEXT PACKAGE
FRAMES
NO FRAMES
All Classes
ProgramStatement
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class ProgramStatement
java.lang.Object
mars.ProgramStatement
public class ProgramStatement
extends java.lang.Object
Represents one assembly/machine statement. This represents the “bare machine” level.
Pseudo-instructions have already been processed at this point and each assembly
statement generated by them is one of these.
Author:
Pete Sanderson and Jason Bumgarner
Constructor Summary
ProgramStatement(int binaryStatement,
int textAddress)
Constructor for ProgramStatement used only for writing a binary machine
instruction with no source code to refer back to.
ProgramStatement(MIPSprogram sourceMIPSprogram,
java.lang.String source,
TokenList origTokenList,
TokenList strippedTokenList,
Instruction inst,
int textAddress,
int sourceLine)
Constructor for ProgramStatement when there are links back to all source and token
information.
Method Summary
void buildBasicStatementFromBasicInstruction(ErrorList errors)
Given specification of BasicInstruction for this operator, build the
corresponding assembly statement in basic assembly format (e.g.
void buildMachineStatementFromBasicStatement(ErrorList errors)
Given the current statement in Basic Assembly format (see above), build the
32-bit binary machine code statement.
int getAddress()
Produces Text Segment address where the binary machine statement is stored.
java.lang.String getBasicAssemblyStatement()
Produces Basic Assembly statement for this MIPS source statement.
int getBinaryStatement()
Produces 32-bit binary machine statement as int.
Instruction getInstruction()
Produces Instruction object corresponding to this statement’s operator.
java.lang.String getMachineStatement()
Produces binary machine statement as 32 character string, all ‘0’ and ‘1’ chars.
int getOperand(int i)
Produces operand value from given array position (first operand is position 0).
int[] getOperands()
Produces int array of operand values for this statement.
TokenList getOriginalTokenList()
Produces token list generated from original source statement.
java.lang.String getPrintableBasicAssemblyStatement()
Produces printable Basic Assembly statement for this MIPS source
statement.
java.lang.String getSource()
Produces MIPS source statement.
java.lang.String getSourceFile()
Produces String name of the source file containing this statement.
int getSourceLine()
Produces line number of MIPS source statement.
MIPSprogram getSourceMIPSprogram()
Produces MIPSprogram object representing the source file containing this statement.
TokenList getStrippedTokenList()
Produces token list stripped of all but operator and operand tokens.
void setBasicAssemblyStatement(java.lang.String statement)
Assigns given String to be Basic Assembly statement equivalent to this source line.
void setBinaryStatement(int binaryCode)
Assigns given int to be binary machine code equivalent to this source line.
void setMachineStatement(java.lang.String statement)
Assigns given String to be binary machine code (32 characters, all of them 0 or 1)
equivalent to this source line.
void setSource(java.lang.String src)
associates MIPS source statement.
java.lang.String toString()
Crude attempt at building String representation of this complex structure.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Constructor Detail
ProgramStatement
public ProgramStatement(MIPSprogram sourceMIPSprogram,
java.lang.String source,
TokenList origTokenList,
TokenList strippedTokenList,
Instruction inst,
int textAddress,
int sourceLine)
Constructor for ProgramStatement when there are links back to all source and token
information. These can be used by a debugger later on.
Parameters:
sourceMIPSprogram – The MIPSprogram object that contains this statement
source – The corresponding MIPS source statement.
origTokenList – Complete list of Token objects (includes labels, comments, parentheses, etc)
strippedTokenList – List of Token objects with all but operators and operands removed.
inst – The Instruction object for this statement’s operator.
textAddress – The Text Segment address in memory where the binary machine code for this statement
is stored.
ProgramStatement
public ProgramStatement(int binaryStatement,
int textAddress)
Constructor for ProgramStatement used only for writing a binary machine
instruction with no source code to refer back to. It could be extended to support
self-modifying code but currently supports only NOP which is all zeroes.
Parameters:
binaryStatement – The 32-bit machine code.
textAddress – The Text Segment address in memory where the binary machine code for this statement
is stored.
Method Detail
buildBasicStatementFromBasicInstruction
public void buildBasicStatementFromBasicInstruction(ErrorList errors)
Given specification of BasicInstruction for this operator, build the
corresponding assembly statement in basic assembly format (e.g. substituting
register numbers for register names, replacing labels by values).
Parameters:
errors – The list of assembly errors encountered so far. May add to it here.
buildMachineStatementFromBasicStatement
public void buildMachineStatementFromBasicStatement(ErrorList errors)
Given the current statement in Basic Assembly format (see above), build the
32-bit binary machine code statement.
Parameters:
errors – The list of assembly errors encountered so far. May add to it here.
toString
public java.lang.String toString()
Crude attempt at building String representation of this complex structure.
Overrides:
toString in class java.lang.Object
Returns:
A String representing the ProgramStatement.
setBasicAssemblyStatement
public void setBasicAssemblyStatement(java.lang.String statement)
Assigns given String to be Basic Assembly statement equivalent to this source line.
Parameters:
statement – A String containing equivalent Basic Assembly statement.
setMachineStatement
public void setMachineStatement(java.lang.String statement)
Assigns given String to be binary machine code (32 characters, all of them 0 or 1)
equivalent to this source line.
Parameters:
statement – A String containing equivalent machine code.
setBinaryStatement
public void setBinaryStatement(int binaryCode)
Assigns given int to be binary machine code equivalent to this source line.
Parameters:
binaryCode – An int containing equivalent binary machine code.
setSource
public void setSource(java.lang.String src)
associates MIPS source statement. Used by assembler when generating basic
statements during macro expansion of extended statement.
Parameters:
src – a MIPS source statement.
getSourceMIPSprogram
public MIPSprogram getSourceMIPSprogram()
Produces MIPSprogram object representing the source file containing this statement.
Returns:
The MIPSprogram object. May be null…
getSourceFile
public java.lang.String getSourceFile()
Produces String name of the source file containing this statement.
Returns:
The file name.
getSource
public java.lang.String getSource()
Produces MIPS source statement.
Returns:
The MIPS source statement.
getSourceLine
public int getSourceLine()
Produces line number of MIPS source statement.
Returns:
The MIPS source statement line number.
getBasicAssemblyStatement
public java.lang.String getBasicAssemblyStatement()
Produces Basic Assembly statement for this MIPS source statement.
All numeric values are in decimal.
Returns:
The Basic Assembly statement.
getPrintableBasicAssemblyStatement
public java.lang.String getPrintableBasicAssemblyStatement()
Produces printable Basic Assembly statement for this MIPS source
statement. This is generated dynamically and any addresses and
values will be rendered in hex or decimal depending on the current
setting.
Returns:
The Basic Assembly statement.
getMachineStatement
public java.lang.String getMachineStatement()
Produces binary machine statement as 32 character string, all ‘0’ and ‘1’ chars.
Returns:
The String version of 32-bit binary machine code.
getBinaryStatement
public int getBinaryStatement()
Produces 32-bit binary machine statement as int.
Returns:
The int version of 32-bit binary machine code.
getOriginalTokenList
public TokenList getOriginalTokenList()
Produces token list generated from original source statement.
Returns:
The TokenList of Token objects generated from original source.
getStrippedTokenList
public TokenList getStrippedTokenList()
Produces token list stripped of all but operator and operand tokens.
Returns:
The TokenList of Token objects generated by stripping original list of all
except operator and operand tokens.
getInstruction
public Instruction getInstruction()
Produces Instruction object corresponding to this statement’s operator.
Returns:
The Instruction that matches the operator used in this statement.
getAddress
public int getAddress()
Produces Text Segment address where the binary machine statement is stored.
Returns:
address in Text Segment of this binary machine statement.
getOperands
public int[] getOperands()
Produces int array of operand values for this statement.
Returns:
int array of operand values (if any) required by this statement’s operator.
getOperand
public int getOperand(int i)
Produces operand value from given array position (first operand is position 0).
Parameters:
i – Operand position in array (first operand is position 0).
Returns:
Operand value at given operand array position. If < 0 or >= numOperands, it returns -1.
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
MarsLaunch
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class MarsLaunch
java.lang.Object
mars.MarsLaunch
public class MarsLaunch
extends java.lang.Object
Launch the Mars application
Author:
Pete Sanderson
Constructor Summary
MarsLaunch(java.lang.String[] args)
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MarsLaunch
public MarsLaunch(java.lang.String[] args)
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars Class Hierarchy
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
Hierarchy For Package mars
Package Hierarchies:
All Packages
Class Hierarchy
java.lang.Object java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)
java.awt.Container java.awt.Window (implements javax.accessibility.Accessible)
javax.swing.JWindow (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer)
mars.MarsSplashScreen
mars.ErrorList
mars.ErrorMessage
mars.Globals
mars.MarsLaunch
mars.MIPSprogram
java.util.Observable mars.Settings
mars.ProgramStatement
java.lang.Throwable (implements java.io.Serializable)
java.lang.Exception mars.ProcessingException
Overview Package Class Tree Deprecated Index Help
PREV
NEXT
FRAMES
NO FRAMES
All Classes
MIPSprogram
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class MIPSprogram
java.lang.Object
mars.MIPSprogram
public class MIPSprogram
extends java.lang.Object
Internal representations of MIPS program. Connects source, tokens and machine code. Having
all these structures available facilitates construction of good messages,
debugging, and easy simulation.
Author:
Pete Sanderson
Constructor Summary
MIPSprogram()
Method Summary
ErrorList assemble(java.util.ArrayList MIPSprogramsToAssemble,
boolean extendedAssemblerEnabled)
Assembles the MIPS source program.
ErrorList assemble(java.util.ArrayList MIPSprogramsToAssemble,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
Assembles the MIPS source program.
boolean backSteppingEnabled()
Returns status of BackStepper associated with this program.
MacroPool createMacroPool()
Instantiates a new MacroPool and sends reference of this
MIPSprogram to it
java.util.ArrayList createParsedList()
Produces new empty list to hold parsed source code statements.
BackStepper getBackStepper()
Returns BackStepper associated with this program.
java.lang.String getFilename()
Produces name of associated source code file.
MacroPool getLocalMacroPool()
Gets local macro pool MacroPool for this program
SymbolTable getLocalSymbolTable()
Returns SymbolTable associated with this program.
java.util.ArrayList getMachineList()
Produces list of machine statements that are assembled from the program.
java.util.ArrayList getParsedList()
Produces existing list of parsed source code statements.
java.lang.String getSourceLine(int i)
Produces specified line of MIPS source program.
java.util.ArrayList
Retrieve list of source statements that comprise the program.
java.util.ArrayList getSourceList()
Produces list of source statements that comprise the program.
java.util.ArrayList getTokenList()
Produces list of tokens that comprise the program.
boolean inSteppedExecution()
Will be true only while in process of simulating a program statement
in step mode (e.g.
java.util.ArrayList prepareFilesForAssembly(java.util.ArrayList filenames,
java.lang.String leadFilename,
java.lang.String exceptionHandler)
Prepares the given list of files for assembly.
void readSource(java.lang.String file)
Reads MIPS source code from file into structure.
void setLocalMacroPool(MacroPool macroPool)
Sets local macro pool MacroPool for this program
void setSourceLineList(java.util.ArrayList
Set list of source statements that comprise the program.
boolean simulate(int maxSteps)
Simulates execution of the MIPS program.
boolean simulate(int[] breakPoints)
Simulates execution of the MIPS program.
boolean simulateFromPC(int[] breakPoints,
int maxSteps,
javax.swing.AbstractAction a)
Simulates execution of the MIPS program.
boolean simulateStepAtPC(javax.swing.AbstractAction a)
Simulates execution of the MIPS program.
void tokenize()
Tokenizes the MIPS source program.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Constructor Detail
MIPSprogram
public MIPSprogram()
Method Detail
getSourceList
public java.util.ArrayList getSourceList()
Produces list of source statements that comprise the program.
Returns:
ArrayList of String. Each String is one line of MIPS source code.
setSourceLineList
public void setSourceLineList(java.util.ArrayList
Set list of source statements that comprise the program.
Parameters:
sourceLineList – ArrayList of SourceLine.
Each SourceLine represents one line of MIPS source code.
getSourceLineList
public java.util.ArrayList
Retrieve list of source statements that comprise the program.
Returns:
ArrayList of SourceLine.
Each SourceLine represents one line of MIPS source cod
getFilename
public java.lang.String getFilename()
Produces name of associated source code file.
Returns:
File name as String.
getTokenList
public java.util.ArrayList getTokenList()
Produces list of tokens that comprise the program.
Returns:
ArrayList of TokenList. Each TokenList is list of tokens generated by
corresponding line of MIPS source code.
See Also:
TokenList
createParsedList
public java.util.ArrayList createParsedList()
Produces new empty list to hold parsed source code statements.
Returns:
ArrayList of ProgramStatement. Each ProgramStatement represents a parsed
MIPS statement.
See Also:
ProgramStatement
getParsedList
public java.util.ArrayList getParsedList()
Produces existing list of parsed source code statements.
Returns:
ArrayList of ProgramStatement. Each ProgramStatement represents a parsed
MIPS statement.
See Also:
ProgramStatement
getMachineList
public java.util.ArrayList getMachineList()
Produces list of machine statements that are assembled from the program.
Returns:
ArrayList of ProgramStatement. Each ProgramStatement represents an assembled
basic MIPS instruction.
See Also:
ProgramStatement
getBackStepper
public BackStepper getBackStepper()
Returns BackStepper associated with this program. It is created upon successful assembly.
Returns:
BackStepper object, null if there is none.
getLocalSymbolTable
public SymbolTable getLocalSymbolTable()
Returns SymbolTable associated with this program. It is created at assembly time,
and stores local labels (those not declared using .globl directive).
backSteppingEnabled
public boolean backSteppingEnabled()
Returns status of BackStepper associated with this program.
Returns:
true if enabled, false if disabled or non-existant.
getSourceLine
public java.lang.String getSourceLine(int i)
Produces specified line of MIPS source program.
Parameters:
i – Line number of MIPS source program to get. Line 1 is first line.
Returns:
Returns specified line of MIPS source. If outside the line range,
it returns null. Line 1 is first line.
readSource
public void readSource(java.lang.String file)
throws ProcessingException
Reads MIPS source code from file into structure. Will always read from file.
It is GUI responsibility to assure that source edits are written to file
when user selects compile or run/step options.
Parameters:
file – String containing name of MIPS source code file.
Throws:
ProcessingException – Will throw exception if there is any problem reading the file.
tokenize
public void tokenize()
throws ProcessingException
Tokenizes the MIPS source program. Program must have already been read from file.
Throws:
ProcessingException – Will throw exception if errors occured while tokenizing.
prepareFilesForAssembly
public java.util.ArrayList prepareFilesForAssembly(java.util.ArrayList filenames,
java.lang.String leadFilename,
java.lang.String exceptionHandler)
throws ProcessingException
Prepares the given list of files for assembly. This involves
reading and tokenizing all the source files. There may be only one.
Parameters:
filenames – ArrayList containing the source file name(s) in no particular order
leadFilename – String containing name of source file that needs to go first and
will be represented by “this” MIPSprogram object.
exceptionHandler – String containing name of source file containing exception
handler. This will be assembled first, even ahead of leadFilename, to allow it to
include “startup” instructions loaded beginning at 0x00400000. Specify null or
empty String to indicate there is no such designated exception handler.
Returns:
ArrayList containing one MIPSprogram object for each file to assemble.
objects for any additional files (send ArrayList to assembler)
Throws:
ProcessingException – Will throw exception if errors occured while reading or tokenizing.
assemble
public ErrorList assemble(java.util.ArrayList MIPSprogramsToAssemble,
boolean extendedAssemblerEnabled)
throws ProcessingException
Assembles the MIPS source program. All files comprising the program must have
already been tokenized. Assembler warnings are not considered errors.
Parameters:
MIPSprogramsToAssemble – ArrayList of MIPSprogram objects, each representing a tokenized source file.
extendedAssemblerEnabled – A boolean value – true means extended (pseudo) instructions
are permitted in source code and false means they are to be flagged as errors.
Returns:
ErrorList containing nothing or only warnings (otherwise would have thrown exception).
Throws:
ProcessingException – Will throw exception if errors occured while assembling.
assemble
public ErrorList assemble(java.util.ArrayList MIPSprogramsToAssemble,
boolean extendedAssemblerEnabled,
boolean warningsAreErrors)
throws ProcessingException
Assembles the MIPS source program. All files comprising the program must have
already been tokenized.
Parameters:
MIPSprogramsToAssemble – ArrayList of MIPSprogram objects, each representing a tokenized source file.
extendedAssemblerEnabled – A boolean value – true means extended (pseudo) instructions
are permitted in source code and false means they are to be flagged as errors
warningsAreErrors – A boolean value – true means assembler warnings will be considered errors and terminate
the assemble; false means the assembler will produce warning message but otherwise ignore warnings.
Returns:
ErrorList containing nothing or only warnings (otherwise would have thrown exception).
Throws:
ProcessingException – Will throw exception if errors occured while assembling.
simulate
public boolean simulate(int[] breakPoints)
throws ProcessingException
Simulates execution of the MIPS program. Program must have already been assembled.
Begins simulation at beginning of text segment and continues to completion.
Parameters:
breakPoints – int array of breakpoints (PC addresses). Can be null.
Returns:
true if execution completed and false otherwise
Throws:
ProcessingException – Will throw exception if errors occured while simulating.
simulate
public boolean simulate(int maxSteps)
throws ProcessingException
Simulates execution of the MIPS program. Program must have already been assembled.
Begins simulation at beginning of text segment and continues to completion or
until the specified maximum number of steps are simulated.
Parameters:
maxSteps – maximum number of steps to simulate.
Returns:
true if execution completed and false otherwise
Throws:
ProcessingException – Will throw exception if errors occured while simulating.
simulateFromPC
public boolean simulateFromPC(int[] breakPoints,
int maxSteps,
javax.swing.AbstractAction a)
throws ProcessingException
Simulates execution of the MIPS program. Program must have already been assembled.
Begins simulation at current program counter address and continues until stopped,
paused, maximum steps exceeded, or exception occurs.
Parameters:
breakPoints – int array of breakpoints (PC addresses). Can be null.
maxSteps – maximum number of instruction executions. Default -1 means no maximum.
a – the GUI component responsible for this call (GO normally). set to null if none.
Returns:
true if execution completed and false otherwise
Throws:
ProcessingException – Will throw exception if errors occured while simulating.
simulateStepAtPC
public boolean simulateStepAtPC(javax.swing.AbstractAction a)
throws ProcessingException
Simulates execution of the MIPS program. Program must have already been assembled.
Begins simulation at current program counter address and executes one step.
Parameters:
a – the GUI component responsible for this call (STEP normally). Set to null if none.
Returns:
true if execution completed and false otherwise
Throws:
ProcessingException – Will throw exception if errors occured while simulating.
inSteppedExecution
public boolean inSteppedExecution()
Will be true only while in process of simulating a program statement
in step mode (e.g. returning to GUI after each step). This is used to
prevent spurious AccessNotices from being sent from Memory and Register
to observers at other times (e.g. while updating the data and register
displays, while assembling program’s data segment, etc).
createMacroPool
public MacroPool createMacroPool()
Instantiates a new MacroPool and sends reference of this
MIPSprogram to it
Returns:
instatiated MacroPool
getLocalMacroPool
public MacroPool getLocalMacroPool()
Gets local macro pool MacroPool for this program
Returns:
MacroPool
setLocalMacroPool
public void setLocalMacroPool(MacroPool macroPool)
Sets local macro pool MacroPool for this program
Parameters:
macroPool – reference to MacroPool
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Settings
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class Settings
java.lang.Object
java.util.Observable
mars.Settings
public class Settings
extends java.util.Observable
Contains various IDE settings. Persistent settings are maintained for the
current user and on the current machine using
Java’s Preference objects. Failing that, default setting values come from
Settings.properties file. If both of those fail, default values come from
static arrays defined in this class. The latter can can be modified prior to
instantiating Settings object.
NOTE: If the Preference objects fail due to security exceptions, changes to
settings will not carry over from one MARS session to the next.
Actual implementation of the Preference objects is platform-dependent.
For Windows, they are stored in Registry. To see, run regedit and browse to:
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\mars
Author:
Pete Sanderson
Field Summary
static int ASSEMBLE_ALL_ENABLED
Flag to determine whether only the current editor source file (enabled false) or
all files in its directory (enabled true) will be assembled when assembly is selected.
static int ASSEMBLE_ON_OPEN_ENABLED
Flag to determine whether or not a file is immediately and automatically assembled
upon opening.
static int AUTO_INDENT
Flag to control whether or not language-aware editor will use auto-indent feature
static int BARE_MACHINE_ENABLED
Flag to determine whether or not program being assembled is limited to
using register numbers instead of names.
static int CARET_BLINK_RATE
Caret blink rate in milliseconds, 0 means don’t blink.
static int DATA_SEGMENT_HIGHLIGHTING
Flag to control whether or not highlighting is applied to data segment window
static int DATASEGMENT_HIGHLIGHT_BACKGROUND
RGB color for text segment highlighted background
static int DATASEGMENT_HIGHLIGHT_FONT
Font for text segment highlighted background
static int DATASEGMENT_HIGHLIGHT_FOREGROUND
RGB color for text segment highlighted foreground
static boolean[] defaultBooleanSettingsValues
Last resort default values for boolean settings; will use only if neither
the Preferences nor the properties file work.
static int DELAYED_BRANCHING_ENABLED
Flag to determine whether or not delayed branching is in effect at MIPS execution.
static int DISPLAY_ADDRESSES_IN_HEX
Default setting for displaying addresses and values in hexidecimal in the Execute
pane.
static int DISPLAY_VALUES_IN_HEX
static int EDITOR_CURRENT_LINE_HIGHLIGHTING
Flag to control whether or not editor will highlight the line currently being edited
static int EDITOR_FONT
Font for the text editor
static int EDITOR_LINE_NUMBERS_DISPLAYED
Flag to determine whether or not the editor will display line numbers.
static int EDITOR_POPUP_PREFIX_LENGTH
Number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled)
static int EDITOR_TAB_SIZE
Editor tab size in characters.
static int EVEN_ROW_BACKGROUND
RGB color for table even row background (text, data, register displays)
static int EVEN_ROW_FONT
Font for table even row background (text, data, register displays)
static int EVEN_ROW_FOREGROUND
RGB color for table even row foreground (text, data, register displays)
static int EXCEPTION_HANDLER
Current specified exception handler file (a MIPS assembly source file)
static int EXCEPTION_HANDLER_ENABLED
Flag to determine whether the currently selected exception handler source file will
be included in each assembly operation.
static int EXTENDED_ASSEMBLER_ENABLED
Flag to determine whether or not program being assembled is limited to
basic MIPS instructions and formats.
static int GENERIC_TEXT_EDITOR
Flag to control whether or not to use generic text editor instead of language-aware styled editor
static int LABEL_SORT_STATE
State for sorting label window display
static int LABEL_WINDOW_VISIBILITY
Default visibilty of label window (symbol table).
static int MEMORY_CONFIGURATION
Identifier of current memory configuration
static int ODD_ROW_BACKGROUND
RGB color for table odd row background (text, data, register displays)
static int ODD_ROW_FONT
Font for table odd row background (text, data, register displays)
static int ODD_ROW_FOREGROUND
RGB color for table odd row foreground (text, data, register displays)
static int POPUP_INSTRUCTION_GUIDANCE
Flag to control whether or not editor will provide popup instruction guidance while typing
static int POPUP_SYSCALL_INPUT
Flag to control whether or not simulator will use popup dialog for input syscalls
static int PROGRAM_ARGUMENTS
Flag to determine whether or not to display and use program arguments
static int REGISTER_HIGHLIGHT_BACKGROUND
RGB color for register highlighted background
static int REGISTER_HIGHLIGHT_FONT
Font for register highlighted background
static int REGISTER_HIGHLIGHT_FOREGROUND
RGB color for register highlighted foreground
static int REGISTERS_HIGHLIGHTING
Flag to control whether or not highlighting is applied to register windows
static int START_AT_MAIN
Flag to control whether or not assembler automatically initializes program counter to ‘main’s address
static int TEXT_COLUMN_ORDER
Order of text segment table columns
static int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND
RGB color for text segment delay slot highlighted background
static int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT
Font for text segment delay slot highlighted background
static int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND
RGB color for text segment delay slot highlighted foreground
static int TEXTSEGMENT_HIGHLIGHT_BACKGROUND
RGB color for text segment highlighted background
static int TEXTSEGMENT_HIGHLIGHT_FONT
Font for table odd row foreground (text, data, register displays)
static int TEXTSEGMENT_HIGHLIGHT_FOREGROUND
RGB color for text segment highlighted foreground
static int WARNINGS_ARE_ERRORS
Flag to determine whether or not assembler warnings are considered errors.
Constructor Summary
Settings()
Create Settings object and set to saved values.
Settings(boolean gui)
Create Settings object and set to saved values.
Method Summary
boolean getAssembleAllEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
boolean getAssembleOnOpenEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
boolean getBackSteppingEnabled()
Return whether backstepping is permitted at this time.
boolean getBareMachineEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.BARE_MACHINE_ENABLED)
boolean getBooleanSetting(int id)
Fetch value of a boolean setting given its identifier.
int getCaretBlinkRate()
Retrieve the caret blink rate in milliseconds.
java.awt.Color getColorSettingByKey(java.lang.String key)
Get Color object for specified settings key.
java.awt.Color getColorSettingByPosition(int position)
Get Color object for specified settings name (a static constant).
boolean getDataSegmentHighlighting()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
java.awt.Color getDefaultColorSettingByKey(java.lang.String key)
Get default Color value for specified settings key.
java.awt.Color getDefaultColorSettingByPosition(int position)
Get default Color object for specified settings name (a static constant).
SyntaxStyle getDefaultEditorSyntaxStyleByPosition(int index)
int getDefaultEditorTabSize()
Get the text editor default tab size in characters
java.awt.Font getDefaultFontByPosition(int fontSettingPosition)
Retrieve a default Font setting
boolean getDelayedBranchingEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
boolean getDisplayAddressesInHex()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
boolean getDisplayValuesInHex()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
java.awt.Font getEditorFont()
Current editor font.
boolean getEditorLineNumbersDisplayed()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
int getEditorPopupPrefixLength()
Get number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
SyntaxStyle getEditorSyntaxStyleByPosition(int index)
int getEditorTabSize()
Get the tab size in characters.
java.lang.String getExceptionHandler()
Name of currently selected exception handler file.
boolean getExceptionHandlerEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
boolean getExtendedAssemblerEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
java.awt.Font getFontByPosition(int fontSettingPosition)
Retrieve a Font setting
java.lang.String getLabelSortState()
Get the saved state of the Labels Window sorting (can sort by either
label or address and either ascending or descending order).
boolean getLabelWindowVisibility()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
java.lang.String getMemoryConfiguration()
Returns identifier of current built-in memory configuration.
boolean getProgramArguments()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
boolean getRegistersHighlighting()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
boolean getStartAtMain()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
int[] getTextColumnOrder()
Order of text segment display columns (there are 5, numbered 0 to 4).
boolean getWarningsAreErrors()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
void reset(boolean gui)
Reset settings to default values, as described in the constructor comments.
void setAssembleAllEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
void setAssembleOnOpenEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
void setBooleanSetting(int id,
boolean value)
Set value of a boolean setting given its id and the value.
void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds.
void setColorSettingByKey(java.lang.String key,
java.awt.Color color)
Set Color object for specified settings key.
void setColorSettingByPosition(int position,
java.awt.Color color)
Set Color object for specified settings name (a static constant).
void setDataSegmentHighlighting(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
void setDelayedBranchingEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
void setDelayedBranchingEnabledNonPersistent(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
void setDisplayAddressesInHex(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
void setDisplayValuesInHex(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
void setEditorFont(java.awt.Font font)
Set editor font to the specified Font object and write it to persistent storage.
void setEditorLineNumbersDisplayed(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
void setEditorPopupPrefixLength(int length)
Set number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
void setEditorSyntaxStyleByPosition(int index,
SyntaxStyle syntaxStyle)
void setEditorTabSize(int size)
Set the tab size in characters.
void setExceptionHandler(java.lang.String newFilename)
Set name of exception handler file and write it to persistent storage.
void setExceptionHandlerEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
void setExtendedAssemblerEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
void setFontByPosition(int fontSettingPosition,
java.awt.Font font)
Store a Font setting
void setLabelSortState(java.lang.String state)
Store the current state of the Labels Window sorter.
void setLabelWindowVisibility(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
void setMemoryConfiguration(java.lang.String config)
Store the identifier of the memory configuration.
void setProgramArguments(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
void setRegistersHighlighting(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
void setStartAtMain(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
void setTextColumnOrder(int[] columnOrder)
Store the current order of Text Segment window table columns, so the ordering
can be preserved and restored.
void setWarningsAreErrors(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Field Detail
EXTENDED_ASSEMBLER_ENABLED
public static final int EXTENDED_ASSEMBLER_ENABLED
Flag to determine whether or not program being assembled is limited to
basic MIPS instructions and formats.
See Also:
Constant Field Values
BARE_MACHINE_ENABLED
public static final int BARE_MACHINE_ENABLED
Flag to determine whether or not program being assembled is limited to
using register numbers instead of names. NOTE: Its default value is
false and the IDE provides no means to change it!
See Also:
Constant Field Values
ASSEMBLE_ON_OPEN_ENABLED
public static final int ASSEMBLE_ON_OPEN_ENABLED
Flag to determine whether or not a file is immediately and automatically assembled
upon opening. Handy when using externa editor like mipster.
See Also:
Constant Field Values
ASSEMBLE_ALL_ENABLED
public static final int ASSEMBLE_ALL_ENABLED
Flag to determine whether only the current editor source file (enabled false) or
all files in its directory (enabled true) will be assembled when assembly is selected.
See Also:
Constant Field Values
LABEL_WINDOW_VISIBILITY
public static final int LABEL_WINDOW_VISIBILITY
Default visibilty of label window (symbol table). Default only, dynamic status
maintained by ExecutePane
See Also:
Constant Field Values
DISPLAY_ADDRESSES_IN_HEX
public static final int DISPLAY_ADDRESSES_IN_HEX
Default setting for displaying addresses and values in hexidecimal in the Execute
pane.
See Also:
Constant Field Values
DISPLAY_VALUES_IN_HEX
public static final int DISPLAY_VALUES_IN_HEX
See Also:
Constant Field Values
EXCEPTION_HANDLER_ENABLED
public static final int EXCEPTION_HANDLER_ENABLED
Flag to determine whether the currently selected exception handler source file will
be included in each assembly operation.
See Also:
Constant Field Values
DELAYED_BRANCHING_ENABLED
public static final int DELAYED_BRANCHING_ENABLED
Flag to determine whether or not delayed branching is in effect at MIPS execution.
This means we simulate the pipeline and statement FOLLOWING a successful branch
is executed before branch is taken. DPS 14 June 2007.
See Also:
Constant Field Values
EDITOR_LINE_NUMBERS_DISPLAYED
public static final int EDITOR_LINE_NUMBERS_DISPLAYED
Flag to determine whether or not the editor will display line numbers.
See Also:
Constant Field Values
WARNINGS_ARE_ERRORS
public static final int WARNINGS_ARE_ERRORS
Flag to determine whether or not assembler warnings are considered errors.
See Also:
Constant Field Values
PROGRAM_ARGUMENTS
public static final int PROGRAM_ARGUMENTS
Flag to determine whether or not to display and use program arguments
See Also:
Constant Field Values
DATA_SEGMENT_HIGHLIGHTING
public static final int DATA_SEGMENT_HIGHLIGHTING
Flag to control whether or not highlighting is applied to data segment window
See Also:
Constant Field Values
REGISTERS_HIGHLIGHTING
public static final int REGISTERS_HIGHLIGHTING
Flag to control whether or not highlighting is applied to register windows
See Also:
Constant Field Values
START_AT_MAIN
public static final int START_AT_MAIN
Flag to control whether or not assembler automatically initializes program counter to ‘main’s address
See Also:
Constant Field Values
EDITOR_CURRENT_LINE_HIGHLIGHTING
public static final int EDITOR_CURRENT_LINE_HIGHLIGHTING
Flag to control whether or not editor will highlight the line currently being edited
See Also:
Constant Field Values
POPUP_INSTRUCTION_GUIDANCE
public static final int POPUP_INSTRUCTION_GUIDANCE
Flag to control whether or not editor will provide popup instruction guidance while typing
See Also:
Constant Field Values
POPUP_SYSCALL_INPUT
public static final int POPUP_SYSCALL_INPUT
Flag to control whether or not simulator will use popup dialog for input syscalls
See Also:
Constant Field Values
GENERIC_TEXT_EDITOR
public static final int GENERIC_TEXT_EDITOR
Flag to control whether or not to use generic text editor instead of language-aware styled editor
See Also:
Constant Field Values
AUTO_INDENT
public static final int AUTO_INDENT
Flag to control whether or not language-aware editor will use auto-indent feature
See Also:
Constant Field Values
defaultBooleanSettingsValues
public static boolean[] defaultBooleanSettingsValues
Last resort default values for boolean settings; will use only if neither
the Preferences nor the properties file work. If you wish to change them,
do so before instantiating the Settings object.
Values are matched to keys by list position.
EXCEPTION_HANDLER
public static final int EXCEPTION_HANDLER
Current specified exception handler file (a MIPS assembly source file)
See Also:
Constant Field Values
TEXT_COLUMN_ORDER
public static final int TEXT_COLUMN_ORDER
Order of text segment table columns
See Also:
Constant Field Values
LABEL_SORT_STATE
public static final int LABEL_SORT_STATE
State for sorting label window display
See Also:
Constant Field Values
MEMORY_CONFIGURATION
public static final int MEMORY_CONFIGURATION
Identifier of current memory configuration
See Also:
Constant Field Values
CARET_BLINK_RATE
public static final int CARET_BLINK_RATE
Caret blink rate in milliseconds, 0 means don’t blink.
See Also:
Constant Field Values
EDITOR_TAB_SIZE
public static final int EDITOR_TAB_SIZE
Editor tab size in characters.
See Also:
Constant Field Values
EDITOR_POPUP_PREFIX_LENGTH
public static final int EDITOR_POPUP_PREFIX_LENGTH
Number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled)
See Also:
Constant Field Values
EDITOR_FONT
public static final int EDITOR_FONT
Font for the text editor
See Also:
Constant Field Values
EVEN_ROW_FONT
public static final int EVEN_ROW_FONT
Font for table even row background (text, data, register displays)
See Also:
Constant Field Values
ODD_ROW_FONT
public static final int ODD_ROW_FONT
Font for table odd row background (text, data, register displays)
See Also:
Constant Field Values
TEXTSEGMENT_HIGHLIGHT_FONT
public static final int TEXTSEGMENT_HIGHLIGHT_FONT
Font for table odd row foreground (text, data, register displays)
See Also:
Constant Field Values
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FONT
Font for text segment delay slot highlighted background
See Also:
Constant Field Values
DATASEGMENT_HIGHLIGHT_FONT
public static final int DATASEGMENT_HIGHLIGHT_FONT
Font for text segment highlighted background
See Also:
Constant Field Values
REGISTER_HIGHLIGHT_FONT
public static final int REGISTER_HIGHLIGHT_FONT
Font for register highlighted background
See Also:
Constant Field Values
EVEN_ROW_BACKGROUND
public static final int EVEN_ROW_BACKGROUND
RGB color for table even row background (text, data, register displays)
See Also:
Constant Field Values
EVEN_ROW_FOREGROUND
public static final int EVEN_ROW_FOREGROUND
RGB color for table even row foreground (text, data, register displays)
See Also:
Constant Field Values
ODD_ROW_BACKGROUND
public static final int ODD_ROW_BACKGROUND
RGB color for table odd row background (text, data, register displays)
See Also:
Constant Field Values
ODD_ROW_FOREGROUND
public static final int ODD_ROW_FOREGROUND
RGB color for table odd row foreground (text, data, register displays)
See Also:
Constant Field Values
TEXTSEGMENT_HIGHLIGHT_BACKGROUND
public static final int TEXTSEGMENT_HIGHLIGHT_BACKGROUND
RGB color for text segment highlighted background
See Also:
Constant Field Values
TEXTSEGMENT_HIGHLIGHT_FOREGROUND
public static final int TEXTSEGMENT_HIGHLIGHT_FOREGROUND
RGB color for text segment highlighted foreground
See Also:
Constant Field Values
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_BACKGROUND
RGB color for text segment delay slot highlighted background
See Also:
Constant Field Values
TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND
public static final int TEXTSEGMENT_DELAYSLOT_HIGHLIGHT_FOREGROUND
RGB color for text segment delay slot highlighted foreground
See Also:
Constant Field Values
DATASEGMENT_HIGHLIGHT_BACKGROUND
public static final int DATASEGMENT_HIGHLIGHT_BACKGROUND
RGB color for text segment highlighted background
See Also:
Constant Field Values
DATASEGMENT_HIGHLIGHT_FOREGROUND
public static final int DATASEGMENT_HIGHLIGHT_FOREGROUND
RGB color for text segment highlighted foreground
See Also:
Constant Field Values
REGISTER_HIGHLIGHT_BACKGROUND
public static final int REGISTER_HIGHLIGHT_BACKGROUND
RGB color for register highlighted background
See Also:
Constant Field Values
REGISTER_HIGHLIGHT_FOREGROUND
public static final int REGISTER_HIGHLIGHT_FOREGROUND
RGB color for register highlighted foreground
See Also:
Constant Field Values
Constructor Detail
Settings
public Settings()
Create Settings object and set to saved values. If saved values not found, will set
based on defaults stored in Settings.properties file. If file problems, will set based
on defaults stored in this class.
Settings
public Settings(boolean gui)
Create Settings object and set to saved values. If saved values not found, will set
based on defaults stored in Settings.properties file. If file problems, will set based
on defaults stored in this class.
Parameters:
gui – true if running the graphical IDE, false if running from command line.
Ignored as of release 3.6 but retained for compatability.
Method Detail
getBackSteppingEnabled
public boolean getBackSteppingEnabled()
Return whether backstepping is permitted at this time. Backstepping is ability to undo execution
steps one at a time. Available only in the IDE. This is not a persistent setting and is not under
MARS user control.
Returns:
true if backstepping is permitted, false otherwise.
reset
public void reset(boolean gui)
Reset settings to default values, as described in the constructor comments.
Parameters:
gui – true if running from GUI IDE and false if running from command mode.
Ignored as of release 3.6 but retained for compatibility.
setEditorSyntaxStyleByPosition
public void setEditorSyntaxStyleByPosition(int index,
SyntaxStyle syntaxStyle)
getEditorSyntaxStyleByPosition
public SyntaxStyle getEditorSyntaxStyleByPosition(int index)
getDefaultEditorSyntaxStyleByPosition
public SyntaxStyle getDefaultEditorSyntaxStyleByPosition(int index)
getBooleanSetting
public boolean getBooleanSetting(int id)
Fetch value of a boolean setting given its identifier.
Parameters:
id – int containing the setting’s identifier (constants listed above)
Returns:
corresponding boolean setting.
Throws:
java.lang.IllegalArgumentException – if identifier is invalid.
getBareMachineEnabled
public boolean getBareMachineEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.BARE_MACHINE_ENABLED)
Setting for whether user programs limited to “bare machine” formatted basic instructions.
This was added 8 Aug 2006 but is fixed at false for now, due to uncertainty as to what
exactly constitutes “bare machine”.
Returns:
true if only bare machine instructions allowed, false otherwise.
getExtendedAssemblerEnabled
public boolean getExtendedAssemblerEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
Setting for whether user programs can use pseudo-instructions or extended addressing modes
or alternative instruction formats (all are implemented as pseudo-instructions).
Returns:
true if pseudo-instructions and formats permitted, false otherwise.
getAssembleOnOpenEnabled
public boolean getAssembleOnOpenEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
Setting for whether selected program will be automatically assembled upon opening. This
can be useful if user employs an external editor such as MIPSter.
Returns:
true if file is to be automatically assembled upon opening and false otherwise.
getDisplayAddressesInHex
public boolean getDisplayAddressesInHex()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
Setting for whether Addresses in the Execute pane will be displayed in hexadecimal.
Returns:
true if addresses are displayed in hexadecimal and false otherwise (decimal).
getDisplayValuesInHex
public boolean getDisplayValuesInHex()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
Setting for whether values in the Execute pane will be displayed in hexadecimal.
Returns:
true if values are displayed in hexadecimal and false otherwise (decimal).
getAssembleAllEnabled
public boolean getAssembleAllEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
Setting for whether the assemble operation applies only to the file currently open in
the editor or whether it applies to all files in that file’s directory (primitive project
capability). If the “assemble on open” setting is set, this “assemble all” setting will
be applied as soon as the file is opened.
Returns:
true if all files are to be assembled, false if only the file open in editor.
getExceptionHandlerEnabled
public boolean getExceptionHandlerEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
Setting for whether the currently selected exception handler
(a MIPS source file) will be automatically included in each
assemble operation.
Returns:
true if exception handler is to be included in assemble, false otherwise.
getDelayedBranchingEnabled
public boolean getDelayedBranchingEnabled()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
Setting for whether delayed branching will be applied during MIPS
program execution. If enabled, the statement following a successful
branch will be executed and then the branch is taken! This simulates
pipelining and all MIPS processors do it. However it is confusing to
assembly language students so is disabled by default. SPIM does same thing.
Returns:
true if delayed branching is enabled, false otherwise.
getLabelWindowVisibility
public boolean getLabelWindowVisibility()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
Setting concerning whether or not to display the Labels Window — symbol table.
Returns:
true if label window is to be displayed, false otherwise.
getEditorLineNumbersDisplayed
public boolean getEditorLineNumbersDisplayed()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
Setting concerning whether or not the editor will display line numbers.
Returns:
true if line numbers are to be displayed, false otherwise.
getWarningsAreErrors
public boolean getWarningsAreErrors()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
Setting concerning whether or not assembler will consider warnings to be errors.
Returns:
true if warnings are considered errors, false otherwise.
getProgramArguments
public boolean getProgramArguments()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
Setting concerning whether or not program arguments can be entered and used.
Returns:
true if program arguments can be entered/used, false otherwise.
getDataSegmentHighlighting
public boolean getDataSegmentHighlighting()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
Setting concerning whether or not highlighting is applied to Data Segment window.
Returns:
true if highlighting is to be applied, false otherwise.
getRegistersHighlighting
public boolean getRegistersHighlighting()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
Setting concerning whether or not highlighting is applied to Registers,
Coprocessor0, and Coprocessor1 windows.
Returns:
true if highlighting is to be applied, false otherwise.
getStartAtMain
public boolean getStartAtMain()
Deprecated. Use getBooleanSetting(int id) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
Setting concerning whether or not assembler will automatically initialize
the program counter to address of statement labeled ‘main’ if defined.
Returns:
true if it initializes to ‘main’, false otherwise.
getExceptionHandler
public java.lang.String getExceptionHandler()
Name of currently selected exception handler file.
Returns:
String pathname of current exception handler file, empty if none.
getMemoryConfiguration
public java.lang.String getMemoryConfiguration()
Returns identifier of current built-in memory configuration.
Returns:
String identifier of current built-in memory configuration, empty if none.
getEditorFont
public java.awt.Font getEditorFont()
Current editor font. Retained for compatibility but replaced
by: getFontByPosition(Settings.EDITOR_FONT)
Returns:
Font object for current editor font.
getFontByPosition
public java.awt.Font getFontByPosition(int fontSettingPosition)
Retrieve a Font setting
Parameters:
fontSettingPosition – constant that identifies which item
Returns:
Font object for given item
getDefaultFontByPosition
public java.awt.Font getDefaultFontByPosition(int fontSettingPosition)
Retrieve a default Font setting
Parameters:
fontSettingPosition – constant that identifies which item
Returns:
Font object for given item
getTextColumnOrder
public int[] getTextColumnOrder()
Order of text segment display columns (there are 5, numbered 0 to 4).
Returns:
Array of int indicating the order. Original order is 0 1 2 3 4.
getCaretBlinkRate
public int getCaretBlinkRate()
Retrieve the caret blink rate in milliseconds. Blink rate of 0 means
do not blink.
Returns:
int blink rate in milliseconds
getEditorTabSize
public int getEditorTabSize()
Get the tab size in characters.
Returns:
tab size in characters.
getEditorPopupPrefixLength
public int getEditorPopupPrefixLength()
Get number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
Should be 1 or 2. If 1, the popup will be generated after first letter typed, based on all matches; if 2,
the popup will be generated after second letter typed.
Returns:
number of letters (should be 1 or 2).
getDefaultEditorTabSize
public int getDefaultEditorTabSize()
Get the text editor default tab size in characters
Returns:
tab size in characters
getLabelSortState
public java.lang.String getLabelSortState()
Get the saved state of the Labels Window sorting (can sort by either
label or address and either ascending or descending order).
Default state is 0, by ascending addresses.
Returns:
State value 0-7, as a String.
getColorSettingByKey
public java.awt.Color getColorSettingByKey(java.lang.String key)
Get Color object for specified settings key.
Returns null if key is not found or its value is not a valid color encoding.
Parameters:
key – the Setting key
Returns:
corresponding Color, or null if key not found or value not valid color
getDefaultColorSettingByKey
public java.awt.Color getDefaultColorSettingByKey(java.lang.String key)
Get default Color value for specified settings key.
Returns null if key is not found or its value is not a valid color encoding.
Parameters:
key – the Setting key
Returns:
corresponding default Color, or null if key not found or value not valid color
getColorSettingByPosition
public java.awt.Color getColorSettingByPosition(int position)
Get Color object for specified settings name (a static constant).
Returns null if argument invalid or its value is not a valid color encoding.
Parameters:
position – the Setting name (see list of static constants)
Returns:
corresponding Color, or null if argument invalid or value not valid color
getDefaultColorSettingByPosition
public java.awt.Color getDefaultColorSettingByPosition(int position)
Get default Color object for specified settings name (a static constant).
Returns null if argument invalid or its value is not a valid color encoding.
Parameters:
position – the Setting name (see list of static constants)
Returns:
corresponding default Color, or null if argument invalid or value not valid color
setBooleanSetting
public void setBooleanSetting(int id,
boolean value)
Set value of a boolean setting given its id and the value.
Parameters:
id – int containing the setting’s identifier (constants listed above)
value – boolean value to store
Throws:
java.lang.IllegalArgumentException – if identifier is not valid.
setExtendedAssemblerEnabled
public void setExtendedAssemblerEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXTENDED_ASSEMBLER_ENABLED)
Establish setting for whether or not pseudo-instructions and formats are permitted
in user programs. User can change this setting via the IDE. If setting changes,
new setting will be written to properties file.
Parameters:
value – True to permit, false otherwise.
setAssembleOnOpenEnabled
public void setAssembleOnOpenEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ON_OPEN_ENABLED)
Establish setting for whether a file will be automatically assembled as soon as it
is opened. This is handy for those using an external text editor such as Mipster.
If setting changes, new setting will be written to properties file.
Parameters:
value – True to automatically assemble, false otherwise.
setAssembleAllEnabled
public void setAssembleAllEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.ASSEMBLE_ALL_ENABLED)
Establish setting for whether a file will be assembled by itself (false) or along
with all other files in its directory (true). This permits multi-file programs
and a primitive “project” capability. If setting changes,
new setting will be written to properties file.
Parameters:
value – True to assemble all, false otherwise.
setDisplayAddressesInHex
public void setDisplayAddressesInHex(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_ADDRESSES_IN_HEX)
Establish setting for whether addresses in the Execute pane will be displayed
in hexadecimal format.
Parameters:
value – True to display addresses in hexadecimal, false for decimal.
setDisplayValuesInHex
public void setDisplayValuesInHex(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DISPLAY_VALUES_IN_HEX)
Establish setting for whether values in the Execute pane will be displayed
in hexadecimal format.
Parameters:
value – True to display values in hexadecimal, false for decimal.
setLabelWindowVisibility
public void setLabelWindowVisibility(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.LABEL_WINDOW_VISIBILITY)
Establish setting for whether the labels window (i.e. symbol table) will
be displayed as part of the Text Segment display. If setting changes,
new setting will be written to properties file.
Parameters:
value – True to dispay labels window, false otherwise.
setExceptionHandlerEnabled
public void setExceptionHandlerEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EXCEPTION_HANDLER_ENABLED)
Establish setting for whether the currently selected exception handler
(a MIPS source file) will be automatically included in each
assemble operation. If setting changes, new setting will be written
to properties file.
Parameters:
value – True to assemble exception handler, false otherwise.
setDelayedBranchingEnabled
public void setDelayedBranchingEnabled(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
Establish setting for whether delayed branching will be applied during
MIPS program execution. If enabled, the statement following a successful
branch will be executed and then the branch is taken! This simulates
pipelining and all MIPS processors do it. However it is confusing to
assembly language students so is disabled by default. SPIM does same thing.
Parameters:
value – True to enable delayed branching, false otherwise.
setEditorLineNumbersDisplayed
public void setEditorLineNumbersDisplayed(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.EDITOR_LINE_NUMBERS_DISPLAYED)
Establish setting for whether line numbers will be displayed by the
text editor.
Parameters:
value – True to display line numbers, false otherwise.
setWarningsAreErrors
public void setWarningsAreErrors(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.WARNINGS_ARE_ERRORS)
Establish setting for whether assembler warnings will be considered errors.
Parameters:
value – True to consider warnings to be errors, false otherwise.
setProgramArguments
public void setProgramArguments(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.PROGRAM_ARGUMENTS)
Establish setting for whether program arguments can be ented/used.
Parameters:
value – True if program arguments can be entered/used, false otherwise.
setDataSegmentHighlighting
public void setDataSegmentHighlighting(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DATA_SEGMENT_HIGHLIGHTING)
Establish setting for whether highlighting is to be applied to
Data Segment window.
Parameters:
value – True if highlighting is to be applied, false otherwise.
setRegistersHighlighting
public void setRegistersHighlighting(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.REGISTERS_HIGHLIGHTING)
Establish setting for whether highlighting is to be applied to
Registers, Coprocessor0 and Coprocessor1 windows.
Parameters:
value – True if highlighting is to be applied, false otherwise.
setStartAtMain
public void setStartAtMain(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.START_AT_MAIN)
Establish setting for whether assembler will automatically initialize
program counter to address of statement labeled ‘main’ if defined.
Parameters:
value – True if PC set to address of ‘main’, false otherwise.
setDelayedBranchingEnabledNonPersistent
public void setDelayedBranchingEnabledNonPersistent(boolean value)
Deprecated. Use setBooleanSetting(int id, boolean value) with the appropriate boolean setting ID
(e.g. Settings.DELAYED_BRANCHING_ENABLED)
Establish setting for whether delayed branching will be applied during
MIPS program execution. This setting will NOT be written to persisent
store! This method should be called only to temporarily set this
setting — currently this is needed only when running MARS from the
command line (MarsLaunch.java).
Parameters:
value – True to enabled delayed branching, false otherwise.
setExceptionHandler
public void setExceptionHandler(java.lang.String newFilename)
Set name of exception handler file and write it to persistent storage.
Parameters:
newFilename – name of exception handler file
setMemoryConfiguration
public void setMemoryConfiguration(java.lang.String config)
Store the identifier of the memory configuration.
Parameters:
config – A string that identifies the current built-in memory configuration
setCaretBlinkRate
public void setCaretBlinkRate(int rate)
Set the caret blinking rate in milliseconds. Rate of 0 means no blinking.
Parameters:
rate – blink rate in milliseconds
setEditorTabSize
public void setEditorTabSize(int size)
Set the tab size in characters.
Parameters:
size – tab size in characters.
setEditorPopupPrefixLength
public void setEditorPopupPrefixLength(int length)
Set number of letters to be matched by editor’s instruction guide before popup generated (if popup enabled).
Should be 1 or 2. If 1, the popup will be generated after first letter typed, based on all matches; if 2,
the popup will be generated after second letter typed.
Parameters:
number – of letters (should be 1 or 2).
setEditorFont
public void setEditorFont(java.awt.Font font)
Set editor font to the specified Font object and write it to persistent storage.
This method retained for compatibility but replaced by:
setFontByPosition(Settings.EDITOR_FONT, font)
Parameters:
font – Font object to be used by text editor.
setFontByPosition
public void setFontByPosition(int fontSettingPosition,
java.awt.Font font)
Store a Font setting
Parameters:
fontSettingPosition – Constant that identifies the item the font goes with
setTextColumnOrder
public void setTextColumnOrder(int[] columnOrder)
Store the current order of Text Segment window table columns, so the ordering
can be preserved and restored.
Parameters:
columnOrder – An array of int indicating column order.
setLabelSortState
public void setLabelSortState(java.lang.String state)
Store the current state of the Labels Window sorter. There are 8 possible states
as described in LabelsWindow.java
Parameters:
state – The current labels window sorting state, as a String.
setColorSettingByKey
public void setColorSettingByKey(java.lang.String key,
java.awt.Color color)
Set Color object for specified settings key. Has no effect if key is invalid.
Parameters:
key – the Setting key
color – the Color to save
setColorSettingByPosition
public void setColorSettingByPosition(int position,
java.awt.Color color)
Set Color object for specified settings name (a static constant). Has no effect if invalid.
Parameters:
position – the Setting name (see list of static constants)
color – the Color to save
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Globals
Overview Package Class Tree Deprecated Index Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
mars
Class Globals
java.lang.Object
mars.Globals
public class Globals
extends java.lang.Object
Collection of globally-available data structures.
Author:
Pete Sanderson
Field Summary
static java.lang.String ASCII_NON_PRINT
Placeholder for non-printable ASCII codes
static java.lang.String[] ASCII_TABLE
Array of strings to display for ASCII codes in ASCII display of data segment.
static java.lang.String copyrightHolders
MARS copyright holders
static java.lang.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 java.util.ArrayList fileExtensions
List of accepted file extensions for MIPS assembly source files.
static java.lang.String helpPath
Path to folder that contains help text
static java.lang.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 java.lang.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 java.lang.String userInputAlert
String to GUI’s RunI/O text area when echoing user input from pop-up dialog.
static java.lang.String version
The current MARS version number.
Constructor Summary
Globals()
Method Summary
static java.lang.String getAsciiNonPrint()
static java.lang.String[] getAsciiStrings()
static java.util.ArrayList getExternalTools()
Get list of MarsTools that reside outside the MARS distribution.
static VenusUI getGui()
static java.lang.String getPropertyEntry(java.lang.String propertiesFile,
java.lang.String propertyName)
Read and return property file value (if any) for requested property.
static Settings getSettings()
java.util.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 java.lang.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 java.lang.String userInputAlert
String to GUI’s RunI/O text area when echoing user input from pop-up dialog.
imagesPath
public static final java.lang.String imagesPath
Path to folder that contains images
See Also:
Constant Field Values
helpPath
public static final java.lang.String helpPath
Path to folder that contains help text
See Also:
Constant Field Values
version
public static final java.lang.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 java.util.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 java.lang.String copyrightYears
MARS copyright years
copyrightHolders
public static final java.lang.String copyrightHolders
MARS copyright holders
ASCII_NON_PRINT
public static final java.lang.String ASCII_NON_PRINT
Placeholder for non-printable ASCII codes
ASCII_TABLE
public static final java.lang.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 java.lang.String getAsciiNonPrint()
getAsciiStrings
public static java.lang.String[] getAsciiStrings()
getExternalTools
public static java.util.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 java.lang.String getPropertyEntry(java.lang.String propertiesFile,
java.lang.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 java.util.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
All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Macros in MARS
Writing and Using Macros
.macro, .end_macro,.eqv and .include directives are new in MARS 4.3
Introduction to macros
Patterson and Hennessy define a macro as a pattern-matching and replacement facility
that provides a simple mechanism to name a frequently used sequence of instructions [1].
This permits the programmer to specify the instruction sequence by invoking the macro. This requires
only one line of code for each use instead of repeatedly typing
in the instruction sequence each time. It follows the axiom “define once, use many times,” which
not only reduces the chance for error but also facilitates program maintenance.
Macros are like procedures (subroutines) in this sense but operate differently than procedures.
Procedures in MIPS assembly language follow particular protocols for procedure definition, call and return.
Macros operate by substituting the macro body for each use at the time of assembly. This substitution
is called macro expansion.. They do not require the protocols and execution overhead of procedures.
As a simple example, you may want to terminate your program from a number of locations. If you are running
from the MARS IDE, you will use system call 10, exit. The instruction sequence is pretty easy
li $v0,10
syscall
but still tedious. You can define a macro, let’s call it done, to represent this sequence
.macro done
li $v0,10
syscall
.end_macro
then invoke it whenever you wish with the statement
done
At assembly time, the assembler will replace each occurrence of the statement done with the two-statement
sequence
li $v0,10
syscall
This is the macro expansion. The runtime simulator is unaware of macros or macro expansion.
If running MARS from the command line, perhaps you want to return a termination value. This can be done
with syscall 17, exit2, which takes the termination value as an argument. An equivalent macro,
let’s call it terminate would be
.macro terminate (%termination_value)
li $a0, %termination_value
li $v0, 17
syscall
.end_macro
This macro defines a formal parameter to represent the termination value. You would invoke it
with the statement
terminate (1)
to terminate with value 1. Upon assembly,
the statement terminate (1) would be replaced by the three-statement sequence
li $a0, 1
li $v0, 17
syscall
The argument value, 1, is substituted wherever the formal parameter %termination_value appears
in the macro body.
This is a textual substitution. Note that in this example the argument value must be an integer, not a
register name or a label, because the parameter is used as the second operand in the Load Immediate operation.
In MARS, a macro is similar to an extended (pseudo) instruction. They are distinguished in that the expansion of
extended instructions is supported by an internally-defined specification language and mechanism which can manipulate argument values.
The macro facility can only substitute argument values as given, and it uses a separate mechanism from extended instructions.
Additional examples and details follow.
How to define macros
The first line begins with a .macro directive followed by an optional list of formal parameters.
Placing commas between parameters and parentheses around the list is optional.
Each formal parameter is an identifier that begins with a % character. For compatibility with
the SPIM preprocessor APP, it may alternatively begin with $.
The lines that follow define the body of the macro. Use the formal parameters as appropriate. The body
may contain data segments as well as text segments.
The macro definition finishes with a .end_macro directive.
See the Notes below for additional information.
How to use macros
To invoke a macro, form a statement consisting of the macro name and then one token for each argument
to be substituted for its corresponding formal parameter by the assembler.
The argument list may optionally be surrounded by parentheses.
Arguments may be separated either by spaces or commas.
Macro expansion is a pre-processing task for assemblers.
Notes
A macro definition must appear before its use. No forward references.
All macro definitions are local in each file and they cannot be global.
Nested macro definitions are not supported. No .macro directive should appear inside body of a macro definition.
A macro definition can contain a call to a previously-defined macro. Only backward references are allowed.
Labels placed in the body of a macro definition will not have same name after macro expansion.
During expansion, their name will be followed by “_M#” where # will be a unique number for each macro expansion.
Two macros with the same name but different number of parameters are considered different and both can be used.
A macro defined with the same name and same number of parameters as another macro defined before it will be ignored.
Each argument in a macro call can only be a single language element (token). For instance “4($t0)” cannot be an argument.
Macros are a part of the assembler, not the ISA. So the syntax might be different with other assemblers.
For compatibility with the SPIM simulator, SPIM-style macros are also supported in MARS. SPIM-style macros are same as MARS but formal parameters begin with “$” instead of “%”.
Examples
Printing an integer (argument may be either an immediate value or register name):
.macro print_int (%x)
li $v0, 1
add $a0, $zero, %x
syscall
.end_macro
print_int ($s0)
print_int (10)
Printing a string (macro will first assign a label to its parameter in data segment then print it):
.macro print_str (%str)
.data
myLabel: .asciiz %str
.text
li $v0, 4
la $a0, myLabel
syscall
.end_macro
print_str (“test1″) #”test1” will be labeled with name “myLabel_M0”
print_str (“test2″) #”test2” will be labeled with name “myLabel_M1”
Implementing a simple for-loop:
# generic looping mechanism
.macro for (%regIterator, %from, %to, %bodyMacroName)
add %regIterator, $zero, %from
Loop:
%bodyMacroName ()
add %regIterator, %regIterator, 1
ble %regIterator, %to, Loop
.end_macro
#print an integer
.macro body()
print_int $t0
print_str “\n”
.end_macro
#printing 1 to 10:
for ($t0, 1, 10, body)
The for macro has 4 parameters. %regIterator should be the name of a register which iterates from %from to %to and in each iteration %bodyMacroName will be expanded and run.
Arguments for
%from and %to can be either a register name or an immediate value, and %bodyMacroName should be name of a macro that has no parameters.
Macro source line numbers
For purpose of error messaging and Text Segment display, MARS attempts to display line numbers for both the definition and use of the pertinent
macro statement. If an error message shows the line number in the form “X->Y” (e.g. “20->4”), then X is the line number in the expansion
(use) where the error was detected and Y is the line number in the macro definition. In the Text Segment display
of source code, the macro definition
line number will be displayed within brackets, e.g. “<4>“, at the point of expansion. Line numbers should correspond to the
numbers you would see in the text editor.
The .eqv directive
The .eqv directive (short for “equivalence”) is also new in MARS 4.3. It is similar to #define in C or C++. It
is used to substitute an arbitrary string for an identifier. It is useful but much less powerful than macros.
It was developed independently of the macro facility.
Using .eqv, you can specify simple substitutions that provide “define once, use many times” capability at assembly
pre-processing time. For example, once you define
.eqv LIMIT 20
.eqv CTR $t2
.eqv CLEAR_CTR add CTR, $zero, 0
then you can refer to them in subsequent code:
li $v0,1
CLEAR_CTR
loop: move $a0, CTR
syscall
add CTR, CTR, 1
blt CTR, LIMIT, loop
CLEAR_CTR
During assembly pre-processing, the .eqv substitutions will be applied. The resulting code is
li $v0,1
add $t2, $zero, 0
loop: move $a0, $t2
syscall
add $t2, $t2, 1
blt $t2, 20, loop
add $t2, $zero, 0
which when run will display the values 0 through 19 on one line with no intervening spaces.
Note that the substitution string is not limited to a single token. Like .macro, .eqv is local to the file
in which it is defined, and must be defined prior to use. Macro bodies can contain references to .eqv directives.
The .include directive
The .include directive is also new in MARS 4.3. It has one operand, a quoted filename. When the
directive is carried out, the contents of the specified file are substituted for the directive. This occurs
during assembly preprocessing. It is like #include in C or C++.
.include is designed to make macro and equivalence (.eqv directive) use
more convenient. Both macro definitions and equivalence definitions are local, which means they can be used only
in the same file where defined. Without .include, you would have to repeat their definitions in every
file where you want to use them. Besides being tedious, this is poor programming practice; remember
“define once, use many times.” Now you can define macros and equivalences in a separate file, then include it
in any file where you want to use them.
The .include preprocessor will detect and flag any circular includes (file that includes itself, directly or
indirectly).
The use of .include presents some challenges for error messaging and for source code numbering in the Text
Segment display. If a file being included has any assembly errors, the filename and line number in the error
message should refer to the file being included, not the file it was substituted into. Similarly, the line number
given in the Text Segment source code display refers to the line in the file being included. Thus the displayed line numbers do not
monotonically increase – this is also the case when using the “assemble all” setting. Line numbers should correspond to the numbers
you would see in the text editor.
As a simple example, you could define the done macro (and others) in a separate file
then include it wherever you need it. Suppose “macros.asm” contains the following:
.macro done
li $v0,10
syscall
.end_macro
You could then include it in a different source file something like this:
.include “macros.asm”
.data
value: .word 13
.text
li $v0, 1
lw $a0, value
syscall
done
During assembly preprocessing, this would be expanded to
.macro done
li $v0,10
syscall
.end_macro
.data
value: .word 13
.text
li $v0, 1
lw $a0, value
syscall
done
The assembler will then perform the appropriate macro expansion.
Acknowledgements
The MARS macro facility was developed in 2012 by Mohammad Hossein Sekhavat, , while an engineering student at
Sharif University in Tehran. MARS creators Pete and Ken are incredibly grateful for his contribution! Pete developed .eqv
and .include at about the same time.
References
[1] Computer Organization and Design: The Hardware/Software Interface, Fourth Edition, Patterson and Hennessy,
Morgan Kauffman Publishers, 2009.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Operating Requirements
MARS is written in Java and
requires at least Release 1.5 of the J2SE Java Runtime Environment (JRE) to work.
The graphical IDE is implemented using Swing. It has been
tested on Windows XP and Vista, Mac OS X, and is also being used under Linux.
Some MARS Assembler and Simulator Limitations
Releases 3.0 and later assemble and simulate nearly all the MIPS32 instructions documented in the
textbook Computer Organization and Design, Fourth Edition by Patterson and Hennessy,
Elsevier – Morgan Kaufmann, 2009. All basic and pseudo instructions, directives,
and system services described in Appendix B are implemented.
Limitations of MARS as of Release 4.3 include:
Memory segments (text, data, stack, kernel text, kernel data) are limited to 4MB each starting at their
respective base addresses.
There is no pipelined mode (but delayed branching is supported).
Self-modifying code is not supported. This is a program that during
execution modifies the contents of its own text segment (binary instructions).
If you open a file which is a link or shortcut to another file, MARS will not
open the target file. The file open dialog is implemented using Java Swing’s JFileChooser,
which does not support links.
Very few configuration changes, besides those in the Settings menu, are saved from one session to the next.
The editor settings, which include font settings and display of line numbers, are saved.
The IDE will work only with the MARS assembler. It cannot be used
with any other compiler, assembler, or simulator. The MARS assembler and simulator
can be used either through the IDE or from a command prompt.
Bug:A couple of critical Alt-key combinations do not work with some European Mac keyboard layouts.
For instance, the Italian Mac keyboard requires an Alt-key combination for the # symbol
and Swedish keyboards require an Alt-key combination for the $ symbol. We do not have the equipment to
work on this bug, but would appreciate any of our European friends doing so.
Start by checking mars.venus.editors.jeditsyntax.DefaultInputHandler.keyTyped().
We’ve been told that workarounds include using the generic non-highlighting editor (checkbox in editor settings dialog)
or switching to Windows/Linux. Or paste from the outside world, use alternate character then replace-all, etc.
Bug:The error message highlighter does not automatically select the code for the first assembly
error if the file containing the error is not open at the time of assembly (assemble-on-open, assemble-all).
Bug: The Screen Magnifier screen capture feature does not appear to work properly under Windows Vista.
Bug: There appears to be a memory leak in the Editor. Several different people have independently
reported the same behavior: severe slowdown in editor response during an extended interactive session.
If MARS is exited and restarted, this behavior disappears and the editor responds instantly to actions.
Not a bug, but documented here anyway: MIPS Branch instruction target addresses are represented by
the relative number of words to branch. With Release 3.4, this value reflects delayed branching,
regardless of whether the Delayed Branching setting is enabled or not.
The generated binary code for branches will now match that of examples in the Computer Organization
and Design textbook. This is a change from the past, and was made after extensive discussions
with several faculty adopters of MARS. Previously, the branch offset was 1 lower if the Delayed Branching setting
was enabled — the instruction label: beq $0,$0,label would generate 0x1000FFFF if
Delayed Branching was enabled and 0x10000000 if it was disabled. Now it will generate 0x1000FFFF in
either case. The simulator will always branch to the correct location; MARS does not allow assembly under one
setting and simulation under the other to occur.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Configuration Settings
Releases 3.0 and later include a Settings menu. The Editor and Exception Handler items launch a dialog but the rest are each
controlled by a checkbox for selecting or deselecting it (checked means true, unchecked means false). Settings and their default
values are:
Display the Labels window in the Execute tab. Default value is false. If selected, the Labels window,
which shows the name and associated address for each label defined in the program, will be
displayed to the right of the Text Segment.
Provide program arguments to the MIPS program. Default value is false. New in Release 3.5.
If selected, a text field will appear at the top of the Text Segment Display. Any argument values in this
text field at the time of program execution will be stored in MIPS memory prior to execution. The argument
count (argc) will be placed in register $a0, and the address of an array of null-terminated strings containing
the arguments (argv) will be placed in register $a1. These values are also available on the runtime stack ($sp).
Popup Dialog for input syscalls (5,6,7,8,12). New in Release 4.0. Default value is false. If selected, runtime console
input will be entered using popup dialogs (this was the only option prior to Release 4.0). Otherwise, input is entered
directly into the Run I/O tab at the bottom of the screen.
Display memory addresses in hexadecimal. Default value is true. If deselected, addresses will be displayed in decimal.
This setting can also be toggled in a checkbox on the lower border of the Data Segment Window.
Display memory and register contents in hexadecimal. Default value is true. If deselected, vlaues will be displayed in decimal.
This setting can also be toggled in a checkbox on the lower border of the Data Segment Window.
Assemble a file automatically as soon as it is opened, and initialize the File Open dialog with the most-recently opened file.
Default value is false. This is convenient if you use an external editor for composing your programs.
Assemble applies to all files in directory. Default value is false.
If selected, the file currently open in the
editor will become the “main” program in a multi-file assemble-and-link operation involving all
assembly files (*.asm; *.s) in its directory. If successful, execution will begin with the currently open file.
Assembler warnings are considered errors. Default value is false. New in Release 3.5.
If selected, the assemble operation will fail if any warnings are produced. At this time, all assembler warnings
relate to unrecognized or ignored directives. MARS may be able to assemble code produced by compilers for other MIPS
assemblers if this setting is deselected.
Initialize Program Counter to global ‘main’ if defined. Default value is false. New in Release 3.8.
If selected, the Program Counter will be initialized to the address of the text segment statement with the global label ‘main’ if it
exists. If it does not exist or if the setting is not selected, the Program Counter will be initialized to the default text segment
starting address.
Permit programs to use extended (pseudo) instructions and formats. Default value is true. This includes all memory addressing
modes other than the MIPS native mode (16 bit constant offset added to register content).
Assemble and execute programs using delayed branching. Default value is false. MIPS processors use delayed branches
as part of the pipelined design, but it can be confusing to programmers. With delayed branching, the instruction
following a branch or jump instruction will always be executed even if the branch condition is true! Assemblers
and, failing that, programmers, often deal with this by following branches and jumps with a “nop” instruction. The MARS
assembler does not insert a nop. When delayed branching was introduced in Release 3.3, the machine code generated
for a branch instruction depended on this setting since
its target value is relative to the Program Counter (PC-relative addressing). Although technically correct, this led to
confusion in the MARS community because the generated code did not match textbook examples. Starting with Release 3.4, the relative branching
offset is always calculated as if delayed branching is enabled even when it is not. The runtime simulation adjusts accordingly.
The Editor dialog. Use it to view and modify editor font settings. New with Release 3.3.
The Highlighting dialog. Use it to modify color and font settings for the highlighting of table items in the
Text Segment window, Data Segment window, Registers window, Coprocessor0 window and Coprocessor1 window.
Highlighting occurs during timed, stepped, and backstepped simulation. Color and font for normal (non-highlighted)
display can also be set separately for even-numbered and odd-numbered display rows but not individually by windows.
New with Release 3.6.
The Exception Handler dialog. It has the setting: Include this
exception handler in all assemble operations. Default value is false. If selected, a button to browse to the desired
file is enabled. New with Release 3.2
The Memory Configuration dialog. Use it to select from among available MIPS address space configurations.
The default configuration is derived from SPIM; it was only one available from MARS 1.0 through MARS 3.6.
New with Release 3.7.
Beginning with Release 3.2, settings are retained from one interactive session to the next. Settings are stored in a system-dependent
way as specified by java.util.prefs.Preferences. Windows systems use the Registry.
These settings are independent of command options given when using MARS from a command line;
neither affects the other. We anticipate future releases will include additional settings and preferences.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
Writing and Using MIPS exception handlers in MARS
Writing and Using MIPS exception handlers in MARS
Introduction
Exception handlers, also known as trap handlers or
interrupt handlers, can easily be incorporated into a MIPS program.
This guide is not intended to be comprehensive but provides the essential
information for writing and using exception handlers.
Although the same mechanism services all three, exceptions, traps
and interrupts are all distinct from each other.
Exceptions are caused by exceptional conditions that occur at runtime
such as invalid memory address references. Traps are caused by instructions
constructed especially for this purpose, listed below. Interrupts are
caused by external devices.
MARS partially but not completely implements the exception and interrupt
mechanism of SPIM.
Essential Facts
Some essential facts about writing and using exception handlers include:
MARS simulates basic elements of the MIPS32 exception mechanism.
The MIPS instruction set includes a number of instructions that
conditionally trigger a trap exception based on the relative values of two
registers or of a constant and a register:
teq, teqi (trap if equal),
tne, tnei (trap if not equal),
tge, tgeu,
tgei, tgeiu (trap if greater than or equal),
tlt, tltu,
tlti, tltiu (trap if less than)
When an exception occurs,
Coprocessor 0 register $12 (status) bit 1 is set
Coprocessor 0 register $13 (cause) bits 2-6 are set to the exception type (codes below)
Coprocessor 0 register $14 (epc) is set to the
address of the instruction that triggered the exception
If the exception was caused by an invalid memory address,
Coprocessor 0 register $8 (vaddr) is set to the invalid address.
Execution flow jumps to the MIPS
instruction at memory location 0x800000180. This address
in the kernel text segment (.ktext directive) is the
standard MIPS32 exception handler location. The only way to change
it in MARS is to change the MIPS memory configuration through
the Settings menu item Memory Configuration.
There are three ways to include an exception handler in a MIPS program
Write the exception handler in the same file as the regular
program. An example of this is presented below.
Write the exception handler in a separate file, store that file
in the same directory as the regular program, and select
the Settings menu item “Assemble all files in directory”
Write the exception handler in a separate file, store that file
in any directory, then open the “Exception Handler…” dialog
in the Settings menu, check the check box and browse to
that file.
If there is no instruction at location 0x800000180,
MARS will terminate the MIPS program with an appropriate error message.
The exception handler can return control to the program using
the eret instruction. This will place the EPC register $14 value into the
Program Counter, so be sure to increment $14 by 4 before returning
to skip over the instruction that caused the exception. The mfc0
and mtc0 instructions are used to read from and write to Coprocessor 0
registers.
Bits 8-15 of the Cause register $13 can also be used to indicate
pending interrupts. Currently this is used only by the Keyboard and
Display Simulator Tool, where bit 8 represents a keyboard interrupt
and bit 9 represents a display interrupt. For more details, see the
Help panel for that Tool.
Exception types declared in mars.simulator.Exceptions, but
not necessarily implemented, are ADDRESS_EXCEPTION_LOAD (4), ADDRESS_EXCEPTION_STORE (5),
SYSCALL_EXCEPTION (8),
BREAKPOINT_EXCEPTION (9),
RESERVED_INSTRUCTION_EXCEPTION (10),
ARITHMETIC_OVERFLOW_EXCEPTION (12),
TRAP_EXCEPTION(13),
DIVIDE_BY_ZERO_EXCEPTION (15),
FLOATING_POINT_OVERFLOW (16), and
FLOATING_POINT_UNDERFLOW (17).
When writing a non-trivial exception handler, your handler must first save
general purpose register contents, then restore them before returning.
Example of Trap Handler
The sample MIPS program below will immediately generate a trap exception because
the trap condition evaluates true, control jumps to the exception handler,
the exception handler returns control to the instruction following
the one that triggered the exception, then the program terminates normally.
.text
main:
teqi $t0,0 # immediately trap because $t0 contains 0
li $v0, 10 # After return from exception handler, specify exit service
syscall # terminate normally
# Trap handler in the standard MIPS32 kernel text segment
.ktext 0x80000180
move $k0,$v0 # Save $v0 value
move $k1,$a0 # Save $a0 value
la $a0, msg # address of string to print
li $v0, 4 # Print String service
syscall
move $v0,$k0 # Restore $v0
move $a0,$k1 # Restore $a0
mfc0 $k0,$14 # Coprocessor 0 register $14 has address of trapping instruction
addi $k0,$k0,4 # Add 4 to point to next instruction
mtc0 $k0,$14 # Store new address back into $14
eret # Error return; set PC to value in $14
.kdata
msg:
.asciiz “Trap generated”
Widely Used Exception Handler
The exception handler exceptions.s provided with
the SPIM simulator will assemble and run under MARS. The MARS
assembler will generate warnings because this program
contains directives that it does not
recognize, but as long as the setting “Assembler warnings are
considered errors” is not set this will not cause any
problems.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Using MARS through its Integrated Development Environment (IDE)
The IDE is invoked when MARS is run with no command arguments, e.g. java -jar mars.jar.
It may also be launched from a graphical interface by double-clicking the mars.jar icon
that represents this executable JAR file.
The IDE provides basic editing, assembling and execution capabilities. Hopefully it
is intuitive to use. Here are comments on some features.
Menus and Toolbar: Most menu items have equivalent toolbar icons.
If the function of a toolbar icon is not obvious, just hover the mouse over it and
a tool tip will soon appear. Nearly all menu items also have keyboard shortcuts.
Any menu item not appropriate in a given situation is disabled.
Editor: MARS includes two integrated text editors. The default editor, new
in Release 4.0, features syntax-aware color highlighting of most MIPS language elements
and popup instruction guides. The original, generic, text editor without these features
is still available and can be selected in the Editor Settings dialog. It supports a single
font which can be modified in the Editor Settings dialog.
The bottom border of either editor includes the cursor line
and column position and there is a checkbox to display line numbers.
They are displayed outside the editing area. If you use an external editor, MARS provides
a convenience setting that will automatically assemble a file as soon as it is opened. See
the Settings menu.
Message Areas: There are two tabbed message areas at the
bottom of the screen. The Run I/O tab is used at runtime for
displaying console output and entering console input as program execution progresses.
You have the option of entering console input into a pop-up dialog then echoes to the message area.
The MARS Messages tab is used for other messages such as assembly or
runtime errors and informational messages. You can click on assembly error messages to
select the corresponding line of code in the editor.
MIPS Registers: MIPS registers are displayed at all times, even
when you are editing and not running a program. While writing your program,
this serves as a useful reference for register names and their conventional
uses (hover mouse over the register name to see tool tips). There are three
register tabs: the Register File (integer registers $0 through $31 plus LO,
HI and the Program Counter), selected Coprocesor 0 registers (exceptions and
interrupts), and Coprocessor 1 floating point registers.
Assembly: Select Assemble from the Run menu or the
corresponding toolbar icon to assemble the file currently in the Edit tab.
Prior to Release 3.1, only one file could be assembled and run at a time.
Releases 3.1 and later provide a primitive Project capability. To use it, go to the
Settings menu and check Assemble operation applies to all
files in current directory. Subsequently, the assembler will assemble
the current file as the “main” program and also assemble all other assembly
files (*.asm; *.s)
in the same directory. The results are linked and if all these
operations were successful the program can be executed. Labels that are
declared global with the “.globl” directive may be referenced in any of the
other files in the project. There is also a setting that permits
automatic loading and assembly of a selected exception handler file. MARS uses
the MIPS32 starting address for exception handlers: 0x80000180.
Execution: Once a MIPS program successfully assembles, the
registers are initialized and three windows
in the Execute tab are filled: Text Segment, Data Segment,
and Program Labels. The major execution-time features are described below.
Labels Window: Display of the Labels window (symbol table) is
controlled through the Settings menu. When displayed, you can click on any label
or its associated address to center and highlight the contents of that address
in the Text Segment window or Data Segment window as appropriate.
The assembler and simulator are invoked from the IDE
when you select the Assemble, Go,
or Step operations from the Run menu or their corresponding
toolbar icons or keyboard shortcuts. MARS messages are displayed on the
MARS Messages tab of the message area at the bottom of the screen.
Runtime console input and output is handled in the Run I/O tab.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Introduction
MARS, the Mips Assembly and Runtime Simulator,
will assemble and simulate the execution of MIPS assembly language programs.
It can be used either from a command line or through its
integrated development environment (IDE). MARS is written in Java and
requires at least Release 1.5 of the J2SE Java Runtime Environment (JRE) to work.
It is distributed as an executable JAR file.
The MARS home page
is
http://www.cs.missouristate.edu/MARS/. This document is available for printing there.
As of Release 4.0, MARS assembles and simulates 155 basic instructions of the MIPS-32
instruction set, approximately 370 pseudo-instructions or instruction variations, the 17 syscall functions
mainly for console and file I/O defined by SPIM, and an additional 22 syscalls for other uses such as MIDI
output, random number generation and more. These are listed in separate help tabs. It supports seven
different memory addressing modes for load and store instructions: label, immed,
label+immed, ($reg), label($reg), immed($reg), and label+immed($reg), where immed
is an integer up to 32 bits. A setting is available to disallow use of pseudo-instructions
and extended instruction formats and memory addressing modes.
Our guiding reference in implementing the instruction set has been
Computer Organization and Design, Fourth Edition by Patterson and Hennessy,
Elsevier – Morgan Kaufmann, 2009. It summarizes the MIPS-32 instruction set
and pseudo-instructions in Figures 3.24 and 3.25 on pages 279-281, with details
provided in the text and in Appendix B. MARS Releases 3.2 and above implement all the instructions
in Appendix B and those figures except the delay branches from the left column of Figure 3.25.
It also implements all the system services (syscalls) and assembler directives
documented in Appendix B.
The MARS IDE provides program editing and assembling but its real
strength is its support for interactive debugging. The programmer can easily set and
remove execution breakpoints or step through execution forward or backward (undo) while
viewing and directly editing register and memory contents.
Questions and Comments
Send MARS questions and comments to
Dr. Pete Sanderson at or
Dr. Ken Vollmar at .
We will respond as quickly as we can but as teaching professors do not have as much time to work on
this project as we would like during the school year. We presented papers
on MARS at the 2005 CCSC:MW conference and the 2006 SIGCSE Technical Symposium. We presented
a tutorial session on MARS at the 2007 CCSC:CP conference and the Tutorial handout is available
from the MARS homepage.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Interactive Debugging Features
MARS provides many features for interactive debugging through its Execute pane.
Features include:
In Step mode, the next instruction to be simulated is highlighted and
memory content displays are updated at each step.
Select the Go option if you want to simulate continually.
It can also be used to continue simulation
from a paused (step, breakpoint, pause) state.
Breakpoints are easily set and reset using the check boxes next to each instruction displayed
in the Text Segment window. New in Release 3.8: You can temporarily suspend breakpoints
using Toggle Breakpoints in the Run menu or by clicking the “Bkpt” column header in the Text Segment
window. Repeat, to re-activate.
When running in the Go mode, you can select the simulation
speed using the Run Speed slider. Available speeds range
from .05 instructions per second (20 seconds between steps) up to 30
instructions per second, then above this offers an “unlimited” speed.
When using “unlimited” speed, code highlighting and memory display updating
are turned off while simulating (but it executes really fast!).
When a breakpoint is reached, highlighting and updating occur.
Run speed can be adjusted while the program is running.
When running in the Go mode, you can pause or stop
simulation at any time using the Pause or Stop features.
The former will pause execution and update the display, as if you
were stepping or at a breakpoint. The latter will terminate execution
and display final memory and register values. If running at “unlimited”
speed, the system may not respond immediately but it will respond.
You have the ability to interactively step “backward” through program execution
one instruction at a time to “undo” execution steps. It will buffer up to 2000 of the most
recent execution steps (this limit is stored in a properties file and can be changed).
It will undo changes made to MIPS memory, registers or condition flags,
but not console or file I/O. This should be a great debugging aid.
It is available anytime execution is paused and at termination (even if terminated due to
exception).
When program execution is paused or terminated, select Reset
to reset all memory cells and registers to their initial post-assembly values.
In fact, Reset is implemented by re-assembling the program.
Memory addresses and values, and register values, can be viewed in either decimal
or hexadecimal format. All data are stored in little-endian byte order (each
word consists of byte 3 followed by byte 2 then 1 then 0). Note that each word
can hold 4 characters of a string and those 4 characters will appear in the
reverse order from that of the string literal.
Data segment contents are displayed 512 bytes
at a time (with scrolling) starting with the data segment base address (0x10010000).
Navigation buttons are provided to change the display to the next
section of memory, the previous, or back to the initial (home) range. A combo box is
also provided to view memory contents in the vicinity of the stack pointer
(contents of MIPS $sp register), global pointer (contents of MIPS $gp register),
the heap base address (0x10040000), .extern globals (0x10000000),
the kernel data segment (0x90000000), or memory-mapped IO (MMIO, 0xFFFF0000).
Contents of any data segment memory word and almost any MIPS register can be modified by
editing its displayed table cell. Double-click on a cell to edit it and press the Enter key
when finished typing the new value. If you
enter an invalid 32-bit integer, the word INVALID appears in the cell
and memory/register contents are not affected. Values can be entered
in either decimal or hexadecimal (leading “0x”). Negative hexadecimal
values can be entered in either two’s complement or signed format. Note
that three of the integer registers (zero, program counter, return address)
cannot be edited.
Contents of cells representing floating point registers can be edited
as described above and will accept valid hexadecimal or decimal floating point
values. Since each double-precision register overlays two single-precision
registers, any changes to a double-precision register will affect one or both
of the displayed contents of its corresponding single-precision registers.
Changes to a single-precision register will affect the display of its
corresponding double-precision register. Values entered in hexadecimal
need to conform to IEEE-754 format. Values entered in decimal are entered
using decimal points and E-notation (e.g. 12.5e3 is 12.5 times 10 cubed).
Cell contents can be edited during program execution and once accepted
will apply starting with the next instruction to be executed.
Clicking on a Labels window entry will cause the location associated with
that label to be centered and highlighted in the Text Segment or Data Segment
window as appropriate. Note the Labels window is not displayed by default but
can be by selecting it from the Settings menu.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
Bug Reporting help contents
Bug Reporting and General Comments
The MARS web page is maintained at
http://www.cs.missouristate.edu/MARS/
and will contain updated releases, bug lists, etc.
For bug reporting and general comments, please send email to
Dr. Pete Sanderson at
with “MARS” in the
subject line. Please include sufficient information to recreate
the problem, and assembly programs if appropriate.
MARS 4.3 help contents
MARS – Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Using MARS from a command line.
MARS can be run from a command interpreter to assemble and execute a MIPS program in
a batch fashion.
The format for running MARS from a command line is:
java -jar mars.jar [options] program.asm [more files…] [ pa arg1 [more args…]]
Items in [ ] are optional. Valid options (not case sensitive, separated by spaces) are:
Option Description Since
a assemble only, do not simulate 1.0
aen terminate MARS with integer exit code n if assembly error occurs 4.1
ascii display memory or register contents interpreted as ASCII codes. (alternatives are dec and hex) 4.1
b brief – do not display register/memory address along with contents 2.2
d display MARS debugging statements (of interest mainly to MARS developer) 1.0
db MIPS delayed branching is enabled. 3.3
dec display memory or register contents in decimal. (alternatives are ascii and hex) 2.2
dump dump memory contents to file.
Option has 3 arguments, e.g. dump
and .data. Also supports an address range (see m-n below). Current supported dump formats are Binary, HexText, BinaryText, AsciiText. See examples below. 3.4
hex display memory or register contents in hexadecimal – this is the default. (alternatives are ascii and dec) 2.2
h display this help. Use this option by itself and with no filename. 1.0
ic display instruction count; the number of MIPS basic instructions ‘executed’ 4.3
mc set memory configuration.
Option has 1 argument, e.g. mc
possible values are Default for the default 32-bit address space, CompactDataAtZero for
a 32KB address space with data segment at address 0, or CompactTextAtZero
for a 32KB address space with text segment at address 0. 3.7
me display MARS messages to standard err instead of standard out. Allows you to separate MARS messages from MIPS program output using redirection. 4.3
nc copyright notice will not be displayed. Useful if redirecting or piping program output. 3.5
np pseudo-instructions or extended instruction formats are not permitted. 3.0
p project option – will assemble the specified file and all other assembly files (*.asm; *.s) in its directory. 3.1
sen terminate MARS with exit code n if simulate (run) error occurs 4.1
sm start execution at statement having global label ‘main’ if defined 3.8
we assembler warnings will be considered errors. 3.5
n where n is an integer maximum count of execution steps to simulate.
If 0, negative or not specified, there is no maximum. 1.0
$reg where reg is number or name (e.g. 5, t3, f10) of register whose
content to display at end of run. Even-numbered float register displays both float and double. Option may be repeated.
NOTE: Depending on your command shell, you may need to escape the $, e.g. \$t3 2.2
reg_name where reg_name is the name (e.g. t3, f10) of register whose
content to display at end of run. Even-numbered float register displays both float and double. Option may be repeated. $ not required. 2.2
m-n memory address range from m to n whose contents to
display at end of run. m and n may be decimal or hexadecimal (starts with 0x),
m <= n, both must be on word boundary. Option may be repeated. 2.2
pa program arguments - all remaining space-separated items are argument values provided to the MIPS
program via $a0 (argc - argument count) and $a1 (argv - address of array containing pointers to null-terminated argument
strings). The count is also at the top of the runtime stack ($sp), followed by the array.This option and its arguments must be the last items in the command! 3.5
Example: java -jar mars.jar h
Displays command options and explanations.
Example: java -jar mars.jar $s0 $s1 0x10010000-0x10010010 fibonacci.asm
Assemble and run fibonacci.asm. At the end of the run, display the contents of registers $s0 and
$s1, and the contents of memory locations 0x10010000 through 0x10010010. The contents are displayed in
hexadecimal format.
Example: java -jar mars.jar a fibonacci.asm
Assemble fibonacci.asm. Does not attempt to run the program, and the assembled code is not saved.
Example: java -jar mars.jar 100000 infinite.asm
Assemble and run infinite.asm for a maximum of 100,000 execution steps.
Example: java -jar mars.jar p major.asm
Assemble major.asm and all other files in the same directory, link the assembled code, and run starting with the first instruction in major.asm.
Example: java -jar mars.jar major.asm minor.asm sub.asm
Assemble and link major.asm, minor.asm and sub.asm. If successful, execution
will begin with the first instruction in major.asm.
Example: java -jar mars.jar a dump .text HexText hexcode.txt fibonacci.asm
Assemble fibonacci.asm without simulating (note use of 'a' option). At end of assembly, dump the text segment (machine code) to
file hexcode.txt in hexadecimal text format with one instruction per line.
Example: java -jar mars.jar dump 0x10010000-0x10010020 HexText hexcode.txt fibonacci.asm
Assemble and simulate fibonacci.asm. At end of simulation, dump the contents of addresses 0x1001000 to
0x10010020 to file hexdata.txt in hexadecimal text format with one word per line.
Example: java -jar mars.jar t0 process.asm pa counter 10
Assemble and run process.asm with two program argument values, "counter" and "10". It may retrieve the
argument count (2) from $a0, and the address of an array containing pointers to the strings "count" and "10",
from $a1. At the
end of the run, display the contents of register $t0.
The ability to run MARS from the command line is useful if you want to develop
scripts (macros) to exercise a given MIPS program under multiple scenarios
or if you want to run a number of different MIPS programs
such as for grading purposes.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
MARS 4.3 help contents
MARS - Mips Assembly and Runtime Simulator
Release 4.3
January 2013
Cool Capability: Plug-in Tools
Beginning with Release 2.0, MARS is capable of running externally-developed
software that interacts with an executing MIPS program and MIPS system
resources.
The requirements for such a program are:
It implements the mars.tools.MarsTool interface.
It is part of the mars.tools package.
It compiles cleanly into a ".class" file, stored in the mars/tools directory.
MARS will detect all qualifying tools upon startup and include them in
its Tools menu.
When a tool's menu item is selected, an instance of it will be created using its no-argument
constructor and its action() method will be invoked.
If no qualifying tools are found at MARS startup, the Tools menu will not
appear.
To use such a tool, load and assemble a MIPS program of interest then select the desired tool
from the Tools menu. The tool's window will open and depending on how it is written it will either
need to be "connected" to the MIPS program by clicking a button or will already be connected. Run
the MIPS program as you normally would, to initiate tool interaction with the executing program.
Beginning with Release 3.2, the abstract class mars.tools.AbstractMarsToolAndApplication
is included in the MARS distribution to provide
a substantial framework for implementing your own MARS Tool. A subclass that extends it by
implementing at least its two abstract methods can be run not only from the Tools menu but also
as a free-standing application that uses the MARS assembler and simulator in the background.
Several Tools developed by subclassing AbstractMarsToolAndApplication are included
with MARS: an Introduction to Tools, a Data Cache Simulator, a Memory Reference Visualizer, and
a Floating Point tool. The last one is quite useful even when not connected to a MIPS program
because it displays binary, hexadecimal and decimal representations for a 32 bit floating point
value; when any of them is modified the other two are updated as well.
Release 3.5 includes new tools, most notably a keyboard and display simulator that allows you
to perform memory-mapped I/O (MMIO) using polled and interrupt-driven techniques as described
in various references. Click its Help button for more details.
If you wish to develop your own MARS Tool, you will first need to extract the MARS distribution
from its JAR file if you have not already done so. All MARS tools must
be stored in the mars/tools directory.
Follow the Tutorial Materials link on the MARS homepage to find a tutorial
that covers development of MARS Tools.
Cool Capability: Extending the syscall set or reassigning syscall numbers
Beginning with Release 3.1, system calls (syscall instruction) are implemented using
a technique similar to that for tools. This permits anyone to add a new syscall by defining
a new class that meets these requirements:
It implements the mars.mips.instructions.syscalls.Syscall interface, or
extends the mars.mips.instructions.syscalls.AbstractSyscall class (which
provides default implementations of everything except the simulate() method).
It is part of the mars.mips.instructions.syscalls package.
It compiles cleanly into a ".class" file, stored in the
mars/mips/instructions/syscalls directory.
MARS will detect all qualifying syscall classes upon startup and the runtime simulator
will invoke them when the syscall instruction is simulated and register $v0
contains the corresponding integer service number.
Syscalls and syscall number assignments in MARs match those of SPIM for syscalls 1 through 17.
However if you wish to change syscall number assignments, you may do so by editing the
Syscall.properties file included in the release (this requires extraction from the JAR
file).
Follow the Tutorial Materials link on the MARS homepage to find a tutorial
that covers development of system calls.
Cool Capability: Extending the instruction set
You can add customized pseudo-instructions to the MIPS instruction set by editing
the PseudoOps.txt file included in the MARS distribution. Instruction
specification formats are explained in the file itself.
The specification of a pseudo-instruction is one line long. It consists of
an example of the instruction, constructed using
available instruction specification symbols, followed by a tab-separated
list of the basic MIPS instructions it will expand to. Each is an instruction template
constructed using
instruction specification symbols combined with special template
specification symbols. The latter permit substitution at program
assembly time of operands from the user's program into the expanded
pseudo-instruction.
PseudoOps.txt is read and processed at MARS startup, and error messages will
be produced if a specification is not correctly formatted. Note that if you wish to
edit it you first have to extract it from the JAR file.
Follow the Tutorial Materials link on the MARS homepage to find a tutorial
that covers modification of the pseudo-instruction set.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
MARS Release History and Notes
MARS - Mips Assembly and Runtime Simulator
Release 4.3
January 2013
MARS Release History
Mars 4.3 was released in January 2013. Enhancements and bug fixes include:
A macro facility has been developed by Mr. Mohammad Sekhavat. It is documented
in the MIPS help tab Macros.
A text substitution facility similar to #define has been developed using
the new .eqv directive. It is also documented in the MIPS help
tab Macros.
A text insertion facility similar to #include has been developed
using the new .include directive. It is also documented in the
MIPS help tab Macros. It permits a macro to be defined in one file and
included wherever needed.
Two new command mode options are now available: ic (Instruction Count) to
display a count of statements executed upon program termination, and me
(Messages to Error) to send MARS messages to System.err instead of System.out.
Allows you to separate MARS messages from MIPS output using redirection,
if desired. Redirect a stream in DOS with "1>” or “2>” for out and err,
respectively. To redirect both, use “> filename 2>&1”
Changed the default font family settings from Courier New to Monospaced.
This was in response to reports of Macs displaying left parentheses and vertical
bars incorrectly.
Changed the way operands for .byte and .half directives are range-checked.
It will now work like SPIM, which accepts any operand value but truncates high-end bits as
needed to fit the 1 (byte) or 2 (half) byte field. We’ll still issue a warning
but not an error.
For file reads, syscall 14, file descriptor 0 is always open for standard input. For file
writes, syscall 15, file descriptors 1 and 2 are always open for standard output and
standard error, respectively. This permits you to write I/O code that will
work either with files or standard I/O. When using the IDE, standard input and output
are performed in the Run I/O tab. File descriptors for regular files are
allocated starting with file descriptor 3.
Mars 4.2 was released in August 2011. Enhancements and bug fixes include:
Performing a Save operation on a new file will now use the file’s tab
label as the the default filename in the Save As dialog (e.g. mips1.asm).
Previously, it did not provide a default name.
When the “assemble all files in directory” setting is enabled (useful
for multi-file projects), you can now switch focus from one editor tab to another
without invalidating the current assemble operation. You can similarly open
additional project files. Previously, the open or tab selection would
invalidate the assemble operation and any paused execution state or
breakpoints would be lost.
The Read String syscall (syscall 8) has been fortified to prevent Java exceptions from occurring
when invalid values are placed in $a1.
Will now perform runtime test for unaligned doubleword address in
‘ldc1’ and ‘sdc1’ instructions and trap if not aligned.
Basic statements in the Text Segment display now renders immediates using
eight hex digits when displaying in hex. Previously it rendered only
four digits to conserve space. This led to confusing
results. For instance, -1 and 0xFFFF would both be displayed as 0xFFFF
but -1 expands to 0xFFFFFFFF and 0xFFFF expands to 0x0000FFFF.
Mars 4.1 was released in January 2011. Enhancements and bug fixes include:
The ability to view Data Segment contents interpreted as ASCII
characters has been added. You’ll find it on the bottom border of
the Data Segment Window as the checkbox “ASCII”. This overrides the
hexadecimal/decimal setting but only for the Data Segment display.
It does not persist across sessions. Cells cannot be edited in
ASCII format.
The Dump Memory feature in the File menu now provides an ASCII dump
format. Memory contents are interpreted as ASCII codes.
A command-mode option “ascii” has been added to display memory or
register contents interpreted as ASCII codes. It joins the existing
“dec” and “hex” options for displaying in decimal or hexadecimal,
respectively. Only one of the three may be specified.
The actual characters to display for all the ASCII display options
(data segment window, dump memory, command-mode option) are
specified in the config.properties file. This includes a “placeholder”
character to be displayed for all codes specified as non-printing.
ASCII codes 1-7, 14-31, and 127-255 are specified as
non-printing, but this can be changed in the properties file.
A new Help tab called Exceptions has been added. It explains the basics
of MIPS exceptions and interrupts as implemented in MARS. It also includes
tips for writing and using exception handlers.
A new Tool called Bitmap Display has been added. You can use it
to simulate a simple bitmap display. Each word of the specified address
space represents a 24 bit RGB color (red in bits 16-23, green in bits
8-15, blue in bits 0-7) and a word’s value will be displayed on the Tool’s
display area when the word is written to by the MIPS program. The base
address corresponds to the upper left corner of the display, and words are
displayed in row-major order. Version 1.0 is pretty basic, constructed
from the Memory Reference Visualization Tool code.
Additional operand formats
were added for the multiplication pseudo-instructions ‘mul’ and ‘mulu’.
The editor’s context-sensitive pop-up help will now appear below
the current line whenever possible. Originally it appeared either above,
centered to the side,
or below, depending on the current line’s vertical position in the editing
window. Displaying the pop-up above the current line tended to visually block
important information, since frequently a line of code uses the same operand
(especially registers) as the one immediately above it.
The editor will now auto-indent each new line when the Enter
key is pressed. Indentation of the new line will match that of the
line that precedes it. This feature can be disabled in the Editor settings dialog.
Two new command-mode options have been added. The “aeN” option, where
N is an integer, will terminate MARS with exit value N when an assemble error
occurs. The “seN” option will similarly terminate MARS with exit value
N when a simulation (MIPS runtime) error occurs. These options can be useful
when writing scripts for grading. Thanks to my Software
Engineering students Robert Anderson, Jonathan Barnes, Sean Pomeroy, and Melissa Tress
for designing and implementing these options.
An editor bug that affected Macintosh users has been fixed.
Command shortcuts, e.g. Command-s for save, did not
function and also inserted the character into the text.
A bug in Syscall 54 (InputDialogString) has been fixed. This syscall is
the GUI equivalent of Syscall 8 (ReadString), which follows the semantics
of UNIX ‘fgets’. Syscall 54 has been modified to also follow the ‘fgets’
semantics.
A bug in the Cache Simulator Tool has been fixed. The animator that
paints visualized blocks green or red (to show cache hit or miss) sometimes
paints the wrong block when set-associated caching is used. The underlying
caching algorithm is correct so the numeric results such as hit ratios
have always been correct. The animator has been corrected.
Thanks to Andreas Schafer and his student Carsten Demel for bringing this
to my attention.
Mars 4.0.1 was released in October 2010. It is a bug fix release to address three bugs.
The Edit and Execute tabs of the IDE, which were relocated in 4.0 from the top to the left edge and oriented vertically, have been
moved back to the top edge because Macintosh running Java 1.6 does not correctly render vertically-oriented tabs.
An exception may be thrown in multi-file assembles when the last file of the assembly is not the longest. This occurs
only when using the IDE, and has been corrected.
If an assemble operation fails due to a non-existing exception handler file (specified through the IDE Settings menu), unchecking
the exception handler setting does not prevent the same error from occuring on the next assemble. This has been corrected.
Mars 4.0 was released in August 2010. Enhancements and bug fixes include:
New Text Editor: Mars features an entirely new integrated text editor. It creates a new tab for each file
as it is opened. The editor now features language-aware
color highlighting of many MIPS assembly language elements with customizable
colors and styles. It also features automatic context-sensitive popup instruction
guides. There are two levels: one with help and autocompletion of instruction names
and a second with help information for operands. These and other new editor
features can be customized or disabled through
the expanded Editor Settings dialog. You can even revert to the previous
notepad-style editor if you wish (multi-file capability is retained).
The language-aware editor is based on
the open source jEdit Syntax Package (syntax.jedit.org). It is separate from
the assembler, so any syntax highlighting quirks will not affect assembly.
Improved Instruction Help: All the instruction examples in the help tabs (and new popup instruction guides)
now use realistic register names, e.g. $t1, $t2, instead of $1, $2. The instruction format
key displayed above the MIPS help tabs has been expanded to include explanations of the
various addressing modes for load and store instructions and pseudo-instructions.
Descriptions have been added to every example instruction and pseudo-instruction.
Improved Assembly Error Capability: If the assemble operation results in errors, the first error message
in the Mars Messages text area will be highighted and the corresponding erroneous instruction will be selected in the
text editor. In addition, you can click on any error message in the Mars Messages text area to select the corresponding
erroneous instruction in the text editor. The first feature does not select in every situation (such as when
assemble-on-open is set) but in the situations where it doesn’t work no harm is done plus
the second feature, clicking on error messages, can still be used.
Console input syscalls (5, 6, 7, 8, 12) executed in the IDE now receive input keystrokes directly in the Run I/O text
area instead of through a popup input dialog. Thanks to Ricardo Pascual for providing this feature!
If you prefer the popup dialogs, there is a setting to restore them.
The floor, ceil, trunc and round operations now all produce the MIPS default result 2^31-1 if the value is
infinity, NaN or out of 32-bit range. For consistency, the sqrt operations now produce the result NaN if the operand is negative
(instead of raising an exception). These cases are all consistent with FCSR (FPU Control and Status Register)
Invalid Operation flag being off. The ideal solution would be to simulate the FCSR register itself so all
MIPS specs for floating point instructions can be implemented, but that hasn’t happened yet.
The Basic column in the Text Segment Window now displays data and addresses in either decimal or
hexadecimal, depending on the current settings. Note that the “address” in branch instructions
is actually an offset relative to the PC, so is treated as data not address. Since data operands in
basic instructions are no more than 16 bits long, their hexadecimal display includes only 4 digits.
The Source column in the Text Segment Window now preserves tab spacing for a cleaner appearance (tab characters were previously not rendered).
Instruction mnemonics can now be used as labels, e.g. “b:”.
New syscall 36 will display an integer as an unsigned decimal.
A new tool, Digital Lab Sim, contributed by Didier Teifreto ( -fcomte.fr). This tool
features two seven-segment displays, a hexadecimal keypad, and a counter. It uses MMIO to explore
interrupt-driven I/O in an engaging setting. More information is available from its Help feature. Many thanks!
MARS 4.0 requires Java 1.5 (5.0) instead of 1.4. If this is an issue for you, let me know.
Mars 3.8 was released in January 2010. Enhancements and bug fixes include:
A new feature to temporarily suspend breakpoints you have previously set. Use it
when you feel confident enough to run your program without the breakpoints but not
confident enough to clear them! Use the Toggle Breakpoints item in the Run menu, or
simply click on the “Bkpt” column header in the Text Segment window. Repeat, to re-activate.
Two new Tools contributed by Ingo Kofler of Klagenfurt University in Austria.
One generates instruction statistics and the other simulates branch prediction using
a Branch History Table.
Two new print syscalls. Syscall 34 prints an integer in hexadecimal format.
Syscall 35 prints an integer in binary format. Suggested by Bernardo Cunha of Portugal.
A new Setting to control whether or not the MIPS program counter will be
initialized to the statement with global label ‘main’ if such a statement exists. If
the setting is unchecked or if checked and there is no ‘main’, the program counter
will be initialized to the default starting address. Release 3.7 was programmed
to automatically initialize it to the statement labeled ‘main’. This led to
problems with programs that use the standard SPIM exception handler exceptions.s
because it includes a short statement sequence at the default starting address
to do some initialization then branch to ‘main’. Under 3.7 the initialization
sequence was being bypassed. By default this setting is unchecked. This
option can be specified in command mode using the ‘sm’ (Start at Main) option.
Mars Tools that exist outside of Mars can now be included in the Tools
menu by placing them in a JAR and including it in a command that launches
the Mars IDE. For example: java -cp plugin.jar;Mars.jar Mars
Thanks to Ingo Kofler for thinking of this technique and providing the
patch to implement it.
Corrections and general improvements to the MIDI syscalls. Thanks to Max Hailperin
of Gustavus Adolphus College for supplying them.
Correction to an assembler bug that flagged misidentified invalid MIPS instructions
as directives.
Mars 3.7 was released in August 2009. Enhancements and bug fixes include:
A new feature for changing the address space configuration of the
simulated MIPS machine. The 32-bit address space configuration used by
all previous releases remains the default. We have defined two
alternative configurations for a compact 32KB address space. One starts the
text segment at address 0 and the other starts the data segment at address 0.
A 32KB address space permits commonly-used load/store pseudo-instructions
using labels, such as lw $t0,increment, to expand to a single basic
instruction since the label’s full address will fit into the 16-bit address
offset field without sign-extending to a negative value. This was done in response to
several requests over the years for smaller addresses and simplified expansions
to make assembly programs easier to comprehend. This release does not
include the ability to define your own customized configuration, although we
anticipate adding it in the future. It is available both through the command
mode (option mc) and the IDE.
See Memory Configuration… at the bottom of the Settings menu.
Related to the previous item: load and store pseudo-instructions of the form
lw $t0,label and lw $t0,label($t1) will expand to a single
instruction (addi for these examples) if the current memory configuration assures the
label’s full address will fit into the low-order 15 bits. Instructions
for which this was implemented are: la, lw, lh, lb, lhu, lbu, lwl, lwr, ll,
lwc1, ldc1, l.s, l.d, sw, sh, sb, swl, swr, sc, swc1, sdc1,
s.s, and s.d.
If a file contains a global statement label “main” (without quotes, case-sensitive), then execution will
begin at that statement regardless of its address. Previously, program execution
always started at the base address of the text segment. This will be handy for
multi-file projects because you no longer need to have the “main file” opened in
the editor in order to run the project. Note that main has to be declared global
using the .globl directive.
We have added a Find/Replace feature to the editor. This has been another
frequent request. Access it through the Edit menu or Ctrl-F. Look for major
enhancements to the editor in 2010!
The syscalls for Open File (13), Read from File (14), and Write to File (15)
all now place their return value into register $v0 instead of $a0. The table
in Computer Organization and Design’s Appendix B on SPIM specifies
$a0 but SPIM itself consistently uses $v0 for the return values.
Pseudo-instructions for div, divu, mulo, mulou, rem, remu, seq, sne, sge,
sgeu, sgt, sgtu, sle, sleu now accept a 16- or 32-bit immediate as their third operand.
Previously the third operand had to be a register.
Existing Tools were tested using reconfigured memory address space (see first item). Made some
adaptations to the Keyboard and Display Simulator Tool that allow it to be used for
Memory Mapped I/O (MMIO) even under the compact memory model, where the MMIO base address
is 0x00007f00 instead of 0xffff0000. Highlighting is not perfect in this scenario.
Bug Fix: The syscall for Open File (13) reversed the meanings of the
terms mode and flag. Flags are used to indicate the intended
use of the file (read/write). Mode is used to set file permissions in specific situations.
MARS implements selected flags as supported by Java file streams,
and ignores the mode if specified. For more details, see the Syscalls
tab under Help. The file example in that tab has been corrected.
Bug Fix: The assembler incorrectly generated an
error on Jump instructions located in the kernel text segment.
Bug Fix: The project (p) option in the command interface worked incorrectly
when MARS was invoked within the directory containing the files to be assembled.
Acknowledgement: The development of Release 3.7 was supported by a SIGCSE
Special Projects Grant.
Mars 3.6 was released in January 2009. Enhancements and bug fixes include:
We’ve finally implemented the most requested new feature: memory and register cells will
be highlighted when written to during timed or stepped simulation! The
highlighted memory/register cell thus represents the result of the instruction just completed.
During timed or stepped execution, this is NOT the highlighted instruction. During back-stepping,
this IS the highlighted instruction. The highlighted instruction is the next one
to be executed in the normal (forward) execution sequence.
In conjunction with cell highlighting, we’ve added the ability to customize the highlighting
color scheme and font. Select Highlighting in the Settings menu. In the resulting dialog,
you can select highlight background color, text color, and font for the different runtime tables (Text segment,
Data segment, Registers). You can also select them for normal, not just
highlighted, display by even- and odd-numbered row but not by table.
Cool new Labels Window feature: the table can be sorted in either ascending or descending
order based on either the Label (alphanumeric) or the Address (numeric) column. Just click on
the column heading to select and toggle between ascending (upright triangle) or descending
(inverted triangle). Addresses are sorted based on unsigned 32 bit values.
The setting persists across sessions.
The Messages panel, which includes the Mars Messages and Run I/O tabs, now displays using
a mono-spaced (fixed character width) font. This facilitates text-based graphics when running
from the IDE.
The Mars.jar distribution file now contains all files needed to produce
a new jar file. This will make it easier for you to expand the jar, modify source files,
recompile and produce a new jar for local use. CreatMarsJar.bat contains the jar instruction.
The Help window now includes a tab for Acknowledgements. This recognizes MARS contributors
and correspondents.
We’ve added a new system call (syscall) for generating MIDI tones synchronously, syscall 33.
The original MIDI call returns immediately when the tone is generated. The new one will not return
until the tone output is complete regardless of its duration.
The Data Segment display now scrolls 8 rows (half a table) rather than 16 when the
arrow buttons are clicked. This makes it easier to view a sequence of related cells that
happen to cross a table boundary. Note you can hold down either button for rapid scrolling.
The combo box with various data address boundaries also works better now.
Bug Fix: Two corrections to the Keyboard and Display Simulator Tool. Transmitter Ready bit was
not being reset based on instruction count
when running in the kernel text segment, and the Status register’s Exception Level bit was not
tested before enabling the interrupt service routine (could lead to looping if interrupts occur
w/i the interrupt service routine). Thanks to Michael Clancy and Carl Hauser for bringing these
to my attention and suggesting solutions.
Bug Fix: Stack segment byte addresses not on word boundaries were not being processed
correctly. This applies to little-endian byte order (big-endian is not enabled or tested in MARS).
Thanks to Saul Spatz for recognizing the problem and providing a patch.
Minor Bug Fixes include: Correcting a fault leading to failure when launching MARS in command
mode, clarifying assembler error message for too-few or too-many operands error, and correcting the
description of lhu and lbu instructions from “unaligned” to “unsigned”.
Mars 3.5 was released in August 2008. Major enhancements and bug fixes include:
A new Tool, the Keyboard and Display MMIO Simulator, that supports polled and interrupt-driven
input and output operations through Memory-Mapped I/O (MMIO) memory. The MIPS program writes to
memory locations which serve as registers for simulated devices. Supports keyboard input and a
simulated character-oriented display. Click the tool’s Help button for more details.
A new Tool, the Instruction Counter, contributed by MARS user Felipe Lessa. It will count the
number of MIPS instructions executed along with percentages for R-format, I-format, and J-format
instructions. Thanks, Felipe!
Program arguments can now be provided to the MIPS program at runtime, through either an IDE setting or
command mode. See the command mode “pa” option for more details on command mode operation. The argument
count (argc) is placed in $a0 and the address of an array of null-terminated strings containing the
arguments (argv) is placed in $a1. They are also available on the runtime stack ($sp).
Two related changes permit MARS to assemble source code produced by certain compilers such as gcc.
One change is to issue warnings rather than errors for unrecognized directives. MARS implements a
limited number of directives. Ignore these warnings at your risk, but the assembly can continue.
The second change is to allow statement labels to contain, and specifically begin with, ‘$’.
In command mode, final register values are displayed by giving the register name as an option.
Register names begin with ‘$’, which is intercepted by certain OS command shells. The
convention for escaping it is not uniform across shells. We have enhanced the options so now you can
give the register name without the ‘$’. For instance, you can use t0 instead of $t0 as the option.
You cannot refer to registers by number in this manner, since an integer option is interpreted by
the command parser as an instruction execution limit. Thanks to Lucien Chaubert for reporting
this problem.
Minor enhancements: The command mode dump feature has been extended to permit memory address ranges as well
as segment names. If you enter a new file extension into the Open dialog, the extension will remain available throughout
the interactive session. The data segment value repetition operator ‘:’ now
works for all numeric directives (.word, .half, .byte, .float, .double).
This allows you to initialize multiple consecutive memory locations to the same value. For
example:
ones: .half 1 : 8 # Store the value 1 in 8 consecutive halfwords
Major change: Hexadecimal constants containing less than 8 digits will be interpreted as though the
leading digits are 0’s. For instance, 0xFFFF will be interpreted as 0x0000FFFF, not 0xFFFFFFFF as before.
This was causing problems with immediate operands in the range 32768 through 65535, which were
misinterpreted by the logical operations as signed 32 bit values rather than unsigned 16 bit values.
Signed and unsigned 16 bit values are now distinguished by the tokenizer based on the prototype
symbols -100 for signed and 100 for unsigned (mainly logical operations).
Many thanks to Eric Shade of Missouri State University and Greg Gibeling of UC Berkeley for
their extended efforts in helping me address this situation.
Minor Bug Fixes: round.w.s and round.w.d have been modified to correctly perform IEEE
rounding by default. Thanks to Eric Shade for pointing this out.
Syscall 12 (read character) has been changed to leave the character in $v0 rather then $a0. The
original was based on a misprint in Appendix A of Computer Organization and Design.
MARS would not execute from the executable Mars.jar file if it was stored in a directory
path those directory names contain any non-ASCII characters. This has been corrected. Thanks to
Felipe Lessa for pointing this out and offering a solution.
MARS will now correctly detect the EOF condition when reading from a file using syscall 14.
Thanks to David Reimann for bringing this to our attention.
Mars 3.4.1 was released on 23 January 2008. It is a bug fix release to address two bugs.
One bug shows up in pseudo-instructions in which the expansion includes branch instructions. The fixed branch
offsets were no longer correct due to changes in the calculation of branch offsets in Release 3.4.
At the same time, we addressed the issue of expanding such pseudo-instructions when
delayed branching is enabled. Such expansions will now include a nop instruction following the
branch.
We also addressed an off-by-one error that occurred in generating the lui instruction in the
expansion of conditional branch pseudo-instructions whose second operand is a 32 bit immediate.
The expansions for a number of pseudo-instructions were modified to eliminate internal branches.
These and other expansions were also optimized for sign-extended loading of 16-bit immediate operands
by replacing the lui/ori or lui/sra sequence with addi. Pseudo-instructions affected by one
or both of these modifications include: abs, bleu, bgtu, beq, bne, seq, sge, sgeu, sle, sleu, sne,
li, sub and subi. These modifications were suggested by Eric Shade of Missouri State University.
Mars 3.4 was released in January 2008. Major enhancements are:
A new syscall (32) to support pauses of specified length in milliseconds (sleep) during simulated execution.
Five new syscalls (40-44) to support the use of pseudo-random number generators. An unlimited number of these generators are available,
each identified by an integer value, and for each you have the ability to: set the seed value, generate a 32 bit integer value from the Java
int range, generate a 32 bit integer value between 0 (inclusive) and a specified upper bound (exclusive), generate a 32-bit float value between 0 (inclusive) and 1 (exclusive),
and generate a 64-bit double value between 0 (inclusive) and 1 (exclusive). All are based on the java.util.Random class.
Ten new syscalls (50-59) to support message dialog windows and data input dialog windows. The latter are distinguished from
the standard data input syscalls in that a prompting message is specified as a syscall argument and displayed in the input dialog.
All are based on the javax.swing.JOptionPane class.
The capability to dump .text or .data memory contents to file in various formats. The dump can be performed
before or after program execution from either the IDE (File menu and toolbar) or from command mode. It can also be performed
during an execution pause from the IDE. Look for the “Dump Memory” menu item in the File menu, or the “dump” option in command
mode. A .text dump will include only locations containing an instruction. A .data dump will include a multiple
of 4KB “pages” starting at the segment base address and ending with the last 4KB “page” to be referenced by the
program. Current dump formats include pure binary (java.io.PrintStream.write() method), hexadecimal text with one word (32 bits)
per line, and binary text with one word per line. An interface, abstract class, and format loader have been developed to facilitate
development and deployment of additional dump formats. This capability was prototyped by Greg Gibeling of UC Berkeley.
Changed the calculation of branch offsets when Delayed Branching setting is disabled.
Branch instruction target addresses are represented by
the relative number of words to branch. With Release 3.4, this value reflects delayed branching,
regardless of whether the Delayed Branching setting is enabled or not.
The generated binary code for branches will now match that of examples in the Computer Organization
and Design textbook. This is a change from the past, and was made after extensive discussions
with several MARS adopters. Previously, the branch offset was 1 lower if the Delayed Branching setting
was enabled — the instruction label: beq $0,$0,label would generate 0x1000FFFF if
Delayed Branching was enabled and 0x10000000 if it was disabled. Now it will generate 0x1000FFFF in
either case. The simulator will always branch to the correct location; MARS does not allow assembly under one
setting and simulation under the other.
Bug fix: The mars.jar executable JAR file can now be run from a different working directory. Fix was
suggested by Zachary Kurmas of Grand Valley State University.
Bug fix: The problem of MARS hanging while assembling a pseudo-instruction with a label operand that
contains the substring “lab”, has been fixed.
Bug fix: No Swing-related code will be executed when MARS is run in command mode. This fixes a problem that
occurred when MARS was run on a “headless” system (no monitor). Swing is the Java library to support
programming Graphical User Interfaces. Fix was provided by Greg Gibeling of UC Berkeley.
The ‘\0’ character is now recognized when it appears in string literals.
MARS 3.3 was released in July 2007. Major enhancements are:
Support for MIPS delayed branching. All MIPS computers implement this but it can be confusing for
programmers, so it is disabled by default. Under delayed branching, the next instruction after a branch
or jump instruction will always be executed, even if the branch or jump is taken! Many
programmers and assemblers deal with this by inserting a do-nothing “nop” instruction after every branch or jump.
The MARS assembler does not insert a “nop”. Certain pseudo-instructions expand to
a sequence that includes a branch; such instructions will not work correctly under delayed
branching.
Delayed branching is available in command mode with the “db” option.
A new tool of interest mainly to instructors. The Screen Magnifier tool, when selected from
the Tools menu, can be used to produce an enlarged static image of the pixels that lie beneath it.
The image can be annotated by dragging the mouse over it to produce a scribble line. It enlarges
up to 4 times original size.
You now have the ability to set and modify the text editor font family, style and size. Select
“Editor…” from the Settings menu to get the dialog. Click the Apply button to see the new
settings while the dialog is still open. Font settings are retained from one session to the next.
The font family list begins with 6 fonts commonly used across platforms (selected from lists
found at www.codestyle.org), followed by a complete list.
Two of the six are monospaced fonts, two are proportional serif, and two are proportional sans serif.
The Labels window on the Execute pane, which displays symbol table information, has been
enhanced. When you click on a label name or its address, the contents of that address are
centered and highlighted in the Text Segment window or Data Segment window as appropriate. This makes
it easier to set breakpoints based on text labels, or to find the value stored at a label’s address.
If you re-order the columns in the Text Segment window by dragging a column header,
the new ordering will be remembered and applied from that time forward, even from one MARS session to the next. The Text Segment
window is where source code, basic code, binary code, code addresses, and breakpoints are displayed.
If a MIPS program terminates by “running off the bottom” of the program, MARS terminates, as
before, without an exception, but now will display a more descriptive termination message in the
Messages window. Previously, the termination message was the same as that generated after executing an Exit syscall.
A new system call (syscall) to obtain the system time is now available. It is service
30 and is not available in SPIM. Its value is obtained from the java.util.Date.getTime() method.
See the Syscall tab in MIPS help for further information.
A new system call (syscall) to produce simulated MIDI sound through your sound card is now available.
It is service 31 and is not available in SPIM. Its implementation is based on the
javax.sound.midi package. It has been tested only under Windows.
See the Syscall tab in MIPS help for further information.
MARS 3.2.1 was released in January 2007. It is a bug fix release that addresses the
following bug in 3.2: a NullPointerException occurs when MIPS program execution terminates
by “dropping off the bottom” of the program rather than by using one of the Exit system
calls.
MARS 3.2 was released in December 2006. Major enhancements are:
It fixes several minor bugs, including one that
could cause incorrect file sequencing in the Project feature.
It includes the
AbstractMarsToolAndApplication abstract class to serve as a framework for easily
constructing “tools” and equivalent free-standing applications that use the MARS assembler
and simulator engines (kudos to the SIGCSE 2006 audience member who suggested this capability!).
A subclass of this abstract class can be used both ways (tool or application).
The floating
point and data cache tools were elaborated in this release and a new tool for animating and
visualizing memory references was developed. All are AbstractMarsToolAndApplication
subclasses.
This release includes support for exception handlers: the kernel data and text
segments (.kdata and .ktext directives), the MIPS trap-related instructions, and the ability
to automatically include a selected exception (trap) handler with each assemble operation.
Items in the Settings menu became persistent with this release.
Added default assembly file extensions “asm” and “s” to the Config.properties file and used
those not only to filter files for the File Open dialog but also to filter them for the “assemble all”
setting.
Implemented a limit to the amount of text scrollable in the Mars Messages and Run I/O message
tabs – default 1 MB is set in the Config.properties file.
For programmer convenience, labels can now be referenced in the operand field of integer
data directives (.word, .half, .byte). The assembler will substitute the label’s address (low order
half for .half, low order byte for .byte).
For programmer convenience, character literals (e.g. ‘b’, ‘\n’, ‘\377’) can be used anywhere that integer literals are
permitted. The assembler converts them directly to their equivalent 8 bit integer value. Unicode is not supported and
octal values must be exactly 3 digits ranging from ‘\000’ to ‘\377’.
Replaced buttons for selecting Data Segment display base addresses with a combo box and added more
base addresses: MMIO (0xFFFF0000), .kdata (0x90000000), .extern (0x10000000).
MARS 3.1 was released in October 2006. The major issues and features are listed here:
It addressed several minor limits (Tools menu items
could not be run from the JAR file, non-standard shortcuts for Mac users, inflexible and
sometimes inappropriate sizing of
GUI components).
It changed the way SYSCALLs are implemented, to allow anyone to define
new customized syscall services without modifying MARS.
It added a primitive
Project capability through the “Assemble operation applies to all files in current directory.”
setting (also available as “p” option in command mode). The command mode also allows you
to list several file names not necessarily in the same directory to be assembled and linked.
Multi-file assembly also required implementing the “.globl” and “.extern” directives.
And although “Mars tools” are not officially part of MARS releases, MARS 3.1 includes the
initial versions of two tools: one for learning about floating point representation and another
for simulating data caching capability.
MARS 3.0 was released in August 2006, with one bug fix and two major additions.
The bug fix was corrected instruction format for the slti and sltiu instructions.
One major addition is a greatly expanded MIPS-32 instruction
set (trap instructions are the only significant ones to remain unimplemented). This includes, via
pseudo-instructions, all reasonable memory addressing modes for the load/store instructions.
The
second major addition is ability to interactively step “backward” through program execution
one instruction at a time to “undo” execution steps. It will buffer up to 2000 of the most
recent execution steps (this limit is stored in a properties file and can be changed).
It will undo changes made to MIPS memory, registers or condition flags,
but not console or file I/O. This should be a great debugging aid.
It is available anytime execution is paused and at termination (even if terminated due to
exception).
A number of IDE settings, described
above, are now available through the Settings menu.
MARS 2.2 was released in March 2006 with additional bug fixes and implemented command
line options (run MARS from command line with h option for command line help). This also coincides with our
SIGCSE 2006 paper “MARS: An Education-Oriented MIPS Assembly Language Simulator”.
MARS 2.1 was released in October 2005 with some bug fixes.
MARS 2.0 was released in September 2005. It incorporated significant
modifications to both the GUI and the assembler, floating point registers and instructions
most notably.
MARS 1.0 was released in January 2005 and
publicized during a poster presentation at SIGCSE 2005.
Dr. Ken Vollmar initiated MARS development in 2002 at Missouri State University. In
2003, Dr. Pete Sanderson of Otterbein College and his student Jason Bumgarner continued
implementation. Sanderson implemented the assembler and simulator that summer, and
the basic GUI the following summer, 2004.
The development of Releases 3.1 and 3.2 during fall 2006 was supported by the Otterbein College
sabbatical leave program. The development of Release 3.7 during summer 2009 was supported by
a SIGCSE Special Projects Grant.
This document is available for printing on the MARS home page
http://www.cs.missouristate.edu/MARS/.
The MIPS Instruction Set
The MIPS Instruction Set
Written by Walter Chang
Used by permission of the author. Copyright notice below.
Correct pronunciation is critical to get the cadence and beat to line
up; see the Pronunciation
Guide at the end of this document for how you should pronounce the various
assembler instructions.
To the tune of: The Major-General’s Song, from
Pirates of Penzance
Inspired by Tom Lehrer’s The Elements
There’s div and nor and mult and or and sllv sra
There’s xor and swl and beq and sll and bgezal jumps today
And multu, srav, and j combined with lhu and lui
And also slt and bne and instruction mthi
There’s sh and sb and lbu and blez and jal and then sltu
And of course there’s and and add and srl and sub and things to do
With the MIPS instructions I am very nimble on my feet
And though I sing assembler but I am really not a geek
There’s addu, ori, slti, swr, and bgez and jalr too
And loads of other fun instructions that were put in just for you
The MIPS instruction set is very simple to be memorized
Which will come in handy when you have your code to optimize!
There’s addi, divu, lh, rfe, and syscall, jr, mfcz
And mfc1, nop, and break, and bltzal with bczt
And srlv, xori, bltz, and lb, lwl, and addiu
andi, subu, lwr, and lwcz, mtcz, sltiu
There’s bczf, bgtz to branch if it’s greater than
And mflo and sw, these instructions are not any also-rans
There’s mtlo and swcz too, although I don’t know what they’re for
And lw – that’s obviously load word from mem bytes there are four
And now my song is through and I know all of my words by the heart
Which will come in handy when we have our projects multi-part
I live and breathe the MIPS instruction set on every night and day
Because the MIPS assembler will always try and work my way!
Pronunciation Guide
note: assembler is 4 syllables: ass-em-bell-er
The pronunciations suitable for this song are as follows:
div: div
nor: nor
mult: mult
or: or
sllv: s-l-l-v
sra: s-r-a
xor: zor
swl: swill
beq: beck
sll: sill
bgezal: beh-geezal
multu: mult-you
srav: srav (one syllable)
j: jay
lhu: l-h-u
lui: l-u-i
slt: slit
bne: b-n-e
mthi: m-t-high
sh: shih
sb: sib
lbu: l-b-u
blez: blez
jal: jal
sltu: slit-u
and: and
add: add
srl: srill
sub: sub
addu: add-u
ori: or-i
slti: slitty
swr: swir
bgez: beh-gez
jalr: jal-er
addi: addy
divu: div-u
lh: l-h
rfe: reef
syscall: sis-call
jr: junior
mfcz: miff-c-z
mfc1: m-f-c-one
nop: nopp
break: break
bltzal: blitz-al
bczt: b-c-z-t
srlv: s-r-l-v
xori: zorri
bltz: blitz
lb: l-b
lwl: lwill
addiu: addy-you
andi: andy
subu: sub-u
lwr: lwer
lwcz: lwiscz
mtcz: m-t-c-z
sltiu: slitty-u
bzcf: b-z-c-f
bgtz: b-g-t-z
mflo: em-flow
sw: swee
mtlo: m-t-low
swcz: swizzy
lw: lwee
http://www.cs.utexas.edu/users/walter/cs-songbook/instruction_set.html
Copyright Walter Chang. Permission granted for noncommercial use
as long as attribution is maintained. .edu
MIPS/SPIM Reference Card
CORE INSTRUCTION SET (INCLUDING PSEUDO INSTRUCTIONS)
MNE- FOR- OPCODE/
MON- MAT FUNCT
NAME IC OPERATION (in Verilog) (Hex)
Add add R R[rd]=R[rs]+R[rt] (1) 0/20
Add Immediate addi I R[rt]=R[rs]+SignExtImm (1)(2) 8
Add Imm. Unsigned addiu I R[rt]=R[rs]+SignExtImm (2) 9
Add Unsigned addu R R[rd]=R[rs]+R[rt] (2) 0/21
Subtract sub R R[rd]=R[rs]-R[rt] (1) 0/22
Subtract Unsigned subu R R[rd]=R[rs]-R[rt] 0/23
And and R R[rd]=R[rs]&R[rt] 0/24
And Immediate andi I R[rt]=R[rs]&ZeroExtImm (3) c
Nor nor R R[rd]=∼(R[rs]|R[rt]) 0/27
Or or R R[rd]=R[rs]|R[rt] 0/25
Or Immediate ori I R[rt]=R[rs]|ZeroExtImm (3) d
Xor xor R R[rd]=R[rs]ˆR[rt] 0/26
Xor Immediate xori I R[rt]=R[rs]ˆZeroExtImm e
Shift Left Logical sll R R[rd]=R[rs]�shamt 0/00
Shift Right Logical srl R R[rd]=R[rs]�shamt 0/02
Shift Right Arithmetic sra R R[rd]=R[rs]�>shamt 0/03
Shift Left Logical Var. sllv R R[rd]=R[rs]�R[rt] 0/04
Shift Right Logical Var. srlv R R[rd]=R[rs]�R[rt] 0/06
Shift Right Arithmetic Var. srav R R[rd]=R[rs]�>R[rt] 0/07
Set Less Than slt R R[rd]=(R[rs]
Branch Less Than Or Equal ble P if(R[rs]<=R[rt]) PC=PC+4+BranchAddr
Branch Greater Than Or Equal bge P if(R[rs]>=R[rt]) PC=PC+4+BranchAddr
Jump j J PC=JumpAddr (5) 2
Jump And Link jal J R[31]=PC+4; (5) 2
PC=JumpAddr
Jump Register jr R PC=R[rs] 0/08
Jump And Link Register jalr R R[31]=PC+4; 0/09
PC=R[rs]
Move move P R[rd]=R[rs]
Load Byte lb I R[rt]={24’b0, M[R[rs]+ZeroExtImm](7:0)} (3) 20
Load Byte Unsigned lbu I R[rt]={24’b0, M[R[rs]+SignExtImm](7:0)} (2) 24
Load Halfword lh I R[rt]={16’b0, M[R[rs]+ZeroExtImm](15:0)} (3) 25
Load Halfword Unsigned lhu I R[rt]={16’b0, M[R[rs]+SignExtImm](15:0)} (2) 25
Load Upper Imm. lui I R[rt]={imm,16’b0} f
Load Word lw I R[rt]=M[R[rs]+SignExtImm] (2) 23
Load Immediate li P R[rd]=immediate
Load Address la P R[rd]=immediate
Store Byte sb I M[R[rs]+SignExtImm] (7:0)=R[rt](7:0) (2) 28
Store Halfword sh I M[R[rs]+SignExtImm] (15:0)=R[rt](15:0) (2) 29
Store Word sw I M[R[rs]+SignExtImm]=R[rt] (2) 2b
REGISTERS
NAME NMBR USE STORE?
$zero 0 The Constant Value 0 N.A.
$at 1 Assembler Temporary No
$v0-$v1 2-3 Values for Function Results and
Expression Evaluation
No
$a0-$a3 4-7 Arguments No
$t0-$t7 8-15 Temporaries No
$s0-$s7 16-23 Saved Temporaries Yes
$t8-$t9 24-25 Temporaries No
$k0-$k1 26-27 Reserved for OS Kernel No
$gp 28 Global Pointer Yes
$sp 29 Stack Pointer Yes
$fp 30 Frame Pointer Yes
$ra 31 Return Address Yes
$f0-$f31 0-31 Floating Point Registers Yes
(1) May cause overflow exception
(2) SignExtImm ={16{immediate[15]},immediate }
(3) ZeroExtImm ={16{1b’0},immediate }
(4) BranchAddr = {14{immediate[15]},immediate,2’b0 }
(4) JumpAddr = {PC[31:28], address, 2’b0 }
(6) Operands considered unsigned numbers (vs. 2 s comp.)
BASIC INSTRUCTION FORMATS,
FLOATING POINT INSTRUCTION FORMATS
R 31 opcode 2625 rs 2120 rt 1615 rd 1110 shamt 65 funct 0
I 31 opcode 2625 rs 2120 rt 1615 immediate 0
J 31 opcode 2625 immediate 0
FR 31 opcode 2625 fmt 2120 ft 1615 fs 1110 fd 65 funct 0
FI 31 opcode 2625 fmt 2120 rt 1615 immediate 0
Copyright c© 2007 Jan Wätzig, Staatliche Studienakademie Dresden (www.ba-dresden.de/∼jan)
This reference card may be used for educational purposes only.
http://www.ba-dresden.de/~jan
ARITHMETIC CORE INSTRUCTION SET
MNE- FOR- OPCODE/
MON- MAT FMT/FT/
NAME IC OPERATION (in Verilog) FUNCT
Divide div R Lo=R[rs]/R[rt]; 0/–/–/1a
Hi=R[rs]%R[rt]
Divide Unsigned divu R Lo=R[rs]/R[rt]; (6) 0/–/–/1b
Hi=R[rs]%R[rt]
Multiply mult R {Hi,Lo}=R[rs]∗R[rt] 0/–/–/18
Multiply Unsigned multu R {Hi,Lo}=R[rs]∗R[rt] (6) 0/–/–/19
Branch On FP True bc1t FI if(FPCond) PC=PC+4+BranchAddr (4) 11/8/1/–
Branch On FP False bc1f FR if(!FPCond) PC=PC+4+BranchAddr (4) 11/8/0/–
FP Compare Single c.x.s∗ FR FPCond=(F[fs] op F[ft])?1:0 11/10/–/y
FP Compare Double c.x.d∗ FR FPCond=({F[fs],F[fs+1]} op {F[ft],F[ft+1]})?1:0 11/11/–/y
∗(x is eq, lt or le) (op is ==, < or <=) (y is 32, 3c or 3e)
FP Add Single add.s FR F[fd]=F[fs]+F[ft] 11/10/–/0
FP Divide Single div.s FR F[fd]=F[fs]/F[ft] 11/10/–/3
FP Multiply Single mul.s FR F[fd]=F[fs]∗F[ft] 11/10/–/2
FP Subtract Single sub.s FR F[fd]=F[fs]-F[ft] 11/10/–/1
FP Add Double add.d FR {F[fd],F[fd+1]}={F[fs],F[fs+1]}+{F[ft],F[ft+1]} 11/11/–/0
FP Divide Double div.d FR {F[fd],F[fd+1]}={F[fs],F[fs+1]}/{F[ft],F[ft+1]} 11/11/–/3
FP Multiply Double mul.d FR {F[fd],F[fd+1]}={F[fs],F[fs+1]}∗{F[ft],F[ft+1]} 11/11/–/2
FP Subtract Double sub.d FR {F[fd],F[fd+1]}={F[fs],F[fs+1]}-{F[ft],F[ft+1]} 11/11/–/1
Move From Hi mfhi R R[rd]=Hi 0/–/–/10
Move From Lo mflo R R[rd]=Lo 0/–/–/12
Move From Control mfc0 R R[rd]=CR[rs] 16/0/–/0
Load FP Single lwc1 I F[rt]=M[R[rs]+SignExtImm] (2) 31/–/–/–
Load FP Double ldc1 I F[rt]=M[R[rs]+SignExtImm]; (2) 35/–/–/–
F[rt+1]=M[R[rs]+SignExtImm+4]
Store FP Single swc1 I M[R[rs]+SignExtImm]=F[rt] (2) 39/–/–/–
Store FP Double sdc1 I M[R[rs]+SignExtImm]=F[rt]; (2) 3d/–/–/–
M[R[rs]+SignExtImm+4]=F[rt+1]
ASSEMBLER DIRECTIVES
.data [addr]∗ Subsequent items are stored in the data segment
.kdata [addr]∗ Subsequent items are stored in the kernel data segment
.ktext [addr]∗ Subsequent items are stored in the kernel text segment
.text [addr]∗ Subsequent items are stored in the text
∗ starting at [addr] if specified
.ascii str Store string str in memory, but do not null-terminate it
.asciiz str Store string str in memory and null-terminate it
.byte b1, . . . , bn Store the n values in successive bytes of memory
.double d1, . . . , dn Store the n floating-point double precision numbers in successive memory locations
.float f1, . . . , f1 Store the n floating-point single precision numbers in successive memory locations
.half h1, . . . , hn Store the n 16-bit quantities in successive memory halfwords
.word w1, . . . , wn Store the n 32-bit quantities in successive memory words
.space n Allocate n bytes of space in the current segment
.extern symsize Declare that the datum stored at sym is size bytes large and is a global label
.globl sym Declare that label sym is global and can be referenced from other files
.align n Align the next datum on a 2n byte boundary, until the next .data or .kdata directive
.set at Tells SPIM to complain if subsequent instructions use $at
.set noat prevents SPIM from complaining if subsequent instructions use $at
SYSCALLS
SERVICE $v0 ARGS RESULT
print_int 1 integer $a0
print_float 2 float $f12
print_double 3 double $f12/$f13
print_string 4 string $a0
read_int 5 integer (in $v0)
read_float 6 float (in $f0)
read_double 7 double (in $f0)
read_string 8 buf $a0, buflen $a1
sbrk 9 amount $a address (in $v0)
exit 10
EXCEPTION CODES
Number Name Cause of Exception
0 Int Interrupt (hardware)
4 AdEL Address Error Exception (load or instruction
fetch)
5 AdES Address Error Exception (store)
6 IBE Bus Error on Instruction Fetch
7 DBE Bus Error on Load or Store
8 Sys Syscall Exception
9 Bp Breakpoint Exception
10 RI Reserved Instruction Exception
11 CpU Coprocessor Unimplemented
12 Ov Arithmetic Overflow Exception
13 Tr Trap
15 FPE Floating Point Exception
[1] Patterson, David A; Hennessy, John J.: Computer Organization and Design, 3rd Edition. Morgan Kaufmann Publishers. San Francisco, 2005.
Copyright c© 2007 Jan Wätzig, Staatliche Studienakademie Dresden (www.ba-dresden.de/∼jan)
This reference card may be used for educational purposes only.
http://www.ba-dresden.de/~jan
MIPS syscall functions available in MARS
SYSCALL functions available in MARS
Introduction
A number of system services, mainly for input and output, are available for use by
your MIPS program. They are described in the table below.
MIPS register contents are not affected by a system call, except for result registers
as specified in the table below.
How to use SYSCALL system services
Step 1. Load the service number in register $v0.
Step 2. Load argument values, if any, in $a0, $a1, $a2, or $f12 as specified.
Step 3. Issue the SYSCALL instruction.
Step 4. Retrieve return values, if any, from result registers as specified.
Example: display the value stored in $t0 on the console
li $v0, 1 # service 1 is print integer
add $a0, $t0, $zero # load desired value into argument register $a0, using pseudo-op
syscall
Table of Available Services
Service Code in $v0 Arguments Result
print integer 1 $a0 = integer to print
print float 2 $f12 = float to print
print double 3 $f12 = double to print
print string 4 $a0 = address of null-terminated string to print
read integer 5 $v0 contains integer read
read float 6 $f0 contains float read
read double 7 $f0 contains double read
read string 8 $a0 = address of input buffer
$a1 = maximum number of characters to read See note below table
sbrk (allocate heap memory) 9 $a0 = number of bytes to allocate $v0 contains address of allocated memory
exit (terminate execution) 10
print character 11 $a0 = character to print See note below table
read character 12 $v0 contains character read
open file 13 $a0 = address of null-terminated string containing filename
$a1 = flags
$a2 = mode $v0 contains file descriptor (negative if error). See note below table
read from file 14 $a0 = file descriptor
$a1 = address of input buffer
$a2 = maximum number of characters to read $v0 contains number of characters read (0 if end-of-file, negative if error). See note below table
write to file 15 $a0 = file descriptor
$a1 = address of output buffer
$a2 = number of characters to write $v0 contains number of characters written (negative if error). See note below table
close file 16 $a0 = file descriptor
exit2 (terminate with value) 17 $a0 = termination result See note below table
Services 1 through 17 are compatible with the SPIM simulator, other than Open File (13) as described in the Notes below the table.
Services 30 and higher are exclusive to MARS.
time (system time) 30 $a0 = low order 32 bits of system time
$a1 = high order 32 bits of system time. See note below table
MIDI out 31 $a0 = pitch (0-127)
$a1 = duration in milliseconds
$a2 = instrument (0-127)
$a3 = volume (0-127) Generate tone and return immediately. See note below table
sleep 32 $a0 = the length of time to sleep in milliseconds. Causes the MARS Java thread to sleep for (at least) the specified number of milliseconds. This timing will not be precise, as the Java implementation will add some overhead.
MIDI out synchronous 33 $a0 = pitch (0-127)
$a1 = duration in milliseconds
$a2 = instrument (0-127)
$a3 = volume (0-127) Generate tone and return upon tone completion. See note below table
print integer in hexadecimal 34 $a0 = integer to print Displayed value is 8 hexadecimal digits, left-padding with zeroes if necessary.
print integer in binary 35 $a0 = integer to print Displayed value is 32 bits, left-padding with zeroes if necessary.
print integer as unsigned 36 $a0 = integer to print Displayed as unsigned decimal value.
(not used) 37-39
set seed 40 $a0 = i.d. of pseudorandom number generator (any int).
$a1 = seed for corresponding pseudorandom number generator. No values are returned. Sets the seed of the corresponding underlying Java pseudorandom number generator (java.util.Random). See note below table
random int 41 $a0 = i.d. of pseudorandom number generator (any int). $a0 contains the next pseudorandom, uniformly distributed int value from this random number generator's sequence. See note below table
random int range 42 $a0 = i.d. of pseudorandom number generator (any int).
$a1 = upper bound of range of returned values. $a0 contains pseudorandom, uniformly distributed int value in the range 0 See note below table
random float 43 $a0 = i.d. of pseudorandom number generator (any int). $f0 contains the next pseudorandom, uniformly distributed float value in the range 0.0 See note below table
random double 44 $a0 = i.d. of pseudorandom number generator (any int). $f0 contains the next pseudorandom, uniformly distributed double value in the range 0.0 See note below table
(not used) 45-49
ConfirmDialog 50 $a0 = address of null-terminated string that is the message to user $a0 contains value of user-chosen option
0: Yes
1: No
2: Cancel
InputDialogInt 51 $a0 = address of null-terminated string that is the message to user $a0 contains int read
$a1 contains status value
0: OK status
-1: input data cannot be correctly parsed
-2: Cancel was chosen
-3: OK was chosen but no data had been input into field
InputDialogFloat 52 $a0 = address of null-terminated string that is the message to user $f0 contains float read
$a1 contains status value
0: OK status
-1: input data cannot be correctly parsed
-2: Cancel was chosen
-3: OK was chosen but no data had been input into field
InputDialogDouble 53 $a0 = address of null-terminated string that is the message to user $f0 contains double read
$a1 contains status value
0: OK status
-1: input data cannot be correctly parsed
-2: Cancel was chosen
-3: OK was chosen but no data had been input into field
InputDialogString 54 $a0 = address of null-terminated string that is the message to user
$a1 = address of input buffer
$a2 = maximum number of characters to read See Service 8 note below table
$a1 contains status value
0: OK status. Buffer contains the input string.
-2: Cancel was chosen. No change to buffer.
-3: OK was chosen but no data had been input into field. No change to buffer.
-4: length of the input string exceeded the specified maximum. Buffer contains the maximum allowable input string plus a terminating null.
MessageDialog 55 $a0 = address of null-terminated string that is the message to user
$a1 = the type of message to be displayed:
0: error message, indicated by Error icon
1: information message, indicated by Information icon
2: warning message, indicated by Warning icon
3: question message, indicated by Question icon
other: plain message (no icon displayed)
N/A
MessageDialogInt 56 $a0 = address of null-terminated string that is an information-type message to user
$a1 = int value to display in string form after the first string N/A
MessageDialogFloat 57 $a0 = address of null-terminated string that is an information-type message to user
$f12 = float value to display in string form after the first string N/A
MessageDialogDouble 58 $a0 = address of null-terminated string that is an information-type message to user
$f12 = double value to display in string form after the first string N/A
MessageDialogString 59 $a0 = address of null-terminated string that is an information-type message to user
$a1 = address of null-terminated string to display after the first string N/A
NOTES: Services numbered 30 and higher are not provided by SPIM
Service 8 - Follows semantics of UNIX 'fgets'. For specified length n, string can be no longer than n-1. If less than that, adds newline to end. In either case, then pads with null byte If n = 1, input is ignored and null byte placed at buffer address. If n < 1, input is ignored and nothing is written to the buffer.
Service 11 - Prints ASCII character corresponding to contents of low-order byte.
Service 13 - MARS implements three flag values: 0 for read-only, 1 for write-only with create, and 9 for write-only with create and append. It ignores mode. The returned file descriptor will be negative if the operation failed. The underlying file I/O
implementation uses java.io.FileInputStream.read() to read and java.io.FileOutputStream.write() to write. MARS maintains file descriptors internally and allocates them starting with 3. File descriptors 0, 1 and 2 are
always open for: reading from standard input, writing to standard output, and writing to standard error, respectively (new in release 4.3).
Services 13,14,15 - In MARS 3.7, the result register was changed to $v0 for SPIM compatability. It was previously $a0 as erroneously printed
in Appendix B of Computer Organization and Design,.
Service 17 - If the MIPS program is run under control of the MARS graphical interface (GUI), the exit code in $a0 is ignored.
Service 30 - System time comes from java.util.Date.getTime() as milliseconds since 1 January 1970.
Services 31,33 - Simulate MIDI output through sound card. Details below.
Services 40-44 use underlying Java pseudorandom number generators provided by the java.util.Random class. Each stream (identified
by $a0 contents) is modeled by a different Random object. There are no default seed values, so use the Set Seed service (40) if
replicated random sequences are desired.
Example of File I/O
The sample MIPS program below will open a new file for writing, write text to it from a memory buffer, then close it. The file will be created in the
directory in which MARS was run.
# Sample MIPS program that writes to a new file.
# by Kenneth Vollmar and Pete Sanderson
.data
fout: .asciiz "testout.txt" # filename for output
buffer: .asciiz "The quick brown fox jumps over the lazy dog."
.text
###############################################################
# Open (for writing) a file that does not exist
li $v0, 13 # system call for open file
la $a0, fout # output file name
li $a1, 1 # Open for writing (flags are 0: read, 1: write)
li $a2, 0 # mode is ignored
syscall # open a file (file descriptor returned in $v0)
move $s6, $v0 # save the file descriptor
###############################################################
# Write to file just opened
li $v0, 15 # system call for write to file
move $a0, $s6 # file descriptor
la $a1, buffer # address of buffer from which to write
li $a2, 44 # hardcoded buffer length
syscall # write to file
###############################################################
# Close the file
li $v0, 16 # system call for close file
move $a0, $s6 # file descriptor to close
syscall # close file
###############################################################
Using SYSCALL system services 31 and 33: MIDI output
These system services are unique to MARS, and provide a means of producing sound. MIDI output is
simulated by your system sound card, and the simulation is provided by the javax.sound.midi
package.
Service 31 will generate the tone then immediately return. Service 33 will generate the tone then
sleep for the tone's duration before returning. Thus it essentially combines services 31 and 32.
This service requires four parameters as follows:
pitch ($a0)
Accepts a positive byte value (0-127) that denotes a pitch as it would
be represented in MIDI
Each number is one semitone / half-step in the chromatic scale.
0 represents a very low C and 127 represents a very high G (a standard
88 key piano begins at 9-A and ends at 108-C).
If the parameter value is outside this range, it applies a default value 60 which is the same as middle C on a piano.
From middle C, all other pitches in the octave are as follows:
61 = C# or Db
62 = D
63 = D# or Eb
64 = E or Fb
65 = E# or F
66 = F# or Gb
67 = G
68 = G# or Ab
69 = A
70 = A# or Bb
71 = B or Cb
72 = B# or C
To produce these pitches in other octaves, add or subtract multiples
of 12.
duration in milliseconds ($a1)
Accepts a positive integer value that is the length of the tone in milliseconds.
If the parameter value is negative, it applies a default value of one second (1000 milliseconds).
instrument ($a2)
Accepts a positive byte value (0-127) that denotes the General MIDI
"patch" used to play the tone.
If the parameter is outside this range, it applies a default value 0 which is an Acoustic Grand Piano.
General MIDI standardizes the number associated with each possible instrument
(often referred to as program change numbers), however it does
not determine how the tone will sound. This is determined by the synthesizer
that is producing the sound. Thus a Tuba (patch 58) on one computer
may sound different than that same patch on another computer.
The 128 available patches are divided into instrument families of 8:
0-7 Piano 64-71 Reed
8-15 Chromatic Percussion 72-79 Pipe
16-23 Organ 80-87 Synth Lead
24-31 Guitar 88-95 Synth Pad
32-39 Bass 96-103 Synth Effects
40-47 Strings 104-111 Ethnic
48-55 Ensemble 112-119 Percussion
56-63 Brass 120-127 Sound Effects
Note that outside of Java, General MIDI usually refers to patches 1-128.
When referring to a list of General MIDI patches, 1 must be subtracted
to play the correct patch. For a full list of General MIDI instruments,
see
www.midi.org/about-midi/gm/gm1sound.shtml.
The General MIDI channel 10 percussion key map is not relevant to the
toneGenerator method because it always defaults to MIDI channel 1.
volume ($a3)
Accepts a positive byte value (0-127) where 127 is the loudest and 0
is silent. This value denotes MIDI velocity which refers to the initial
attack of the tone.
If the parameter value is outside this range, it applies a default value 100.
MIDI velocity measures how hard a note on (or note off)
message is played, perhaps on a MIDI controller like a keyboard. Most
MIDI synthesizers will translate this into volume on a logarithmic scale
in which the difference in amplitude decreases as the velocity value increases.
Note that velocity value on more sophisticated synthesizers can also
affect the timbre of the tone (as most instruments sound different when
they are played louder or softer).
System service 31 was developed and documented by Otterbein student Tony Brock in July 2007.
MARS Acknowledgements
MARS Acknowledgements
Updated 3 January 2013
Pete and Ken would like to acknowledge the many helpful contributors to MARS.
It has succeeded beyond our wildest expectations and for this we are most grateful.
Its success would not be possible without your feedback, suggestions and assistance!
We are pleased to recognize these contributions to release 4.3:
Mohammad Sekhavat, a student from Sharif University, who developed the
macro capability. We think you will find it quite useful.
We also appreciate the contributions others have made to previous releases:
Tom Bradford, Slava Pestov and others, who developed the jEdit Syntax Package (syntax.jedit.org)
at the heart of the syntax-aware color highlighting editor. It is old but the licensing is right and it was
written for embedding into Java applications.
Greg Gibeling of UC Berkeley, who introduced capabilities into his customized version
of MARS that have subsequently been expanded and integrated into our release.
These include the ability to dump MIPS memory contents to file and parser improvements
to distinguish signed from unsigned hexadecimal constants.
Eric Shade of Missouri State University, who suggested several improvements to
pseudo-instruction expansions such as elimination of internal branches
and improvements to the sign-extended loading of 16-bit immediate operands.
Saul Spatz of the University of Missouri Kansas City, who noticed and provided a solution
for a flaw in the calculation of byte-oriented addresses in the simulated MIPS memory stack segment.
He has also suggested several improvements that we have implemented.
Zachary Kurmas of Grand Valley State University, who suggested several bug fixes and
who encorporated MARS into his own successful JLSCircuitTester digital logic simulator software.
Felipe Lessa, who contributed the Instruction Counter tool and suggested a solution
for the problem of MARS inability to launch when stored in a directory whose name
contained non-ASCII characters.
Carl Hauser of Washington State University, who pointed out and provided a solution to
a flaw in the Keyboard and Display Simulator Tool in how it used the Exception Level bit in the
Coprocessor1 Status register. Also thanks to Michael Clancy of UC Berkeley for pointing out a flaw in the
tool's mechanism for resetting the Transmit Ready bit when operating in kernel memory.
Dave Poplawski of Michigan Technological University, for his assistance in working through
some issues with signed/unsigned constants and with output redirection.
Ingo Kofler of Klagenfurt University in Austria, who contributed two Tools: a tool
to collect Instruction Statistics, and a tool to simulate branch prediction
with a Branch History Table.
Brad Richards and Steven Canfield from the University of Puget Sound, for providing
a technique that improved file loading performance.
Jan Schejbal and Jan-Peter Kleinhans of Darmstadt technical university in Germany, for
suggesting and providing a patch to display Run I/O text in a constant-width font.
Max Hailperin of Gustavus Adolphus College, who made several
improvements to the MIDI syscalls.
David Patterson of UC Berkeley, for making time in his busy schedule for Ken's demo of MARS.
Denise Penrose and Nate McFadden of Morgan Kaufmann Publishers, for their
assistance as editors of
Computer Organization and Design.
Ricardo Pascual of University of Murcia in Spain, who contributed the code to permit input syscall
keystrokes to be typed directly into the Run I/O window instead of through a popup dialog.
Didier Teifreto of Université de Franche-Comté in France, who contributed the Digital Lab Sim tool.
Facundo Agriel of the University of Illinois at Chicago, who added font selection to the Keyboard and
Display Simulator tool.
Patrik Lundin for contributing the code to add scrolling to the keyboard and display simulator.
Otterbein students Robert Anderson, Jonathan Barnes, Sean Pomeroy and Melissa Tress
for contributing the new command-mode options for specifying MARS exit codes when
assembly or simulation errors occur. This was sparked by a comment from
Zheming Jim of the University of South Carolina.
The unknown audience member at our SIGCSE 2006 conference presentation,
who suggested that MARS would also be useful running in the background
in support of an external application. This led directly to our development of the Tools
framework and API that truly distinguishes MARS from all other MIPS simulators.
We would also like to recognize many others who have contacted us to point out bugs, suggest improvements, or engaged us in
interesting correspondence. The bugs have been addressed and the
improvements either implemented or added to our wish list. Correspondents include:
William Bai,
Miguel Barao,
James Baltimore,
Jared Barneck,
Bruce Barton,
Battista Biggio,
Carl Burch,
Ram Busani,
Gene Chase,
Lucien Chaubert,
David Chilson,
Sangyeun Cho,
Donald Cooley,
Bernardo Cunha,
John Donaldson,
Abhik Ghosh,
Michael Grant,
Thomas Hain,
John Ham,
Kurtis Hardy,
Justin Harlow,
David Harris,
Bill Hsu,
Pierre von Kaenel,
Amos Kittelson,
klondike,
Geoffrey Knauth,
Sudheer Kumar,
Jeremie Lumbroso,
Paul Lynch,
Richard McKenna,
William McQuain,
Adam Megacz,
Alessandro Montano,
Judy Mullins,
William Obermeyer,
Ivor Page,
Gustavo Patino,
Christoph von Praun,
Klaus Ramelow,
David Reimann,
Patricia Renault,
André Rodrigues,
Robert Roos,
Joseph Roth,
Marco Salinas,
Peter Schulthess,
Ofer Shaham,
Scott Sigman,
Sasha Solganik,
Timothy Stanley,
Gene Stark,
Josh Steinhurst,
Michelle Strout,
Didier Teifreto,
Mitchell Theys,
Massimo Tivoli,
Dwayne Towell,
Duy Truong,
Judah Veichselfish,
Vineeth,
Daniel Walker,
Janyce Weibe,
Ben West,
and
Armin Zundel.
The Mars.jar file contains all source code and, starting with Release 3.6,
the files necessary to generate a new jar file should you wish to make changes to
the source and repackage it for your own use. Let us know if you do this, so we
can consider your changes for the general release.
Thanks to everyone who uses MARS. Keep those cards and letters coming!
mars/tools/DigitalLabSim.java
mars/tools/DigitalLabSim.javapackage mars.tools;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.*;
import javax.swing.Timer;
import mars.Globals;
import mars.mips.hardware.AddressErrorException;
import mars.mips.hardware.Coprocessor0;
import mars.mips.hardware.Memory;
import mars.mips.hardware.MemoryAccessNotice;
import mars.simulator.Exceptions;
@SuppressWarnings("serial")
/* Add these two lines in exceptions.java file
* public static final int EXTERNAL_INTERRUPT_TIMER = 0x00000100; //Add for digital Lab Sim
* public static final int EXTERNAL_INTERRUPT_HEXA_KEYBOARD = 0x00000200;// Add for digital Lab Sim
*/
/*
* Didier Teifreto LIFC Université de franche-Comté www.lifc.univ-fcomte.fr/~teifreto
* didier.teifreto@univ-fcomte.fr
*/
public class DigitalLabSim extends AbstractMarsToolAndApplication {
private static String heading = "Digital Lab Sim";
private static String version = " Version 1.0 (Didier Teifreto)";
private static final int IN_ADRESS_DISPLAY_1=Memory.memoryMapBaseAddress+0x10;
private static final int IN_ADRESS_DISPLAY_2=Memory.memoryMapBaseAddress+0x11;
private static final int IN_ADRESS_HEXA_KEYBOARD=Memory.memoryMapBaseAddress+0x12;
private static final int IN_ADRESS_COUNTER=Memory.memoryMapBaseAddress+0x13;
private static final int OUT_ADRESS_HEXA_KEYBOARD=Memory.memoryMapBaseAddress+0x14;
public static final int EXTERNAL_INTERRUPT_TIMER = 0x00000100; //Add for digital Lab Sim
public static final int EXTERNAL_INTERRUPT_HEXA_KEYBOARD = 0x00000200;// Add for digital Lab Sim
// GUI Interface.
private static JPanel panelTools;
// Seven Segment display
private SevenSegmentPanel sevenSegPanel;
// Keyboard
private static int KeyBoardValueButtonClick=-1; // -1 no button click
private HexaKeyboard hexaKeyPanel;
private static boolean KeyboardInterruptOnOff=false;
// Counter
private static int CounterValueMax=30;
private static int CounterValue=CounterValueMax;
private static boolean CounterInterruptOnOff=false;
private static OneSecondCounter SecondCounter;
public DigitalLabSim(String title, String heading) {
super(title,heading);
}
public DigitalLabSim() {
super (heading+", "+version, heading);
}
public static void main(String[] args) {
new DigitalLabSim(heading+", "+version,heading).go();
}
public String getName() {
return "Digital Lab Sim";
}
protected void addAsObserver(){
addAsObserver(IN_ADRESS_DISPLAY_1, IN_ADRESS_DISPLAY_1);
addAsObserver(Memory.textBaseAddress, Memory.textLimitAddress);
}
public void update(Observable ressource, Object accessNotice){
MemoryAccessNotice notice = (MemoryAccessNotice) accessNotice;
int address=notice.getAddress();
char value=(char)notice.getValue();
if(address == IN_ADRESS_DISPLAY_1)
updateSevenSegment(1, value);
else
if (address == IN_ADRESS_DISPLAY_2)
updateSevenSegment(0, value);
else
if (address == IN_ADRESS_HEXA_KEYBOARD)
updateHexaKeyboard(value);
else
if (address == IN_ADRESS_COUNTER)
updateOneSecondCounter(value);
if (CounterInterruptOnOff)
if (CounterValue >0){
CounterValue–;
}
else{
CounterValue=CounterValueMax;
if((Coprocessor0.getValue(Coprocessor0.STATUS) & 2)==0){
mars.simulator.Simulator.externalInterruptingDevice = /*Exceptions.*/EXTERNAL_INTERRUPT_TIMER;
}
}
}
protected void reset(){
sevenSegPanel.resetSevenSegment();
hexaKeyPanel.resetHexaKeyboard();
SecondCounter.resetOneSecondCounter();
}
protected JComponent buildMainDisplayArea() {
panelTools=new JPanel(new GridLayout(1,2));
sevenSegPanel=new SevenSegmentPanel();
panelTools.add(sevenSegPanel);
hexaKeyPanel = new HexaKeyboard();
panelTools.add(hexaKeyPanel);
SecondCounter= new OneSecondCounter();
return panelTools;
}
private synchronized void updateMMIOControlAndData(int dataAddr, int dataValue) {
if (!this.isBeingUsedAsAMarsTool || (this.isBeingUsedAsAMarsTool && connectButton.isConnected())) {
synchronized (Globals.memoryAndRegistersLock) {
try {
Globals.memory.setByte(dataAddr, dataValue);
}
catch (AddressErrorException aee) {
System.out.println(“Tool author specified incorrect MMIO address!”+aee);
System.exit(0);
}
}
if (Globals.getGui() != null && Globals.getGui().getMainPane().getExecutePane().getTextSegmentWindow().getCodeHighlighting() ) {
Globals.getGui().getMainPane().getExecutePane().getDataSegmentWindow().updateValues();
}
}
}
protected JComponent getHelpComponent() {
final String helpContent =
” This tool is composed of 3 parts : two seven-segment displays, an hexadecimal keyboard and counter \n”+
“Seven segment display\n”+
” Byte value at address 0xFFFF0010 : command right seven segment display \n “+
” Byte value at address 0xFFFF0011 : command left seven segment display \n “+
” Each bit of these two bytes are connected to segments (bit 0 for a segment, 1 for b segment and 7 for point \n \n”+
“Hexadecimal keyboard\n”+
” Byte value at address 0xFFFF0012 : command row number of hexadecimal keyboard (bit 0 to 3) and enable keyboard interrupt (bit 7) \n” +
” Byte value at address 0xFFFF0014 : receive row and column of the key pressed, 0 if not key pressed \n”+
” The mips program have to scan, one by one, each row (send 1,2,4,8…)”+
” and then observe if a key is pressed (that mean byte value at adresse 0xFFFF0014 is different from zero). “+
” This byte value is composed of row number (4 left bits) and column number (4 right bits)”+
” Here you’ll find the code for each key : 0x11,0x21,0x41,0x81,0x12,0x22,0x42,0x82,0x14,0x24,0x44,0x84,0x18,0x28,0x48,0x88. \n”+
” For exemple key number 2 return 0x41, that mean the key is on column 3 and row 1. \n”+
” If keyboard interruption is enable, an exception is started, with cause register bit number 11 set.\n \n”+
“Counter\n”+
” Byte value at address 0xFFFF0013 : If one bit of this byte is set, the counter interruption is enable.\n”+
” If counter interruption is enable, every 30 instructions, an exception is started with cause register bit number 10.\n” +
” (contributed by Didier Teifreto, -fcomte.fr)”
;
JButton help = new JButton(“Help”);
help.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent e) {
JTextArea ja = new JTextArea(helpContent);
ja.setRows(20);
ja.setColumns(60);
ja.setLineWrap(true);
ja.setWrapStyleWord(true);
JOptionPane.showMessageDialog(theWindow, new JScrollPane(ja),
“Simulating the Hexa Keyboard and Seven segment display”, JOptionPane.INFORMATION_MESSAGE);
}
});
return help;
}/* ………………..Seven Segment display start here…………………………….. */
/* ………………………Seven segment display start here …………………………*/
public void updateSevenSegment(int number,char value) {
sevenSegPanel.display[number].modifyDisplay(value);
}
public class SevenSegmentDisplay extends JComponent {
public char aff;
public SevenSegmentDisplay(char aff){
this.aff=aff;
this.setPreferredSize(new Dimension(60,80));
}
public void modifyDisplay(char val){
aff=val;
this.repaint();
}
public void SwitchSegment(Graphics g,char segment){
switch(segment){
case ‘a’: //a segment
int[]pxa1={12,9,12};
int[]pxa2={36,39,36};
int[]pya={5,8,11};
g.fillPolygon(pxa1,pya, 3);
g.fillPolygon(pxa2,pya, 3);
g.fillRect(12,5,24,6);
break;
case ‘b’: //b segment
int[]pxb={37,40,43};
int[]pyb1={12,9,12};
int[]pyb2={36,39,36};
g.fillPolygon(pxb,pyb1, 3);
g.fillPolygon(pxb,pyb2, 3);
g.fillRect(37,12,6,24);
break;
case ‘c’: // c segment
int[]pxc={37,40,43};
int[]pyc1={44,41,44};
int[]pyc2={68,71,68};
g.fillPolygon(pxc,pyc1, 3);
g.fillPolygon(pxc,pyc2, 3);
g.fillRect(37,44,6,24);
break;
case ‘d’: // d segment
int[]pxd1={12,9,12};
int[]pxd2={36,39,36};
int[]pyd={69,72,75};
g.fillPolygon(pxd1,pyd, 3);
g.fillPolygon(pxd2,pyd, 3);
g.fillRect(12,69,24,6);
break;
case ‘e’: // e segment
int[]pxe={5,8,11};
int[]pye1={44,41,44};
int[]pye2={68,71,68};
g.fillPolygon(pxe,pye1, 3);
g.fillPolygon(pxe,pye2, 3);
g.fillRect(5,44,6,24);
break;
case ‘f’: // f segment
int[]pxf={5,8,11};
int[]pyf1={12,9,12};
int[]pyf2={36,39,36};
g.fillPolygon(pxf,pyf1, 3);
g.fillPolygon(pxf,pyf2, 3);
g.fillRect(5,12,6,24);
break;
case ‘g’: // g segment
int[]pxg1={12,9,12};
int[]pxg2={36,39,36};
int[]pyg={37,40,43};
g.fillPolygon(pxg1,pyg, 3);
g.fillPolygon(pxg2,pyg, 3);
g.fillRect(12,37,24,6);
break;
case ‘h’: // decimal point
g.fillOval(49,68,8,8);
break;
}
}
public void paint(Graphics g) {
char c=’a’;
while(c<='h'){
if ((aff & 0x1) == 1)
g.setColor(Color.RED);
else
g.setColor(Color.LIGHT_GRAY);
SwitchSegment(g,c);
aff = (char)(aff >>>1);
c++;
}
}
}
public class SevenSegmentPanel extends JPanel {
public SevenSegmentDisplay[] display;
public SevenSegmentPanel(){
int i;
FlowLayout fl= new FlowLayout();
this.setLayout(fl);
display= new SevenSegmentDisplay[2];
for (i=0;i<2;i++){
display[i]= new SevenSegmentDisplay((char)(0));
this.add(display[i]);
}
}
public void modifyDisplay(int num,char val){
display[num].modifyDisplay(val);
display[num].repaint();
}
public void resetSevenSegment() {
int i;
for (i=0;i<2;i++)
modifyDisplay(i, (char)0);
}
}
/* ...........................Seven segment display end here ..............................*/
/* ....................Hexa Keyboard start here................................... */
public void updateHexaKeyboard(char row) {
int key = KeyBoardValueButtonClick;
if ((key !=-1)&& ((1 << (key / 4))==(row & 0xF))){
updateMMIOControlAndData(OUT_ADRESS_HEXA_KEYBOARD,
(char)(1 << (key / 4)) | (1 << (4+(key%4))));
}
else{
updateMMIOControlAndData(OUT_ADRESS_HEXA_KEYBOARD, 0);
}
if ((row & 0xF0) != 0)
KeyboardInterruptOnOff = true;
else
KeyboardInterruptOnOff = false;
}
public class HexaKeyboard extends JPanel{
public JButton[] button;
public HexaKeyboard(){
int i;
GridLayout layout = new GridLayout(4,4);
this.setLayout(layout);
button = new JButton[16];
for (i=0;i<16;i++){
button[i]= new JButton(Integer.toHexString(i));
button[i].setBackground(Color.WHITE);
button[i].setMargin(new Insets(10,10,10,10));
button[i].addMouseListener(new EcouteurClick(i));
this.add(button[i]);
}
}
public void resetHexaKeyboard(){
int i;
KeyBoardValueButtonClick=-1;
for(i=0;i<16;i++){
button[i].setBackground(Color.WHITE);
}
}
public class EcouteurClick implements MouseListener{
private int buttonValue;
public EcouteurClick(int val){
buttonValue=val;
}
public void mouseEntered(MouseEvent arg0) { }
public void mouseExited(MouseEvent arg0) {}
public void mousePressed(MouseEvent arg0) {}
public void mouseReleased(MouseEvent arg0) {}
public void mouseClicked(MouseEvent arg0) {
int i;
if(KeyBoardValueButtonClick!=-1){//Button already pressed -> now realease
KeyBoardValueButtonClick = -1;
updateMMIOControlAndData(OUT_ADRESS_HEXA_KEYBOARD,0);
for(i=0;i<16;i++)
button[i].setBackground(Color.WHITE);
}
else{ // new button pressed
KeyBoardValueButtonClick = buttonValue;
button[KeyBoardValueButtonClick].setBackground(Color.GREEN);
if( KeyboardInterruptOnOff && (Coprocessor0.getValue(Coprocessor0.STATUS) & 2)==0){
mars.simulator.Simulator.externalInterruptingDevice = /*Exceptions.*/EXTERNAL_INTERRUPT_HEXA_KEYBOARD;
}
}
}
}
}
/* ....................Hexa Keyboard end here................................... */
/* ....................Timer start here................................... */
public void updateOneSecondCounter(char value) {
if (value !=0){
CounterInterruptOnOff=true;
CounterValue=CounterValueMax;
}
else{
CounterInterruptOnOff=false;
}
}
public class OneSecondCounter{
public OneSecondCounter(){
CounterInterruptOnOff=false;
}
public void resetOneSecondCounter(){
CounterInterruptOnOff=false;
CounterValue=CounterValueMax;
}
}
}
AbstractMarsToolAndApplication$MessageField
package mars.tools;
synchronized class AbstractMarsToolAndApplication$MessageField extends javax.swing.JTextField {
public void AbstractMarsToolAndApplication$MessageField(AbstractMarsToolAndApplication, String);
private void displayTerminatingMessage(String);
private void displayNonTerminatingMessage(String);
private void displayMessage(String, boolean);
}
mars/tools/IntroToTools.java
mars/tools/IntroToTools.java package mars.tools;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import mars.*;
/*
Copyright (c) 2003-2006, Pete Sanderson and Kenneth Vollmar
Developed by Pete Sanderson ( )
and Kenneth Vollmar ( )
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(MIT license, http://www.opensource.org/licenses/mit-license.html)
*/
/**
* The "hello world" of MarsTools!
*/
public class IntroToTools extends AbstractMarsToolAndApplication {
private static String heading = "Introduction to MARS Tools and Applications";
private static String version = " Version 1.0";
/**
* Simple constructor, likely used to run a stand-alone memory reference visualizer.
* @param title String containing title for title bar
* @param heading String containing text for heading shown in upper part of window.
*/
public IntroToTools(String title, String heading) {
super(title,heading);
}
/**
* Simple constructor, likely used by the MARS Tools menu mechanism
*/
public IntroToTools() {
super (heading+", "+version, heading);
}
/**
* Main provided for pure stand-alone use. Recommended stand-alone use is to write a
* driver program that instantiates a MemoryReferenceVisualization object then invokes its go() method.
* "stand-alone" means it is not invoked from the MARS Tools menu. "Pure" means there
* is no driver program to invoke the application.
*/
public static void main(String[] args) {
new IntroToTools(heading+", "+version,heading).go();
}
/**
* Required method to return Tool name.
* @return Tool name. MARS will display this in menu item.
*/
public String getName() {
return "Introduction to Tools";
}
/**
* Implementation of the inherited abstract method to build the main
* display area of the GUI. It will be placed in the CENTER area of a
* BorderLayout. The title is in the NORTH area, and the controls are
* in the SOUTH area.
*/
protected JComponent buildMainDisplayArea() {
JTextArea message = new JTextArea();
message.setEditable(false);
message.setLineWrap(true);
message.setWrapStyleWord(true);
message.setFont(new Font("Ariel",Font.PLAIN,12));
message.setText(
"Hello! This Tool does not do anything but you may use its "+
"source code as a starting point to build your own MARS Tool "+
"or Application."+
"\n\n"+
"A MARS Tool is a program listed in the MARS Tools menu. It is launched "+
"when you select its menu item and typically interacts with executing MIPS "+
"programs to do something exciting and informative or at least interesting."+
"\n\n"+
"A MARS Application is a stand-alone program for similarly interacting with "+
"executing MIPS programs. It uses MARS' MIPS assembler and "+
"runtime simulator in the background to control MIPS execution."+
"\n\n"+
"The basic requirements for building a MARS Tool are:"+
"\n"+
" 1. It must be a class that implements the MarsTool interface. "+
"This has only two methods: 'String getName()' to return the "+
"name to be displayed in its Tools menu item, and "+
"'void action()' which is invoked when that menu item "+
"is selected by the MARS user."+
"\n"+
" 2. It must be stored in the mars.tools package (in folder "+
"mars/tools)"+
"\n"+
" 3. It must be successfully compiled in that package. This "+
"normally means the MARS distribution needs to be extracted from the "+
"JAR file before you can develop your Tool."+
"\n\n"+
"If these requirements are met, MARS will recognize and load "+
"your Tool into its Tools menu the next time it runs."+
"\n\n"+
"There are no fixed requirements for building a MARS Application, a "+
"stand-alone program that utilizes the MARS API."+
"\n\n"+
"You can build a program that may be run as either a MARS Tool or an Application. "+
"The easiest way is to extend an abstract class provided in the MARS distribution: "+
"mars.tools.AbstractMarsToolAndApplication. "+
"\n"+
" 1. It defines a suite of methods and provides default definitions for "+
"all but two: getName() and buildMainDisplayArea()."+
"\n"+
" 2. String getName() was introduced above."+
"\n"+
" 3. JComponent buildMainDisplayArea() returns the JComponent to be placed in the "+
"BorderLayout.CENTER region of the tool/app's user interface. The NORTH and "+
"SOUTH are defined to contain a heading and a set of button controls, respectively. "+
"\n"+
" 4. It defines a default 'void go()' method to launch the application."+
"\n"+
" 5. Conventional usage is to define your application as a subclass then launch it "+
"by invoking its go() method."+
"\n\n"+
"The frame/dialog you are reading right now is an example of an "+
"AbstractMarsToolAndApplication subclass. If you run it as an application, you "+
"will notice the set of controls at the bottom of the window differ from those "+
"you get when running it from MARS' Tools menu. It includes additional controls "+
"to load and control the execution of pre-existing MIPS programs."+
"\n\n"+
"See the mars.tools.AbstractMarsToolAndApplication API or the source code of "+
"existing tool/apps for further information."+
"\n"
);
message.setCaretPosition(0); // Assure first line is visible and at top of scroll pane.
return new JScrollPane(message);
}
}
MemoryReferenceVisualization$8
package mars.tools;
synchronized class MemoryReferenceVisualization$8 implements java.awt.event.ActionListener {
void MemoryReferenceVisualization$8(MemoryReferenceVisualization);
public void actionPerformed(java.awt.event.ActionEvent);
}
CacheSimulator$5
package mars.tools;
synchronized class CacheSimulator$5 implements java.awt.event.ActionListener {
void CacheSimulator$5(CacheSimulator);
public void actionPerformed(java.awt.event.ActionEvent);
}
MemoryReferenceVisualization$ColorChooserControls$1
package mars.tools;
synchronized class MemoryReferenceVisualization$ColorChooserControls$1 implements java.awt.event.ActionListener {
void MemoryReferenceVisualization$ColorChooserControls$1(MemoryReferenceVisualization$ColorChooserControls);
public void actionPerformed(java.awt.event.ActionEvent);
}
AbstractMarsToolAndApplication$CreateAssembleRunMIPSprogram
package mars.tools;
synchronized class AbstractMarsToolAndApplication$CreateAssembleRunMIPSprogram implements Runnable {
private void AbstractMarsToolAndApplication$CreateAssembleRunMIPSprogram(AbstractMarsToolAndApplication);
public void run();
}
BitmapDisplay$4
package mars.tools;
synchronized class BitmapDisplay$4 implements java.awt.event.ActionListener {
void BitmapDisplay$4(BitmapDisplay);
public void actionPerformed(java.awt.event.ActionEvent);
}
FloatRepresentation$InstructionsPane
package mars.tools;
synchronized class FloatRepresentation$InstructionsPane extends javax.swing.JLabel {
void FloatRepresentation$InstructionsPane(FloatRepresentation, java.awt.Component);
public void setText(String);
}
AbstractMarsToolAndApplication$1
package mars.tools;
synchronized class AbstractMarsToolAndApplication$1 extends java.awt.event.WindowAdapter {
void AbstractMarsToolAndApplication$1(AbstractMarsToolAndApplication);
public void windowClosing(java.awt.event.WindowEvent);
}
mars/tools/FloatRepresentation.java
mars/tools/FloatRepresentation.java package mars.tools;
import mars.*;
import mars.util.*;
import mars.assembler.*;
import mars.mips.instructions.*;
import mars.mips.hardware.*;
import java.util.*;
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.border.*;
import javax.swing.text.html.*;
/*
Copyright (c) 2003-2006, Pete Sanderson and Kenneth Vollmar
Developed by Pete Sanderson ( )
and Kenneth Vollmar ( )
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject
to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
(MIT license, http://www.opensource.org/licenses/mit-license.html)
*/
/**
* Tool to help students learn about IEEE 754 representation of 32 bit
* floating point values. This representation is used by MIPS "float"
* directive and instructions and also the Java (and most other languages)
* "float" data type. As written, it can ALMOST be adapted to 64 bit by
* changing a few constants.
*/
public class FloatRepresentation extends AbstractMarsToolAndApplication {
private static String version = "Version 1.1";
private static String heading = "32-bit IEEE 754 Floating Point Representation";
private static final String title = "Floating Point Representation, ";
private static final String defaultHex = "00000000";
private static final String defaultDecimal = "0.0";
private static final String defaultBinarySign = "0";
private static final String defaultBinaryExponent = "00000000";
private static final String defaultBinaryFraction = "00000000000000000000000";
private static final int maxLengthHex = 8;
private static final int maxLengthBinarySign = 1;
private static final int maxLengthBinaryExponent = 8;
private static final int maxLengthBinaryFraction = 23;
private static final int maxLengthBinaryTotal = maxLengthBinarySign+maxLengthBinaryExponent+maxLengthBinaryFraction;
private static final int maxLengthDecimal = 20;
private static final String denormalizedLabel = " significand (denormalized - no 'hidden bit')";
private static final String normalizedLabel = " significand ('hidden bit' underlined) ";
private static final Font instructionsFont = new Font("Arial",Font.PLAIN,14);
private static final Font hexDisplayFont = new Font("Courier",Font.PLAIN,32);
private static final Font binaryDisplayFont = new Font("Courier",Font.PLAIN,18);
private static final Font decimalDisplayFont = new Font("Courier",Font.PLAIN,18);
private static final Color hexDisplayColor = Color.red;
private static final Color binaryDisplayColor = Color.black;
private static final Color decimalDisplayColor = Color.blue;
private static final String expansionFontTag = "“;
private static final String instructionFontTag = ““;
private static final int exponentBias = 127; // 32 bit floating point exponent bias
private Register attachedRegister = null;
private Register[] fpRegisters;
private FloatRepresentation thisFloatTool;
// Panels to hold binary displays and decorations (labels, arrows)
private JPanel binarySignDecoratedDisplay,
binaryExponentDecoratedDisplay, binaryFractionDecoratedDisplay;
// Editable fields for the hex, binary and decimal representations.
private JTextField hexDisplay, decimalDisplay,
binarySignDisplay, binaryExponentDisplay, binaryFractionDisplay;
// Non-editable fields to display formula translating binary to decimal.
private JLabel expansionDisplay;
private JLabel significandLabel = new JLabel(denormalizedLabel, JLabel.CENTER);
private BinaryToDecimalFormulaGraphic binaryToDecimalFormulaGraphic;
// Non-editable field to display instructions
private InstructionsPane instructions;
private String defaultInstructions = “Modify any value then press the Enter key to update all values.”;
/**
* Simple constructor, likely used to run a stand-alone memory reference visualizer.
* @param title String containing title for title bar
* @param heading String containing text for heading shown in upper part of window.
*/
public FloatRepresentation(String title, String heading) {
super(title,heading);
thisFloatTool = this;
}
/**
* Simple constructor, likely used by the MARS Tools menu mechanism
*/
public FloatRepresentation() {
this(title+version, heading);
}
/**
* Main provided for pure stand-alone use. Recommended stand-alone use is to write a
* driver program that instantiates a FloatRepresentation object then invokes its go() method.
* “stand-alone” means it is not invoked from the MARS Tools menu. “Pure” means there
* is no driver program to invoke the application.
*/
public static void main(String[] args) {
new FloatRepresentation(title+version,heading).go();
}
/**
* Fetch tool name (for display in MARS Tools menu)
* @return String containing tool name
*/
public String getName() {
return “Floating Point Representation”;
}
/**
* Override the inherited method, which registers us as an Observer over the static data segment
* (starting address 0x10010000) only. This version will register us as observer over the selected
* floating point register, if any. If no register is selected, it will not do anything.
* If you use the inherited GUI buttons, this method is invoked when you click “Connect” button
* on MarsTool or the “Assemble and Run” button on a Mars-based app.
*/
protected void addAsObserver() {
addAsObserver(attachedRegister);
}
/**
* Delete this app/tool as an Observer of the attached register. This overrides
* the inherited version which deletes only as an Observer of memory.
* This method is called when the default “Disconnect” button on a MarsTool is selected or
* when the MIPS program execution triggered by the default “Assemble and run” on a stand-alone
* Mars app terminates (e.g. when the button is re-enabled).
*/
protected void deleteAsObserver() {
deleteAsObserver(attachedRegister);
}
/**
* Method that constructs the main display area. This will be vertically sandwiched between
* the standard heading area at the top and the control area at the bottom.
* @return the GUI component containing the application/tool-specific part of the user interface
*/
protected JComponent buildMainDisplayArea() {
return buildDisplayArea();
}
/**
* Override inherited update() to update display when “attached” register is modified
* either by MIPS program or by user editing it on the MARS user interface.
* The latter is the reason for overriding the inherited update() method.
* The inherited method will filter out notices triggered by the MARS GUI or the user.
* @param register the attached register
* @param accessNotice information provided by register in RegisterAccessNotice object
*/
public void update(Observable register, Object accessNotice) {
if (((AccessNotice)accessNotice).getAccessType()==AccessNotice.WRITE) {
updateDisplays(new FlavorsOfFloat().buildOneFromInt(attachedRegister.getValue()));
}
}
/**
* Method to reset display values to 0 when the Reset button selected.
* If attached to a MIPS register at the time, the register will be reset as well.
* Overrides inherited method that does nothing.
*/
protected void reset() {
instructions.setText(defaultInstructions);
updateDisplaysAndRegister(new FlavorsOfFloat());
}
//////////////////////////////////////////////////////////////////////////////////////
// Private methods defined to support the above.
protected JComponent buildDisplayArea() {
// Panel to hold all floating point dislay and editing components
Box mainPanel = Box.createVerticalBox();
JPanel leftPanel = new JPanel(new GridLayout(5,1,0,0));
JPanel rightPanel = new JPanel(new GridLayout(5,1,0,0));
Box subMainPanel = Box.createHorizontalBox();
subMainPanel.add(leftPanel);
subMainPanel.add(rightPanel);
mainPanel.add(subMainPanel);
// Editable display for hexadecimal version of the float value
hexDisplay = new JTextField(defaultHex, maxLengthHex+1);
hexDisplay.setFont(hexDisplayFont);
hexDisplay.setForeground(hexDisplayColor);
hexDisplay.setHorizontalAlignment(JTextField.RIGHT);
hexDisplay.setToolTipText(“”+maxLengthHex+”-digit hexadecimal (base 16) display”);
hexDisplay.setEditable(true);
hexDisplay.revalidate();
hexDisplay.addKeyListener(new HexDisplayKeystrokeListener(8));
JPanel hexPanel = new JPanel();
hexPanel.add(hexDisplay);
//################ Grid Row : Hexadecimal ##################################
leftPanel.add(hexPanel);
HexToBinaryGraphicPanel hexToBinaryGraphic = new HexToBinaryGraphicPanel();
//################ Grid Row : Hex-to-binary graphic ########################
leftPanel.add(hexToBinaryGraphic);
// Editable display for binary version of float value.
// It is split into 3 separately editable components (sign,exponent,fraction)
binarySignDisplay = new JTextField(defaultBinarySign, maxLengthBinarySign+1);
binarySignDisplay.setFont(binaryDisplayFont);
binarySignDisplay.setForeground(binaryDisplayColor);
binarySignDisplay.setHorizontalAlignment(JTextField.RIGHT);
binarySignDisplay.setToolTipText(“The sign bit”);
binarySignDisplay.setEditable(true);
binarySignDisplay.revalidate();
binaryExponentDisplay = new JTextField(defaultBinaryExponent, maxLengthBinaryExponent+1);
binaryExponentDisplay.setFont(binaryDisplayFont);
binaryExponentDisplay.setForeground(binaryDisplayColor);
binaryExponentDisplay.setHorizontalAlignment(JTextField.RIGHT);
binaryExponentDisplay.setToolTipText(“”+maxLengthBinaryExponent+”-bit exponent”);
binaryExponentDisplay.setEditable(true);
binaryExponentDisplay.revalidate();
binaryFractionDisplay = new BinaryFractionDisplayTextField(defaultBinaryFraction, maxLengthBinaryFraction+1);
binaryFractionDisplay.setFont(binaryDisplayFont);
binaryFractionDisplay.setForeground(binaryDisplayColor);
binaryFractionDisplay.setHorizontalAlignment(JTextField.RIGHT);
binaryFractionDisplay.setToolTipText(“”+maxLengthBinaryFraction+”-bit fraction”);
binaryFractionDisplay.setEditable(true);
binaryFractionDisplay.revalidate();
binarySignDisplay.addKeyListener(new BinaryDisplayKeystrokeListener(maxLengthBinarySign));
binaryExponentDisplay.addKeyListener(new BinaryDisplayKeystrokeListener(maxLengthBinaryExponent));
binaryFractionDisplay.addKeyListener(new BinaryDisplayKeystrokeListener(maxLengthBinaryFraction));
JPanel binaryPanel = new JPanel();
binarySignDecoratedDisplay = new JPanel(new BorderLayout());
binaryExponentDecoratedDisplay = new JPanel(new BorderLayout());
binaryFractionDecoratedDisplay = new JPanel(new BorderLayout());
binarySignDecoratedDisplay.add(binarySignDisplay,BorderLayout.CENTER);
binarySignDecoratedDisplay.add(new JLabel(“sign”,JLabel.CENTER),BorderLayout.SOUTH);
binaryExponentDecoratedDisplay.add(binaryExponentDisplay,BorderLayout.CENTER);
binaryExponentDecoratedDisplay.add(new JLabel(“exponent”,JLabel.CENTER),BorderLayout.SOUTH);
binaryFractionDecoratedDisplay.add(binaryFractionDisplay,BorderLayout.CENTER);
binaryFractionDecoratedDisplay.add(new JLabel(“fraction”,JLabel.CENTER),BorderLayout.SOUTH);
binaryPanel.add(binarySignDecoratedDisplay);
binaryPanel.add(binaryExponentDecoratedDisplay);
binaryPanel.add(binaryFractionDecoratedDisplay);
//################ Grid Row : Binary ##################################
leftPanel.add(binaryPanel);
//################ Grid Row : Binary to decimal formula arrows ##########
binaryToDecimalFormulaGraphic = new BinaryToDecimalFormulaGraphic();
binaryToDecimalFormulaGraphic.setBackground(leftPanel.getBackground());
leftPanel.add(binaryToDecimalFormulaGraphic);
// Non-Editable display for expansion of binary representation
expansionDisplay = new JLabel(new FlavorsOfFloat().expansionString);
expansionDisplay.setFont(new Font(“Monospaced”,Font.PLAIN,12));
expansionDisplay.setFocusable(false); // causes it to be skipped in “tab sequence”.
expansionDisplay.setBackground(leftPanel.getBackground());
JPanel expansionDisplayBox = new JPanel(new GridLayout(2,1));
expansionDisplayBox.add(expansionDisplay);
expansionDisplayBox.add(significandLabel); // initialized at top
//################ Grid Row : Formula mapping binary to decimal ########
leftPanel.add(expansionDisplayBox);
// Editable display for decimal version of float value.
decimalDisplay = new JTextField(defaultDecimal, maxLengthDecimal+1);
decimalDisplay.setFont(decimalDisplayFont);
decimalDisplay.setForeground(decimalDisplayColor);
decimalDisplay.setHorizontalAlignment(JTextField.RIGHT);
decimalDisplay.setToolTipText(“Decimal floating point value”);
decimalDisplay.setMargin(new Insets(0,0,0,0));
decimalDisplay.setEditable(true);
decimalDisplay.revalidate();
decimalDisplay.addKeyListener(new DecimalDisplayKeystokeListenter());
Box decimalDisplayBox = Box.createVerticalBox();
decimalDisplayBox.add(Box.createVerticalStrut(5));
decimalDisplayBox.add(decimalDisplay);
decimalDisplayBox.add(Box.createVerticalStrut(15));
FlowLayout rightPanelLayout = new FlowLayout(FlowLayout.LEFT);
JPanel place1 = new JPanel(rightPanelLayout);
JPanel place2 = new JPanel(rightPanelLayout);
JPanel place3 = new JPanel(rightPanelLayout);
JPanel place4 = new JPanel(rightPanelLayout);
JEditorPane hexExplain = new JEditorPane(“text/html”,expansionFontTag+”< Hexadecimal representation”+”“);
hexExplain.setEditable(false);
hexExplain.setFocusable(false);
hexExplain.setForeground(Color.black);
hexExplain.setBackground(place1.getBackground());
JEditorPane hexToBinExplain = new JEditorPane(“text/html”,expansionFontTag+”< Each hex digit represents 4 bits”+”“);
hexToBinExplain.setEditable(false);
hexToBinExplain.setFocusable(false);
hexToBinExplain.setBackground(place2.getBackground());
JEditorPane binExplain = new JEditorPane(“text/html”,expansionFontTag+”< Binary representation”+”“);
binExplain.setEditable(false);
binExplain.setFocusable(false);
binExplain.setBackground(place3.getBackground());
JEditorPane binToDecExplain = new JEditorPane(“text/html”,expansionFontTag+”< Binary-to-decimal conversion”+”“);
binToDecExplain.setEditable(false);
binToDecExplain.setFocusable(false);
binToDecExplain.setBackground(place4.getBackground());
place1.add(hexExplain);
place2.add(hexToBinExplain);
place3.add(binExplain);
place4.add(binToDecExplain);
//################ 4 Grid Rows : Explanations #########################
rightPanel.add(place1);
rightPanel.add(place2);
rightPanel.add(place3);
rightPanel.add(place4);
//################ Grid Row : Decimal ##################################
rightPanel.add(decimalDisplayBox);
//######## mainPanel is vertical box, instructions get a row #################
JPanel instructionsPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
instructions = new InstructionsPane(instructionsPanel);
instructionsPanel.add(instructions);
instructionsPanel.setBorder(new TitledBorder(“Instructions”));
mainPanel.add(instructionsPanel);
// Means of selecting and deselecting an attached floating point register
fpRegisters = Coprocessor1.getRegisters();
String[] registerList = new String[fpRegisters.length+1];
registerList[0] = “None”;
for (int i=0; i
+ “-1“+binaryString.substring(0,maxLengthBinarySign)+” * 2”
+ stringExponent + HTMLspaces.substring(0, (5-stringExponent.length())*6)
+ “ * ”
+ ((biasedExponent==0) ? ” .” : “1.”)
+ binaryString.substring(maxLengthBinarySign+maxLengthBinaryExponent, maxLengthBinaryTotal)
+ ” =