Re: [cc65] Best way to get aligned memory...

Date view Thread view Subject view

From: Christian Krüger (christian.krueger_at_pace.de)
Date: 2003-01-16 12:17:19


Hi,

----8<----------------------------------------------------------
>
>	.export _buffer
>
>BUFSIZE         = 1024
>BUFALIGN        = 4             ; Must be a power of 2
>
>.bss
>buf:		.res	BUFSIZE
>_buffer = (buf + BUFALIGN - 1) .AND (~(BUFALIGN - 1) .AND $FFFF)
>
----8<----------------------------------------------------------

will not work (cc65 2.9.0) (_buffer seems to be zero), and I'm not
sure if it could work.
In my understanding the value of 'buf' can only resolved by the linker,
so the '_buffer' equation have to be also done by the linker?
Is the linker capable resolving assembler equations?

Regards
chrisker

----------------------------------------------------------------------
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 : 2003-01-16 12:17:35 CET