mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-04-24 19:33:55 +00:00
sim: sim_boolean: handle ANDCMM, add unit test
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
-define(OP_SETMB, 8#417).
|
||||
-define(OP_ANDCM, 8#420).
|
||||
-define(OP_ANDCMI, 8#421).
|
||||
-define(OP_ANDCMM, 8#422).
|
||||
|
||||
%% 2.4 Boolean Functions =======================================================
|
||||
|
||||
@@ -309,6 +310,17 @@ andcmi_test() ->
|
||||
[ {#ea{section = 1, offset = 1, islocal = false}, 8#030303} % AC1 = 0,,030303
|
||||
]).
|
||||
|
||||
andcmm_test() ->
|
||||
Prog =
|
||||
[ {1, 8#100, ?INSN(?OP_MOVEI, 1, 0, 0, 8#333333)} % 1,,100/ MOVEI 1,333333
|
||||
, {1, 8#101, ?INSN(?OP_ANDCMM, 1, 0, 0, 8#200)} % 1,,101/ ANDCMM 1,200
|
||||
, {1, 8#102, ?INSN_INVALID} % 1,,102/ <invalid>
|
||||
, {1, 8#200, ?COMMA2(0, 8#707070)} % 1,,200/ 0,,707070
|
||||
],
|
||||
expect(Prog, [], {1, 8#102}, ?DEFAULT_FLAGS,
|
||||
[ {#ea{section = 1, offset = 8#200, islocal = false}, ?COMMA2(0, 8#030303)} % C(1,,200) = 0,,030303
|
||||
]).
|
||||
|
||||
%% Common code to run short sequences ==========================================
|
||||
|
||||
expect(Prog, ACs, ExpectedPC, ExpectedFlags, ExpectedEs) ->
|
||||
|
||||
Reference in New Issue
Block a user