EASy68K  
It is currently Thu May 25, 2017 8:47 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Tue May 15, 2012 5:30 pm 
Offline

Joined: Mon Mar 19, 2012 9:11 pm
Posts: 17
I am using the latest simulator (v5.12.3) starting with X=0 and C=0.
The following snip of code results in X=1 and C=1.

move.l #$fffffff8,d2
move.l #$ffffff99,d5
asl.l d2,d5

The 68000 spec says d2 will be treated as a modulo 64 number which is
56 decimal. That is large enough to make the last shifts into X and C equal
zero.

thanks,
aaron boxer


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 16, 2012 4:10 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Corrected in Sim68K v5.12.5
Changes: UTILS.CPP, cc_update function,
Code:
    case CASE_9 :                   // ASL, LSL CK 5-2012
                if (r > m+1)        // if shift count > size
                    c_bit = false;
                else {
                    r %= (m+2);
                    c_bit = ((dest >> (m-r+1)) & 1) ? true : false;
                }
                break;

Also changed the call to cc_update in CODE7.CPP for ASL & LSL.

_________________
Prof. Kelly


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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:  
cron
Powered by phpBB® Forum Software © phpBB Group