From b3e99083c23802f9afebb727678ab30cfeb02441 Mon Sep 17 00:00:00 2001 From: Andrew Bird Date: Sun, 22 Nov 2026 13:57:22 +0000 Subject: [PATCH 1/3] CI: Update share build 1/ Update submodule from master repo 2/ Copy not move binary to target directory --- ci_build.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ci_build.sh b/ci_build.sh index 284bbd4f..572c6d10 100755 --- a/ci_build.sh +++ b/ci_build.sh @@ -20,13 +20,13 @@ mv -n bin/kgc*.map bin/kgc*.sys _output/gcc/. mv -n bin/country.sys _output/gcc/. # GCC share ( + git submodule update --remote share cd share - git submodule update --init --recursive git clean -x -d -f env COMPILER=gcc ./build.sh ) -mv -n share/src/share.com _output/gcc/. -mv -n share/src/share.map _output/gcc/. +cp -p share/src/share.com _output/gcc/. +cp -p share/src/share.map _output/gcc/. # Open Watcom Environment Setup export WATCOM=$BUILD_DIR/_watcom @@ -95,13 +95,13 @@ if [ -d ${HOME}/.dosemu/drive_c/tc201 ] ; then mv -n bin/country.sys _output/tc_dos/. # TC share ( + git submodule update --remote share cd share - git submodule update --init --recursive git clean -x -d -f env COMPILER=tcc2-emu ./build.sh ) - mv -n share/src/share.com _output/tc_dos/. - mv -n share/src/share.map _output/tc_dos/. + cp -p share/src/share.com _output/tc_dos/. + cp -p share/src/share.map _output/tc_dos/. fi echo done From 509633a10440809585f03e9542ccd33cd3198161 Mon Sep 17 00:00:00 2001 From: Andrew Bird Date: Sun, 22 Nov 2026 10:20:43 +0000 Subject: [PATCH 2/3] share: Preserve SI register on share_is_file_open --- kernel/int2f.asm | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kernel/int2f.asm b/kernel/int2f.asm index 3e9462b8..1590bc98 100644 --- a/kernel/int2f.asm +++ b/kernel/int2f.asm @@ -357,17 +357,17 @@ SHARE_LOCK_UNLOCK: ; STATIC WORD share_is_file_open(const char far *filename) /* pointer to fully qualified filename */ global SHARE_IS_FILE_OPEN SHARE_IS_FILE_OPEN: - mov si, ds - mov es, si ; save ds - pop ax ; save return address - pop si ; filename - pop ds ; SEG filename - push ax ; restore return address + push bp + mov bp, sp + push si + push ds + lds si, [bp+4] ; DS:SI = filename mov ax, 0x10a6 - int 0x2f ; returns ax - mov si, es ; restore ds - mov ds, si - ret + int 0x2f ; returns ax + pop ds + pop si + pop bp + ret 4 ; Int 2F Multipurpose Remote System Calls ; From 42ca52c66faccac62b8f99bafc0eff6cd0ec676d Mon Sep 17 00:00:00 2001 From: Andrew Bird Date: Sun, 22 Nov 2026 11:24:50 +0000 Subject: [PATCH 3/3] share: Check if call to share set the carry flag On older releases of share there was no 10a6 function, so after a call to it the return value could be rubbish. Check that nothing set the carry flag before testing the value. --- kernel/int2f.asm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kernel/int2f.asm b/kernel/int2f.asm index 1590bc98..d29f735e 100644 --- a/kernel/int2f.asm +++ b/kernel/int2f.asm @@ -363,7 +363,14 @@ SHARE_IS_FILE_OPEN: push ds lds si, [bp+4] ; DS:SI = filename mov ax, 0x10a6 - int 0x2f ; returns ax + clc + int 0x2f + jc .notopen ; someone returned an error + cmp ax, 1 ; only an explicit 1 means "open" + je .done +.notopen: + xor ax, ax +.done: pop ds pop si pop bp