LinuxQuestions.org
Review your favorite Linux distribution.
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 08-18-2011, 11:34 AM   #1
ramorous24
LQ Newbie
 
Registered: Aug 2011
Posts: 1

Rep: Reputation: Disabled
Unhappy assembly language


hi i have a problem with assembly code (.asm), can someone help me do the code output is a scientific calculator using the assembly language?thanks hope someone will help me with this...GOD bless..
 
Old 08-18-2011, 11:44 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Is this a homework assignment?
jdk
 
Old 08-18-2011, 01:50 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Moved: This thread is more suitable in <PROGRAMMING> and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 08-19-2011, 06:38 AM   #4
salasi
Senior Member
 
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
Quote:
Originally Posted by jdkaye View Post
Is this a homework assignment?
Well, it certainly looks like it, and if it walks like a duck and quacks like a duck...

In any case, for the OP, the answer is no. You haven't given enough information - Linux supports many architectures, and the assembly language for each architecture is different (and its not even clear that the question refers to an arch supported by Linux...real scientific calculators can use a number of architectures that are only really popular in embedded and to which Linux has not been currently ported, as well as all of the usual ARM, 'HC09 stuff), so you ought to be doing at least a bit more work in defining the problem. And, in any case, there are many variants in terms of where the input would come from (a scientific calculator keyboard, with all that implies in the way of scanning a matrix of buttons, an ASCII/Qwerty keyboard, a touchscreen....) and of output device (graphics screen via unknown device driver libraries. seven segment display, with multiplexing, etc).

So, right now I would be unable to answer this question, even if I really wanted to. And, if people suspect that the question is homework, they are more probably going to try to push you in the right direction, rather than answer the question directly. (And it probably builds on whatever other exercises that you have been doing in whichever programming class that you are taking, if this is a quacking duck.)
 
Old 08-21-2011, 11:31 PM   #5
rob.rice
Senior Member
 
Registered: Apr 2004
Distribution: slack what ever
Posts: 1,076

Rep: Reputation: 205Reputation: 205Reputation: 205
I assume your asking about intel x86 assembly running linux
the simplest way to write a scientific calculator in assembly
would be to write a user interface to the math co-processor
(a built in hardware scientific calculator )
the assembly source to convert strings to floating point and back (the hardest part ) is on the web
http://webster.cs.ucr.edu/AoA/DOS/ch14/CH14-2.html


http://homepage.mac.com/randyhyde/we...uxSysCalls.pdf

Last edited by rob.rice; 08-22-2011 at 12:51 AM.
 
  


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
assembly language! please help me! thanks in advance! topheraholic Programming 6 03-19-2011 08:15 PM
Is Assembly Language considered a Structured Language? theKbStockpiler Programming 4 01-30-2011 09:09 AM
Assembly Language Books JMJ_coder Programming 3 05-06-2008 04:04 PM
assembly language in linux herbertgnanaraja Programming 12 09-21-2006 03:52 AM
Assembly Language, and networks grizzly Programming 5 12-11-2003 09:50 PM

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

All times are GMT -5. The time now is 05:37 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