示例#1
0
    def load_selected_task(self, widget):
        # create new vm and load new task
        input_device.input_file = self.chooser.get_filename()
        self.vm = manager.create_vm()

        processor.si = 0
        output_device.clear()

        self.update_info()
        self.update_page_table()
        self.cache = []
示例#2
0
    def __init__(self): 
        self.xml = gtk.glade.XML('gui/pos.glade')
        self.vm = manager.create_vm()
        
        # cache variable for storing executed VM state 
        # should be reloaded with every new loaded vm
        self.cache = [] 

        # real memory management
  
        # fields
        self.ax_info = self.xml.get_widget('entry2')
        self.bx_info = self.xml.get_widget('entry1')
        self.cs_info = self.xml.get_widget('entry3')
        self.ds_info = self.xml.get_widget('entry4')
        self.c_info = self.xml.get_widget('entry5')
        self.ic_info = self.xml.get_widget('entry6')
        self.chst0_info = self.xml.get_widget('entry7')
        self.chst1_info = self.xml.get_widget('entry8')
        self.chst2_info = self.xml.get_widget('entry9')

        self.pi_info = self.xml.get_widget('entry10')
        self.si_info = self.xml.get_widget('entry11')
        self.ti_info = self.xml.get_widget('entry12')
        self.ioi_info = self.xml.get_widget('entry13')
        self.time_info = self.xml.get_widget('entry14')
        self.mode_info = self.xml.get_widget('entry15')
        self.ptr_info = self.xml.get_widget('entry16')

        # wm info fields
        self.wm0 = self.xml.get_widget('entry18')
        self.wm1 = self.xml.get_widget('entry19')
        self.wm2 = self.xml.get_widget('entry20')
        self.wm3 = self.xml.get_widget('entry21')
        self.wm4 = self.xml.get_widget('entry22')
        self.wm5 = self.xml.get_widget('entry23')
        self.wm6 = self.xml.get_widget('entry24')
        self.wm7 = self.xml.get_widget('entry25')
        self.wm8 = self.xml.get_widget('entry26')
        self.wm9 = self.xml.get_widget('entry27')
        self.wma = self.xml.get_widget('entry28')
        self.wmb = self.xml.get_widget('entry29')
        self.wmc = self.xml.get_widget('entry30')
        self.wmd = self.xml.get_widget('entry31')
        self.wme = self.xml.get_widget('entry32')
        self.wmf = self.xml.get_widget('entry33')

        # page table 
        self.pgtable = [
            self.xml.get_widget('label50'), 
            self.xml.get_widget('label51'),
            self.xml.get_widget('label52'),
            self.xml.get_widget('label53'),
            self.xml.get_widget('label54'),
            self.xml.get_widget('label55'),
            self.xml.get_widget('label56'),
            self.xml.get_widget('label57'),
            self.xml.get_widget('label58'),
            self.xml.get_widget('label59'),
            self.xml.get_widget('label60'),
            self.xml.get_widget('label61'),
            self.xml.get_widget('label62'),
            self.xml.get_widget('label63'), 
            self.xml.get_widget('label64'),
            self.xml.get_widget('label65'),
          ]

        self.real_address = self.xml.get_widget('entry17')
        self.realtable = [
            self.xml.get_widget('label36'),
            self.xml.get_widget('label37'),
            self.xml.get_widget('label38'),
            self.xml.get_widget('label39'),
            self.xml.get_widget('label40'),
            self.xml.get_widget('label41'),
            self.xml.get_widget('label42'),
            self.xml.get_widget('label43'),
            self.xml.get_widget('label44'),
            self.xml.get_widget('label45'),
            self.xml.get_widget('label46'),
            self.xml.get_widget('label47'),
            self.xml.get_widget('label48'),
            self.xml.get_widget('label49'),
            self.xml.get_widget('label66'),
            self.xml.get_widget('label67'),
          ]

        # latest adjustments: output_device + current command
        self.commands = self.xml.get_widget('textview1')
        self.commands_buffer = gtk.TextBuffer(None)
        self.commands.set_buffer(self.commands_buffer)

        self.output = self.xml.get_widget('textview2')
        self.output_buffer = gtk.TextBuffer(None)
        self.output.set_buffer(self.output_buffer)