EASy68K  
It is currently Thu Sep 19, 2019 5:08 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Mon Dec 19, 2011 4:00 am 
Offline

Joined: Fri Dec 16, 2011 12:32 am
Posts: 17
Hello everyone. I was wondering if someone could explain the most efficient way to separate the upper part of a word and store it somewhere. For example we take the word $F9AB we copy the four bits of F into one memory,ex.$2000, location and the four bits 9 just after it,ex.$2001.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2011 9:56 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Code:
      MOVE.w    #$F9AB,d1   * set the word
      LSR.w     #4,d1       * makes d1 $0F9A
      LSR.b     #4,d1       * makes d1 $0F09
      MOVE.w    d1,$2000    * saves d1 at $2000 and $2001

Lee.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 03, 2012 1:47 pm 
Offline

Joined: Fri Dec 16, 2011 12:32 am
Posts: 17
lee wrote:
Code:
      MOVE.w    #$F9AB,d1   * set the word
      LSR.w     #4,d1       * makes d1 $0F9A
      LSR.b     #4,d1       * makes d1 $0F09
      MOVE.w    d1,$2000    * saves d1 at $2000 and $2001

Lee.


Very clear. Thank you.


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: Bing [Bot] and 7 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