Mail Archives: djgpp/2014/02/17/17:15:20
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | "Rod Pemberton" <dont_use_email AT xnohavenotit DOT cnm>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: resident PMODEDJ?
|
Date: | Mon, 17 Feb 2014 16:59:38 -0500
|
Organization: | Aioe.org NNTP Server
|
Lines: | 118
|
Message-ID: | <op.xbf4pool5zc71u@localhost>
|
References: | <op DOT xbbhyde95zc71u AT localhost>
|
NNTP-Posting-Host: | CNsg4fVcCsvs3UaOgZtQCw.user.speranza.aioe.org
|
Mime-Version: | 1.0
|
X-Complaints-To: | abuse AT aioe DOT org
|
User-Agent: | Opera Mail/12.16 (Linux)
|
X-Notice: | Filtered by postfilter v. 0.8.2
|
Bytes: | 4105
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
X-MIME-Autoconverted: | from Quoted-Printable to 8bit by delorie.com id s1HMF1vO001542
|
Reply-To: | djgpp AT delorie DOT com
|
On Sat, 15 Feb 2014 04:57:39 -0500, Rod Pemberton
<dont_use_email AT xnohavenotit DOT cnm> wrote:
> [...]
>
> PMODEDJ's documentation says it will only stay resident
> one time. Is there a switch, parameter, hidden switch,
> tweak, patch, etc that can be used to make PMODEDJ
> (pmodetsr.exe) stay resident longer? I.e., permanently.
The patch below allow you to build a resident version of
PMODEDJ. PMODEDJ is a.k.a. PMODETSR.EXE.
This version is experimental. Use at your own discretion.
Be warned that I could've introduced any number of unknown
issues, or more likely failed to fix many potential problems
that the program was never coded to handle.
However, preliminary tests seem to indicate that the few
trivial changes below make PMODEDJ resident.
The diff's are against pmode13s.zip available here:
http://www.delorie.com/pub/djgpp/current/v2misc/
I also had an issue with the MAKEFILE failing when TLINK
was executed. The error complained about 16-bit DPMI ...
So, I made a batch file to build it. That's below also.
Please don't ask me for additional fixes.
diff -Naur PMODE/pmode.asm PMODE_NEW/pmode.asm
--- PMODE/pmode.asm 2000-10-13 22:09:00.000000000 -0500
+++ PMODE_NEW/pmode.asm 2014-02-17 15:37:58.000000000 -0500
@@ -933,11 +933,11 @@
;°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°
; [fold] [
pm_init:
- push ax
- call pm_info
- pop ax
- jnc short @@initf0 ; error?
- ret ; yup, abort
+; push ax
+; call pm_info
+; pop ax
+; jnc short @@initf0 ; error?
+; ret ; yup, abort
@@initf0: ; no error, init protected mode
test ax,2
@@ -2902,10 +2902,10 @@
add bx,bx
call [exitrouttbl+bx] ; deinit
- mov es,[privatedataseg]
- mov ah,49h
- int 21h ; free private data
- call [pm_exit] ; user defined cleanup routine
+; mov es,[privatedataseg]
+; mov ah,49h
+; int 21h ; free private data
+; call [pm_exit] ; user defined cleanup routine
pop ax
int 21h ; quit
diff -Naur PMODE/pmodetsr.asm PMODE_NEW/pmodetsr.asm
--- PMODE/pmodetsr.asm 1997-02-22 22:18:24.000000000 -0500
+++ PMODE_NEW/pmodetsr.asm 2014-02-17 13:52:50.000000000 -0500
@@ -43,8 +43,8 @@
; restore old int 2f vector since pmode is not reentrable and looks at
int 2f
xor ax,ax
mov ds,ax
- mov eax, dword ptr cs:oldint2f
- mov ds:[2fh*4], eax ; atomic, cli not needed
+; mov eax, dword ptr cs:oldint2f
+; mov ds:[2fh*4], eax ; atomic, cli not needed
push DGROUP
pop ds
----------BUILD.BAT
del *.obj
del *.map
del *.exe
gcc -O2 -s padsec.c -o padsec.exe
gcc -O2 -s ehdrfix.c -o ehdrfix.exe
tasm -ml -zi -zn pmode.asm
tasm -ml -zi -zn pmodstub.asm
tasm -ml -zi -zn pmodetsr.asm
tlink -n -c -m -s pmodstub.obj pmode.obj
padsec pmodstub.exe
tlink -n -c -m -s pmodetsr.obj pmode.obj
ehdrfix pmodetsr.exe
----------
HTH,
Rod Pemberton
- Raw text -