[comp.os.msdos.programmer] Print String via BIOS and return DOS prompt: How?

r3jjs@VAX1.CC.UAKRON.EDU (Jeremy J Starcher) (11/03/90)

In article <4741@trantor.harris-atd.com> sonny@trantor.harris-atd.com (Bob Davis) writes:
>In a TSR (where, as I understand it, I need to stay out of non-reentrant DOS)
>I want to print a string followed by a return to the DOS prompt.
>
>Using Int 10, Fcn. 0Eh, I get the string OK, but the cursor position is not 
>updated when not at the bottom of the screen, and I do not return to the
>DOS prompt.
>
>Can you give me a hint on how to do what I want? I have searched long and 
>hard through my _DOS Programmer's Reference_ without finding what I seek.
>

Ok.. You just got me on m y favorite subject...

You will not get a DOS prompt because DOS has no concept that you just
changed the screen on it.

A TSR will work behind DOS's back, doing things that DOS has no concept of..

When you say that the cursor position is not updated, can you be a little
more specific (or send a little source)?



If you want it, I have plenty of TSR source around here (TSRs are the reason
I learned assembly to begin with...)-- 
--------------------------+---------------------------------------------------
Jeremy J Starcher         !  No programmer programs in LOGO after reaching
r3jjs@vax1.cc.uakron.edu  !  age 14...
r3jjs@akronvm.bitnet      !

darcy@druid.uucp (D'Arcy J.M. Cain) (11/03/90)

In article <4741@trantor.harris-atd.com> Bob Davis writes:
>In a TSR (where, as I understand it, I need to stay out of non-reentrant DOS)
>I want to print a string followed by a return to the DOS prompt.
>
>Using Int 10, Fcn. 0Eh, I get the string OK, but the cursor position is not 
>updated when not at the bottom of the screen, and I do not return to the
>DOS prompt.
>

There isn't really any way to do this.  COMMAND.COM. the program that
prints the prompt, doesn't "know" that it was interrupted and so continues
to wait for a keystroke.  I first thought that you could just shove a
return into the keyboard queue but that doesn't work either.  What if you
have a partial command typed?  You could clear out the input buffer but
you still don't even know that you are in the shell or not.  You may be
in a program where a return could be catastrophic.

What you want to do is re-think how the TSR communicates with the user.
Use a pop-up box or write to some specific location on the screen or
something like that.

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   I support gun control.
West Hill, Ontario, Canada         |   Let's start with the government!
+ 416 281 6094                     |