I made my own DOS implementation (Announce)
> If that is not possible, there are other ways to stay resident in memory so
> that the part of the program that stays resident is not the memory block
> with the original PSP, but they are all either relatively difficult to do
> or need modifying the internal structures of the kernel.
>
> For example, the program could free its environment segment and file
> handles, allocate memory for the resident part, copy its own PSP to the
> resident part (with memcpy to make sure that the parent PSP does not
> change), change the current PSP to the new PSP, jump to the new PSP, free
> the old PSP and then exit via int21,ah=31.
Service 31h does have the problem that you need to keep a part of a/the PSP resident, at least 40h bytes though I'd go with 60h bytes. And as you mentioned a program using service 31h should free its process file handles unless it specifically wants to keep them around for later use. (Most programs using service 31h get this wrong.)
As also described in the link, my TSRs will relocate their initial process to the top of the LMA. This is done unconditionally, but the reason is to avoid fragmentation when installing without a suitable UMB being available. The process relocation can be disabled using a /J+P
switch for insufficiently compatible systems. The final resident allocation is also made by allocating a new data block (with appropriate strategy and UMB link) and hacking its MCB, just like mkeyb.
---
l
Complete thread:
- I made my own DOS implementation - samwdpckr, 07.12.2023, 05:07 (Announce)
- I made my own DOS implementation - CandyMan, 07.12.2023, 22:17
- I made my own DOS implementation - Zyzzle, 07.12.2023, 23:58
- I made my own DOS implementation - samwdpckr, 08.12.2023, 02:43
- I made my own DOS implementation - tom, 08.12.2023, 15:52
- I made my own DOS implementation - samwdpckr, 08.12.2023, 22:11
- I made my own DOS implementation - tom, 09.12.2023, 01:46
- I made my own DOS implementation - marcov, 09.12.2023, 11:29
- I made my own DOS implementation - nico7550, 16.12.2023, 14:17
- I made my own DOS implementation - samwdpckr, 27.12.2023, 17:59
- I made my own DOS implementation - nico7550, 28.12.2023, 08:31
- I made my own DOS implementation - 0ffer, 30.12.2023, 09:35
- I made my own DOS implementation - samwdpckr, 27.12.2023, 17:59
- I made my own DOS implementation - nico7550, 16.12.2023, 14:17
- I made my own DOS implementation - samwdpckr, 08.12.2023, 22:11
- I made my own DOS implementation - Zyzzle, 08.12.2023, 15:56
- I made my own DOS implementation - tom, 08.12.2023, 15:52
- I made my own DOS implementation - samwdpckr, 08.12.2023, 02:43
- I made my own DOS implementation - Zyzzle, 07.12.2023, 23:58
- I made my own DOS implementation - SuperIlu, 07.12.2023, 23:24
- I made my own DOS implementation - 0ffer, 25.12.2023, 20:31
- I made my own DOS implementation - RayeR, 31.01.2024, 17:13
- I made my own DOS implementation - tom, 31.01.2024, 22:02
- I made my own DOS implementation - Japheth, 01.02.2024, 08:32
- I made my own DOS implementation - samwdpckr, 01.02.2024, 15:36
- I made my own DOS implementation - RayeR, 01.02.2024, 19:01
- I made my own DOS implementation - samwdpckr, 01.02.2024, 19:09
- I made my own DOS implementation - RayeR, 02.02.2024, 05:22
- I made my own DOS implementation - KormaX, 02.02.2024, 11:11
- I made my own DOS implementation - samwdpckr, 02.02.2024, 20:20
- I made my own DOS implementation - RayeR, 11.02.2024, 15:52
- I made my own DOS implementation - samwdpckr, 02.02.2024, 20:20
- I made my own DOS implementation - KormaX, 02.02.2024, 11:11
- I made my own DOS implementation - RayeR, 02.02.2024, 05:22
- I made my own DOS implementation - samwdpckr, 01.02.2024, 19:09
- I made my own DOS implementation - RayeR, 01.02.2024, 19:01
- I made my own DOS implementation - tom, 31.01.2024, 22:02
- I made my own DOS implementation - samwdpckr, 12.03.2024, 22:56
- I made my own DOS implementation - fritz.mueller, 15.03.2024, 14:49
- I made my own DOS implementation - samwdpckr, 15.03.2024, 20:46
- I made my own DOS implementation - fritz.mueller, 16.03.2024, 20:01
- I made my own DOS implementation - samwdpckr, 16.03.2024, 23:11
- I made my own DOS implementation - samwdpckr, 18.03.2024, 01:52
- I made my own DOS implementation - fritz.mueller, 18.03.2024, 13:25
- I made my own DOS implementation - samwdpckr, 18.03.2024, 22:22
- I made my own DOS implementation - fritz.mueller, 20.03.2024, 15:56
- I made my own DOS implementation - samwdpckr, 21.03.2024, 18:06
- I made my own DOS implementation - tom, 21.03.2024, 19:32
- I made my own DOS implementation - samwdpckr, 21.03.2024, 19:56
- I made my own DOS implementation - fritz.mueller, 21.03.2024, 22:14
- I made my own DOS implementation - samwdpckr, 21.03.2024, 22:21
- I made my own DOS implementation - ecm, 22.03.2024, 00:21
- I made my own DOS implementation - samwdpckr, 22.03.2024, 02:06
- I made my own DOS implementation - ecm, 22.03.2024, 07:31
- I made my own DOS implementation - tom, 22.03.2024, 10:58
- I made my own DOS implementation - tom, 22.03.2024, 11:22
- I made my own DOS implementation - samwdpckr, 22.03.2024, 13:14
- I made my own DOS implementation - tom, 22.03.2024, 14:12
- I made my own DOS implementation - samwdpckr, 22.03.2024, 16:21
- I made my own DOS implementation - tom, 22.03.2024, 17:32
- I made my own DOS implementation - samwdpckr, 23.03.2024, 08:10
- I made my own DOS implementation - ecm, 23.03.2024, 09:58
- I made my own DOS implementation - tom, 23.03.2024, 12:20
- I made my own DOS implementation - samwdpckr, 23.03.2024, 20:32
- I made my own DOS implementation - samwdpckr, 26.03.2024, 04:36
- I made my own DOS implementation - samwdpckr, 27.03.2024, 23:29
- I made my own DOS implementation - Rugxulo, 28.03.2024, 01:29
- I made my own DOS implementation - samwdpckr, 28.03.2024, 04:15
- I made my own DOS implementation - fritz.mueller, 28.03.2024, 21:19
- I made my own DOS implementation - samwdpckr, 29.03.2024, 18:00
- I made my own DOS implementation - Rugxulo, 29.03.2024, 22:01
- I made my own DOS implementation - samwdpckr, 29.03.2024, 22:31
- I made my own DOS implementation - Rugxulo, 08.04.2024, 03:19
- I made my own DOS implementation - fritz.mueller, 17.05.2024, 12:49
- I made my own DOS implementation - Rugxulo, 08.04.2024, 03:19
- I made my own DOS implementation - samwdpckr, 29.03.2024, 22:31
- I made my own DOS implementation - Rugxulo, 29.03.2024, 22:01
- I made my own DOS implementation - samwdpckr, 29.03.2024, 18:00
- I made my own DOS implementation - Rugxulo, 29.03.2024, 02:53
- I made my own DOS implementation - Rugxulo, 30.03.2024, 10:16
- I made my own DOS implementation - samwdpckr, 30.03.2024, 20:09
- I made my own DOS implementation - Oso2k, 31.03.2024, 21:22
- I made my own DOS implementation - Rugxulo, 31.03.2024, 22:59
- I made my own DOS implementation - samwdpckr, 01.04.2024, 16:31
- I made my own DOS implementation - Oso2k, 31.03.2024, 21:22
- I made my own DOS implementation - samwdpckr, 30.03.2024, 20:09
- I made my own DOS implementation - fritz.mueller, 28.03.2024, 21:19
- I made my own DOS implementation - samwdpckr, 28.03.2024, 04:15
- I made my own DOS implementation - Rugxulo, 28.03.2024, 01:29
- I made my own DOS implementation - samwdpckr, 27.03.2024, 23:29
- I made my own DOS implementation - samwdpckr, 08.09.2024, 01:32
- I made my own DOS implementation - samwdpckr, 31.10.2024, 22:29
- I made my own DOS implementation - samwdpckr, 26.03.2024, 04:36
- I made my own DOS implementation - samwdpckr, 23.03.2024, 20:32
- I made my own DOS implementation - samwdpckr, 23.03.2024, 08:10
- I made my own DOS implementation - tom, 22.03.2024, 17:32
- I made my own DOS implementation - samwdpckr, 22.03.2024, 16:21
- I made my own DOS implementation - tom, 22.03.2024, 14:12
- I made my own DOS implementation - samwdpckr, 22.03.2024, 13:14
- I made my own DOS implementation - samwdpckr, 22.03.2024, 02:06
- I made my own DOS implementation - ecm, 22.03.2024, 00:21
- I made my own DOS implementation - samwdpckr, 21.03.2024, 19:56
- I made my own DOS implementation - tom, 21.03.2024, 19:32
- I made my own DOS implementation - samwdpckr, 21.03.2024, 18:06
- I made my own DOS implementation - fritz.mueller, 20.03.2024, 15:56
- I made my own DOS implementation - samwdpckr, 18.03.2024, 22:22
- I made my own DOS implementation - fritz.mueller, 18.03.2024, 13:25
- I made my own DOS implementation - samwdpckr, 18.03.2024, 01:52
- I made my own DOS implementation - samwdpckr, 16.03.2024, 23:11
- I made my own DOS implementation - fritz.mueller, 16.03.2024, 20:01
- I made my own DOS implementation - samwdpckr, 15.03.2024, 20:46
- I made my own DOS implementation - fritz.mueller, 15.03.2024, 14:49
- I made my own DOS implementation - CandyMan, 07.12.2023, 22:17