EASy68K  
It is currently Thu Mar 30, 2017 8:40 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Force long form
PostPosted: Tue Mar 28, 2006 5:51 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Is there any way to make a line such as ..

Code:
MOVE.l   #$A,d3

.. assemble as such and not optimize to ..

Code:
MOVEQ   #$A,d3

I'm having to use data statements at the moment. 8^(=

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Mar 29, 2006 8:24 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
There is currently no way to force long addressing.

What would be the preferred syntax?

Something like this?

MOVE.FB #$A,D3 ; force Byte addressing
MOVE.FW #$A,D3 ; force Word addressing
MOVE.FL #$A,D3 ; force Long addressing

Is there another 68000 assembler syntax in use that EASy68K should follow?

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 30, 2006 1:13 am 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Quote:
What would be the preferred syntax?

How about ..

Code:
   MOVE.l   #x.l,dn      

..which is similar to forcing the effective address size in something like ..

Code:
   MOVE.l   4.l,dn      


Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 30, 2006 12:48 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
Same request for ADDI and SUBI to stop them being optimized to ADDQ and SUBQ.

Lee.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 01, 2007 10:11 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
Forcing long form.

Code:
00001000  7005                       9      MOVE.L  #5,D0
00001002  203C 00000005             10      MOVE.L  #5.L,D0
00001008  5C81                      11      ADD.L   #6,D1
0000100A  0681 00000006             12      ADD.L   #6.L,D1
00001010  5F82                      13      SUB.L   #7,D2
00001012  0482 00000007             14      SUB.L   #7.L,D2

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 01, 2007 11:36 pm 
Offline

Joined: Mon Dec 27, 2004 11:40 pm
Posts: 318
So it does. Thank you.

Lee.


Top
 Profile  
Reply with quote  
 Post subject: Re:
PostPosted: Wed May 13, 2015 3:10 pm 
Offline

Joined: Thu Feb 16, 2012 4:34 pm
Posts: 15
profkelly wrote:
Forcing long form.

Code:
00001000  7005                       9      MOVE.L  #5,D0
00001002  203C 00000005             10      MOVE.L  #5.L,D0
00001008  5C81                      11      ADD.L   #6,D1
0000100A  0681 00000006             12      ADD.L   #6.L,D1
00001010  5F82                      13      SUB.L   #7,D2
00001012  0482 00000007             14      SUB.L   #7.L,D2


Sorry, but this does not seem to work for .w (creates an error)
00001052 907c0168 SUB.W #360!$168,D0 <- correct code
00001052 04400168 SUB.W #360!$168,D0 <- Easy68k
SUB.W #360.W,D0 -> Error
or
00000df0 d47c0040 ADD.W #64!$40,D2 <- correct code
00000df0 06420040 ADD.W #64!$40,D2 <- EAsy68k
ADD.W #68.w,D2 -> Error

I really think that the developer should get the code he/she is submitting for assembly.
There could be an overall option "optimizing for length/for speed" or if ADD is specified then Easy68k should produce the correct code..?

Rgds


Top
 Profile  
Reply with quote  
 Post subject: Re: Re:
PostPosted: Wed May 13, 2015 7:13 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1036
Location: Monroe County Community College, Monroe Michigan, U.S.A.
hancock wrote:
profkelly wrote:
Forcing long form.

Sorry, but this does not seem to work for .w (creates an error)
00001052 907c0168 SUB.W #360!$168,D0 <- correct code
00001052 04400168 SUB.W #360!$168,D0 <- Easy68k
SUB.W #360.W,D0 -> Error
or
00000df0 d47c0040 ADD.W #64!$40,D2 <- correct code
00000df0 06420040 ADD.W #64!$40,D2 <- EAsy68k
ADD.W #68.w,D2 -> Error


There is no error in the code. EASy68K optimizes SUB.W #n,Dn to SUBI.W #n,Dn
and ADD.W #n,Dn to ADDI.W #n,Dn
This is the recommended and normal behavior for 68000 assemblers.

_________________
Prof. Kelly


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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