Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

input a signed number

Posted on 1999-06-23
15
Medium Priority
?
258 Views
Last Modified: 2011-09-20
I want to know how to input a signed number and display it in 68000 assembly language? I am waiting your answer. Thanks
0
Comment
Question by:yyzz
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
  • 2
  • +3
15 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1534600
> .. display it in 68000 assembly language?
what do you mean by that?
0
 

Author Comment

by:yyzz
ID: 1534601
I mean I need to use 68000 to implement signed number input and display.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1534602
That is OS specific.  What OS?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 6

Expert Comment

by:My name is Mud
ID: 1534603
MAC???
0
 
LVL 6

Expert Comment

by:tecbuilder
ID: 1534604
Are you wanting the number (decimal) converted to binary?  If not please try to re-write your question being as specific as possible.
0
 
LVL 22

Expert Comment

by:nietod
ID: 1534605
I think this question is dead.
0
 
LVL 6

Expert Comment

by:My name is Mud
ID: 1534606
Noooooooooooooo, bu huu huu... :P
0
 

Accepted Solution

by:
Meybe earned 400 total points
ID: 1534607
Hi;
for the input subr. you may facing the following problem:
How do i save the number ( 796 ) into a register ( say D1 ) ?
there is a TRAP that i don't remomber the number of it. but that TRAP gets a character from the user. you convert that charcter to a number ( you can check if the char. is valid or not? can't you:)) )
now make a loop until the user enter CR. use two deferent registers say D1 & D2 with 0 in both. now each time in the loop mult. D2 ( which is ZERO ) and add it like this:
D2<-D2+D1; ( the number that the user entered is stored in D1).
For the sign problem: one way to solve it is that to check if the user enter ' - ' at the begining of the loop you can store a falg in some register say D3 ( D3 holds the sign for the number stored in D2 ).
and when displying the number to the user you can check first the flag ( sign ) in D3 and decide to print out a '-' char. or not.

for the displying part:
you can use the division looping...
if you don't know how to implement it I will give a sample program.
0
 

Author Comment

by:yyzz
ID: 1534608
I got your idea. Thanks a lot.
0
 

Expert Comment

by:Meybe
ID: 1534609
Welcome any time:))))))
what was your study?
0
 

Author Comment

by:yyzz
ID: 1534610
computer engg. a new driver.
0
 

Expert Comment

by:Meybe
ID: 1534611
Where did you study?:))
do you have any E-mail.

0
 

Author Comment

by:yyzz
ID: 1534612
Michign. Detroit. Wayne State University. Email: ae9231@wayne.edu
0
 

Expert Comment

by:Meybe
ID: 1534613
Mey I mail you at this E-mail?:)))
0
 

Author Comment

by:yyzz
ID: 1534614
Sure. You are welcome.
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question