home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky alt.msdos.programmer:2719 comp.os.msdos.programmer:10553
- Newsgroups: alt.msdos.programmer,comp.os.msdos.programmer
- Path: sparky!uunet!clarkson!smithbm
- From: smithbm@craft.camp.clarkson.edu (Azrak)
- Subject: Re: my_tsr
- Message-ID: <smithbm.721597007@craft.camp.clarkson.edu>
- Sender: news@news.clarkson.edu
- Nntp-Posting-Host: craft.camp.clarkson.edu
- Organization: Clarkson University
- References: <1348@datmuc.UUCP>
- Date: Thu, 12 Nov 1992 19:36:47 GMT
- Lines: 35
-
- vincent@datmuc.UUCP (vincent) writes:
-
- >This is a (re)repost I never got any replys, The Org. Q. was why this code
- >doesn't work?
-
- [Lot's of text and code deleted....]
-
- >P.P.P.S. I will continue on my side like instead of allocating a stack,
- >have a fix buffer in the code segment. Also to date I'm not shure
- >if I need to save the DS since it is anyway restore at the interrupt.
- >Also in the inline asembly I might try to set ds to cs (for my data) and
- >also for the stack seg.. (I guess I do need my own stack). The only thing I know
- >about .COM is that LINK tell me that for tiny memory model I am not alowed
- >to have _far pointers.
-
- In the very few TSRs I have written (all in assembly, I'm afraid), I
- save ALL registers I use, especially segment registers, like DS.
- I never made my own stack, but the TSRs I wrote were also of the clock
- interrupt type, and did not perform stack intensive operations,
- though I did PUSH a few registers, including DS.
- I did set DS = CS upon entering the clock interrupt so I could get at
- my own data easier, just remember to save DS before assigning it.
-
- If you wish, I will post one of my TSRs for you to look at, but remember
- that it is completely in 8088 assembly, and I am not a CS major. The
- program might not be as efficient as possible, however it is quite
- stable and will not crash very easily.
-
- - Brian (smithbm@craft.camp.clarkson.edu)
-
- As for my opinion for why it crashes, try saving all registers used
- in the interrupt routine. At least you will be at a "known state" and
- can go from there. Just remember to POP all registers in reverse order
- at the end of your routine.
-
-