Skip to content

Commit db2c975

Browse files
committed
cpu6: Implement operations for TOS6
stcc and bie (branch if interrupts enabled). TOS6 now starts up.
1 parent 0042518 commit db2c975

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

cpu6.c

+13-2
Original file line numberDiff line numberDiff line change
@@ -1582,8 +1582,10 @@ static int branch_op(void)
15821582
case 13: /* BS4 */
15831583
t = (switches & BS4);
15841584
break;
1585-
case 14: /* BTM - branch on teletype mark - CPU4 only ? */
1586-
t = 0;
1585+
case 14:
1586+
/* Branch if interrupts enabled.
1587+
* Was BTM - branch on teletype mark - on CPU4 */
1588+
t = int_enable;
15871589
break;
15881590
case 15: /* B?? - branch of IL1 AH bit 0 set (see B6/C6) */
15891591
t = cpu_sram[0x10] & 0x01;
@@ -1882,6 +1884,13 @@ static int jump_op(void)
18821884
return 0;
18831885
}
18841886

1887+
static int stcc(void)
1888+
{
1889+
uint16_t addr = fetch16();
1890+
mmu_mem_write8(addr, alu_out);
1891+
return 0;
1892+
}
1893+
18851894
/*
18861895
* This appears to work like the other loads and not affect C
18871896
*/
@@ -2491,6 +2500,8 @@ unsigned cpu6_execute_one(unsigned trace)
24912500
return alu5x_op();
24922501
if (op == 0x67)
24932502
return block_op(0x67, trace);
2503+
if (op == 0x6f)
2504+
return stcc();
24942505
if (op < 0x70)
24952506
return x_op();
24962507
if (op == 0x77 || op == 0x78)

0 commit comments

Comments
 (0)