Skip to content

Commit

Permalink
Updated possible 'dests'
Browse files Browse the repository at this point in the history
  • Loading branch information
volf52 committed Dec 21, 2020
1 parent def996e commit 5cc966c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 2 deletions.
18 changes: 17 additions & 1 deletion pyasm/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,23 @@ def generate_possible_c_commands():
"D|M",
]

possible_dests = ["M", "D", "MD", "A", "AM", "AD", "AMD"]
possible_dests = [
"M",
"D",
"MD",
"DM",
"A",
"AM",
"MA",
"AD",
"DA",
"AMD",
"ADM",
"MAD",
"MDA",
"DAM",
"DMA",
]
possible_jmps = ["JGT", "JEQ", "JGE", "JLT", "JNE", "JLE", "JMP"]

result = []
Expand Down
18 changes: 17 additions & 1 deletion tests/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,23 @@ def get_possible_c_commands():
"D|M",
]

possible_dests = ["M", "D", "MD", "A", "AM", "AD", "AMD"]
possible_dests = [
"M",
"D",
"MD",
"DM",
"A",
"AM",
"MA",
"AD",
"DA",
"AMD",
"ADM",
"MAD",
"MDA",
"DAM",
"DMA",
]
possible_jmps = ["JGT", "JEQ", "JGE", "JLT", "JNE", "JLE", "JMP"]

result = []
Expand Down

0 comments on commit 5cc966c

Please sign in to comment.