Commit graph

812 commits

Author SHA1 Message Date
Mark Pizzolato
c389573c91 SCP: Avoid output to log during DEPOSIT command 2017-06-05 02:41:39 -07:00
Mark Pizzolato
df627b0cb1 SCP: Cleanup output produced by SHOW CONSOLE command 2017-05-27 20:25:50 -07:00
Mark Pizzolato
cb7c739b15 SCP: Add file exist test to IF command 2017-05-09 00:21:48 -07:00
Mark Pizzolato
2c6c8f4ef8 SCP: Always invoke strlcpy, strlcat, strcasecmp and strcasencmp vs sim_ forms 2017-05-07 19:19:55 -07:00
Mark Pizzolato
af54a5c8fd SCP: Fix out of scope memory reference in SET ENV -P "Prompt" EnvVar=Default 2017-05-01 08:11:36 -07:00
Mark Pizzolato
7ae5015610 SCP: Provide a way to gather input from a user into an environment variable
SET ENV -P "Prompt String" EnvVar=Default
2017-04-30 09:44:37 -07:00
Mark Pizzolato
168d0d9c47 SCP: add generic length limted and case independent string for all platforms 2017-04-22 21:28:48 -07:00
Mark Pizzolato
6ff3eeac80 SCP: Compiler suggested cleanup 2017-04-10 10:47:42 -07:00
Mark Pizzolato
7317645dd7 SCP: Make COPY command more robust 2017-04-07 14:35:04 -07:00
Mark Pizzolato
00f6cd59a2 SCP: Make sure that SCPE_OK isn't interpreted as error in sim_messagef
Error status returns cause the line in a DO file to be displayed.  This
should only happen for non SCPE_OK status.
2017-04-03 12:56:48 -07:00
Mark Pizzolato
9b2ff7e371 SCP: Add COPY/CP command 2017-04-03 08:26:25 -07:00
Mark Pizzolato
fa7e350c78 SCP: Avoid potential invalid pointer reference (Coverity) 2017-03-29 07:02:46 -07:00
Mark Pizzolato
cb6b0a526a SCP: Coverity warning cleanup 2017-03-28 22:35:26 -07:00
Mark Pizzolato
8d8a286c58 SCP: Add checks to avoid potential buffer overrun (Coverity) 2017-03-28 19:36:12 -07:00
Mark Pizzolato
3989251f85 SCP: Add more Error path checks 2017-03-28 13:40:11 -07:00
Mark Pizzolato
36f09d223f SCP: Fix potential error return checks (COVERITY) 2017-03-28 13:34:19 -07:00
Mark Pizzolato
f4b7d1fbf8 SCP: Migrate some use of strcat() to sim_strlcat() 2017-03-27 08:23:03 -07:00
Mark Pizzolato
34d29d3160 SCP: Add sim_strlcpy and sim_strlcat for platforms missing strlcpy and strlcat 2017-03-27 07:51:13 -07:00
Mark Pizzolato
ca19ac921c SCP: Fix potential NULL pointer dereference (COVERITY) 2017-03-14 10:24:18 -07:00
Mark Pizzolato
18efafe927 SCP: Fix remaining memory leak in RESTORE (COVERITY) 2017-03-13 17:56:18 -07:00
Mark Pizzolato
de95d5bec1 SCP: Fix memory leak in error paths of RESTORE command (COVERITY) 2017-03-13 17:25:42 -07:00
Mark Pizzolato
65f8e72b40 SCP: Fix uninitialized variable referenced in help (COVERITY) 2017-03-11 12:44:04 -08:00
Mark Pizzolato
7eece3deb1 SCP: Allow detaching of buffered devices without a buffer (COVERITY) 2017-03-11 11:10:56 -08:00
Mark Pizzolato
9731644495 SCP: Fix Coverity identified problems
- Use memmove instead of memcpy for potentially overlapping moves.
- Fix memory leaks in error paths.
- Fix potential NULL pointer references
- Assure that string copies stay within bounds of the destination string and
  are NUL terminated
- Fix NULL pointer dereferencing in help routines
2017-03-11 02:33:22 -08:00
Mark Pizzolato
abc1afc07e SCP: Fix director scan logic for *nix host systems 2017-03-09 11:03:00 -08:00
Mark Pizzolato
9d013e9b44 SCP: Fix asynchronous event queue updates without intrinsic instructions.
As discussed in #393
2017-03-09 07:55:21 -08:00
Mark Pizzolato
24f1c06d06 SCP: Add HELP info for UNTIL argument to the RUN and GO commands 2017-03-03 20:35:28 -08:00
Mark Pizzolato
c1f228f0b0 SCP: Add wild card support to DEL/RM and TYPE/CAT commands 2017-02-19 13:57:03 -08:00
Mark Pizzolato
ed8a288583 SCP: Fix help for DEL/RM command and use unlink() instead of remove()
remove()'s behavior was extended to perform either a unlink() and if
that failed, a rmdir().  This is not consistent with the native commands
del or rm since they only remove a file but not a directory.
2017-02-17 00:11:16 -08:00
Mark Pizzolato
7a1b35ae12 SCP: Add DEL/RM command to facilitate portable command files 2017-02-16 07:36:35 -08:00
Mark Pizzolato
8882cebe27 SCP: Produce detailed message when REG names are ambiguous.
As discussed in #402 and #398
2017-02-14 14:20:09 -08:00
Mark Pizzolato
69d2ba5193 SCP: Avoid use of 64 bit integers in SCP when host doesn't support it
As mentioned for VAX in #394
2017-02-08 16:44:49 -08:00
Mark Pizzolato
026d082950 SCP: Fix compiler indicated warning. 2017-02-06 12:26:37 -08:00
Mark Pizzolato
692b9abe5f SCP: Add ability to descriptively name UNITs
This allows a device simulator to specifically name the units that it uses
for different purposes.  This info is visible in the output of SHOW QUEUE
and debug output.

Once specified or dynamically determined (as previously occurred with
each call to sim_uname()), that name is saved for fast delivery on subsequent
calls.  This will remove some overhead when running with debugging on.
2017-02-06 10:27:01 -08:00
Mark Pizzolato
8dcc8c0678 SCP: Add the ability to Fprintf to memory buffer 2017-01-23 10:25:06 -08:00
Mark Pizzolato
e565ee563f SCP: Assure that all SCP produced debug output always lands in the debug file
The fprintf substitute function Fprintf can call tmxr_linemsgvf which may
internally produce debug output thus producing an infinite recursion.

All writes to the debug file are now done by explicit calls to fwrite() OR the
Fprintf socket destination is saved and cleared during all calls to fprintf.
2017-01-20 12:23:54 -08:00
Mark Pizzolato
1bb42b83ef VAX730, VAX750, VAX780, VAX8600: Make TODR a little more precise
Add consistent debug options to track TODR activities and the values which
are set.  Debug data will display the VMS time related to the values set and
read.
2017-01-19 15:25:08 -08:00
Mark Pizzolato
e36873f466 TIMER: Fix coscheduling functionality to produce consistent results
Added debug CHECK option to the sim_timer_activate_after() to verify
that coscheduled events actually have sim_activate_time_usecs() results
which are consistent with each other.
Additionally, coschedule tick processing now properly counts down
pending coschedule queued activities.
2017-01-18 23:53:46 -08:00
Mark Pizzolato
af1603f000 SCP: Add missing sim_strcasecmp() for host platforms without strcasecmp()
sim_strncasecmp() was previously provided.  Now both forms are available.
2017-01-17 21:54:01 -08:00
Mark Pizzolato
d5a56e0ab4 SCP: Take care to only write to a socket a single time and when appropriate 2017-01-16 14:25:38 -08:00
Mark Pizzolato
9851a36dd8 SCP: Fix Async I/O primitives operations for hosts without Intrinsic CAS 2017-01-10 23:40:25 -08:00
Mark Pizzolato
e450edd6ce SCP: Display most recent instruction execution rate in SHOW QUEUE output 2017-01-05 06:24:25 -08:00
Mark Pizzolato
711f6167fb TIMER: Make sure remnant usecs are always explicitly removed 2016-12-30 15:38:40 -08:00
Mark Pizzolato
c9276407e6 TIMER: Timing corrections and enhancements
- Add support to query remaining usecs on pending events.
- Generalized the sim_interval adjustment in sim_idle to allow more than
   a single decrement.
- More overhead reduction when idling.
- Carry usec values as double through out to fully support long wall clock
   delays.
2016-12-30 10:26:59 -08:00
Mark Pizzolato
e52ac6d57f SCP: Add help for NOEXPECT and spelling cleanups 2016-12-29 13:52:06 -08:00
Mark Pizzolato
8102e13d47 SCP: Add usecs_remaining information to SHOW QUEUE output 2016-12-29 07:12:12 -08:00
Mark Pizzolato
af6026b25e SCP: Add extended usecs wait time to SAVE/RESTORE file format. 2016-12-28 17:01:16 -08:00
Mark Pizzolato
aa82b57d10 TIMER: Fix various inconsistent timing behaviors
- Support for arbitrary long wait intervals in sim_activate_after with
   precisely correct delays aligned with the calibrated clock once
   per second.
- Proper handling of calls to sim_cancel for calibrated timer units
- Properly allow stopping of calibrated clock by calling sim_rtcn_calb
   with a ticksper == 0
- Only schedule asynchronous timer activities for delays longer than
   the minimal OS sleep time
- Only wake asynchronous timer thread to queue new timer events
   that are shorter than the currently shortest scheduled event
2016-12-26 12:42:25 -08:00
Mark Pizzolato
7c2d20f26f SCP: Make sim_cancel more efficient by stopping search as soon as canceled 2016-12-24 09:49:32 -08:00
Mark Pizzolato
48e0b47d51 SCP: Add a way to see the enabled SCP internal devices SHOW DEV -I 2016-12-17 10:35:56 -08:00