Date : Thu, 18 Apr 1991 22:36:46 GMT
From : prism!jm59@gatech.edu (MILLS,JOHN M.)
Subject: Re: Help on overlays etc
In article <1991Apr18.135845.4914@ips.oz.au> dave@ips.oz.au (Dave Horsfall)
writes:
>Hello all. Can someone give me a brief guide to writing overlays and
I think the information you need is in DRI's CP/M 2.2 Modification Guide,
but basically you have to do three things:
(1) write your code so that it can install itself just under the
[current] low-end of CP/M: since this is unknown until the TSR
is invoked, it is easier to write for (say) a Z80 with some relative
addressing than for an 8080/5 without such capability;
(2) you must create a "thread" for whatever BDOS or BIOS calls you want
to intercept, into a screening routine of your own -- probably
you want to copy them all, and put a new set of pointers in their
place which hits the corresponding targets in your TSR; and
(3) you have to adjust the free-memory pointer so that the next TSR to
be invoked doesn't clobber the earlier one(s).
The Sybex book _Mastering CP/M_ includes utilities to (for example) divert
printer output to a disk file. These are probably reasonable examples.
I don't know if any compilers for CP/M give you enough control to do these
things. Assembly language is probably required.
WARNING>> This is all conjecture: I never actually wrote a CP/M TSR.<<
Regards -jmm-
--
MILLS,JOHN M.
Georgia Institute of Technology, Atlanta Georgia, 30332
uucp: ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!jm59
Internet: jm59@prism.gatech.edu