mirror of
https://github.com/simh/simh.git
synced 2026-03-04 10:34:40 +00:00
NOVA: Fix carry display in CPU instruction history
Problem: Currently when viewing the Nova CPU history the carry flag is always displayed as 0 regardless of it's actual value at the time. Cause: The carry bit is stored in bit 17 and is lost when stored into the int16 carry member of struct Hist_entry Solution: Shift carry into bit 0 before storing it in the CPU history. Improve code for displaying carry bit.
This commit is contained in:
committed by
Mark Pizzolato
parent
aaa4e4ca5e
commit
adf1a4c1dc
@@ -1,6 +1,6 @@
|
||||
/* nova_cpu.c: NOVA CPU simulator
|
||||
|
||||
Copyright (c) 1993-2017, Robert M. Supnik
|
||||
Copyright (c) 1993-2020, Robert M. Supnik
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
@@ -25,6 +25,7 @@
|
||||
|
||||
cpu Nova central processor
|
||||
|
||||
03-Oct-20 RMS Fixed bug in history handling of C bit (Samuel Deutsch)
|
||||
07-Sep-17 RMS Fixed sim_eval declaration in history routine (COVERITY)
|
||||
17-Mar-13 RMS Added clarifying brances to IND_STEP macro (Dave Bryan)
|
||||
04-Jul-07 BKR DEV_SET/CLR macros now used,
|
||||
@@ -1316,7 +1317,7 @@ if ( hist )
|
||||
hist_ptr->ac1 = AC[ 1 ] ;
|
||||
hist_ptr->ac2 = AC[ 2 ] ;
|
||||
hist_ptr->ac3 = AC[ 3 ] ;
|
||||
hist_ptr->carry = C ;
|
||||
hist_ptr->carry = C >> 16 ;
|
||||
hist_ptr->fp = FP ;
|
||||
hist_ptr->sp = SP ;
|
||||
hist_ptr->devBusy = dev_busy ;
|
||||
@@ -1388,7 +1389,7 @@ if ( hptr )
|
||||
(hptr->ac1 & 0xFFFF),
|
||||
(hptr->ac2 & 0xFFFF),
|
||||
(hptr->ac3 & 0xFFFF),
|
||||
((hptr->carry) ? 1 : 0)
|
||||
(hptr->carry & 1)
|
||||
) ;
|
||||
if ( cpu_unit.flags & UNIT_STK /* Nova 3 or Nova 4 */ )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user