EASy68K  
It is currently Thu Aug 22, 2019 8:56 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: CLEAR REGISTERS
PostPosted: Wed May 22, 2019 8:43 am 
Offline

Joined: Tue May 14, 2019 4:49 pm
Posts: 1
How can I clear all registers at once in the programe?

I am doing a calculator and after doing one operation, I want all the registers clear.

Thank you


Top
 Profile  
 
 Post subject: Re: CLEAR REGISTERS
PostPosted: Wed Jul 17, 2019 3:53 pm 
Offline
User avatar

Joined: Wed Jan 06, 2016 9:24 am
Posts: 14
You can do
Code:
    MOVE.L  #$00FF0000, A0 * Point A0 to FF0000
    MOVE.L    #$00000000, (A0) * Set it to 0
    MOVEM.L (A0), D0-D7/A0-A6 * Move it into all the registers, except A7


Doesn't clear status registers though but I'm guessing this isn't your aim.


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 5 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:  
cron
Powered by phpBB® Forum Software © phpBB Group