From dbcb93dc2c76bee448b282ec7ac0d6a7d25888a5 Mon Sep 17 00:00:00 2001 From: Mikael Pettersson Date: Sun, 12 Jan 2020 18:38:09 +0100 Subject: [PATCH] as: parse: handle indirect EA without preceding accumulator --- erlang/apps/as/src/parse.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/erlang/apps/as/src/parse.erl b/erlang/apps/as/src/parse.erl index b6fac6b..3c1160d 100644 --- a/erlang/apps/as/src/parse.erl +++ b/erlang/apps/as/src/parse.erl @@ -116,6 +116,7 @@ stmt_after_symbol(ScanState, Location, Name) -> case scan:token(ScanState) of {ok, {_Location, ?T_COLON}} -> {ok, {Location, #s_label{name = Name}}}; {ok, {_Location, ?T_NEWLINE}} -> make_insn(Location, Name, false, false, false, false); + {ok, {_Location, ?T_AT}} -> insn_ea_at(ScanState, Location, Name, _AccOrDev = false); {ok, {Location2, {?T_UINTEGER, UInt}}} -> insn_uint(ScanState, Location, Name, Location2, UInt); {ok, {_Location, _Token} = First} -> insn_disp(ScanState, Location, Name, First); {error, _Reason} = Error -> Error @@ -133,7 +134,7 @@ insn_uint(ScanState, Location, Name, Location2, UInt) -> {error, _Reason} = Error -> Error end. -%% Seen " " where is not followed by ",". +%% Seen " " where is not "@", or followed by ",". %% is the start of the . insn_disp(ScanState, Location, Name, First) -> case do_expr({ok, First}) of