From 1d6b8008f2f23ee6eaed6116167be0f4a5539257 Mon Sep 17 00:00:00 2001 From: David Lee Date: Thu, 4 Jul 2024 11:35:53 -0700 Subject: [PATCH] linux build --- .../BIN/{qbxlink.exe => QBXLINK.EXE} | Bin Microsoft Cobol v5/BIN/m.bat | 2 +- Microsoft Cobol v5/BIN/m.sh | 20 ++++++++++++++++++ 3 files changed, 21 insertions(+), 1 deletion(-) rename Microsoft Cobol v5/BIN/{qbxlink.exe => QBXLINK.EXE} (100%) create mode 100644 Microsoft Cobol v5/BIN/m.sh diff --git a/Microsoft Cobol v5/BIN/qbxlink.exe b/Microsoft Cobol v5/BIN/QBXLINK.EXE similarity index 100% rename from Microsoft Cobol v5/BIN/qbxlink.exe rename to Microsoft Cobol v5/BIN/QBXLINK.EXE diff --git a/Microsoft Cobol v5/BIN/m.bat b/Microsoft Cobol v5/BIN/m.bat index 94961af..ef1e306 100644 --- a/Microsoft Cobol v5/BIN/m.bat +++ b/Microsoft Cobol v5/BIN/m.bat @@ -5,7 +5,7 @@ ntvdm -r:.. -c -d cobol %1,%1,%1,%1 rem link.exe that ships with cobol requires 286+ protected mode. use msvc v5's linker instead rem qbx's link.exe executes code in a segment it just freed -ntvdm -h -i -c -r:.. /e:lib=c:\lib mcv5link %1,,%1,,nul.def +ntvdm -h -c -r:.. /e:lib=c:\lib mcv5link %1,,%1,,nul.def ntvdm -c -m -p %1 diff --git a/Microsoft Cobol v5/BIN/m.sh b/Microsoft Cobol v5/BIN/m.sh new file mode 100644 index 0000000..b382cd2 --- /dev/null +++ b/Microsoft Cobol v5/BIN/m.sh @@ -0,0 +1,20 @@ +str=$(tr '[a-z]' '[A-Z]' <<< $1) + +rm $str.EXE 2>/dev/null +rm $str.OBJ 2>/dev/null +rm $str.GRP 2>/dev/null +rm $str.LST 2>/dev/null +rm $str.MAP 2>/dev/null + +ntvdm -u -r:.. -c -d cobol $str,$str,$str,$str + +# link.exe that ships with cobol requires 286+ protected mode. use msvc v5's linker instead +# qbx's link.exe executes code in a segment it just freed +ntvdm -u -h -c -r:.. -e:lib=c:\\lib mcv5link $str,,$str,,nul.def + +rm $str.OBJ 2>/dev/null +rm $str.GRP 2>/dev/null +rm $str.LST 2>/dev/null +rm $str.MAP 2>/dev/null + +ntvdm -u -c -m -p $str