EASy68K
http://www.easy68k.com/EASy68Kforum/

Force long form
http://www.easy68k.com/EASy68Kforum/viewtopic.php?f=9&t=220
Page 1 of 1

Author:  lee [ Tue Mar 28, 2006 5:51 pm ]
Post subject:  Force long form

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.

Author:  profkelly [ Wed Mar 29, 2006 8:24 pm ]
Post subject: 

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?

Author:  lee [ Thu Mar 30, 2006 1:13 am ]
Post subject: 

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.

Author:  lee [ Thu Mar 30, 2006 12:48 pm ]
Post subject: 

Same request for ADDI and SUBI to stop them being optimized to ADDQ and SUBQ.

Lee.

Author:  profkelly [ Thu Mar 01, 2007 10:11 pm ]
Post subject: 

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

Author:  lee [ Thu Mar 01, 2007 11:36 pm ]
Post subject: 

So it does. Thank you.

Lee.

Author:  hancock [ Wed May 13, 2015 3:10 pm ]
Post subject:  Re:

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

Author:  profkelly [ Wed May 13, 2015 7:13 pm ]
Post subject:  Re: Re:

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.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/