Hello! I need to write a resident program in the language Assembler, which would look in the memory of other resident programs and display their name. I found that I can scan the chain of MCB records using function 52h, but I don’t understand how to find resident programs there.
1 answer
DOS (a and MCB and "resident programs") suggest it - single-task OS. That is, all programs except yours, which own the memory blocks, will be resident. And going along the chain of memory control block, you are looking for blocks that do not belong to the OS (the word with offset 1 in the chain, "owner" is not equal to 0). The "owner" specified there is the PID of the process. Write unique PIDs in a string or array - this will be the list of "resident" (currently running) programs. Do not write into it the PID of your program, if you know how to get it.
Here is an example on assembler, I can't check, I don't have DOS.
|
int 27h,31h/21h? - PinkTux