EASy68K  
It is currently Tue Jul 07, 2020 3:45 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Force allignment
PostPosted: Tue Dec 27, 2016 9:20 am 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1126
Add directive to force Long address alignment.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject: Re: Force allignment
PostPosted: Sat Feb 22, 2020 4:56 pm 
Offline

Joined: Thu Feb 20, 2020 8:02 pm
Posts: 11
According to documentation, you can use

Code:
    DS.W 0 ; forces word alignment.


See documentation of the DS and DC directives.

Yes,some assemblers sometimes provide an EVEN directive which does just that, i.e force the next command to be on a word-aligned address.

This directive doesn't exist in EASy68k (it could be added indeed) but you can have a very similar thing by making a macro:

Code:
EVEN   MACRO
   DS.W 0
   ENDM


Top
 Profile  
 
 Post subject: Re: Force allignment
PostPosted: Sat Feb 22, 2020 11:45 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1126
Force Long alignment was a user request. DS.W 0 or DS.L 0 forces word alignment but not Long alignment.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject: Re: Force allignment
PostPosted: Fri Apr 10, 2020 2:45 pm 
Offline

Joined: Thu Apr 09, 2020 11:25 am
Posts: 2
Long alignment can be done with:
Code:
ORG (*+3)/4*4

and arbitrary alignment can be defined with a macro, along same principles, like:
Code:
ALIGN   MACRO
            ORG (*+((1<<\1)-1))/(1<<\1)*(1<<\1)
        ENDM

        ALIGN 1  * Word alignment
        ALIGN 2  * Long alignment
        ALIGN 8  * 256 byte block alignment


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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