EASy68K  
It is currently Wed Nov 22, 2017 2:39 pm

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
PostPosted: Wed Sep 10, 2008 12:02 pm 
Offline

Joined: Wed Jun 27, 2007 2:08 pm
Posts: 6
Location: France
... on Easy68K v3.7.11 Beta :
Code:
        move    #20,d0
        move    #10,d1
        move    #220,d2
        move    #150,d3
        move.w  d3,d4
        sub.w   d1,d4       
        swap    d4       
        move.w  d2,d5
        sub.w   d0,d5
        divu    d5,d4

works, but :
Code:
        move    #20,d0
        move    #10,d1
        move    #220,d2
        move    #150,d3
        move.w  d3,d4
        sub.w   d1,d4       
        swap    d4       
        move.w  d2,d5
        sub.w   d0,d5
        divs    d5,d4

let d4 unchanged


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 10, 2008 1:11 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1049
DIVS in your example is resulting in an Overflow because the resulting quotient would be larger than a 16-bit signed number. If you watch the V flag you will see that it is being set by DIVS. If an overflow is detected, the condition is flagged but the operands are unaffected.

_________________
Prof. Kelly


Last edited by profkelly on Fri Dec 11, 2009 3:38 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 11, 2008 8:11 am 
Offline

Joined: Wed Jun 27, 2007 2:08 pm
Posts: 6
Location: France
Ok ! :oops:

Note for later : when code doesn't work : first sleep, then re-read the code and, only then, write a post... :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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