John Payson wrote: > > > Unfortunately, it also destroys W which forces subroutines to return > > results in registers. There are plenty of solutions. How about the > > following untested macro for general calls. No doubt Andrew Warren et > > al. have something similar in their web pages, but this is my 5 cents > > worth (sorry, Oz doesn't have 2 cents any more - inflation, you know). > > Is there any particular problem with placing critical code such as > interrupt handlers at both addresses [$0004 and $0804]? I realize > that normal assemblers do not [yet] accommodate this, but it would > seem like a simple hex-file post-processor should take care of it > very nicely. Alternatively, if most of the code is used for table > storage, it might be possible/practical to duplicate all of the > real "code" and just use PCLATH to reference the tables. Any > thoughts on this notion? I like to save PCLATCH at 0x0004 (Int vector) and then restore it before retfie - ing. It works OK. -- Friendly Regards Tjaart van der Walt ______________________________________________________________ | Another sun-deprived R&D Engineer slaving away in a dungeon | |WASP International GSM vehicle tracking and datacomm solutions| | +27-(0)11-622-8686 | http://wasp.co.za | |______________________________________________________________|