•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Assembly section within the Software Development category of DaniWeb, a massive community of 401,951 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,341 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1953 | Replies: 3
![]() |
•
•
Join Date: Jun 2006
Location: UK (Bristol)
Posts: 225
Reputation:
Rep Power: 3
Solved Threads: 1
Hello everyone. I read a couple of tutorials on x86 assembly a while ago. It was made clear in these that certain instructions need to be included at the end of a program to make it close properly. However, there was some inconsistency about how a program should be terminated. Could anyone tell me how a process should be closed on a win32 system and is this proceedure OS specific? Thanks.
Steven.
Steven.
Hello, you're through to Steven on the BT Business technical help desk. Could I take your broadband telephone number please?
•
•
Join Date: Aug 2005
Location: near St Louis, Missouri, USA
Posts: 10,694
Reputation:
Rep Power: 36
Solved Threads: 878
see this thred for example. It is specific to 16-bit MS-DOS 6.X and earlier. Can't run it in 32-bit applications because int 21 instruction not allowed unless running in ring 0 as super user (os)
MOV AH,4CH ; return control to DOS INT 21H
Last edited by Ancient Dragon : Jan 12th, 2007 at 11:44 am.
I think it's about time we voted for senators with breasts. After all, we've been voting for boobs long enough. ~Clarie Sargent, Arizona senatorial candidate
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
Those who are too smart to engage in politics are punished by being governed by those who are dumber. ~Plato
•
•
•
•
Hello everyone. I read a couple of tutorials on x86 assembly a while ago. It was made clear in these that certain instructions need to be included at the end of a program to make it close properly. However, there was some inconsistency about how a program should be terminated. Could anyone tell me how a process should be closed on a win32 system and is this proceedure OS specific? Thanks.
Steven.
There are three (3) different means of process termination on a Win32 system and all three are "proper" or valid.
The first (most common) method is: any thread in the process can make a call to the ExitProcess function.
The second (should be avoided) method is that another process (e.g. application, process explorer) makes a call to the Terminate Process function passing as a parameter the process handle for the application being terminated.
The third (rare) method is when all the threads in a process simply die on their own {e.g. they all call the ExitThread function} leaving the process with no reason to exist so the OS kills the process. NOTE: Since every process has at least one thread....if you do not indulge in any multithreading code {i.e. make calls to CreateThread}, then ExitThread is synonimous with ExitProcess.
while (CPU is present) {some assembly required}
![]() |
•
•
•
•
•
•
•
•
DaniWeb Assembly Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- UNIX shell programming. Times function isn't working right (C++)
- VX2 aurora smitfraud infection (Viruses, Spyware and other Nasties)
- HJT log (Viruses, Spyware and other Nasties)
- Aurora virus - Hijack log (Viruses, Spyware and other Nasties)
- Kill A Process (Windows NT / 2000 / XP / 2003)
- Main Options / Style Questions (C++)
Other Threads in the Assembly Forum
- Previous Thread: URGENT: Code for 32 Bit Division
- Next Thread: helllp me plz



Linear Mode