Commit graph

17 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
8a858c181d SCP: Clean up WEAK definition and rework deprecated references to sim_vm_init
As discussed in #794
2020-01-29 12:30:25 -08:00
Mark Pizzolato
bcdabeb9fe SAGE, PDQ-3: Silence GCC optimizer warnings about unused function results 2020-01-04 08:42:15 -08:00
Holger Veit
3e54264253 SAGE: Fix flag setting with 33bit mask 2017-03-28 13:32:22 -07:00
Holger Veit
9a9b5deb9c PDQ-3, SAGE: Coverity Fixes
CID       Action
   1416081   changed variable answer to int
   1416082   checked returned values with ASSURE - read error means corrupted target code.
   1416088   added return
   1416109   This fallthru was intentional - duplicated code to make coverity happy
   1416111   This fallthru was intentional - duplicated code to make coverity happy
   1416116   This fallthru was intentional - duplicated code to make coverity happy
   1416117   This fallthru was intentional - duplicated code to make coverity happy
   1416124   protected against negative return
   1416142   added ASSURE, however this case won't happen since reg_intpending==true implies positive int level
   1416145   checked non-NULL, return SCPE_ARG if NULL
   1416150   since only 2 drives are supported, fdc_selected is decoded to 0 and 1 only (allowed 2 and 3 before)
   1416152   restrict to 2 drives only
   1416166   checked value with ASSURE

   1416101   typo: should have been resx
   1416106   unnecessary code removed
   1416110   this fallthru was intentional - duplicated code to make coverity happy
   1416112   this fallthru was intentional - duplicated code to make coverity happy
   1416148   change condition to check for negative value
   1416179   break was remainder from former logic - removed
   1415866   code was remainder from former unimplemented instruction trap - removed
2017-03-27 06:57:43 -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
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
0a2eb2997c SAGE: Add missing STEP command structure members from scp.c 2015-09-25 11:26:09 -07:00
Mark Pizzolato
41978eca80 All: Convert from C runtime library perror() to sim_perror so that all messages will arrive in the same place(s). 2015-04-03 19:56:37 -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
Eric Scharff
af713b78e1 Fix off-by-one in reading cache address from memory
Commit a9ac7c153 properly avoided writing past the end of cache_line,
but in doing so introduced an error as to the first memory address that
should be written. This fix avoids writing past the cache_line by simply
reading the previous memory location.

Fixes the CP/M 68K simulation example and issue #181
2015-01-22 21:58:56 -05:00
Lioncash
a9ac7c1534 SAGE: Fix loop bounds in m68k_cpu
cache_line has a size of CACHE_SIZE (16), so starting at that index will be outside the bounds of the array.
2014-11-26 12:55:55 -05:00
Mark Pizzolato
995ab8f1e2 More General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-24 14:37:37 -07:00
Mark Pizzolato
3951ad2432 Cleanup of unneeded global extern declarations 2014-10-10 08:18:15 -07:00
Mark Pizzolato
9bfc87f2dc Compiler suggest cleanup. 2014-09-18 03:29:58 -07:00
Mark Pizzolato
e2524e7feb Beta Simulators (PDQ-3 and SAGE) from Holger Veit 2014-09-17 17:31:40 -07:00