469,889 Members | 1,171 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,889 developers. It's quick & easy.

How to exit program from a procedure?

In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?

May 2 '06 #1
10 4733

Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


If you're asking how to exit from an assembly language routine, you're
in the wrong place. Try some of the assembly language groups.

If you're asking how to exit a C *function* (as C has no notion of
procedures), then the answer is: using a `return` statement. This comes
in two flavours:

1) return;
Use this when returning from `void` functions (closest to procedure
in Pascal)

2) return <expression>;
Use this to return from function that returns a value (closest to
function in Pascal)

May 2 '06 #2
Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


By hitting the computer with a very large axe. What makes you think
assembler programming is topical in a C news group? Try an assembler one
or uk.rec.sheds (where it would probably be more acceptable than here!)
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 2 '06 #3
Andy said:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


For now, forget how you can, and focus on whether you should.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
May 2 '06 #4
Andy wrote:
assemble program?


Whats it ??

If you meant assembly language program, go somewhere else.

Otherwise, if you have to exit from "assemble program",

The following are the ways that i have identified..
These are to be done in the given order

1. Try pressing ctrl+C while its running.
2. Try passing SIGKILL to the program.
3. Try rebooting the machine from another console.
4. Try pressing the power button on the PC cabinet.
5. Try to reset the machine making use of reset button of the PC.
6. Try to switch off the power supply.
7. Try to disconnect the power cable of the PC.
8. Hit the machine hard with an axe.
9. If its still running, let it run. It is really talented and lets
wait and see how much it will go.

May 2 '06 #5
Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


jsr exit

:-)

--
Simon.
May 2 '06 #6
Simon Biber wrote:
Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


jsr exit

:-)


Doesn't work on the TMS320C25. No such instruction as jsr :-)
--
Flash Gordon, living in interesting times.
Web site - http://home.flash-gordon.me.uk/
comp.lang.c posting guidelines and intro:
http://clc-wiki.net/wiki/Intro_to_clc
May 2 '06 #7
Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


Very often the programmer has implemented a menu bar. Typically you go
to the menu bar. Then you click "File". Typically you then choose "Exit"
in the bottom. There you go.

I suggest your next exercises would be something like:

1) It seems like you can already open an application. Next time try
pressing alt+tab to switch between several open applications running
simultaneously (wauw).
2) How to use the mouse.
3) Knowing the difference between left and right mouse button.
4) How to shut down windows xp from the shutdown menu, instead of
clicking on the power-button or just unplugging the power chord.
5) ???

I guess you can easily figure out some more exercises yourself.
Best regards / Med venlig hilsen
Martin Jørgensen

--
---------------------------------------------------------------------------
Home of Martin Jørgensen - http://www.martinjoergensen.dk
May 2 '06 #8
Martin Jørgensen said:
4) How to shut down windows xp from the shutdown menu, instead of
clicking on the power-button or just unplugging the power chord. ^^^^^^^^^^^
Bawaaauuuuummmm-baaaauuummmmeeeeeeeEEEEEE-bwaaauufzzt. :-)
5) ???

I guess you can easily figure out some more exercises yourself.


One vital task for neophyte computer users to learn is how to install
Service Pack 7.
--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
May 2 '06 #9

Richard Heathfield wrote:
Martin Jørgensen said:
4) How to shut down windows xp from the shutdown menu, instead of
clicking on the power-button or just unplugging the power chord.

^^^^^^^^^^^
Bawaaauuuuummmm-baaaauuummmmeeeeeeeEEEEEE-bwaaauufzzt. :-)


Early Ted Nugent, with a slight hint of Tony Iommi, and a faint, yet
crisp aura of Robin Trower. Classic ;o)

May 2 '06 #10
Flash Gordon wrote:

Simon Biber wrote:
Andy wrote:
In C, we can use "exit" to exit the program.But how can we exit from a
assemble program?


jsr exit

:-)


Doesn't work on the TMS320C25. No such instruction as jsr :-)


Besides, "Jam Soviet Radar" is so 1960's.

--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody/at\spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:Th*************@gmail.com>

May 3 '06 #11

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Yasaswi Pulavarti | last post: by
1 post views Thread by Peter Oliphant | last post: by
8 posts views Thread by Suresh | last post: by
23 posts views Thread by Tina | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.