diff --git a/3B2/3b2_cpu.c b/3B2/3b2_cpu.c index 59d2abd2..3ec97b24 100644 --- a/3B2/3b2_cpu.c +++ b/3B2/3b2_cpu.c @@ -683,8 +683,11 @@ t_stat sys_boot(int32 flag, CONST char *ptr) { char gbuf[CBUFSIZE]; - get_glyph(ptr, gbuf, 0); + if ((ptr = get_sim_sw(ptr)) == NULL) { + return SCPE_INVSW; + } + get_glyph(ptr, gbuf, 0); if (gbuf[0] && strcmp(gbuf, "CPU")) { return SCPE_ARG; } diff --git a/3B2/tests/3b2_test.ini b/3B2/tests/3b2_test.ini new file mode 100644 index 00000000..39f6a980 --- /dev/null +++ b/3B2/tests/3b2_test.ini @@ -0,0 +1,34 @@ +:: 3b2-diag.ini +:: This script will run the available 3B2/400 core diagnostics. +:: +cd %~p0 +set runlimit 2 minutes +set on +on error ignore +on runtime echof "\r\n*** Test Runtime Limit %SIM_RUNLIMIT% %SIM_RUNLIMIT_UNITS% Exceeded ***\n"; exit 1 + +set env DIAG_QUIET_MODE=0 +if ("%1" == "-v") set console notelnet +else set -qu console telnet=localhost:65432,telnet=buffered; set env -a DIAG_QUIET_MODE=1 + +:: Set maximum memory size +set cpu 4M + +if not exist rev2_diags.dsk echof "\r\nMISSING - Diagnostic disk image '%~p0rev2_diags.dsk' is missing\n"; exit 1 +attach -rq ifloppy rev2_diags.dsk + +:: Initial setup +expect "UTILITIES GUIDE" send "mcp\r"; go -q +expect "Enter name of program to execute [ ]:" send "filledt\r"; go -q +expect "Enter Load Device Option Number [0 (FD5)]:" send "0\r"; go -q +expect "Enter name of program to execute [ ]:" send "dgmon\r"; go -q +expect "Enter Load Device Option Number [0 (FD5)]:" send "0\r"; go -q +expect "Did you boot filledt? [y or n] (n)" send "y\r"; go -q +expect "DGMON > " send "DGN SBD\r"; go -q +expect "SBD 0 (IN SLOT 0) DIAGNOSTICS PASSED" echof; echof "PASSED: 3B2 DGMON SBD Diagnostics."; exit 0 +expect [4] "FAIL" echof; echof "FAILED: 3B2 DGMON SBD Diagnostics."; exit 1 + +:: Run tests +if (DIAG_QUIET_MODE) echof "\nStarting 3B2 DGMON SBD Diagnostics." +boot -q CPU +return diff --git a/3B2/tests/rev2_diags.dsk b/3B2/tests/rev2_diags.dsk new file mode 100644 index 00000000..1fbfe909 Binary files /dev/null and b/3B2/tests/rev2_diags.dsk differ