How to force ca65 to reserve memory at page boundary?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: How to force ca65 to reserve memory at page boundary?

Post by dougeff »

You can shrink the segment of your RAM so it doesn't overlap.
nesdoug.com -- blog/tutorial on programming for the NES
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: How to force ca65 to reserve memory at page boundary?

Post by tepples »

Then make another memory area at $690-$6FF or something.
User avatar
rainwarrior
Posts: 8732
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: How to force ca65 to reserve memory at page boundary?

Post by rainwarrior »

yaros wrote:And in this project I should not use too much RAM to overlap with this address, but can I actually make ca65 to reserve space at certain address without creating separate segment in the middle of the RAM?
If the segment has the align attribute on it you can use the .align directive to make it pad to a power-of-two boundary:

Code: Select all

; CFG has "align=256" on the current segment
.align 256
thing: .res 55 ; this will be aligned to 256 bytes
Post Reply