LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-14-2006, 12:37 AM   #1
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
System call and registers


I'm writing an assembly program. Is it necessary to save all the general purpose registers on the stack
before making a system call, or is there some guarantee that certain ones not be changed after the
system call returns?
 
Old 12-14-2006, 04:24 AM   #2
cyber-worx
Member
 
Registered: May 2004
Location: England / Switzerland
Distribution: Gentoo, Ubuntu, Debian, Slackware
Posts: 138

Rep: Reputation: 15
There are never guarantee's

If you want data to be there after a call, make sure you deal with it

Cheers
-rob
 
Old 12-14-2006, 06:30 PM   #3
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Original Poster
Rep: Reputation: 165Reputation: 165
Thank you. I was hoping system calls would be more considerate, but the results made me suspicious that a system call was corrupting the registers.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
system system call usage sureshkellemane Programming 3 03-20-2007 12:41 AM
Calling a system call from a system call? Loc_8 Programming 0 09-16-2006 04:21 PM
system call to primo Solaris / OpenSolaris 1 05-03-2006 07:15 AM
Is it possible to use system() and get the return value from the system call newguy21 Programming 1 08-11-2004 01:37 PM
Novell Registers UNIX System V Copyrights /bin/bash General 5 12-23-2003 03:00 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration