nga-python: bug fixes
FossilOrigin-Name: db3e43cefbfd1dbc5c623bb278b9c255b07e2c170c5101c9161573cc6d958e47
This commit is contained in:
parent
9c48935d22
commit
a5bad6d738
2 changed files with 5 additions and 2 deletions
|
@ -11,9 +11,13 @@ class Memory():
|
|||
self.memory[i] = cell
|
||||
i = i + 1
|
||||
f.close()
|
||||
self.length = size
|
||||
|
||||
def store(self, value, address):
|
||||
self.memory[address] = value
|
||||
|
||||
def fetch(self, address):
|
||||
return self.memory[address]
|
||||
|
||||
def size(self):
|
||||
return self.length
|
||||
|
|
|
@ -258,7 +258,7 @@ def i_fe():
|
|||
elif target == -2:
|
||||
stack.push(len(address))
|
||||
elif target == -3:
|
||||
stack.push(len(memory))
|
||||
stack.push(memory.size())
|
||||
elif target == -4:
|
||||
stack.push(2147483648)
|
||||
elif target == -5:
|
||||
|
@ -647,4 +647,3 @@ if __name__ == "__main__":
|
|||
else:
|
||||
for source in sources:
|
||||
run_file(source)
|
||||
|
||||
|
|
Loading…
Reference in a new issue