LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 03-02-2012, 01:52 PM   #1
Zssfssz
Member
 
Registered: Sep 2011
Location: Las Vegas!
Distribution: Ubuntu n' Flavors, ReactOS, MINIX3, FreeDOS, Arch
Posts: 339

Rep: Reputation: Disabled
C++ & Fortran; Get Current Register Values


I want to make a program in both Fortran (For Syntax Simplicity) and C++ (Know More) that prints the current values of each register (esp, etc.).
I have a hunch that it will difficult in Fortran but C++ should be Mildly simple. I would rather it not be inline assembly so I could edit it more easaly but I'm flexible.
How would I Get the value of a register(s) in C++\Fortran?

Last edited by Zssfssz; 03-02-2012 at 01:54 PM.
 
Old 03-02-2012, 04:09 PM   #2
trbennett48
LQ Newbie
 
Registered: Apr 2011
Posts: 22

Rep: Reputation: 3
I can give you a little guidance from my old mainframe days. When we wanted "binary" information in a non-assembler environment (COBOL), we would write a little assembler subroutine, and call it from the high level language.

Be aware, however, during a call to a subroutine, certain register values change.

-tony
 
  


Reply

Tags
c++, fortran, registers


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
cli utility to view hardware register values/ registers slugman Linux - Hardware 1 06-11-2011 09:29 AM
Problem on assigning register for Current pointer beparas Linux - General 1 05-18-2009 12:14 AM
How to know SHMSEG, SHMMIN,SHMMAX and SEMMAP current values sunilvadranapu Suse/Novell 1 09-19-2007 03:18 AM
Accessing register values in C... Elric of Grans Programming 6 05-09-2005 12:30 AM
C Function List && Fortran OutToSea Programming 0 06-18-2003 10:13 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration