1
0
mirror of https://github.com/Gehstock/Mist_FPGA.git synced 2026-02-06 08:14:48 +00:00

MC6809: fix SEX instruction's flags

This commit is contained in:
Gyorgy Szombathelyi
2021-06-10 23:01:10 +02:00
parent 1f6211bb76
commit daea4522fc
2 changed files with 8 additions and 2 deletions

View File

@@ -1971,10 +1971,13 @@ begin
else if (Inst1 == OPCODE_INH_SEX)
begin
a_nxt = {8{b[7]}};
cc_nxt[CC_N_BIT] = b[7];
cc_nxt[CC_Z_BIT] = {b == 8'H00};
cc_nxt[CC_V_BIT] = 1'b0;
rLIC = 1'b1; // Instruction done!
rAVMA = 1'b1;
CpuState_nxt = CPUSTATE_FETCH_I1;
end
end
else if (Inst1 == OPCODE_INH_ABX)
begin
x_nxt = x + b;

View File

@@ -1969,10 +1969,13 @@ begin
else if (Inst1 == OPCODE_INH_SEX)
begin
a_nxt = {8{b[7]}};
cc_nxt[CC_N_BIT] = b[7];
cc_nxt[CC_Z_BIT] = {b == 8'H00};
cc_nxt[CC_V_BIT] = 1'b0;
rLIC = 1'b1; // Instruction done!
rAVMA = 1'b1;
CpuState_nxt = CPUSTATE_FETCH_I1;
end
end
else if (Inst1 == OPCODE_INH_ABX)
begin
x_nxt = x + b;