mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-04-26 03:58:09 +00:00
sim: sim_boolean: handle SETCAM, add unit test
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
-define(OP_EQVB, 8#447).
|
||||
-define(OP_SETCA, 8#450).
|
||||
-define(OP_SETCAI, 8#451).
|
||||
-define(OP_SETCAM, 8#452).
|
||||
|
||||
%% 2.4 Boolean Functions =======================================================
|
||||
|
||||
@@ -598,6 +599,17 @@ setcai_test() ->
|
||||
[ {#ea{section = 1, offset = 1, islocal = false}, ?COMMA2(-1, 8#070707)} % AC1 = -1,,070707
|
||||
]).
|
||||
|
||||
setcam_test() ->
|
||||
Prog =
|
||||
[ {1, 8#100, ?INSN(?OP_MOVEI, 1, 0, 0, 8#707070)} % 1,,100/ MOVEI 1,707070
|
||||
, {1, 8#101, ?INSN(?OP_SETCAM, 1, 0, 0, 8#200)} % 1,,101/ SETCAM 1,200
|
||||
, {1, 8#102, ?INSN_INVALID} % 1,,102/ <invalid>
|
||||
, {1, 8#200, 0} % 1,,200/ 0
|
||||
],
|
||||
expect(Prog, [], {1, 8#102}, ?DEFAULT_FLAGS,
|
||||
[ {#ea{section = 1, offset = 8#200, islocal = false}, ?COMMA2(-1, 8#070707)} % C(1,,200) = -1,,070707
|
||||
]).
|
||||
|
||||
%% Common code to run short sequences ==========================================
|
||||
|
||||
expect(Prog, ACs, ExpectedPC, ExpectedFlags, ExpectedEs) ->
|
||||
|
||||
Reference in New Issue
Block a user