示例#1
0
def main():
    print "---Started---"
    hexes = ["52800083","d2800042","d2800063","b8236843"]

    for hexcode in hexes:
        resetInstrFlag()
        decoder.decodeInstr(hexcode)
    printAllRegs()
    printAllFlags()
示例#2
0
def main():
    print "---Started---"
    hexes = ["52800083", "d2800042", "d2800063", "b8236843"]

    for hexcode in hexes:
        resetInstrFlag()
        decoder.decodeInstr(hexcode)
    printAllRegs()
    printAllFlags()
示例#3
0
def main():
    print "---Started---"
    #"52800102"
    hexes = ['d2800041', '94000002', 'd2800040', '52800063', 'd65f03c0']
    for hexcode in hexes:
        print 'inst: ' + utilFunc.hexToBin(hexcode)
        resetInstrFlag()
        #utilFunc.set_Z_flag()
        decoder.decodeInstr(hexcode)
    printAllRegs()
    printAllFlags()
示例#4
0
def main():
    print "---Started---"
    #"52800102"
    hexes = ['d2800041', '94000002', 'd2800040', '52800063', 'd65f03c0']
    for hexcode in hexes:
        print 'inst: '+utilFunc.hexToBin(hexcode)
        resetInstrFlag()
        #utilFunc.set_Z_flag()
        decoder.decodeInstr(hexcode)
    printAllRegs()
    printAllFlags()
示例#5
0
def executeNextInst():
    if getCurrentInstNumber() < len(getHexes()):
        hexcode = hexes[getCurrentInstNumber()]
        utilFunc.resetInstrFlag()
        decoder.decodeInstr(hexcode)
        incPC()
        #now the inst has been executed!!!
        if isWatchPause():
            resetWatchPause()
            raise Exception("watch")  #copied from stack overflow!!! ;)
    else:
        print 'instructions exhausted!!'
示例#6
0
def executeNextInst():
    if getCurrentInstNumber()<len(getHexes()):
        hexcode=hexes[getCurrentInstNumber()]
        utilFunc.resetInstrFlag()
        decoder.decodeInstr(hexcode)
        incPC()
        #now the inst has been executed!!!
        if isWatchPause():
            resetWatchPause()
            raise Exception("watch") #copied from stack overflow!!! ;)
    else:
        print 'instructions exhausted!!'