Category:68000 Assembly: Difference between revisions
m
→Alignment
Puppydrum64 (talk | contribs) No edit summary |
Puppydrum64 (talk | contribs) m (→Alignment) |
||
Line 149:
Another way is to pad the data with an extra byte, so that there is an even number of entries in the table. This allows the programmer to do a "dummy read" (i.e. reading with post-increment with the sole purpose of incrementing the pointer, with the value read being of zero interest.) This becomes impractical with large data tables, so the <code>EVEN</code> directive can be placed after a series of bytes. If the byte count is odd, <code>EVEN</code> will pad the data with an extra byte. If it's already even, the <code>EVEN</code> command is ignored. This saves you the trouble of having to count a long series of bytes without worrying about wasting space.
<lang 68000devpac>MyString: DC.B "HELLO WORLD 12345678900000",0
EVEN ;some assemblers require this to be on its own line</lang>
==Citations==
|