EASy68K  
It is currently Mon May 29, 2017 2:03 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Mar 14, 2016 2:36 pm 
Offline

Joined: Tue Feb 27, 2007 8:25 am
Posts: 4
Hi,

I think I've found an 'undocumented feature'. When you perform a MOVE.L #imm, Ax the status bits are not set correctly. If you execute the following code:
Code:
*-----------------------------------------------------------
* Title      :
* Written by :
* Date       :
* Description:
*-----------------------------------------------------------
    ORG    $1000
START:                  ; first instruction of program

* Put program code here
    MOVE.L #$00000000, A0

    SIMHALT             ; halt simulator

* Put variables and constants here

    END    START        ; last line of source


The Z bit in the CCR is not set. IMO the Z bit should be set though, because the value moved to A0 is zero.


Top
 Profile  
 
PostPosted: Mon Mar 14, 2016 5:21 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Code:
MOVE.L #$00000000, A0
is assembled as
Code:
MOVEA.L #$00000000, A0
. The MOVEA instruction does not alter the CCR bits. There is no MOVE.L #$nn,A0 instruction so most assemblers automatically treat it as MOVEA.

_________________
Prof. Kelly


Top
 Profile  
 
PostPosted: Mon Mar 14, 2016 7:39 pm 
Offline

Joined: Tue Feb 27, 2007 8:25 am
Posts: 4
Ahh of course! Sorry about that :)


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: 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