Re: [cc65] .align

Date view Thread view Subject view

From: Tim Vanderhoek (vanderh_at_ecf.utoronto.ca)
Date: 2000-02-06 17:21:03


On Sun, Feb 06, 2000 at 08:40:25AM +0100, Ullrich von Bassewitz wrote:
> 
> This works in my tests. Can you send me the linker config file that is
> causing you problems?

It's the assembler that does the alignment in these cases.  It doesn't
read the linker Config file so it has no way of knowing better.

It's not really causing me problems --- it fills maybe 15 bytes with
0x00 instead of 0xff, which really is not a problem.  :)

Here, this should illustrate:

Config:

MEMORY {
	ROM1:	start = $E000, size = $2000, fill=yes, fillval=$ff,
		file="rom1.bin";
}

SEGMENTS {
	CODE:    load = ROM1, type = ro, align=32;
}

asm.s

label:
.word	$aaaa
.word	$aaaa
.word	$aaaa
.align 32
.word	$bbbb
.word	$bbbb
.word	$bbbb

$ ca65 asm.s
$ ld65 -C Config -vm -mmap asm.o
$ hd rom1.bin
00000000  aa aa aa aa aa aa 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000020  bb bb bb bb bb bb ff ff  ff ff ff ff ff ff ff ff  |................|
00000030  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000


-- 
Signature withheld by request of author.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.


Date view Thread view Subject view

This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:35 CET