diff options
author | Michael Abed <michael@pidgey.localdomain> | 2012-01-29 18:51:59 -0500 |
---|---|---|
committer | Michael Abed <michael@pidgey.localdomain> | 2012-01-29 18:51:59 -0500 |
commit | 2cad8b8687133ba2c38767e58166d728b65731eb (patch) | |
tree | 5c60e86bb5b27e8766a3ba587c71b84c6e3125d6 | |
parent | 015ea1f428c5b5da762124529363eaa3c642e21c (diff) | |
download | ec327-hw1-2cad8b8687133ba2c38767e58166d728b65731eb.tar.gz ec327-hw1-2cad8b8687133ba2c38767e58166d728b65731eb.tar.bz2 ec327-hw1-2cad8b8687133ba2c38767e58166d728b65731eb.zip |
Label count should be updated after address is computed
Otherwise you it points to the address right before it, not after
-rwxr-xr-x | asmblr.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -18,8 +18,8 @@ def genaddresses(tokens): if ':' not in t[0]: continue label = t[0].split(':')[0] - lblcnt += 1 table[label] = offset + i - lblcnt + lblcnt += 1 return table def gencode(tokens, addresses, ops): |