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

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Table indexing...
PostPosted: Tue Sep 27, 2005 10:58 pm 
Offline

Joined: Mon Sep 26, 2005 11:08 pm
Posts: 3
I need to be able to index through a table.
I searched around and found code similar to what I am trying to do that looks like this:

Code:
move.l  #0,d5
movea.l #Block_Pointer_2,a1
movea.l 4(a1,d5.w*8),a0
move.l  (a1,d5.w*8),d0
.
.
addq.l  #5,d3


tried testing it and these 2 lines give me a syntax error
Code:
movea.l 4(a1,d5.w*8),a0
move.l  (a1,d5.w*8),d0


I've tried a few different ways but am probably missing something.

Code:
movea.l (a1,d5*8),a0
move.l  (a1,d5*8),d0

movea.l a1,d5*8,a0
move.l  a1,d5*8,d0


and a few others.

Any ideas?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 28, 2005 5:44 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
The 68000 doesn't support scaling of the index register. That is a 68020 and upwards only feature.

Lose the *8 from inside the brackets. This means a little extra work in the source code to remember to scale all the index register values.

Lee.


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