Commit graph

658 commits

Author SHA1 Message Date
Mark Pizzolato
ef9d1adce1 PDP10, PDP11, VAX: const cleanup 2015-02-13 06:18:24 -08:00
Mark Pizzolato
5b4e9d5891 SCP: Corrected error message text 2015-02-11 07:03:10 -08:00
Mark Pizzolato
4ee599b97e SCP: Added a SHOW VIDEO command for simulators which include video devices
This displays the capabilities of the available SDL environment on the running platform.
2015-02-05 09:22:36 -08:00
Mark Pizzolato
e0108b52a2 SCP: Compiler suggested cleanup and spelling fix 2015-01-14 15:09:54 -08:00
Mark Pizzolato
6f1e8377c9 SCP: Added -T switch to the EXPECT, SEND and STEP commands to specify that the units of delay/stepping are in microseconds rather than instructions. 2015-01-09 04:52:21 -08:00
Mark Pizzolato
9f9c983688 SCP: Fix debug setup info displayed by SHOW SEND and SHOW EXPECT 2015-01-06 12:44:24 -08:00
Mark Pizzolato
470b9b586a SCP: Fix EXPECT matching logic for non-regex strings to have enough room to buffer all of potential match data plus a NUL byte. 2015-01-06 11:25:55 -08:00
Mark Pizzolato
fb7b53cd07 SCP: Add info displayed in SHOW EXPECT and SHOW SEND to advise how SEND & EXPECT debugging is enabled 2015-01-06 08:27:03 -08:00
Mark Pizzolato
7a2600d6e1 SCP: EXPECT debug fix to avoid invalid memory reference if a expect structure doesn have a device pointer. Corrected comments. From Mark Emmer. 2015-01-06 06:31:05 -08:00
Mark Pizzolato
bc8ee69aba SCP: better parsing support for command files which contain UTF-8 data in SEND/EXPECT strings 2015-01-05 16:53:54 -08:00
Mark Pizzolato
aae9e55a39 SCP: More allow command files to contain UTF-8 data.
- Provide a sim_islower(), sim_isalpha(), sim_isprinit(), sim_isdigit(), sim_isgraph(), sim_isalnum()  which make sure that the character being examined as an unsigned char.
2015-01-05 14:08:03 -08:00
Mark Pizzolato
256bbdddc9 SCP: Allow command files to contain UTF-8 data.
- Ignore a UTF_BOM sequence at the beginning of command files.
- Provide a sim_isspace() which makes sure that isspace only considers the character being examined as an unsigned char.
2015-01-04 06:59:56 -08:00
Mark Pizzolato
99a7e65876 SCP: Only report DO file context when run_cmd completes if the completion status is not a simulator specific error code and not due to a STEP, EXPECT or STOP completion.
The commands which operate through run_cmd (GO, STEP, CONTINUE, BOOT, RUN) will all exit with a status which is NOT SCPE_OK.  Most of the exit status values will be 100% normal and not indicative of a true error, so producing error message context is not necessary or desired.
2014-12-31 15:04:52 -08:00
Mark Pizzolato
6ec6b6ab1f SCP: Provide an API to display alternate error message text while returning SCPE status. 2014-12-31 14:32:10 -08:00
Mark Pizzolato
de9fc84fd4 SCP: added flexibility to search specifier parsing to fallback to register value format if the VM supplied parse_sym() doesn't handle the value provided. 2014-12-29 14:03:43 -08:00
Mark Pizzolato
9e1e32584b SCP: Avoid redundant log and debug output 2014-12-29 03:41:32 -08:00
Mark Pizzolato
1d530cc48d SCP: Enhanced ASSERT/IF to support expressions which test memory contents. Also enhanced EXAMINE's search capabilities to be able to match multi-byte patterns for VMs which are byte addressable. 2014-12-25 06:19:59 -08:00
Mark Pizzolato
47a0576f09 SCP: Revert prior commit since it was the wrong approach 2014-12-25 06:15:52 -08:00
Mark Pizzolato
0a96584fdf SCP: Added special EXAMINE reference variable "$" usable in conditional expression for the ASSERT and IF commands 2014-12-23 03:09:40 -08:00
Mark Pizzolato
88d644258e SCP: Allow the VM to print simulator stop message information in lieu of, or in addition to, the default message.
The current implementation of "run_cmd" in scp.c calls "fprint_stopped_gen" (via "fprint_stopped") to print the message associated with the "sim_instr" return status.  Messages associated with VM stops must be provided to the SCP via the "sim_stop_messages" array.

"fprint_stopped_gen" prints the status message in a rigid format: the message string, a comma, the program counter register name, a colon, the current PC value, and the instruction at that address in symbolic format.

For example:

       HALT instruction, P: 24713 (LDA 1)

Only the message string is under the control of the VM.  If additional information is needed, it can only be added before the first comma.

The HP2100 simulator does this for halt instructions, which contain device select code and flag hold/clear bit fields that, in practice, are used to communicate to the operator the significance of the particular halt encountered, rather than to affect the device interface:

       HALT instruction 102077, P: 24713 (LDA 1)

To implement this, the simulator must define the message as a variable and then copy the formatted octal value into the buffer at the appropriate location before returning from "sim_instr".

However, if the VM wants to display a different register value, e.g.:

       Self test #13 complete, STAT: 000020

...this cannot be done without also displaying the program counter, which may be irrelevant for the given stop condition.
2014-12-18 11:16:27 -08:00
Mark Pizzolato
42e7d48c82 SCP: Fixes Cannot show radix, etc. for a device that has no modifiers and SET and SHOW responses for invalid entry are inconsistent. from Dave Bryan
001. PROBLEM:  Cannot show radix, etc. for a device that has no modifiers.

     OBSERVATION:  The default data radix for a device may be set with the SET
     <dev> OCT|DEC|HEX command.  However, if the device does not have a modifier
     table, SHOW <dev> RADIX is rejected with "No settable parameters".

     The same problem occurs for SHOW <dev> DEBUG and SHOW <dev> NAMES.  For a
     device that provides debug printouts, SHOW <dev> MOD will list "DEBUG,
     NODEBUG" among the modifiers, and the SHOW <dev> DEBUG command will display
     the current debug status.  However, if the device does not contain a
     modifier table, SHOW <dev> MOD and SHOW <dev> DEBUG will report "No
     settable parameters", even though SET <dev> DEBUG is accepted and works as
     expected.  For such a device, SHOW MOD will show "DEBUG, NODEBUG" as
     acceptable modifiers.

002. PROBLEM:  SET and SHOW responses for invalid entry are inconsistent.

     OBSERVATION:  Entering SET <dev> <mod> where <mod> is not defined in the
     device's modifier table displays "Non-existent parameter."  Entering SHOW
     with the same parameters displays "Invalid argument."

     Similarly, entering SET <dev> DEBUG for a device that does not have
     debugging capability displays "Command not allowed."  Entering SHOW with
     the same parameters displays nothing.

     In both cases, the messages displayed should be the same for the same
     error.
2014-12-17 21:00:38 -08:00
Mark Pizzolato
e87d40c600 SCP: Add a -Q option to ATTACH -R and ATTACH -N to suppress success status messages. From Dave Bryan 2014-12-17 20:21:17 -08:00
Mark Pizzolato
95740f1f2d SCP: Add a "-N" (new file) option to the SET LOG and SET DEBUG commands. From Dave Bryan. 2014-12-17 20:07:28 -08:00
Mark Pizzolato
03800ae725 SCP: Stop calls VM-provided address printer for PC without REG_VMAD from Dave Bryan
OBSERVATION:  For a simulator stop, sim_vm_fprint_addr (if defined) is
     called to print the value of the program counter, regardless of whether or
     not the register was defined with REG_VMAD.  However, displaying the PC
     value with "examine" calls sim_vm_fprint_addr only if the REG_VMAD flag is
     present.  The displayed value of the PC should be the same in both cases.
2014-12-16 09:02:57 -08:00
Mark Pizzolato
e35081db1f SCP: Avoid duplicate output when run_cmd completes just as is done in sim_printf() 2014-12-16 07:56:21 -08:00
Mark Pizzolato
4f41c53674 SCP: Fixed potential out of bounds array reference while expanding command arguments.
Avoid race condition while producing debug header output from multiple threads.
2014-12-14 13:21:32 -08:00
Mark Pizzolato
d1b5e3aa27 SCP: Add the # character at the beginning of a line as a comment character. Requested by Kevin Handy 2014-12-05 16:29:17 -08:00
Mark Pizzolato
1f20041b58 SCP: Added expansion of special built-in environment variable DATE_YC which is the century of the current date. 2014-12-03 10:39:19 -08:00
Mark Pizzolato
cd9a499c94 SCP: Fixed EXPECT processing to properly cleanup after matches. Added display of expect buffer to SHOW EXPECT and extended expect match debugging output. 2014-12-03 09:58:31 -08:00
Mark Pizzolato
45859ffe34 SCP: Fixed SEND command to properly support a bare AFTER=n argument. 2014-12-03 07:36:53 -08:00
Mark Pizzolato
4eed007607 SCP: Restructured timer/co-scheduling activities to support co-scheduling on specific timers 2014-12-02 05:33:59 -08:00
François Revol
a0c7f99a5e scp: avoid redefining MAX
On Haiku, we end up including <sys/param.h> from sim_sock.h which
defines MAX.
2014-11-10 20:58:56 +01:00
Mark Pizzolato
94486c1286 SCP: Updated documentation and help text 2014-10-31 05:13:55 -07:00
Mark Pizzolato
a4c50567d7 Compiler suggested cleanup. 2014-10-29 09:17:07 -07:00
Mark Pizzolato
4938c02d95 SCP: Fixed expect match checking when testing regular expressions to avoid NUL bytes in the output stream.
This is necessary since the RegEx api only takes simple C NUL terminated strings.
2014-10-29 00:46:50 -07:00
Mark Pizzolato
6368a217fb SCP: Fixed SET and SHOW command parsing to more generally allow value operations against the default device (CPU) both with and without value oriented modifiers 2014-10-28 08:39:14 -07:00
Mark Pizzolato
c548b34772 Compiler suggested cleanups. 2014-10-27 17:14:28 -07:00
Mark Pizzolato
2e1167d4a0 Compiler suggested cleanups - mostly const fixups 2014-10-26 17:06:24 -07:00
Mark Pizzolato
4dbac410da SCP: Added const declarations to various APIs to reflect the appropriate usage. Moved parameter values for run_cmd and exdep_cmd to scp.h 2014-10-26 14:52:22 -07:00
Mark Emmer
f6e750471a SCP: Fix SEND <dev>:line when after=nn and delay=nn not specified
For a command like:  SEND MUX:0 "abc"
in which a device is specified but there are no after=nn and delay=nn parameters, the code neglected to update cptr, resulting in an illegal argument error condition.
2014-10-26 13:42:49 -06:00
Mark Pizzolato
b4fb149b8d SCP: Fix help text for expect command. 2014-10-25 15:21:55 -07:00
Mark Pizzolato
e8358703be SCP: Fix NOEXPECT to actually delete a single indicated expect rule. Allow expect actions to be provided. Fix match buffer management when expect regular expressions are in use. 2014-10-25 11:14:36 -07:00
Mark Pizzolato
ebf4e0cb64 SCP: Add support for legacy form of console expect and send string commands (from Dave Bryan) 2014-10-23 05:58:43 -07:00
Mark Pizzolato
3256c10c77 General cleanup migrate to using sim_printf vs separate calls to printf and fprintf(sim_log). 2014-10-22 17:12:14 -07:00
Mark Pizzolato
bff7521c56 SCP: Migrate more output written to sim_log to use sim_printf. 2014-10-22 13:25:42 -07:00
Mark Pizzolato
6c5a700191 SCP: Added numeric value comparisons to IF and ASSERT compares.
Compare operations will do a literal compare of basic string values unless the all of each string contains numeric data.  If numeric data is there then a numeric comparison will be made.  For example:

	If "+1" == "1" echo equal

will display equal, while the simple string comparison will be not-equal.
2014-10-22 11:54:08 -07:00
Mark Pizzolato
1f9d21ad2e SCP: Added IF command and string comparision behaviors to the ASSERT and IF command operations. 2014-10-22 11:28:28 -07:00
Mark Pizzolato
916bab3c2a SCP: Cleaned up help for EXPECT and SEND commands. Added optional case insensitive match option to regular expression EXPECT rules. 2014-10-22 11:27:38 -07:00
Mark Pizzolato
5a4bbbad8d SCP: Extended EXPECT and SEND to have more flexible activation delays
- EXPECT will now tolerate a HALTAFTER=n parameter which delay the simulator stopping execution for n instructions.  Unpredictable behavior will happen if multiple EXPECT conditions see matching data before the first actualy halt occurs.
- SEND has an AFTER=n argument which delays the initial stuffed data from being input for at least n instructions.  It also has a DELAY=m argument which specifies the minimum number of instructions which must execute between stuffed input data.
- Changed run_cmd() to no longer clear pending breakpoint actions before starting instruction execution.
- Added a -Q switch to the commands which dispatch through run_cmd() (RUN, STEP, NEXT, GO, BOOT, etc.).  This switch will suppress status output when execution stops.  This will allow sequences of breakpoint action commands to silently execute when needed.
2014-10-20 16:47:33 -07:00
Mark Pizzolato
5af6210ed9 SCP: Add RegEx support to EXPECT string processing 2014-10-20 04:42:25 -07:00