Ram in SX/B
natpie
Posts: 35
I am just finally getting around to learning SX/B. I am finding some features I really like, but I am having a little trouble figuring out how to setup my variables in SX/B and still use ASM. I"m still using a lot of assembly in my code, and I can't seem to figure out a good way to control the address of my variables. In assembly i simply use an ORG command with an address and follow that with my string of variable ds and size. As i am trying to use more than the first 20 ram slots I need to know what bank my variables are in (preferable assigning variables used in a specific task to a specific bank). Is there a way to exercise this control over my variables in SX/B?
Okay I've found the thread that recommends:
This seems to be accomplishing what I am after, however it seems to skip $10 to $1F and Start at $30.
Post Edited (natpie) : 1/28/2009 4:33:21 AM GMT
Okay I've found the thread that recommends:
thing1 var byte(16) var1 var thing1(0) var2 var thing1(1)
This seems to be accomplishing what I am after, however it seems to skip $10 to $1F and Start at $30.
Post Edited (natpie) : 1/28/2009 4:33:21 AM GMT
Comments
· Addresses up to $1F are used for the "normal" non-array variables.
· Arrays start at $30 to the end of RAM (except a couple bytes at the very end).
· SX/B doesn't conform easily to ASM. You need to make your ASM conform to SX/B's memory map.
P.S. The new SX/B 2.0 makes doing this alot easier as you can alias variables to an exact address.
Bean.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
·The next time you need a hero don't look up in the sky...Look in the mirror.
·
I was considering putting off learning SX/B until 2.0 came out. Eventually I figured I probably wouldn't have to change my ways too much when it is released. 1.5 has already taught me a few new tricks just by examining how it does things.