writing tsr in c

A

ashish

i need to write a tsr in c language which asks for the login id and
password before the windows appear. if anyone could advise of any
links which might prove fruitful or anysuggestions..
thanking in advance
ashish
 
R

Richard Bos

i need to write a tsr in c language which asks for the login id and
password before the windows appear. if anyone could advise of any
links which might prove fruitful or anysuggestions..

No doubt people are going to tell you that this is system-specific, and
please ask in a newsgroup for programming your OS... so let me save you
the trouble. The combination of TSR with "before", as well as with
Windows, does not make sense. _First_ figure out what you _actually_
want to do, without referring to technical details like "TSR" - and then
ask in a system-specific newsgroup.

Richard
 
F

Fao, Sean

ashish said:
i need to write a tsr in c language which asks for the login id and
password before the windows appear. if anyone could advise of any
links which might prove fruitful or anysuggestions..
thanking in advance

You're probably going to want to take this to a newsgroup pertaining to
your intended platform. You might also want to be more clear on your
desired outcome because you automatically through up a red flag when you
said TSR and entering username/password before a login.

Sean
 
A

Anupam

i need to write a tsr in c language which asks for the login id and
password before the windows appear. if anyone could advise of any
links which might prove fruitful or anysuggestions..
thanking in advance
ashish

Hi ,
A google search (String : tsr c programming) yielded sample code at :
http://www.geocities.com/progguru/
It would also be nice if you could post this to an appropriate
newsgroup for the platform you are using. And I would suggest that you
give your problem in sufficient detail when you do so.(For instance it
is difficult for us to know which windows you are talking about).

Regards,
Anupam
 
D

Dan Pop

In said:
i need to write a tsr in c language which asks for the login id and
password before the windows appear.

TSR is a DOS concept and DOS doesn't display any windows.

However, even if you want to write it in C, the C language provides NO
support for such things: you're in the wrong newsgroup. Try something
dedicated to DOS or Windows programming.

Dan
 
T

Tom St Denis

Dan Pop said:
In <[email protected]> (e-mail address removed)

TSR is a DOS concept and DOS doesn't display any windows.

DOS concept? Oh really... so when I run apache and I get my console back I
take it that apache is no longer running?

Swing and a miss me boy.

Tom
 
O

osmium

Richard said:
No doubt people are going to tell you that this is system-specific, and
please ask in a newsgroup for programming your OS... so let me save you
the trouble. The combination of TSR with "before", as well as with
Windows, does not make sense. _First_ figure out what you _actually_
want to do, without referring to technical details like "TSR" - and then
ask in a system-specific newsgroup.

Note that the system() function allows one process to initiate another
process. It may be helpful in what you want to do.

It sounds like you want :execute program A and then, conditionally, execute
program B.
 
A

August Derleth

i need to write a tsr in c language which asks for the login id and
password before the windows appear.

This is off-topic in comp.lang.c. Try a system-specific newsgroup.
if anyone could advise of any
links which might prove fruitful or anysuggestions..
thanking in advance
ashish

Try the group comp.os.msdos.programmer or similar.
 
S

Sheldon Simms

DOS concept? Oh really... so when I run apache and I get my console
back I take it that apache is no longer running?

Apache is not a TSR program. Your operating system supports the
concurrent execution of multiple processes, which is a different
thing than the DOS idea of TSRs.
 
F

Fao, Sean

Tom said:
DOS concept? Oh really... so when I run apache and I get my console back I
take it that apache is no longer running?

You obviously don't know what a TSR is so don't talk like you do.
Apache runs as a service.
 
D

Dan Pop

DOS concept? Oh really... so when I run apache and I get my console back I
take it that apache is no longer running?

Who could expect Tom St Denis to understand the difference between a TSR
and a program running in background?

Dan
 
D

David M. Wilson

DOS concept? Oh really... so when I run apache and I get my console back I
take it that apache is no longer running?

In popular speak, the term 'TSR' does indeed usually refer to the type
of program that hooked itself into DOS and returned control to the
operating system. I'm scared if Apache is implemented as a TSR, it
should really be using cleaner interfaces than that...

...if you refer to Apache as a TSR, then I suggest you change your
vocabulary. 'TSR's under *nix are more often known as background
processes, or more specifically in Apache's case, a daemon.

Where 'daemon' should maybe actually be 'DAEMON', and defined in some
places as "Disk And Execution MONitor".

Swing and a miss me boy.

*thwack*

Be nice to newbies, please.


David.
 
R

Randy Howard

dw- said:
*thwack*

Be nice to newbies, please.

David.

I may have missed your meaning here, but did you actually just tell
Tom to be nice Dan Pop here, implying that Dan is a newbie?

*cough* *sputter*
 
T

Tom St Denis

David M. Wilson said:
"Tom St Denis" <[email protected]> wrote in message


In popular speak, the term 'TSR' does indeed usually refer to the type
of program that hooked itself into DOS and returned control to the
operating system. I'm scared if Apache is implemented as a TSR, it
should really be using cleaner interfaces than that...

..if you refer to Apache as a TSR, then I suggest you change your
vocabulary. 'TSR's under *nix are more often known as background
processes, or more specifically in Apache's case, a daemon.

They're the same thing. Sure TSR really arose out of MSDOS but let's not
forget it means "Terminate and Stay Resident". Which is a bit of a misnomer
but really is a daemon. Many TSRs were device drivers [e.g. network shares,
mouse, keyboard, etc].

Tom
 
M

Mark A. Odell

In popular speak, the term 'TSR' does indeed usually refer to the type
of program that hooked itself into DOS and returned control to the
operating system. I'm scared if Apache is implemented as a TSR, it
should really be using cleaner interfaces than that...

..if you refer to Apache as a TSR, then I suggest you change your
vocabulary. 'TSR's under *nix are more often known as background
processes, or more specifically in Apache's case, a daemon.

They're the same thing. Sure TSR really arose out of MSDOS but let's
not forget it means "Terminate and Stay Resident". Which is a bit of a
misnomer but really is a daemon. Many TSRs were device drivers [e.g.
network shares, mouse, keyboard, etc].

No, Terminate and Stay Resident is a DOS-ism. Daemons, threads, processes
etc. do not call into MS-DOS interrupts to hook an interrupt vector so
they can wake up when that DOS service is next called. Why? Because there
*is no DOS in non-DOS operating systems*!!!

Haven't you ever written a scheduler or at least looked at the source code
for an RTOS task scheduler? No DOS in there, no TSR's, nadda, let me tell
you.
 
A

Arthur J. O'Dwyer

David M. Wilson said:
In popular speak, the term 'TSR' does indeed usually refer to the type
of program that hooked itself into DOS and returned control to the
operating system. I'm scared if Apache is implemented as a TSR, it
should really be using cleaner interfaces than that...

..if you refer to Apache as a TSR, then I suggest you change your
vocabulary. 'TSR's under *nix are more often known as background
processes, or more specifically in Apache's case, a daemon.

They're the same thing. Sure TSR really arose out of MSDOS but let's
not forget it means "Terminate and Stay Resident". Which is a bit of
a misnomer but really is a daemon. Many TSRs were device drivers
[e.g. network shares, mouse, keyboard, etc].

[f-ups set to comp.programming]

Now, this is way OT for c.l.c, and I think Mark Odell basically
corrected Tom elsethread, but I would like to make sure *my*
understanding is basically correct here (having done quite a bit
of TSR programming, and knowing a bit about *nix processes).

An MS-DOS program can invoke a DOS service to "terminate and
stay resident," at which point the control flow returns to the
OS but the program's code remains in memory. TSRs were often
used to hook into the system's interrupts in order to do clever
things in response to events (keypresses, timer alarms, etc).
A Unix or Linux program just runs. Each program (process)
gets its own instruction pointer. The program can't "terminate
and stay resident," although it *can* suspend its IP for a
while. But the IP never leaves the program's "space" until
the program actually terminates and its code is discarded out
of RAM.
*nix processes can suspend themselves, or be suspended, *or*
the shell can let them "run in background." "Background" is
a shell-level concept completely foreign to the kernel.
Daemons are programs that usually run in the background.
They look similar to TSRs, because they only interact with the
user upon receiving certain external signals ("signals" in the
general sense, not the Unix sense). But unlike TSRs, they can
act whenever they feel like it, because they have their own
instruction pointers that are still executing code, even when
the user can't see their effects.
When Tom St Denis talks about Apache, he's talking about a
web server daemon of some sort. It's certainly not a TSR,
because it never T's. :)

Have I got it right?

-Arthur
 
J

J. J. Farrell

Tom St Denis said:
They're the same thing.
Nonsense.

Sure TSR really arose out of MSDOS but let's not
forget it means "Terminate and Stay Resident".

We haven't forgotten - that's exactly why your claim is nonsense.
Which is a bit of a misnomer

Nonsense. It's a precise and accurate description of a TSR.
but really is a daemon.

Nonsense. How would a daemon be of any use if it terminated?
Many TSRs were device drivers [e.g. network shares,
mouse, keyboard, etc].

Indeed. Things entirely unrelated to daemons or other background processes.
 
A

Alex

They're the same thing. Sure TSR really arose out of MSDOS but let's not
forget it means "Terminate and Stay Resident". Which is a bit of a misnomer
but really is a daemon. Many TSRs were device drivers [e.g. network shares,
mouse, keyboard, etc].

Think about those words for a second: "Terminate and Stay Resident".
When does a daemon terminate?

TSRs were a lame attempt at multitasking. Truly multitasking Operating
Systems do not require such hacks because they can logically run multiple
processes concurrently.

In other word, this MS DOS-specific term has absolutely no relevance
to Unix.

Alex
 
J

Joona I Palaste

Alex said:
Tom St Denis said:
They're the same thing. Sure TSR really arose out of MSDOS but let's not
forget it means "Terminate and Stay Resident". Which is a bit of a misnomer
but really is a daemon. Many TSRs were device drivers [e.g. network shares,
mouse, keyboard, etc].
Think about those words for a second: "Terminate and Stay Resident".
When does a daemon terminate?
TSRs were a lame attempt at multitasking. Truly multitasking Operating
Systems do not require such hacks because they can logically run multiple
processes concurrently.
In other word, this MS DOS-specific term has absolutely no relevance
to Unix.

Or, if Tom defines "TSR" as "program that can run simultaneously with
other programs", then *every* program in a multitasking OS is a TSR.
 
T

Tom St Denis

Alex said:
They're the same thing. Sure TSR really arose out of MSDOS but let's not
forget it means "Terminate and Stay Resident". Which is a bit of a misnomer
but really is a daemon. Many TSRs were device drivers [e.g. network shares,
mouse, keyboard, etc].

Think about those words for a second: "Terminate and Stay Resident".
When does a daemon terminate?

Technically TSRs don't terminate either. Here's the jist of a TSR in DOS

1. Setup your device
2. Return any heap to DOS
3. "TSR"

At which point the program is still in memory, DOS still accounts for it.
Just now it won't do anything until either a software or hardware interrupt
[or direct call] invokes the program.

I said "misnomer" because TSRs don't terminate if they did you could
consider them "memory leaks".

And yeah, I agree [and never said otherwise] that a TSR is a form of true
multitasking. In fact I don't even know what this discussion was about in
the first place. All I know is this group has a lot of "experts". Grow
some modesty.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top