EASy68K  
It is currently Mon Dec 11, 2017 7:26 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Feb 18, 2016 7:57 pm 
Offline

Joined: Thu Feb 18, 2016 7:54 pm
Posts: 3
Hello,

I'm subtracting two number that our read from the keyboard and when I do that, I get a negative result.

I tried putting a NEG infront of the sub like this:

Code:
NEG sub.l d2,d1


But I still get a negative answer.

Any help?


Top
 Profile  
 
PostPosted: Thu Feb 18, 2016 9:29 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1056
NEG is an instruction. Placing it in the front of a line creates a label named NEG.
Try this:
Code:
    sub.l d2,d1
    neg.l d1

_________________
Prof. Kelly


Top
 Profile  
 
PostPosted: Thu Feb 18, 2016 9:36 pm 
Offline

Joined: Thu Feb 18, 2016 7:54 pm
Posts: 3
Worked, thanks a lot


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Majestic-12 [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group