473,414 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

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 4969

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Gary | last post by:
I am developing a simple DB-Library program in C calling SQL Server 2000 on windows 2003 and NT 4. I have some T-SQL code that checks for the existence of a table and want to abort the program if...
11
by: Yasaswi Pulavarti | last post by:
I know there are some sample user exit programs in sqllib/samples/c directory. How do I tell DB2, which user exit program to use? I know I have to edit and compile the c based user exit programs,...
6
by: orekin | last post by:
Hi There I have been trying to come to grips with Application.Run(), Application.Exit() and the Message Pump and I would really appreciate some feedback on the following questions .. There are...
22
by: Shelby | last post by:
Hi, I used System.Windows.Forms.Application.DoEvents() in a loop to handle user click close button . Private Sub btnclose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)...
1
by: Peter Oliphant | last post by:
I have a C++ Console application being written using VS C++.NET 2005 Express. It never crashes and seems to be working just fine. However, when I close the application via the Console 'X' exit...
2
by: GGerard | last post by:
Hello Is there a way to exit all running procedures with one command? Sometimes a procedure(1) will call another procedure(2) which could call a third procedure(3) and what I would like to...
8
by: Suresh | last post by:
Hi All I have one STATES table with two fields (STATECODE, NAME). I had written following stored procedure on this table CREATE PROCEDURE ESCRIP.STATES_GETALL(OUT @ERRORCODE INT, OUT...
23
by: Tina | last post by:
In vb.net to get out of a sub or a function we can say Exit Sub. How can I get out of a void method in C#. I can't find that documented anywhere. Thanks, T
6
by: MLH | last post by:
I have a form, frmUSPSReturnReceipts, with a control named NotExpectingGreenTickets. The control's Exit event procedure follows: Private Sub NotExpectingGreenTickets_Exit(Cancel As Integer) If...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.