Skip to content

Commit

Permalink
moving parameters to tables file
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Menotti committed Apr 30, 2021
1 parent e5b5733 commit db55d49
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assembler/assembler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import time

atable, ltable, dtable = {}, {}, {} #initialize global tables
address_size = 4
jump_size = 7
address_size = fields_table["address"]
jump_size = fields_table["jump"]

try:
filename = sys.argv[1]
Expand Down
6 changes: 6 additions & 0 deletions assembler/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@
"unused" : 112,
"data" : 16
}

fields_table = {
"opcode" : 4,
"address" : 4,
"jump" : 7
}

0 comments on commit db55d49

Please sign in to comment.