TIP: Click on subject to list as thread! ANSI
echo: 80xxx
to: SYLVAIN LAUZON
from: DENIS BOYLES
date: 1997-04-06 18:20:00
subject: dosdebug.asm

SL> > it's IMPORTANT that the registers aren't changed before/after
SL> > the call.
SL>Even flags registers?
YES! Even those two, which I learned hands on. When I was trying my "HD
LED" program, at first I didn't handle the flags properly. As a result, it
would appear a disk error occured, when really it didn't.
SL> > INT 21h:      <-            <----
SL> >   mov  AH,09h                   |
SL> >   mov  DX,offset message        |   goes into infinate loop?
SL> >   int  21h                   ---|
SL>I'm not calling int 21h inside another int 21h. i know it could has a side
SL>effect like this. :-)
SL>But say calling int 21h from int 2dh
Hmm, that might be ok, but it's probably safer to check the INDOS flag just
to be sure. If the flag is clear, then you know it's safe to call the DOS
interrupt.
SL> > Firstly reserve
SL> > some space for the stack in your program.
SL> When i use int 21h/31 must i include the stack area too? or round up to
SL> executable code only.
I suppose it depends on the scope and size of your TSR program. If it's
really simple, like my blinky, then you don't really need the stack. Since,
whoever's stack will probably have enough space for you.
However if your program is larger and more complex, like a pop-up
calculator, then keep the stack. In this case it's best to use your own
stack, rather them some unknow one.
SL> > Upon exiting your TSR program, just reverse the process to
SL> > switch the stacks back.
SL>Easy to demonstrate how things works but actually get it done its another
SL>pair of hands.
Yep, that's true, it may look good on paper, but applying it in reality is
another story. I know I've had my problems from time to time...
Cheers,
  Denis Boyles
 * OLX 2.1 TD * Back Up My Hard Drive? I Can't Find The Reverse Switch!
--- Maximus/2 3.01
---------------
* Origin: Frog Hollow Port Moody BC 604-469-0264/0284 (1:153/290)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.