Commit graph

29 commits

Author SHA1 Message Date
Mark Pizzolato
ae825c9afb All: Declare sim_stop_messages as an array SCPE_BASE long
This avoids a potential invalid pointer dereference when formatting
the return value from sim_instr() if it is < SCPE_BASE but greater
than the previously defined static array size.sizeof

Update simh.doc to reflect this generic change.
2020-09-02 15:56:07 -07:00
Mark Pizzolato
80d9393b83 alpha, HP2100, ID16, ID32, I7094, PDP11 and VAX: Fix array REG definitions
Array REGister definitions have been made consistent by passing the
name of the array object.  This allows proper sizing assessment
to occur in the register validation logic.

Some previously described array REGister initializers were not really
arrays.  Some were structures and others were merely pointers to
someplace in memory that it was desirable to view as a scalar array.

Structures or other blob data should now use SAVEDATA.  Virtual
arrays intended to be interpret some part of memory as scalar data
now use VBRDATA initializers.
2020-03-06 16:29:17 -08:00
Mark Pizzolato
90eddfc733 alpha, HP2100, ID16, ID32, PDP11 and VAX: Normalize array REG definitions
Array REGister definitions have been made consistent by passing the
address of the whole array object.  This allows proper sizing assessment
to occur in the register validation logic.
2020-03-01 12:11:13 -08:00
Mark Pizzolato
762bb93199 alpha: Fix DMAPEN register definition 2020-03-01 12:09:13 -08:00
Bob Supnik
e3cdbed45f alpha: Correct physical address masking 2018-06-03 15:41:57 -07:00
Mark Pizzolato
a92dc610a4 alpha, pdp18b, PDP8, sigma: removed stray tabs which crept in over time. 2018-04-01 14:22:30 -07:00
Mark Pizzolato
906ea892cf alpha: CONST compatibility with 3.10 2018-03-09 16:00:56 -08:00
Bob Supnik
bd0cad685c alpha: Fixed reversed definitions of FTOIS, FTOIT (Maurice Marks) 2017-10-05 18:55:00 -07:00
Bob Supnik
4053a6f481 alpha: Fixed reversed definitions in opcode 12 (shifts)
It turns out that the two reversed opcodes Maurice identified were not the
only problems in opcode 12 (shifts). All of the INS/EXT pairs at function
codes .57 and above were reversed. In addition, the mnemonics in the
opcode table in alpha_sys.c are wrong as well as reversed.
2017-05-27 14:30:05 -07:00
Bob Supnik
a719ef51e8 alpha: Fixed function field widths (Maurice Marks)
Maurice Marks, at VMS Software Inc, is using the Alpha instruction emulator
from SimH as a backup to an Alpha binary translator! He found a bug in the
instructions definitions: function fields, both integer and floating, are 7b not
6b.
2017-04-17 10:10:03 -07:00
Bob Supnik
934f4e6471 alpha: Fix Coverity identified Defect: 1416171 2017-03-14 18:22:04 -07:00
Mark Pizzolato
d8dbc7e6b5 SCP: Migrate all stdio writes to pass through SCP provided Fprintf() 2017-01-14 20:48:09 -08:00
Mark Pizzolato
385d14ee4f alpha: Fix pal_eval_intr() to properly reference the ev5_icsr
The original code mistakenly evaluated several constant expressions rather
than referencing the ev5_iscr variable.
2016-05-19 11:04:49 -07:00
Mark Pizzolato
5531ccb175 ALL: Massive 'const' cleanup
These changes facilitate more robust parameter type checking and helps
to identify unexpected coding errors.

Most simulators can now also be compiled with a C++ compiler without
warnings.

Additionally, these changes have also been configured to facilitate easier
backporting of simulator and device simulation modules to run under the
simh v3.9+ SCP framework.
2016-05-15 15:25:33 -07:00
Mark Pizzolato
0f013a582e alpha: Fix iteration count for MINSW4, MINUW4, MAXUW4, MAXSW4 instructions
Also properly type the return value for pal_eval_instr()
and the arguments to vax_sqrt() and ieee_sqrt().
2016-05-04 15:59:08 -07:00
Mark Pizzolato
66dba79418 ALPHA, ALTAIR, AltairZ80, I7094, NOVA, PDP1, PDP10, PDP11, PDP18B, PDP8, SAGE, sigma, swtp6800, TX-0, VAX: Change tabs to spaces which had crept in over time 2015-03-30 10:24:24 -07:00
Mark Pizzolato
e768629009 SCP: Added the capability for EXAMINE command output to be written directly to a socket. 2015-02-21 12:40:36 -08:00
Mark Pizzolato
54a4845fb2 ALL: Revert "ALL: make sure all useful state is in simh registers while processing events"
This reverts commit 5551a0dd9c.

The original idea was that the state being put into simh registers would be required to have all useful information available when remote console executed commands.  These steps were taken from the code that sim_instr() executed as it was exiting.  After this change was made it was realized that once a remote console command executed it might change state that directly affected instruction execution.  To solve this, the logic that executes before the instructions in sim_instr() would then need to be executed whenever the event dispatch processing completed.  This approach is messy, burdensome and potentially a lot of overhead for every event dispatch even though almost none of the event dispatches would be for remote console command execution.  A completely different approach was suggested by J. David Bryan.  That alternative approach would be to have remote console commands execute outside of the sim_instr() routine.  Thus allowing the existing prelude and postlude code in sim_instr() to be performed naturally and let the remote console activities run in the same context as all other simh commands.  Recent changes to scp and sim_console implement this alternative approach and thus these original changes are completely irrelevant and are thus being removed.
2015-02-15 12:42:32 -08:00
Mark Pizzolato
5551a0dd9c ALL: make sure all useful state is in simh registers while processing events 2015-01-15 12:37:07 -08:00
Mark Pizzolato
c2cef3c051 ALL: Avoid name space collision for the global variable PC when readline is dynamically loaded in many simulators. 2015-01-11 15:22:47 -08:00
Mark Pizzolato
17f6132352 alpha: Compiler suggested cleanups 2014-12-30 11:57:19 -08:00
Mark Pizzolato
26bd72ec1e alpha: Compiler suggested cleanup 2014-11-16 14:02:49 -08:00
Mark Pizzolato
3951ad2432 Cleanup of unneeded global extern declarations 2014-10-10 08:18:15 -07:00
Mark Pizzolato
e2524e7feb Beta Simulators (PDQ-3 and SAGE) from Holger Veit 2014-09-17 17:31:40 -07:00
Mark Pizzolato
c1c5535d0b sigma: Fix shutdown/detach issue with tape devices.
Also add makefile and Visual Studio Project definitions to build the incomplete/unsupported sigma and alpha simulators.
2014-07-10 14:57:18 -07:00
Mark Pizzolato
d5ca542102 Changed use of compile #defines which start with a _ character to not do this since defined symbols starting with _ are reserved to local compiler/runtime implementations in the C language. This addresses issue #32 2013-03-12 11:07:58 -07:00
Mark Pizzolato
448d9e52fc Added VAX860 to the descrip.mms and cleaned up the VMS compiler identified issues 2013-01-10 15:14:51 -08:00
Mark Pizzolato
dac73b9381 Migrating scp and library global variables to be declared as extern in the appropriate library include file and remove repetitive declarations in referencing modules. 2013-01-10 13:29:15 -08:00
Mark Pizzolato
fffad7c20e Merge changes from v3.9-0 rc1 2012-03-19 16:05:24 -07:00