mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-01-23 02:49:07 +00:00
sim: sim_core: handle MOVMI as MOVEI, add unit test
This commit is contained in:
parent
e0305acd99
commit
9db877b3cb
@ -244,6 +244,7 @@ dispatch(Core, Mem, IR, EA) ->
|
||||
8#212 -> sim_moves:handle_MOVNM(Core, Mem, IR, EA);
|
||||
8#213 -> sim_moves:handle_MOVNS(Core, Mem, IR, EA);
|
||||
8#214 -> sim_moves:handle_MOVM(Core, Mem, IR, EA);
|
||||
8#215 -> sim_moves:handle_MOVEI(Core, Mem, IR, EA); % MOVMI = MOVEI
|
||||
8#250 -> sim_moves:handle_EXCH(Core, Mem, IR, EA);
|
||||
_ ->
|
||||
PC = (Core#core.pc_section bsl 18) bor Core#core.pc_offset,
|
||||
|
||||
@ -56,6 +56,7 @@
|
||||
-define(OP_MOVNM, 8#212).
|
||||
-define(OP_MOVNS, 8#213).
|
||||
-define(OP_MOVM, 8#214).
|
||||
-define(OP_MOVMI, 8#215).
|
||||
-define(OP_EXCH, 8#250).
|
||||
|
||||
%% 2.1.1 Exchange Instruction ==================================================
|
||||
@ -313,6 +314,17 @@ movm_minint_test() ->
|
||||
[ {#ea{section = 1, offset = 1, islocal = false}, 1 bsl 35} % AC1 = 400000,,0
|
||||
]).
|
||||
|
||||
movmi_test() ->
|
||||
Prog =
|
||||
[ {1, 8#100, ?INSN(?OP_MOVMI, 1, 0, 0, 8#200)} % 1,,100/ MOVMI 1,200
|
||||
, {1, 8#101, ?INSN_INVALID} % 1,,101/ <invalid>
|
||||
],
|
||||
%% Note that the EA in 1,,100 evaluates to 1,,200 local, but only the
|
||||
%% in-section offset is loaded into AC1.
|
||||
expect(Prog, [], {1, 8#101}, ?DEFAULT_FLAGS,
|
||||
[ {#ea{section = 1, offset = 1, islocal = false}, 8#200} % AC1 = 200
|
||||
]).
|
||||
|
||||
%% Common code to run short sequences ==========================================
|
||||
|
||||
expect(Prog, ACs, ExpectedPC, ExpectedFlags, ExpectedEs) ->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user