Ideas based on Dave Bryan's console halt efforts.
sim> SEND {<mux>:line} {DELAY=n,}"string"
Where <mux> is the name of the device pointed to by the TMXR structure. If <mux>:line isn't specified, then the console device is implicitly being referenced.
Delay is optional and once set persists for subsequent SEND operations to the same device. Delay defaults to 1000. The DELAY value is a minimum number of instructions which must execute before the next character in the provided string will be injected to the console port. The DELAY value has effect between the characters delivered as well. "string" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.).
Each device (console, and each line in each mux) has a separate value for DELAY.
An arbitrary number of 'expect' conditions can be defined. The command syntax is:
sim> EXPECT {<mux>:line} {[cnt]} "matchstring" {actioncommand {; actioncommand ...}}
Where <mux> is the name of the device pointed to by the TMXR structure. If <mux>:line isn't specified, then the console device is implicitly being referenced.
"matchstring" requires quotes and within the quoted string, common C escape character syntax is available (\r\r\t, etc.). The quotes used can be single or double quotes, but the closing quote must match the opening quote. The match string might be extended to allow the use of perl style regular expressions in the "matchstring" when a -R switch is specified on the command line.
sim> EXPECT "Enter Color: " SEND "Red\r"; g
A specific 'expect' condition can be removed with:
sim> NOEXPECT {<mux>:line} "matchstring"
All 'expect' conditions can be removed with:
sim> NOEXPECT {<mux>:line}
'expect' conditions can be examined with:
sim> SHOW EXPECT {<mux>:line}
Expect rules are one-shots (i.e. they disappear once a match has occurred) unless they are explicitly described as persistent with the -P switch.
The -C switch is available when defining expect rules. The effect of a rule defined with the -C flag is that when an expect match occurs for that rule, ALL rules are cleared for that device (console or <mux>:line).
Finishing the last DECtape device which was missed when this functionality was added to pdp11_dt, pdp18b_dt and pdp8_dt
in commits: 2934112a70 and c9e8121c16
Cleaned up the pdp11, pdp18b and other pdp8 implementations to make backporting cleaner.
Made sure that buffer flushing happens correctly when simulation returns to the sim> prompt.
ISO 8601 support without requiring C99 strftime functionality.
%DATE% yyyy-mm-dd
%TIME% hh:mm:ss
%DATETIME% yyyy-mm-ddThh:mm:ss
%LDATE% mm/dd/yy (Locale Formatted)
%LTIME% hh:mm:ss am/pm (Locale Formatted)
%CTIME% Www Mmm dd hh:mm:ss yyyy (Locale Formatted)
%DATE_YYYY% yyyy (0000-9999)
%DATE_YY% yy (00-99)
%DATE_MM% mm (01-12)
%DATE_DD% dd (01-31)
%DATE_WW% ww (01-53) ISO 8601 week number
%DATE_WYYYY% yyyy (0000-9999) ISO 8601 week year number
%DATE_D% d (1-7) ISO 8601 day of week
%DATE_JJJ% jjj (001-366) day of year
%TIME_HH% hh (00-23)
%TIME_MM% mm (00-59)
%TIME_SS% ss (00-59)
- Avoid assignments of void * values. Cast all memory allocation return values to appropriate types.
- Add output to sim_log where missing in various places.
- Fixed issue with lost file positions after a restore for devices which leverage the UNIT_SEQ flag.
In 32-bit mode, the compiler truncates constants to 32-bit.
We need LL suffix to avoid the truncation.
This behavior is contrary to the C 99 standard which defines
that constants that do not fit into long and unsigned long shall
have long long type.