guest@tree.UUCP (gray mouser) (09/04/89)
Does anyone here have any ideas on making sure a data segment is in 1 bank and 1 bank only? I just can't figure out a way, except to manually make it upon program bootup. I have a "global" segment which is accessed all the time, about 40k, so obviously I can't do a "phk/plb". I'd like to do a "lda #^global_vars / pha / plb" but the problem is that the global_vars segment (which is in its own loadseg) wraps around banks and therefore parts of it aren't in the bank the B reg will point to. I'm really stuck, I can't find any directives, anything in the kind field, that will MAKE a data load segment be in one bank. Ack.
dlyons@Apple.COM (David Lyons) (09/05/89)
In article <355@tree.UUCP> guest@tree.UUCP (gray mouser) writes: > Does anyone here have any ideas on making sure a data segment is in 1 > bank and 1 bank only? [...] I don't know if you're going to like this solution, because it's *way* too easy. :-) Make your segment a CODE segment rather than a DATA segment. The system never lets a code segment cross a bank boundary, so this will do exactly what you want. (Just don't put your pseudo-CODE segment as the first code segment in your load file, or it'll get control when your application is launched.) --Dave Lyons, Apple Computer, Inc. | DAL Systems AppleLink--Apple Edition: DAVE.LYONS | P.O. Box 875 AppleLink--Personal Edition: Dave Lyons | Cupertino, CA 95015-0875 GEnie: D.LYONS2 or DAVE.LYONS CompuServe: 72177,3233 Internet/BITNET: dlyons@apple.com UUCP: ...!ames!apple!dlyons My opinions are my own, not Apple's.