mirror of
https://github.com/rzzzwilson/pymlac.git
synced 2025-06-10 09:32:41 +00:00
Fixed error in handling of 'dot' label
This commit is contained in:
@@ -627,10 +627,12 @@ def eval_expr(expr):
|
||||
if expr is None:
|
||||
return None
|
||||
|
||||
print('eval_expr: initial expr=%s' % expr)
|
||||
|
||||
# replace any "." value with "dot" defined in the symbol table
|
||||
expr = string.replace(expr, '.', 'DOT')
|
||||
expr = string.replace(expr, '.', '_D_O_T_')
|
||||
globs = copy.deepcopy(SymTable)
|
||||
globs['DOT'] = Dot # add in the "." address
|
||||
globs['_D_O_T_'] = Dot # add in the "." address
|
||||
|
||||
# evaluate the expression
|
||||
try:
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
; a very simple 'smoke-test' file
|
||||
org 0100
|
||||
org 02
|
||||
|
||||
start hlt
|
||||
dot equ 01
|
||||
|
||||
org 0200
|
||||
|
||||
start jmp dot
|
||||
hlt
|
||||
|
||||
end start
|
||||
|
||||
Reference in New Issue
Block a user