pceas .BSS directive

hu, cd, scd, acd, supergrafx discussions.
Post Reply
Debvgger
Posts: 13
Joined: Sun Jun 29, 2008 4:30 pm

pceas .BSS directive

Post by Debvgger »

Hi, shouldn't the first bytes declared after the first .BSS directive be allocated into $2000 ? Checking the disassembly in Mednafen's debugger shows the address is $2200.

Are the first 512 bytes reserved for some reason? I'm checking the documentation but I can't find anything about that. Am I breaking something if I put a .ORG $2000 after the first .BSS ?
User avatar
MooZ
Site Admin
Posts: 402
Joined: Sun Jun 22, 2008 3:19 pm
Location: Lvl 3
Contact:

Re: pceas .BSS directive

Post by MooZ »

Indeed, .bss starts at $2200.
The first 256 bytes of $2000 is the zero page. You can declare stuffs there using the .zp directive.
Next comes the stack ($2100 - $21ff included). There's no directive. You can still read/write there but you'll most likely shoot yourself in the foot as it's used to store returns addresses, and everything you pushed there with the pha/phx/phy/etc... instructions.
Debvgger
Posts: 13
Joined: Sun Jun 29, 2008 4:30 pm

Re: pceas .BSS directive

Post by Debvgger »

Ok, understood. I think I'm too used to manage these things by hand :lol:
Post Reply