Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.os.msdos.djgpp > #1726 > unrolled thread
| Started by | "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> |
|---|---|
| First post | 2014-02-15 04:57 -0500 |
| Last post | 2014-03-03 19:00 -0500 |
| Articles | 6 — 3 participants |
Back to article view | Back to comp.os.msdos.djgpp
resident PMODEDJ? "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-15 04:57 -0500
Re: resident PMODEDJ? rugxulo@gmail.com - 2014-02-15 19:13 -0800
Re: resident PMODEDJ? "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-16 07:45 -0500
Re: resident PMODEDJ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-03-03 19:00 -0500
Re: resident PMODEDJ? "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> - 2014-02-17 16:59 -0500
Re: resident PMODEDJ? "Rod Pemberton" <dont_use_email@xnothavet.cqm> - 2014-03-03 19:00 -0500
| From | "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> |
|---|---|
| Date | 2014-02-15 04:57 -0500 |
| Subject | resident PMODEDJ? |
| Message-ID | <op.xbbhyde95zc71u@localhost> |
As a part of some testing, I'm doing the following: CWSDPMI -p start assembly .com TSR which uses DPMI start a DJGPP program using DPMI afterwards I was doing some testing of some custom DPMI assembly code in conjuction with a DJGPP program. I'm having a problems with the assembly code. This has nothing to do with DJGPP. That's not what I'm asking about. I wanted to try to use PMODEDJ instead of CWSDPMI, since AIUI it doesn't have paging enabled. The CWSDPMI TSR can be told to stay resident with the '-p' parameter. 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. Rod Pemberton
[toc] | [next] | [standalone]
| From | rugxulo@gmail.com |
|---|---|
| Date | 2014-02-15 19:13 -0800 |
| Message-ID | <02698100-1f10-4b86-ac12-39765c9109c8@googlegroups.com> |
| In reply to | #1726 |
Hi, On Saturday, February 15, 2014 3:57:39 AM UTC-6, Rod Pemberton wrote: > > I wanted to try to use PMODEDJ instead of CWSDPMI, since > AIUI it doesn't have paging enabled. The CWSDPMI TSR can > be told to stay resident with the '-p' parameter. You mean paging or swapping? I'm no systems developer myself, so I don't really claim to understand it. I'm not sure you can disable paging in all circumstances (e.g. if EMM386 loaded). If you just want to disable swapping, try "-p -s-" or use CWSDPR0 instead. Or you could probably use something else (e.g. HDPMI32 -r).
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> |
|---|---|
| Date | 2014-02-16 07:45 -0500 |
| Message-ID | <op.xbdkedfk5zc71u@localhost> |
| In reply to | #1731 |
On Sat, 15 Feb 2014 22:13:44 -0500, <rugxulo@gmail.com> wrote: >> I wanted to try to use PMODEDJ instead of CWSDPMI, since >> AIUI it doesn't have paging enabled. The CWSDPMI TSR can >> be told to stay resident with the '-p' parameter. > > You mean paging or swapping? I meant paging. Thanks for the info though. The issue is I need to keep PMODEDJ resident (to execute both programs). Keeping PMODEDJ resident would allow me to see if the TSR code is working or failing the same way for both. I.e., if it works for one but not the other, then I likely have a paging or perhaps a memory locking problem. If it fails for both, then I more likely have some other coding mistake. I was going to look at PMODEJ's code when I get a chance to see what triggers it to unload. It stays resident for one use. So, there is something that causes it to unload, e.g., counter, pointer, etc. It might be possible to recompile it, or patch a byte to prevent it from unloading. A small TSR or two to modify interrupts might work too. I don't know if any of those ideas will be easy or if such an attempt will "break" something internally in PMODEDJ. Usually, the DPMI host cleans up when it exits. So, forcing a DPMI host to stay resident when it wasn't designed to do so may prevent it from cleaning up or initializing things properly with multiple uses. But, I won't know any of that for sure until I look and try, unless someone more experienced with PMODEDJ posts some in-depth information. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <dont_use_email@xnothavet.cqm> |
|---|---|
| Date | 2014-03-03 19:00 -0500 |
| Message-ID | <op.xb57m0uf6zenlw@localhost> |
| In reply to | #1732 |
On Sun, 16 Feb 2014 07:45:39 -0500, Rod Pemberton <dont_use_email@xnohavenotit.cnm> wrote: > [...] > If it fails for both, then I more likely have some other coding mistake. I made some other coding mistakes, mentioned in the "resident service providers" thread. Rod Pemberton
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <dont_use_email@xnohavenotit.cnm> |
|---|---|
| Date | 2014-02-17 16:59 -0500 |
| Message-ID | <op.xbf4pool5zc71u@localhost> |
| In reply to | #1726 |
On Sat, 15 Feb 2014 04:57:39 -0500, Rod Pemberton <dont_use_email@xnohavenotit.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
[toc] | [prev] | [next] | [standalone]
| From | "Rod Pemberton" <dont_use_email@xnothavet.cqm> |
|---|---|
| Date | 2014-03-03 19:00 -0500 |
| Message-ID | <op.xb57mvtt6zenlw@localhost> |
| In reply to | #1735 |
On Mon, 17 Feb 2014 16:59:38 -0500, Rod Pemberton <dont_use_email@xnohavenotit.cnm> wrote: > On Sat, 15 Feb 2014 04:57:39 -0500, Rod Pemberton > <dont_use_email@xnohavenotit.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. > Update: After a trivial amount of use, it seems this modified version of PMODETSR stays resident and can be used repeatedly for single-use execution of DPMI applications, i.e., one DPMI application after another. *But*, it *seems* it's not reentrant. When a PM TSR is loaded, executing another DPMI application causes a lockup. I haven't checked to see if there are any memory leaks etc. I probably won't be doing much more with this. I think it has served it's purpose. Perhaps, someone with more familiarity with PMODETSR can add a '-r' resident or '-p' permanent flag in the future. Rod Pemberton
[toc] | [prev] | [standalone]
Back to top | Article view | comp.os.msdos.djgpp
csiph-web