def runSimulator(): if request.method == "POST": main.runSimulator() reg = main.getRegisters() memory = main.getMemlocs() stack = main.getStack() print stack return json.dumps({'status':'OK', 'reg':reg, 'memory':memory , 'stack':stack})
def runSimulator(): if request.method == "POST": main.runSimulator() reg = main.getRegisters() memory = main.getMemlocs() memoryData = main.getMemData() stack = main.getStack() print("STACK : ", stack) return json.dumps({'status':'OK', 'reg':reg, 'memory':memory, 'memoryData':memoryData, 'stack':stack})
def loadSimulator(): if request.method == "POST": data = request.get_json() fileName = data['file'] print data offset = data['offset'] main.runload(int(offset)) fileName = fileName+'.8085' main.runloader(fileName, offset) reg = main.getRegisters() memory = main.getMemlocs() stack = main.getStack() print stack return json.dumps({'status':'OK', 'reg':reg, 'memory':memory , 'stack':stack})
def loadSimulator(): if request.method == "POST": main.resetAll() data = request.get_json() fileName = data['file'] offset = data['offset'] main.runload(int(offset)) fileName = fileName+'.loaded' # print(fileName) main.runloader(fileName, offset) reg = main.getRegisters() memory = main.getMemlocs() memoryData = main.getMemData() stack = main.getStack() # print("ASDFASDFASFDASFDSFAFDASFASDF", memoryData) return json.dumps({'status':'OK', 'reg':reg, 'memory':memory , 'memoryData':memoryData, 'stack':stack})