• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 265
  • Last Modified:

input a signed number

I want to know how to input a signed number and display it in 68000 assembly language? I am waiting your answer. Thanks
0
yyzz
Asked:
yyzz
  • 5
  • 4
  • 2
  • +3
1 Solution
 
ahoffmannCommented:
> .. display it in 68000 assembly language?
what do you mean by that?
0
 
yyzzAuthor Commented:
I mean I need to use 68000 to implement signed number input and display.
0
 
nietodCommented:
That is OS specific.  What OS?
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
My name is MudSystems EngineerCommented:
MAC???
0
 
tecbuilderCommented:
Are you wanting the number (decimal) converted to binary?  If not please try to re-write your question being as specific as possible.
0
 
nietodCommented:
I think this question is dead.
0
 
My name is MudSystems EngineerCommented:
Noooooooooooooo, bu huu huu... :P
0
 
MeybeCommented:
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
 
yyzzAuthor Commented:
I got your idea. Thanks a lot.
0
 
MeybeCommented:
Welcome any time:))))))
what was your study?
0
 
yyzzAuthor Commented:
computer engg. a new driver.
0
 
MeybeCommented:
Where did you study?:))
do you have any E-mail.

0
 
yyzzAuthor Commented:
Michign. Detroit. Wayne State University. Email: ae9231@wayne.edu
0
 
MeybeCommented:
Mey I mail you at this E-mail?:)))
0
 
yyzzAuthor Commented:
Sure. You are welcome.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 5
  • 4
  • 2
  • +3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now