EASy68K  
It is currently Wed Sep 19, 2018 4:44 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Thu Oct 27, 2011 1:45 am 
Offline

Joined: Tue Oct 25, 2011 5:36 am
Posts: 2
Location: FL
Hello, I am getting the error
"Illegal instruction found at location 9002." Execution halted on the first line where I declare my array. How can I fix this? Thanks.

ORG $9000
START: CLR.L D0

ARRAY DC.B 10 ; first instruction of program
DC.B 8,7,6,5,4,3,2,1,9,10

MOVEA.L #ARRAY,A1
MOVE.B (A1)+,D2
MOVE.B D2,D3
MOVE.B D2,D3
SUBQ #1,D3
LOOP MOVE.B 1(A1),D4
CMP.B (A1),D4
BGT SKIP
MOVE.B D4,(A1)+

SKIP SUBQ #1,D3
BNE LOOP
MOVEA.L #ARRAY,A1
MOVE.B (A1)+,D3
SUBQ #1,D3
SUBQ #1,D2
BNE LOOP


MOVE.B #9,D0
TRAP #15 ; halt simulator

* Variables and Strings



END START ; last line of source


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 27, 2011 10:12 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Don't put your data in the middle of your code, put it after the code.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 28, 2011 12:48 am 
Offline

Joined: Tue Oct 25, 2011 5:36 am
Posts: 2
Location: FL
Thanks so much...


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