473,698 Members | 2,676 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4995

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-baaaauuummmmeee eeeeEEEEEE-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-baaaauuummmmeee eeeeEEEEEE-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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2511
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 the table doesn't exist. I issue a raiserror if the table doesn't exist and then call RETURN. I construct the string using sprintf and pass it dbfcnd and dbsqlexec. Since the commands work, there is no error to halt the execution of the program....
11
11158
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, but how do I tell DB2 instance and database to use that particular user exit program. Thanks, Yasaswi
6
20078
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 quite a few words in this post but the questions are actually quite similar and should be fairly quick to answer ... (1) What is Happening with the Threads
22
2243
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) Handles btnclose.Click Me.Close() System.Windows.Forms.Application.Exit End Sub
1
2512
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 button in upper right corner of its dialog box I get the following exit code: "The program ' MyApplication.exe: Managed' has exited with code -1073741510 (0xc000013a)." If I close it via the 'X' in the application form it exits with exit code 0:
2
5944
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 do is give a command in procedure(3) that would exit all three procedure without returning to procedure(1) and procedure(2)
8
10991
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 @ERRORDESCRIPTION VARCHAR(200)) LANGUAGE SQL READS SQL DATA DYNAMIC RESULT SETS 1 ------------------------------------------------------------------------
23
18913
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
7725
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 IsNull(Me!NotExpectingGreenTickets) Then DoCmd.CancelEvent Exit Sub End If End Sub
0
8685
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9171
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9032
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8880
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6532
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5869
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4373
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.