aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2026-11-30 13:50:53 +0100
committerJavier <dev.git@javispedro.com>2026-11-30 13:50:53 +0100
commit28db73e02db29d3b9545aa396180b10579ac3de8 (patch)
tree9e0402fac89fee2eaa50d85539ab3e0181e592ee
parent81640ecaee28014d6d09399b935641132a60b6fb (diff)
downloadvbados-28db73e02db29d3b9545aa396180b10579ac3de8.tar.gz
vbados-28db73e02db29d3b9545aa396180b10579ac3de8.zip
mousew16: put strings in discardable segment, we only need them during initHEADmaster
-rw-r--r--makefile3
-rw-r--r--mousew16.lnk1
2 files changed, 3 insertions, 1 deletions
diff --git a/makefile b/makefile
index a3f17e7..f45f3fb 100644
--- a/makefile
+++ b/makefile
@@ -27,10 +27,11 @@ dostsr_cflags = $(dos_cflags) -DIN_TSR -zu -s -g=RES_GROUP -nd=RES -nt=RES_TEXT
# -zu since ss != ds on the TSR
# Compiler arguments for W16 .DLL/.DRV files
-w16dll_cflags = -bt=windows -bd -mc -zu -s -6 -osi -w3 -wcd=202
+w16dll_cflags = -bt=windows -bd -mc -zu -zc -s -6 -osi -w3 -wcd=202
# -bd to build DLL
# -mc to use compact memory model (far data pointers, ss != ds in a DLL)
# -zu for DLL calling convention (ss != ds)
+# -zc put const strings in the code segment (which may be discardable/moveable)
# -s to disable stack checks, since the runtime uses MessageBox() to abort (which we can't call from mouse.drv)
# Full compiler command lines
diff --git a/mousew16.lnk b/mousew16.lnk
index 14ca952..d1cd0ca 100644
--- a/mousew16.lnk
+++ b/mousew16.lnk
@@ -19,6 +19,7 @@ option stub=dosstub.exe
segment CALLBACKS fixed shared # We need a non-moveable segment to store our callback routines
segment CLASS DATA fixed shared # Likewise fix the data segment, too cumbersome if not
# We don't do the normal DLL prolog in the interrupt handlers, for example
+segment _TEXT discardable # The rest of code (e.g. Enable) can be discarded
export Inquire.1
export Enable.2