From dd607f57aa3958ed9ffec75c30e5f0fb11326475 Mon Sep 17 00:00:00 2001 From: Adam Sampson Date: Tue, 25 Aug 2020 01:39:09 +0100 Subject: [PATCH] Patch MIDAS 73 to accept JCL. Older versions of MIDAS expect you to type a command at them, which makes them hard to automate with :x or XFILEs. This patch backports the JCLINI code from later versions of MIDAS, which pre-stuffs the command buffer with the JCL string if available. --- build/misc.tcl | 2 ++ src/midas/patch.73 | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/midas/patch.73 diff --git a/build/misc.tcl b/build/misc.tcl index c13dc8a6..3522abc2 100644 --- a/build/misc.tcl +++ b/build/misc.tcl @@ -29,6 +29,8 @@ respond "*" ":midas;77\r" respond "MIDAS.77" "MIDAS; TS 73_MIDAS; MIDAS 73\r" respond "*" ":midas;73\r" respond "MIDAS.73" "MIDAS; TS 73_MIDAS; MIDAS 73\r" +respond "*" ":xfile midas; patch 73\r" +expect ":kill" # MACTAP respond "*" ":midas;324 sysbin;_sysen2; mactap\r" diff --git a/src/midas/patch.73 b/src/midas/patch.73 new file mode 100644 index 00000000..0e91d40d --- /dev/null +++ b/src/midas/patch.73 @@ -0,0 +1,26 @@ +:job midas +:load midas;ts 73 +:Get first command from JCL (based on JCLINI) +cmd+3/pushj p,patch +patch/setzb ff,cmptr +patch+1/.suset patch+20 +patch+2/tlnn a,%opcmd +patch+3/popj p, +patch+4/setom cmbuf+50-1 +patch+5/.break 12,patch+21 +patch+6/.break 12,patch+22 +patch+7/skipn cmbuf +patch+10/popj p, +patch+11/move a,patch+23 +patch+12/movem a,cmptr +patch+13/ildb tt,a +patch+14/caie tt,15 +patch+15/jrst .-2 +patch+16/idpb ff,a +patch+17/popj p, +patch+20/.roptio,,a +patch+21/..rjcl,,cmbuf +patch+22/..sjcl,, +patch+23/10700,,cmbuf-1 +:pdump midas;ts 73 +:kill