I've gone through the set of command files you sent me at the beginning of the year (e.g., "mount," "unmount," etc.), and the only change needed is to change the name of the SEND command to REPLY. Actually, it's easy to make 3.x command files that will also work with 4.x by adding this line: if "%SIM_MAJOR%" == "4" set env reply=send 3.10 enhancements: - Add memory testing to ASSERT - [local fix 4] ASSERT now requires a conditional operator - [local fix 9] Added SET CPU BINARY - [local fix 2] DO cmd file open failure retries with ".sim" appended - substitute args in main cmd loop (so "echo %1" works) 3.10 bugfixes: - Use DO command replacement for command line sim files - [local fix 15] -V now propagates through DO command levels - [local fix 12] Allow action lists to be quoted in "sim_brk_getact" - [local fix 11] Skip semicolons in quoted strings in "sim_brk_getact" 3.10 hooks: - Add "sim_prog_name" global variable - Add "sim_ex_sub_args" global hook and arg count to "sub_args" - Add "sim_ex_cmd" command table hook - Add reference type flags and global declaration - Add "sim_vm_release" hook and SHOW VERSION display - "run_cmd" suppresses stop message if SCPE_OK returned from "sim_instr" - Add "sim_ex_init" hook procedure 3.10 extensions: - [local fix 14] Added SET ENVIRONMENT - [local fix 1] DO -E now stops if VM returns system error code - [local fix 5] reversed meaning of -E in do_cmd 3.10 localfixes: - [local fix 13] ECHO calls OutputDebugString if enabled -- [local fix 9] Added -B (binary) format EX/DEP switch - [local fix 8] Changed ATTACH -R and -N to be less noisy - [local fix 7] Label the patch delta more clearly - [local fix 6] detach_unit returns SCPE_UNATT if not attached -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- SIMH 3.10 Changes Required for Integration ========================================== scp --- - Add "sim_ref_type" global, "REF_UNIT" and "REF_DEVICE" declarations. Needed to be able to tell DETACH MPX and DETACH MPX0 (e.g.) apart. For 4.x, all three are #defined to be the value 1. sim_tmxr -------- - Add "void *exptr" to end of TMLN structure. - Add "tmxr_find_ldsc" and "tmxr_send_buffered_data" global declarations. - Add "tmxr_read", "tmxr_write", and "tmxr_close" function hooks. Initialize the function hooks to point at new "tmxr_local_read", "tmxr_local_write", and "tmxr_local_close" routines that call "sim_read_sock", "sim_write_sock", and "sim_close_sock", respectively. Replace direct "sim_read_sock", "sim_write_sock", and "sim_close_sock" calls with calls through the function hooks. * Helpful to have global "tmxr_init_line", "tmxr_report_connection", and "tmxr_report_disconnection" to avoid code duplication. >> watch for rbr (read break) fixes!!! >> Fix hp2100_mux.c to call "tmxr_set_get_modem_bits" instead of "tmxr_reset"ln" for DTR drop. -------------- ATTACH BACI 1054 OK ATTACH BACI COM1 OK DETACH BACI OK ATTACH MUX 1054 OK ATTACH MUX COM1 FAIL ATTACH MUXL 1054 FAIL ATTACH MUXL COM1 FAIL ATTACH MUXL0 1054 FAIL ATTACH MUXL0 COM1 OK ATTACH MPX 1054 OK DEV tmxr_detach ATTACH MPX COM1 FAIL DEV tmxr_detach ATTACH MPX0 1054 FAIL UNIT ATTACH MPX0 COM1 OK ATTACH MPX9 1054 FAIL ATTACH MPX9 COM1 FAIL DETACH MPX DEV tmxr_detach (u9) DETACH MPX0 UNIT tmxr_detach_line (u0) ----------- BACI: - unit 0 line - unit 1 poll UNIT_DIS | UNIT_ATTABLE - linecount = 1 MPX: - unit 0-7 line - unit 8 controller UNIT_DIS - unit 9 poll UNIT_DIS | UNIT_ATTABLE - linecount = 8 MUX: - MUX unit 0 poll UNIT_ATTABLE - MUXL unit 0-15 line - linecount = 16 tmxr attach: - if UNIT_ATTABLE then attach socket else attach line tmxr detach: - if UNIT_ATTABLE then detach socket else detach line [ Below we assume that devref is always TRUE and unitref is always FALSE on 4.x. ] ==> leave poll unit on unit 0 baci attach: - if unitref and not RESTORE then "Unit not attachable" else if isdigit (cptr[0]) then unit 0 = UNIT_ATTABLE; attach unit 0 else unit 0 /= UNIT_ATTABLE; attach unit 0 baci detach: - if unitref and not RESTORE then "Unit not attachable" else detach unit 0 mpx attach/detach: - if unit = 0 and devref or unit = 9 and RESTORE then attach/detach unit9 to socket (enable/disable) else if unitref then attach/detach unit to serial else "Unit not attachable" mux attach/detach: - if devref or RESTORE then attach/detach unit to socket else "Unit not attachable" muxl attach/detach: - if unitref then attach/detach unit to line else "Unit not attachable" UNIT_ATT - tmxr attach/detach sets/clears UNIT_ATT - scp won't DISABLE if set or unit is active (e.g., poll); SHOW prints "attached to <>" if set, nothing if clear and UNIT_ATTABLE clear ATTACH detaches first if set RESTORE detaches unit if set and DEV_NET clear RUN/BOOT/GO/CONT reseeks file position if set and UNIT_SEQ RUN/BOOT/GO/CONT flushes file if set and not buffered, read-only, etc. get_aval and dep_addr fails if clear UNIT_ATTABLE - tmxr doesn't check - scp SHOW prints "not attached" if set and UNIT_ATT clear attach_unit and detach_unit fail if clear detach_all calls vm_detach if clear and shutting down SAVE saves memory if clear and UNIT_FIX set RESTORE reattaches unit if set or vm_attach and DEV_NET clear BOOT fails if set and UNIT_ATT clear ATTACH fails immediately if UNIT_DIS set can put UNIT_ATTABLE on poll unit - doesn't print "not attached" if UNIT_DIS can't put UNIT_ATTABLE on line units - doing so prints "not attached" on every unit ----------- ATTACH -- attach listening port DETACH -- detach listening port ATTACH -- attach serial port DETACH -- detach serial port SET DISCONNECT -- disconnect Telnet or drop/raise serial DTR ----------- change BACI - separate LOCALACK from FASTTIME? - REALTIME is much slower than 9600 baud! change MPX from SET MPX DISCONNECT= to SET MPX DISCONNECT for compatibility with all other terminal devices also remove DISCONNECT= option from MUX (it already has the MUXL DISCONNECT option) ---------------------------------------------------------------------------------------- Cygwin: $ make hp3000 lib paths are: /usr/lib ../windows-build/winpcap/WpdPack/lib include paths are: /usr/lib/gcc/i686-pc-cygwin/5.4.0/include /usr/local/include /usr/include /usr/lib/gcc/i686-pc-cygwin/5.4.0/../../../../include/w32api ../windows-build/winpcap/WpdPack/include using libm: /usr/lib/libm.a using librt: /usr/lib/librt.a using libpthread: /usr/lib/libpthread.a /usr/include/pthread.h using semaphore: /usr/include/semaphore.h using mman: /usr/include/sys/mman.h using libdl: /usr/lib/libdl.a /usr/include/dlfcn.h *** *** hp3000 Simulator being built with: *** - compiler optimizations and no debugging support. GCC Version: 5.4.0. *** gcc -std=c99 -U__STRICT_ANSI__ -O2 -finline-functions -fgcse-after-reload -fpredictive-commoning -fipa-cp-clone -fno-unsafe-loop-optimizations -fno-strict-overflow -Wno-unused-result -I . -D_GNU_SOURCE -DUSE_READER_THREAD -DHAVE_SEMAPHORE -DHAVE_SHM_OPEN -DHAVE_DLOPEN=a HP3000/hp_disclib.c HP3000/hp_tapelib.c HP3000/hp3000_atc.c HP3000/hp3000_clk.c HP3000/hp3000_cpu.c HP3000/hp3000_cpu_base.c HP3000/hp3000_cpu_fp.c HP3000/hp3000_cpu_cis.c HP3000/hp3000_ds.c HP3000/hp3000_iop.c HP3000/hp3000_lp.c HP3000/hp3000_mem.c HP3000/hp3000_mpx.c HP3000/hp3000_ms.c HP3000/hp3000_scmb.c HP3000/hp3000_sel.c HP3000/hp3000_sys.c scp.c sim_console.c sim_fio.c sim_timer.c sim_sock.c sim_tmxr.c sim_ether.c sim_tape.c sim_shmem.c sim_extension.c sim_serial.c -D HAVE_EXTENSION -I HP3000 -o BIN/hp3000 -lm -lrt -lpthread -ldl --- makefile must use "-D HAVE_DLOPEN=a" for proper sim_sock.c compilation: make CFLAGS="-D HAVE_DLOPEN=a" --- IDLE not supported