How to keep resident only a part of the program (Developers)
Hello Laaca,
> I am thinking about very tiny resident utility which hooks the INT16
> interrupt. I know that "high-level" languages like pascal or C have
> something like function Keep (which apparently calls INT21h/AH=31h). But
Actually the int 0x21, ah = 0x31 interface does allow one to specify how many paragraphs of memory one wants to keep resident. Turbo C and Watcom C also accept a paragraph count as a parameter to keep(...) and (respectively) _dos_keep(...).
But it might be hard to use this correctly in the context of high-level code. You need to arrange your program binary code in such a way that the resident portions will come before (most of) the transient portions (and you must take library functions into account too...). I am not sure what features Free Pascal (e.g.) has that might facilitate this sort of thing.
> Is possible solution to allocate a additional memory block via
> INT21h/AH=48h, copy the code of KeyClick into this block and the program
> end not with Keep but hith Halt?
That will likely not work --- DOS will free up all memory blocks allocated by your program, including those from int 0x21, ah = 0x48.
Thank you!
---
https://gitlab.com/tkchia · https://codeberg.org/tkchia · 😴 "MOV AX,0D500H+CMOS_REG_D+NMI"
Complete thread:
- How to keep resident only a part of the program - Laaca, 14.08.2021, 07:31 (Developers)
- How to keep resident only a part of the program - tkchia, 14.08.2021, 08:49
- How to keep resident only a part of the program - Laaca, 14.08.2021, 10:32
- How to keep resident only a part of the program - tom, 14.08.2021, 11:40
- How to keep resident only a part of the program - RayeR, 14.08.2021, 15:49
- How to keep resident only a part of the program - Laaca, 14.08.2021, 20:18
- How to keep resident only a part of the program - RayeR, 16.08.2021, 03:22
- How to keep resident only a part of the program - Laaca, 14.08.2021, 20:18
- How to keep resident only a part of the program - RayeR, 14.08.2021, 15:49
- How to keep resident only a part of the program - tom, 14.08.2021, 11:40
- How to keep resident only a part of the program - tom, 14.08.2021, 11:28
- How to keep resident only a part of the program - ecm, 15.08.2021, 13:47
- How to keep resident only a part of the program - bretjohn, 27.08.2021, 21:22
- How to keep resident only a part of the program - Laaca, 14.08.2021, 10:32
- How to keep resident only a part of the program - marcov, 14.08.2021, 13:18
- How to keep resident only a part of the program - CandyMan, 27.08.2021, 17:46
- How to keep resident only a part of the program - bretjohn, 27.08.2021, 21:47
- How to keep resident only a part of the program - Laaca, 08.03.2022, 12:24
- How to keep resident only a part of the program - tom, 08.03.2022, 12:51
- How to keep resident only a part of the program - tkchia, 08.03.2022, 14:20
- How to keep resident only a part of the program - bretjohn, 08.03.2022, 19:19
- How to keep resident only a part of the program - tkchia, 08.03.2022, 14:20
- How to keep resident only a part of the program - rr, 08.03.2022, 17:32
- How to keep resident only a part of the program - tom, 08.03.2022, 12:51
- How to keep resident only a part of the program - tkchia, 14.08.2021, 08:49