mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-05-02 14:21:02 +00:00
sim: sim_boolean: handle ORCBI, add unit test
This commit is contained in:
@@ -53,6 +53,7 @@
|
||||
, handle_ORCAI/4
|
||||
, handle_ORCAM/4
|
||||
, handle_ORCB/4
|
||||
, handle_ORCBI/4
|
||||
, handle_ORCM/4
|
||||
, handle_ORCMB/4
|
||||
, handle_ORCMI/4
|
||||
@@ -722,6 +723,14 @@ handle_ORCB(Core, Mem, IR, EA) ->
|
||||
fun(Core1, Mem1) -> handle_ORCB(Core1, Mem1, IR, EA) end)
|
||||
end.
|
||||
|
||||
-spec handle_ORCBI(#core{}, sim_mem:mem(), IR :: word(), #ea{})
|
||||
-> {#core{}, sim_mem:mem(), {ok, integer()} | {error, {module(), term()}}}.
|
||||
handle_ORCBI(Core, Mem, IR, EA) ->
|
||||
AC = IR band 8#17,
|
||||
CA = sim_core:get_ac(Core, AC),
|
||||
Word = ((bnot CA) bor (bnot EA#ea.offset)) band ((1 bsl 36) - 1),
|
||||
sim_core:next_pc(sim_core:set_ac(Core, AC, Word), Mem).
|
||||
|
||||
%% Miscellaneous ===============================================================
|
||||
|
||||
ea_address(#ea{section = Section, offset = Offset}) ->
|
||||
|
||||
@@ -310,6 +310,7 @@ dispatch(Core, Mem, IR, EA) ->
|
||||
8#466 -> sim_boolean:handle_ORCMM(Core, Mem, IR, EA);
|
||||
8#467 -> sim_boolean:handle_ORCMB(Core, Mem, IR, EA);
|
||||
8#470 -> sim_boolean:handle_ORCB(Core, Mem, IR, EA);
|
||||
8#471 -> sim_boolean:handle_ORCBI(Core, Mem, IR, EA);
|
||||
_ ->
|
||||
PC = (Core#core.pc_section bsl 18) bor Core#core.pc_offset,
|
||||
{Core, Mem, {error, {?MODULE, {dispatch, PC, IR, EA}}}}
|
||||
|
||||
Reference in New Issue
Block a user