Jan-Erik wrote: > To someone who have built some project in Olins dev.envir... Did anyone ever get back to you on this? Since Olin's on vacation this week, I suppose I could try to answer your questions... > It uses the /FLAG directive. > > This should define some asambler symbols so that you should be > able to use the bit-instructions easily. Now, whatever I do, > it always seems as the rellevant symbols (GFL0, GFL1) allways > starts frorm addres h'00'. I'd expect them to start fro h'20' > or 'h70' or something. This is verified by looking at the > actual instructions generated. You really shouldn't have to deal with the GFL symbols directly unless you're doing something really unusual. You'd typically declare a flag bit with a line like this: /flag myflag And then set, clear and test it using instructions like bsf flag_myflag bcf flag_myflag btfss flag_myflag "flag_myflag" is a text macro created by the preprocessor that expands to the string "gfl,", where and are generated automatically. > The flag_define macro should set things up correctly. There > must be something that tells this macro the "base-address" > of the global flags. I *thought* it was "gbankadr" which I have > tried to change to H'20' in my *.ins.aspic. I could not > see any difference. No, that's not what "gbankadr" is for. Since the flags go into global memory, you need to do a dbankif gbankadr before each reference to a flag, in order to get the bank switching right. In order to see where the flags are actually allocated in memory, take a look at the "FLAGS_DEFINE" macro in std.ins.aspic. The actual base address of the flags registers will be defined by the linker segment in which this macro is invoked. Using Olin's usual project structure (e.g., the "qqq" project), this is done in the _strt.aspic file, and the flags are placed into the global state area. Refer to the link map to get an actual physical address. > PS. Before anyone asks, no, I didn't find anything about this in > my (PDF) manual either :-) :-) But did you look in Olin's "prepic.txt" file? That's where this stuff is documented. -- Dave Tweed -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu