diff --git a/assembler/assembler.py b/assembler/assembler.py index ffd0b0c..3942ad1 100755 --- a/assembler/assembler.py +++ b/assembler/assembler.py @@ -6,8 +6,8 @@ import time atable, ltable, dtable, vtable = {}, {}, {}, [] #initialize global tables -address_size = 4 -jump_size = 7 +address_size = fields_table["address"] +jump_size = fields_table["jump"] try: filename = sys.argv[1] diff --git a/assembler/tables.py b/assembler/tables.py index 53028f6..b4cf0d3 100644 --- a/assembler/tables.py +++ b/assembler/tables.py @@ -14,3 +14,9 @@ "unused" : 32, "data" : 16 } + +fields_table = { + "opcode" : 4, + "address" : 4, + "jump" : 7 +}