SCP Extensions ============== COMPLETED EXTENSIONS -------------------- The following extensions have been incorporated into the SCP Extensions module and released to the public: 1. ENHANCEMENT: Alter the DO command to retry the command file open with an extension of ".sim" if the original open fails. VERSION: 3.2-1 OBSERVATION: It's helpful to assign command files an extension for sorting and classification purposes, and it's additionally helpful if that extension is assumed when not specified. For example, entering "do rte" should first look for a command file named "rte" and then for one named "rte.sim". RESOLUTION: Create an "ex_do_cmd" routine to replace the existing DO executor to copy the filename, append the extension, and retry the file open if the first attempt fails. STATUS: Added on 2004-07-17. 2. ENHANCEMENT: Reverse the meaning of the -E switch to the DO command. VERSION: 3.6-0 OBSERVATION: The DO command normally continues in the presence of errors returned by invocations within the command file. The -E switch was added in revision 3.6-1 to alter behavior to abort on any error. However, the standard behavior is contrary to expectations. For example, an ATTACH -E command prints an error if the file does not exist. The containing command file, though, continues to execute and undoubtedly will run into additional problems because the attachment failed. In general, command files will not execute properly in the presence of unexpected errors, so it is more reasonable for execution to stop when an error is encountered. If the user wants execution to continue in spite of errors, an explicit override should be required. RESOLUTION: Modify "ex_do_cmd" to reverse the sense of the -E switch. In the absence of -E, command file execution will abort if a command returns an error. If the DO command specifies -E, however, then the command will fail but command file execution will continue. STATUS: Added on 2006-06-08. 3. ENHANCEMENT: Suppress breakpoint and step messages in command files. VERSION: 3.10-0 OBSERVATION: Command files that automate prompts and responses use breakpoints and single steps to respond to prompts and set up responses. However, the console log of such sessions has the "Breakpoint" and "Step expired" messages interspersed with the prompts and responses, making the log hard to read. For example, an automated reply of "1024" to a "Memory size?" prompt would appear as: Memory size? Breakpoint, P: 37305 (CLF 10) 1024 As these "errors" are expected and indeed do not cause DO command aborts, it would be nicer if they were suppressed altogether when they occur in the context of DO command file execution. In the preceding example, the result would be: Memory size? 1024 The messages should continue to be printed when they occur interactively, when the DO command specifies the -V option to print all commands or a new -A switch to print all errors, or when the -E option causes errors to abort execution. RESOLUTION: Modify "ex_do_cmd" to set the SIM_SW_HIDE switch to indicate "quiet" command file execution if neither -V nor -A is specified. The HP simulators look for this switch and return SCPE_OK status in lieu of the SCPE_STEP or STOP_BRKPNT codes. In turn, this suppresses the "Step expired" and "Breakpoint" simulation stop messages that otherwise would be interspersed with prompts and responses. STATUS: Added 2019-04-13. 4. ENHANCEMENT: Add temporary breakpoints to the BREAK command. VERSION: 3.9-0 OBSERVATION: Currently, numeric breakpoints are persistent. When examining execution of a program in memory, skipping over sections of code is done by setting breakpoints at the ends of the sections. In many cases, these breakpoints are used once, just to reach the areas of interest. Entering a NOBREAK command as each breakpoint is reached is tedious. It would be better if the breakpoints could be specified as temporary when they were created. RESOLUTION: Create new "ex_sim_brk_test" routine to augment the existing breakpoint tester to clear temporary breakpoints that were created with the -T switch to the BREAK command. STATUS: Added 2017-10-01. 5. ENHANCEMENT: Add string breakpoints. VERSION: 3.9-0 OBSERVATION: Many repetitive tasks, such as system boot-up, might be automated if SIMH could detect prompts from the simulated program and supply responses. This capability would be especially useful for automating long and tedious interactions, such as running diagnostics or system generations. While sophisticated third-party tools exist for this purpose (e.g., "expect"), many tasks require only simple prompt-and- response interactions. A string breakpoint causes a simulator stop when a specified string is output. This is analogous to a data breakpoint that causes a simulator stop when a specified memory location is read or written, or to a an instruction breakpoint that stops when a specified PC location is reached. The BREAK command can be extended to accept string as well as numeric parameters. This would permit multiple string breakpoints to be active simultaneously and string breakpoints to have actions. The desired syntax is: BREAK { -T } [ } { [ ] } { ; ... } BREAK { -T } [ } { [ ] } DELAY { ; ... } BREAK DELAY NOBREAK [ } ...where specifies whose output is examined, specifies the number of event ticks that elapse before the stop occurs, is one or more strings of characters to match, separated by commas, that are enclosed in single (') or double (") quotes and may contain escapes of the form \", \', \r, \n, or \nnn (octal) that are replaced with their character representations, and specifies the number of times the string is matched before the stop occurs. If the -T option is specified, the breakpoint is temporary; otherwise, it is persistent. If omitted, defaults to the console, defaults to 0 (i.e., the stop occurs immediately after the last character of the string is matched), and defaults to 1. If the duplicates an existing breakpoint, the breakpoint is updated with the new , , and values supplied. Specifying BREAK DELAY with no quoted string sets a persistent simulator stop delay that is used for subsequent string BREAKs that do not specify a DELAY value. Specifying a DELAY with a quoted string sets the delay for that command only; subsequent BREAKs revert to the persistent delay. In this initial implementation, only one per BREAK statement is permitted, and and must be omitted, so string breakpoints apply only to the system console. The NOBREAK command accepts either a single , which removes the corresponding string breakpoint, or an empty , which removes all string breakpoints. NOBREAK ALL also removes all string breakpoints as well as all numeric breakpoints. RESOLUTION: Create a new "ex_break_cmd" routine to augment the existing BREAK executor to look for quoted strings and to establish string breakpoints. Add new "parse_quoted_string" and "encode" routines to parse and decode quoted strings, and to re-encode strings for display. Create new "ex_sim_putchar" and "ex_sim_putchar_s" routines that augment the existing routines to test the supplied characters against pending string breakpoints. Create a new "test_breakpoint" routine that performs the test and schedules the "breakpoint_unit" if a match occurs, and a new "breakpoint_service" routine to set a flag in the "sim_brk_summ" global variable to indicate a triggered breakpoint. Modify the existing "ex_sim_brk_test" routine to check for a triggered string breakpoint and to return the associated switch, causing the simulator's instruction execution loop to exit. STATUS: Added 2004-11-15 and updated 2017-10-01 and 2019-12-03. 6. ENHANCEMENT: Add automated replies. VERSION: 3.9-0 OBSERVATION: To permit automated replies to program prompts, a REPLY command is added that supplies characters to the device poll routine in lieu of keyboard input. The syntax is: REPLY [ } REPLY [ } DELAY REPLY DELAY NOREPLY [ } ...where specifies whose input is supplied, specifies the number of event ticks that elapse before the first character is input, and is a string of characters to supply that are enclosed in single (') or double (") quotes and may contain escapes of the form \", \', \r, \n, or \nnn (octal) that are replaced with their character representations. If omitted, defaults to the console, and defaults to 0 (i.e., the first character is supplied immediately after resuming simulation). Specifying REPLY DELAY with no quoted string sets a persistent simulator reply delay that is used for subsequent REPLYs that do not specify a DELAY value. Specifying a DELAY value with a quoted string sets the delay for that command only; subsequent REPLYs revert to the persistent delay. In this initial implementation, must be omitted. That is, only replies to the system console are implemented. RESOLUTION: Create a new "ex_reply_cmd" routine to establish console replies. Create a new "ex_sim_poll_kbd" routine to augment the existing "sim_poll_kbd" routine to supply characters from the reply string. STATUS: Added 2004-11-15 and updated 2017-10-01. 7. ENHANCEMENT: Extend the SHOW command to show pending string breakpoints, replies, and the default delays associated with each. VERSION: 3.10-0 OBSERVATION: The existing SHOW BREAK command lists pending numeric breakpoints. It should also show pending string breakpoints. A new SHOW REPLY command is needed to display pending replies, and a new SHOW DELAYS command is needed to display the default delays. RESOLUTION: Create a new "ex_show_cmd" routine to augment the existing SHOW executor to display string breakpoints, replies, and the default break and reply delays. STATUS: Added 2019-04-13. 8. ENHANCEMENT: Add RUN UNTIL and GO UNTIL commands to set temporary breakpoints before resuming execution. VERSION: 3.9-0 OBSERVATION: Temporary breakpoints are used most often to step through sections of program code. For this use, a BREAK -T command is immediately followed by a GO or CONTINUE command. It would be helpful if these could be combined in a single GO UNTIL command. For string breakpoints, GO UNTIL could be used to stop the simulator to reply to program prompts. This would permit a more natural command file sequence: GO UNTIL "prompt" ; REPLY "response" ...than the alternate: BREAK -T "prompt" GO REPLY "response" ...that would be required otherwise. The extended command forms for both GO and RUN are: GO UNTIL { ; ... } GO UNTIL { ; ... } GO UNTIL DELAY { ; ... } GO UNTIL { ; ... } GO UNTIL { ; ... } GO UNTIL DELAY { ; ... } Multiple es, separated by commas, may be specified. For example, GO 5 UNTIL 10,20 sets temporary breakpoints at addresses 10 and 20 and then resumes simulator execution at address 5. As with the BREAK command, specifying a DELAY value sets a temporary delay of the specified number of event ticks before execution stops. If a DELAY value is not given, the breakpoint uses the default delay set by an earlier BREAK DELAY command, or a zero delay if the default has not been overridden. RESOLUTION: Add a new "ex_run_cmd" routine to augment the existing RUN executor to look for an UNTIL clause and to set temporary breakpoints accordingly. STATUS: Added 2017-10-01. 9. ENHANCEMENT: Extend argument substitution to add built-in substitutions, including environment substitutions. VERSION: 3.9-0 OBSERVATION: SIMH 4.0 has some useful command string substitution features that obviate the need for an external program to set the OS time on bootup. It would be nice to implement this, as well as making command files (more) compatible between versions. The generally useful current date and time substitutions are: DATE_YYYY The current year, 0000-9999 DATE_YY The current year, 00-99 DATE_MM The current month, 01-12 DATE_MMM The current month, Jan-Dec DATE_DD The current day of the month, 01-31 DATE_JJJ The current day of the year, 001-366 DATE_RRRR A year prior to 2000 with the same calendar days as the current year, rescaled to 1972-1999 DATE_RR A year prior to 2000 with the same calendar days as the current year, rescaled to 72-99 TIME_HH The current hour, 00-23 TIME_MM The current minute, 00-59 TIME_SS The current second, 00-59 Also add substitutions for the simulator version and the simulator executable name: SIM_MAJOR The simulator major version SIM_NAME The simulator name SIM_EXEC The path and name of the simulator executable file SIM_RUNNING Non-zero if the simulator is currently running Each command line is scanned for predefined and user-defined variables, which are replaced with their corresponding values. In addition to the predefined variables, environment variables, including those established by the SET ENVIRONMENT command, may be specified for substitution. Variables are bracketed by percent signs (%). RESOLUTION: Create a new "ex_substitute_args" routine and assign it to the "sub_args" global hook in place of the existing "sub_args_local" routine to add keyword replacements for predefined and environment substitutions. STATUS: Local patch created 2017-05-20 and updated 2019-12-03. 10. ENHANCEMENT: Add a SET ENVIRONMENT command. VERSION: 3.9-0 OBSERVATION: In conjunction with the spawn command and variable substitution, it would be helpful to be able to set environment variables from the SCP prompt. The new SET ENVIRONMENT command creates a user-defined variable and sets its value. The syntax is: SET ENVIRONMENT = The variable is created and added to the host environment with the string value. Subsequently, it may be referenced in other commands by bracketing the variable name with percent signs. For example: SET ENVIRONMENT A=Hello ECHO %A% GO UNTIL "%A%" The second command will print Hello on the simulation console, and the third will execute machine instructions until the string Hello is output to the system console. Note that the environment value is not a quoted string, so escape sequences are not decoded. However, predefined and user-defined variables may be used, and the values will be those at the time the command is entered. This command may be abbreviated as SET ENV. RESOLUTION: Add a new "ex_set_cmd" routine to augment the existing SET executor to add user-specified variable/value pairs to the host environment. STATUS: Local patch created 2018-04-09. 11. ENHANCEMENT: Add an IF command to permit variable testing. VERSION: 3.9-0 OBSERVATION: A command file may contain commands that tie it to 3.x or 4.x simulator versions. It would be helpful if those commands could be executed conditionally, depending on the version. It would also be helpful if parameters or environment variables could be tested to produce conditional command execution. SIMH 4.0 offers an IF command that has extensive testing abilities. However, only a basic string test is required. The syntax is: IF { -I } { ; ... } The forms are: EXIST NOT EXIST IN { , ... } NOT IN { , ... } ...where the s may contain escapes and token substitutions, is either == or !=, is either && or ||, and is one or more comma-separated commands that are executed if the condition is true. The -I switch uses case-insensitive comparisons. RESOLUTION: Add a new "ex_if_cmd" routine that provides basic string testing. STATUS: Added 2017-10-01 and updated 2019-12-03. 12. ENHANCEMENT: Add a DELETE command to delete scratch files from with SCP. VERSION: 3.9-0 OBSERVATION: Diagnostics often create scratch files that should be deleted at the end of the run. Currently, OS-specific commands are needed, e.g.: ! del scratch.tape For universal command files, an equivalent SCP command is needed that hides the underlying OS details, e.g.: DELETE scratch.tape RESOLUTION: Add a new "ex_delete_cmd" that deletes the single filename specified. STATUS: Added 2017-10-01. 13. ENHANCEMENT: Add a GOTO command and command-file labels. VERSION: 3.99-0 OBSERVATION: Combined with the IF command, a GOTO command allows sections of a command file to be executed conditionally. A series of IFs testing the same condition could substitute for a GOTO command but with substantially less clarity. GOTO makes sense only in the context of command files. A GOTO entered interactively at the SCP prompt will be rejected. RESOLUTION: Add a new "goto_label" routine that searches for a specified label in the current command file and modify "ex_do_cmd" to test for a GOTO command and to call the routine to move the file pointer to that label. Also add a new "ex_goto_cmd" routine that simply returns "Command not allowed" if GOTO is entered at the SCP prompt. STATUS: Added 2019-03-07. 14. ENHANCEMENT: Add concurrent VM execution and command processing. VERSION: 3.10-0 OBSERVATION: While the VM is executing, it is often necessary to mount or dismount magnetic or paper tape images. Currently, this requires stopping the simulation with CTRL+E to obtain the "sim>" prompt before entering the ATTACH or DETACH command and then resuming simulation. While the simulator is stopped, the VM's time-of-day clock also stops, and any connected terminal emulator sessions become unresponsive. It would be nicer to be able to enter ATTACH and DETACH commands without interrupting the simulation. One method would be to define a new console option, "CONCURRENT," that enables a mode wherein CTRL+E does not stop simulation but rather prints a prompt ("scp> ") and diverts console input into a command buffer. When CR is entered, returning a special SCPE_EXEC code causes "sim_instr" to exit. The RUN command processor, upon seeing this code, executes the command in the command buffer, clears the buffer, and resumes execution by calling "sim_instr" again. If the command set in this mode is restricted to those that are non-interactive (e.g., excluding IEXAMINE) and that do not affect VM execution (e.g., excluding BOOT), the TOD clock and terminal users will not perceive any lost time. In this mode, execution may be stopped by entering CTRL+E at the "scp>" prompt, i.e., by entering CTRL+E twice in succession. RESOLUTION: Modify the "ex_set_cmd" routine to add a new SET CONSOLE [NO]CONCURRENT command that establishes the concurrent mode. Modify "ex_sim_poll_kbd" to divert console characters into a command buffer and to handle the usual keyboard editing (backspace, etc.) that would occur if the console was not in raw mode. Shim the VM's "sim_instr" function to execute the command in the buffer and then to call the VM's "sim_instr" function again to continue execution. Modify the "ex_show_cmd" routine to add a new SHOW CONSOLE CONCURRENT command and to extend the existing SHOW CONSOLE command to display the console mode. STATUS: Added 2019-04-18 and updated 2019-12-03. 15. ENHANCEMENT: Add multiplexer support for serial port communications. VERSION: 3.8-2 OBSERVATION: For owners of old computer terminals, it would be nice if they could be connected to SIMH via the host PC's serial ports. This would allow the user to run old operating systems for their hardware terminals without needing the corresponding computers, disc and tape drives, etc. Such support could be spliced in easily via the existing terminal multiplexer library. The "tmxr_attach" routine could be extended to accept a serial port connection specification as well as a listening port number. For instance: ATTACH MPX2 com1 ...could attach MPX device line 2 to the serial port named COM1. The host-specific port name could be followed by a connection specification, such as: ATTACH MPX2 /dev/ttyS1;9600-8n1 ...which, in this case, would configure the port for 9600 baud, 8 data bits, no parity, and 1 stop bit. If the specification is omitted, the host system default configuration would be used. RESOLUTION: Modify "tmxr_attach", "tmxr_detach", "tmxr_read", "tmxr_write", "tmxr_show", and "tmxr_close" to work with serial ports as well as with network sockets. STATUS: Added 2008-12-04. 16. ENHANCEMENT: Add CALL and RETURN commands for subroutine execution. VERSION: 3.10-0 OBSERVATION: Currently, repetitive actions within a command file must be expanded inline. For example, configuring the sixteen multiplexer ports during a system generation may require answering a half-dozen prompts identically, except for the port number. Dozens of inline command lines could be replaced by a subroutine that takes a replaceable parameter specifying the port number and replies to the prompts accordingly. RESOLUTION: Add a new "gosub_label" routine that implements subroutine calls with up to nine replaceable parameters that may be designated with the usual "%1" through "%9" placeholders in the subroutine. Modify the "execute_file" routine to detect the CALL and RETURNS commands and to invoke the "gosub_label" routine and to return from the current DO invocation, respectively. STATUS: Added 2019-06-27. 17. ENHANCEMENT: Add an ABORT command to abort nested command file executions. VERSION: 3.10-0 OBSERVATION: If a sequence of prompt/response commands in a command file goes awry, the user cannot easily stop execution. Consider a command file containing this sequence of commands: GO UNTIL "OPTION? " ; REPLY "RELOD\r" GO UNTIL "CHANGES? " ; REPLY "YES\r" GO UNTIL "MEM SIZE? " ; REPLY "128\r" GO UNTIL "SEG SIZE? " ; REPLY "8192\r" [...] When the command file replies with the misspelled RELOAD option, the executing program prints an error message and repeats the OPTION? prompt. The command file, however, is now looking for the CHANGES? prompt and so does not supply the YES reply. At this point, entering CTRL+E stops simulated execution, but the command file then resumes execution with the next prompt and reply. This continues until enough CTRL+Es are entered to exhaust the set of prompts and responses in the command file. It would be nicer if the user could enter an ABORT command in concurrent mode after the first CTRL+E to stop the simulator and abort command file execution at that point. A related problem occurs when a nested DO file detects an error. For example, a nested DO file may qualify the parameters supplied to the invoking DO file. If an invalid parameter is detected, there is no way to stop execution of the outer file, except by passing back a flag to indicate that it should stop. If that outer file is invoked from an enclosing DO file, the flag must be propagated back through each invocation if all execution is to cease. It would be nicer if an inner file could execute an ABORT command that would stop all nested invocations and return to the SCP command prompt. RESOLUTION: Modify the "sim_instr" shim to detect an ABORT entered during concurrent mode and to set a flag that causes the "execute_file" routine to exit the current and any enclosing command file invocations. Modify "execute_file" to detect an ABORT command within a command file and set the same flag. STATUS: Added 2019-06-30. 18. ENHANCEMENT: Allow CTRL+C to break out of an infinite command loop. VERSION: 3.10-0 OBSERVATION: A GOTO command within a command file may inadvertently set up an infinite loop. With no other way to break out of the loop, the user would have to abort the simulator, potentially leaving the simulated environment in an inconsistent state. It would be nicer if CTRL+C could signal a command file abort. RESOLUTION: Modify "execute_file" to detect a SIGINT during command file execution and to respond as though an ABORT command was executed. STATUS: Added 2019-07-05. 19. ENHANCEMENT: Extend serial port support to the system console. VERSION: 3.10-0 OBSERVATION: The HP 3000 Asynchronous Terminal Multiplexer provides 16 ports, of which port 0 is reserved for the system console. Consequently, ports 1-15 use the TMXR library for I/O, while port 0 uses "sim_putchar" and "sim_poll_kbd". The former use Telnet connections and have been extended here to use serial ports as well. The latter permit console window or Telnet connections only. It would be nice to extend serial port support to ATC port 0. RESOLUTION: Add a new "ex_set_serial" routine to extend the SET CONSOLE command to attach to a serial port. The extended TMXR library recognizes the serial port connection and handles it automatically. Add new "ex_show_console" and "ex_show_serial" routines to extend SHOW CONSOLE to display serial port status. STATUS: Added 2019-07-12. 20. ENHANCEMENT: Add a -B (binary) format EX/DEP switch. VERSION: 3.10-0 OBSERVATION: The EXAMINE and DEPOSIT commands currently allow overriding switches to display or enter values in octal, decimal, or hexadecimal format. Device data defaults may also be set to any of these three formats. It would be helpful to provide a binary override as well. RESOLUTION: Change the "sim_get_radix" hook to point at a new "ex_get_radix" command that returns the associated radix for octal, decimal, hexadecimal, and binary overrides. By overriding the hook, SCP will also enable the SET BINARY command. STATUS: Added 2019-07-19. 21. ENHANCEMENT: Add a global initialization file and execute it at startup. VERSION: 3.10-0 OBSERVATION: Commands that are to be executed on every simulator startup, such as configuration commands, would normally be placed in the simulator-specific initialization file (e.g., hp3000.ini). Unfortunately, that file is not executed if the simulator is started with a command file specified. Therefore, such configuration commands must be replicated in every command file used with the simulator. Moreover, if the configuration is to apply to all simulators, then it must be replicated in every simulator's command files. This is very awkward. It would be better if there was an additional, global command file that applied to all simulators and that was executed at every simulator startup, regardless of the mode of invocation. Commands within the file could be made simulator or version specific by using the IF command with the SIM_NAME or SIM_MAJOR substitution variable. RESOLUTION: Modify "ex_do_cmd" to detect the first entry and to search for and execute an optional "simh.ini" file, if it exists. The search for the file is made in the current directory and then in the HOME or USERPROFILE directory. STATUS: Added 2019-07-20. 22. ENHANCEMENT: Suppress ATTACH/DETACH noise messages in command files. VERSION: 3.10-0 OBSERVATION: The ATTACH command prints informative messages when it creates a new file after failing to open an existing one, opens a file that has been designated read-only by the host OS, or buffers a file to memory. The DETACH command prints a message when a memory-buffered file is written. These messages are useful indicators when the commands are entered interactively but are intrusive when they occur in the middle of prompt/response scripting. For example, an automated reply of "1024" to a "Memory size?" prompt preceded by a tape attach would appear as: Memory size? MS: creating new file 1024 Moreover, the messages are useless, as the user has no control over the command file and cannot take any action based on the messages. Therefore, it would be nicer if they were suppressed altogether when they occur in the context of DO command file execution. In the preceding example, the result would be: Memory size? 1024 The messages should continue to be printed when they occur interactively, when the DO command specifies the -V option to print all commands or the new -A switch to print all messages. The messages can be suppressed by invoking the simulator with the -Q switch on the command line, but that suppresses useful interactive messages as well, such as the "unit is read only" message that occurs when the file has OS read-only permission and -R is not specified. It also suppresses the "Logging to file", "Log file closed", "Debug output to", and "Debug output disabled" messages from SET CONSOLE commands that in their absence would give no indication that log and/or debug output files were created. RESOLUTION: Modify "ex_initialize" to save the original value of "sim_quiet" in a new "ex_quiet" global. Modify "execute_file" to set "sim_quiet" to 1 if neither the -A nor -V switch is present, and to propagate the switch values to nested DO invocations. Modify "ex_set_console" to restore the "sim_quiet" value temporarily so that the opening and closing of the console and debug log files are still reported during command file execution. STATUS: Added 2019-10-07. 23. ENHANCEMENT: Provide routines to operate the modem lines on a serial port. VERSION: 3.10-0 OBSERVATION: Terminal multiplexers and serial communication interfaces generally provide operations that control the modem command signals and sense the modem status signals. It would be helpful to provide routines to perform these actions on serial ports, as well as to emulate them for Telnet ports. For example, disconnecting a Telnet session would appear to the simulator as a modem dropping Data Set Ready, which in turn might cause the target OS to log the user off. RESOLUTION: Add new "tmxr_control_line" and "tmxr_line_status" routines to control and sense, respectively, the serial port signals. STATUS: Added 2019-12-10. 24. ENHANCEMENT: Add a FLUSH command to flush files in concurrent mode. VERSION: 3.11-2 OBSERVATION: To improve performance, all log files and most attached device files are buffered. When a simulation stop occurs, buffered files are flushed to the disc before returning to the SCP prompt to permit external examination. To avoid stopping simulation, concurrent mode is enabled by default to allow commands to be entered while the simulator continues to run. As a consequence, though, files will be only partially written when examined externally. In particular, trace and console logs will be incomplete unless the simulator is stopped and restarted, which defeats the purpose of enabling concurrent mode. To resolve this, a concurrent-mode command to flush partially written files to disc is needed. RESOLUTION: Add a new "ex_flush_cmd" routine that implements the FLUSH command to flush the console logs, all attached files of all devices, and all terminal multiplexer logs. STATUS: Added 2020-10-21. 25. ENHANCEMENT: Add timed breakpoints to the RUN and GO commands. VERSION: 3.11-2 OBSERVATION: Several diagnostics need to run for some arbitrary time before an operator action (e.g., failing power, pressing HALT/PRESET/RUN, toggling a switch-register switch) is performed. Also, the 2000 TSB IOP program must initialize itself before the SP can be released from interlocking. Currently, there is no way to do this, except by STEPping for some instruction count that must be determined empirically. It would be nicer if we could break after a specified real time has elapsed As each timed breakpoint typically would be specific to its use in a program, creating persistent timed breakpoints would not be generally useful. A better solution is to extend the RUN/GO command to set (temporary) timed breakpoints. The current syntax is: GO UNTIL GO UNTIL GO UNTIL DELAY The additional syntax is: GO FOR ...for example: GO FOR 100 MSEC. As with other breakpoints, an optional action list can be appended. No command to cancel the breakpoint is necessary, as it will expire on its own or is canceled if simulation is stopped for any other reason (e.g., operator, address breakpoint, halt instruction, etc.). All time delays are calculated as "real time" values. That is, they are scaled to the simulated processor instruction execution time, so that they would represent wall-clock delays on the hardware. Using "calibrated time" values doesn't make sense, as the delays are needed to allow some deterministic number of instructions to execute, and calibrated time varies the instruction count with the speed of the host processor. The command schedules a dedicated unit with the appropriate delay, whose service routine sets the new BP_TIMED type in the "sim_brk_summ" variable to tell the "sim_brk_test" routine to pass a breakpoint indication back to the VM for action (this is how string breakpoints work). RESOLUTION: Modify "ex_run_cmd" to accept the "GO FOR " syntax, accepting MICROSECOND[S], MILLISECOND[S], and SECOND[S] as time units, with USEC and MSEC as alternates for the first two. Add a new "ex_sim_execution_rate" unsigned integer global that is initialized to zero; the VM sets the value to the number of instruction executions per second in its one-time initializer (if the rate is not set, the command is rejected). Add a new "timed_bp_unit" structure that is scheduled for an event time based on the instruction execution rate, and a "timed_bp_service" routine that handles event expiration. STATUS: Added 2020-12-15. 26. ENHANCEMENT: Improve read-only and write-only unit ATTACH behavior. VERSION: 3.12-0 OBSERVATION: Existing ATTACH command behavior is suboptimal for units that are read-only (e.g., a paper tape reader) or write-only (e.g., a line printer). The current behavior for read-only units is to create an empty file if the specified file does not exist. Attaching an empty file is pointless and is often the result of specifying the file name incorrectly, requiring a subsequent detach/delete/reattach command sequence to correct. To avoid this, the user must always remember to add the -E (must exist) switch. For write-only units, the current behavior leaves an existing file positioned at the start of the file. This is almost never desirable, as it means that if the new content is shorter, a partial remainder of the prior output is left. While merely undesirable in the case of a line printer, it is erroneous in the case of a paper tape punch producing an executable memory image. RESOLUTION: Add a new "ex_attach_unit" shim that adds the -E switch automatically for read-only units and seeks to the end of the file after attaching for write-only units, so that new content will be appended. STATUS: Added 2021-03-13. 27. ENHANCEMENT: Extend BREAK and REPLY DELAYs to accept time intervals. VERSION: 3.12-0 OBSERVATION: The BREAK and REPLY commands take optional DELAY arguments that specify the delays between a breakpoint and the simulator stop, and the command and delivery of the first reply character, respectively. These delays are specified in event ticks. But typically the tick counts are merely guesses as to the time it takes the program to prepare for the designated action. It would be more natural to be able to specify the delays as (realistic) time intervals directly. RESOLUTION: Change the "parse_delay" routine to "parse_time" and extend it to accept both event tick counts and time intervals, specified in microseconds, milliseconds, or seconds. This routine is now also used to parse the time interval for the GO FOR command. STATUS: Added 2021-04-24. 28. ENHANCEMENT: Add a PAUSE command to delay command file execution. VERSION: 3.12-0 OBSERVATION: Some commands, particularly those that follow initiation of an external program or that perform an operator action, often need to be delayed to allow the program to prepare to receive the action. For example, after starting a terminal emulator, a subsequent BOOT command must be delayed until the emulator has started and connected. Currently, an external "sleep" program is needed to produce these delays, but then the command file becomes platform-dependent. A system-independent means of producing command file delays is needed. RESOLUTION: Add a new "pause_cmd" routine that accepts a time interval and suspends execution for the specified time. The suspension may be terminated early by the operator by entering CTRL+E. STATUS: Added 2021-04-26. 29. ENHANCEMENT: Add a routine to wait for a multiplexer connection. VERSION: 3.12-0 OBSERVATION: Terminal multiplexer connections are made when the multiplexer polls the listening port while the simulator is executing. Typically, this is done at a calibrated rate of 100 Hz. The listening port is set up with a queue depth of one connection, so if multiple terminal emulators are to be started before an operating system is booted, each connection must be made by running the simulator in a loop for a time long enough to cause a poll to occur. This is awkward, as the CPU memory must be loaded with an execution loop, while the poll calibration interval is not known to the command file. What is needed is a command that waits until a connection is made before returning. RESOLUTION: Add a new "tmxr_connect" routine that can be called as a validation routine for a "SET CONNECT" command. The routine will wait until a line connection is made before returning, or it may be aborted by entering CTRL+E. STATUS: Added 2022-01-05. 30. ENHANCEMENT: Added device cloning support. VERSION: 3.12-4 OBSERVATION: The ability to create multiple instances ("clones") of a given device is a frequent user request. In addition, the HP-IB 3000 systems employ only two basic I/O cards (the GIC and the ADCC/ATP) with multiple cards of each installed in a typical system. So it would be nice to be able to have a user-configurable set of device instances. A new command processing routine extends the existing SET command to provide cloned device allocation and deallocation. The routine processes commands of the form: SET COUNT= ...where is the desired count of the specified device. The count includes the original device, so setting a count of 4 will allocate three clones of the original device. If the count is then set to 3, one of the clones will be deallocated. Setting the count to 1 will deallocate all of the clones. Some support for creating new device instances can be handled at the SCP level, but each cooperating simulator must provide a per-device "adjustment" routine that performs any VM-specific actions needed to make the instances independent. RESOLUTION: Add a new "adjust" function pointer field to the DEVICE structure (sim_defs.h) and add a new "ex_set_dev_count" routine to process SET COUNT commands. STATUS: Added 2023-03-13. 31. ENHANCEMENT: SET ENVIRONMENT now accepts a list of quoted strings. VERSION: 3.12-4 OBSERVATION: Flexible command files often need to set several variables based on the value of a parameter. For example, specifying a particular disc drive model might also establish the SIMH device name, OS driver name, driver type, subtype, and logical device number. These currently require individual SET ENVIRONMENT commands as actions in an IF statement, resulting in a very long line. It would be nicer if a single SET ENV command took a list of variables and values to set. RESOLUTION: Modify "ex_set_environment" to take either a single unquoted assignment (for backward compatibility) or a comma-separated list of quoted assignments. Because quoted strings can decode escapes, this functionality is added as a bonus. STATUS: Added 2023-06-05. 32. ENHANCEMENT: Add multiplexer connection groups. VERSION: 3.12-4.1 OBSERVATION: With the advent of device cloning, it becomes possible to have a user-specified number of identical terminal multiplexers or terminal interface cards. With the current implementation, each device copy would have to specify its own unique listening port. Consequently, a user connecting a Telnet client would need to know the list of ports and, if the one of an identical number of terminal devices selected is busy, would have to select another from the list. Given a group of interchangeable devices, it would be nicer to have a single listening port shared between them, and a connection attempt routed to the first free device. Only if all lines of all devices in a group were busy would the connection be refused. Sharing a listening port is not supported on all platforms. Therefore, a better implementation would be for the first device attachment to open the listening port and subsequent attachments to the same port being noted internally without interaction with the associated network socket. The "tmxr_poll_conn" routine is modified to obtain connections on the listening port and then assign them to the first available line, starting with the first device and proceeding in clone creation order. The poll service routine that calls "tmxr_poll_conn" would have to be able to process line assignments for devices other than itself. In practice, this is trivial, as a device supporting cloning must be able to access each device instance independently in order to access that instance's state. To implement connection groups, a new extension pointer is added to the end of the TMXR structure. Defaulting to NULL, a group is established in the clonable device's "adjust" routine by linking the TMXR structures of the group members in a circular list. The first device that is attached to a given port receives the listening socket. Subsequent attachments to the same port receive only the port number. Incoming connections are distributed among the group members with the same port number, and there can be more than one port connection subgroup within the group of linked devices (so, for example, a six-card group could have three cards sharing one port, two cards sharing a second port, and the last card using a third port). RESOLUTION: Modify "ex_tmxr_attach_unit", "ex_tmxr_detach_unit", and "ex_tmxr_poll_conn" to support connection groups. For a connected on a group, the poll routine returns the line number in the lower 16 bits and the position of the connected device in the circular linked list in the upper 16 bits. STATUS: Added 2023-08-12 33. ENHANCEMENT: ECHO now accepts a quoted string. VERSION: 3.12-4.1 OBSERVATION: When running scripts, it is often desirable to break at a command prompt in order to supply the command automatically. This works seamlessly from the user's perspective, unless the script wants to display some descriptive text before entering the command. For example, a script that inhibits outspooling of all MPE print jobs might break at the colon prompt, then display a message, and then reply with the command: : Now inhibiting further outspooling. OUTFENCE 14 : In such cases, it would be clearer to the user if the command immediately followed the prompt. For MPE, replying with a "\r", then breaking on the next colon, and then replying with "OUTFENCE 14\r" would accomplish the visual goal. But for DUS, replying with a CR printa "Invalid Command or input" before printing the colon prompt. The ECHO command can be used to display a colon, but ECHO is always followed by CRLF, so again the prompt and the command are separated. An ECHO that does not automatically supply a newline is needed. RESOLUTION: Add a new "ex_echo_cmd" routine to augment the existing ECHO executor to process a quoted-string parameter. The routine prints just the characters, which may be escaped, in the quoted string. In particular, it does not implicitly add a newline to the end of the string. STATUS: Added 2023-09-25. 34. ENHANCEMENT: Add DATE_AA and DATE_AAAA for years adjusted to 2000-27. VERSION: 3.12-4 OBSERVATION: MPE V/E is year-2000 compilant. However, its internal date range rolls over from December 31, 2027 to January 1, 1900, because years are kept as seven-bit values offset from 1900. To avoid this, a new rescaled date value is needed to keep the date within the 2000-2027 range. RESOLUTION: Add a new Adjust_Date enumeration to the ACTION type, add DATE_AA and DATE_AAAA entries to the "keys" table, and add an Adjust_Date case to the "replace_token" routine that adjusts dates after 2027 by subtracting 28 until the result is within the 2000-2027 range. STATUS: Added 2024-03-10. ——————————————————————————————————————————————————————————————————————————————— xxx. ENHANCEMENT: VERSION: 3.12-4 OBSERVATION: RESOLUTION: STATUS: Added