EASy68K  
It is currently Sat Apr 04, 2020 6:25 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: array in easy68k
PostPosted: Fri Nov 10, 2006 3:54 pm 
Offline

Joined: Fri Nov 10, 2006 3:32 pm
Posts: 3
Hello guys can anyone help me?
how can i use array in easy68k? please tell me if you know anything about it?????


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 10, 2006 7:45 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
I recommend the book "68000 Family Assembly Language" by Alan Clements. There is a very good explanation of array access in assembly language beginning on page 160.

I can't go into all the detail contained in the book but here is a brief explanation.

An array is a contigous block of data in memory. A 68K address register can be loaded with the address of the first array element and index addressing can be used to access the array elements. Something like this:

Code:
    LEA  Array,A0         A0 points to the first array element
    MOVE.W #n,D2          D2 is the array index n
    MOVE.B (A0,D2.W),D0   Get data element n from array

_________________
Prof. Kelly


Top
 Profile  
 
PostPosted: Sun Nov 12, 2006 5:50 am 
Offline

Joined: Fri Nov 10, 2006 3:32 pm
Posts: 3
Prof may i know the link to download ebook(pdf) "68000 Family Assembly Language" by Alan Clements ?


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