From 2cad8b8687133ba2c38767e58166d728b65731eb Mon Sep 17 00:00:00 2001 From: Michael Abed Date: Sun, 29 Jan 2012 18:51:59 -0500 Subject: Label count should be updated after address is computed Otherwise you it points to the address right before it, not after --- asmblr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'asmblr.py') diff --git a/asmblr.py b/asmblr.py index 9309040..e6a35e1 100755 --- a/asmblr.py +++ b/asmblr.py @@ -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): -- cgit v1.2.3