Dudes: Well, as long as Tom Kellett's going to put my code into a compilation and slap his own copyright notice on it without even asking, I guess I might as well post these 16C57 macros for easy GOTOs and CALLs across page boundaries. The code is written for use with Microchip's MPASM assembler; see the comments for changes necessary for use with Microchip's old MPALC/PICALC assemblers. Those of you using PASM are on your own (as usual). ; The following code was written by Andrew Warren and is ; copyright (C) 1992 by Fast Forward Engineering. Permission ; is hereby granted for any non-commercial use so long as ; this copyright notice is retained. ; "Long Call" macro. Invoked by "XCALL any_address". ; Thanks to Chris Dalla for pointing out the need for the "+2" and ; "+1" sums in the last two lines of the macro. XCALL MACRO LABEL DATA 010010100000B+STATUS+256*((LABEL>>9)&00000001B) DATA 010011000000B+STATUS+256*(LABEL>>10) LIST W=1 ;For MPALC/PICALC, make this an "E=2". CALL LABEL LIST W=0 ;For MPALC/PICALC, make this an "E=1". DATA 010010100000B+STATUS+256*((($+2)>>9)&00000001B) DATA 010011000000B+STATUS+256*(($+1)>>10) ENDM ; "Long Goto" macro. Invoked by "XGOTO any_address". XGOTO MACRO LABEL DATA 010010100000B+STATUS+256*((LABEL>>9)&00000001B) DATA 010011000000B+STATUS+256*(LABEL>>10) LIST W=1 ;For MPALC/PICALC, make this an "E=2". GOTO LABEL LIST W=0 ;For MPALC/PICALC, make this an "E=1". ENDM Enjoy... -Andy -- Andrew Warren - fastfwd@ix.netcom.com Fast Forward Engineering, Vista, California