Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You need to allocate zero page as you do registers - but fortunately it's large enough (compared to the complexity of 6502 programs) that you'll probably never need to deal with spilling. So what I've always done is use the assembler to allocate bytes in zero page as required. Your code will seem to eat through the space available very quickly... and then, at some point before you run out, you'll stop needing any more.

(Trying to allocate space there dynamically is certainly a fool's errand, of course.)



Yes, but it precludes easily sharing routines from different projects. I remember being frustrated a number of times because I didn't have source for something that conflicted with another library I wanted to use.

(Just to add to this, that hundred or so free bytes in the $0300 page IIRC was also a problem. Lots of utilities used it, so I remember there being a lot of conflicts there too).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: