mirror of
https://github.com/rzzzwilson/pymlac.git
synced 2025-06-10 09:32:41 +00:00
Fixed bug in pass 2 handling of BSS
This commit is contained in:
parent
efd43b1391
commit
3feb4c2329
10
pyasm/pyasm
10
pyasm/pyasm
@ -661,13 +661,15 @@ def pass_2(lines):
|
||||
error("BSS pseudo-op has bad value")
|
||||
return False
|
||||
value = eval_expr(addr)
|
||||
if value is None:
|
||||
error("BSS pseudo-op has bad value: '%s'" % addr)
|
||||
if label:
|
||||
try:
|
||||
old_value = SymTable[label]
|
||||
if value != old_value:
|
||||
error("BSS value in has changed, "
|
||||
old_dot = SymTable[label]
|
||||
if Dot != old_dot:
|
||||
error("BSS dot value has changed, "
|
||||
"was %06o, is now %06o"
|
||||
% (old_value, value))
|
||||
% (old_dot, Dot))
|
||||
except KeyError:
|
||||
error("BSS label '%s' wasn't defined in first pass!?"
|
||||
% label)
|
||||
|
||||
@ -16,6 +16,7 @@ offset data start - 3
|
||||
ascii 'xxxxxxx'
|
||||
ascii "xx"
|
||||
ascii 'x'
|
||||
tom bss 4
|
||||
end hlt
|
||||
|
||||
end start
|
||||
end start2
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user