From: Ullrich von Bassewitz (uz_at_musoftware.de)
Date: 2002-07-17 00:44:19
On Wed, Jul 17, 2002 at 12:18:10AM +0200, Daniel Pralle wrote: > Can't you make the Assumption at link-time that the codes starts on an > addres wich is aligned to the 'align-value', > and include a small proggy in the startup-code which moves the code at > startup to a 'that-way-aligned' addres? What if two align commands may not be combined because they are contrary to each other like this: module1.s: -------------------- Label1: .align 2 .byte 0 -------------------- module2.s: -------------------- Label2: .align 2 .byte 0 -------------------- If both are bound together by the linker, either Label1 or Label2 is on an odd address if the assembler does not insert any alignment bytes. Assuming that the program starts at an even address does not help does, and moving the code at runtime does not help either. > Maybe I missed the point of the problem, or left out some thoughts. It is not really a problem, I was just hoping that groepaz complaint about .align meant that he had a better solution than the current one. It is of course possible to use .align if the program itself starts at an address aligned to align-value, and the linker will even warn you if this condition is not satisfied. However, code on the C64 starts at $801, so the prerequisites for using .align are not there. Regards Uz -- Ullrich von Bassewitz uz_at_musoftware.de ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2002-07-17 00:44:17 CEST