On Mon, 31 Mar 2003, Olin Lathrop wrote: > >> SKIP_Z is one of my macros that just expands to BTFSS STATUS, Z on the > >> 16 > >> family. > >> > >> > > Not wishing to be rude, but MPASM already has skpz and skpnz macro's. > > Why > > not use the macro's that come with the tool? (i.e. the ones that other > > people will already be using). > > I wrote mine before MPASM had these, or at least before I heard about > them. I know people have mentioned them here, but I still can't find any > reference to them in the latest "MPASM User's Guide with MPLINK and MPLIB" > (DS33014G). I feel uncomfortable using features that are not documented. > In any case, I've got way too much existing code to change now. When comparing hex files for MPASM and gpasm I was surprised to discover that the SKPXX macros were not supported for 18F family in the versions of MPASM distributed with pre 6.0 MPLAB. In the pass, I've seen the macros defined in two places: the "MPASM and MPLINK PICmicro Quick Reference Guide" (DS30400E) and in the MPASM help under MPLAB. In the reference guide, the macros are described in the section titled "12-bit/14-bit Core Special Instruction Mnemonics". Conspicuously absent is '16-bit'. AFAICT, the macros are intentionally not defined for the 16-bit cores. I doubt this fact is mentioned in the 14-bit to 16-bit transition guide. When it's important for me to have source that can be assembled by gpasm and MPASM, I added this to my Makefile: # gpasm programs ASM = gpasm --define GPASM=1 Later on I have this: $(PROJECT).cod: $(SOURCES) $(ASM) $(PROJECT).asm In the source, I have this: ifndef GPASM MESSG "defining standard macros for MPASM" include "mpasm.inc" endif The mpasm.inc file looks like this: ================================================================== ;sigh... What was microchip thinking. Mpasm for the 18f parts no ;longer includes the common macros: CLRC macro BCF STATUS,C endm SKPNC macro BTFSC STATUS,C endm SKPC macro BTFSS STATUS,C endm SETZ macro BSF STATUS,Z endm CLRZ macro BCF STATUS,Z endm SKPZ macro BTFSS STATUS,Z endm SKPNZ macro BTFSC STATUS,Z endm SKPDC macro BTFSS STATUS,DC endm SKPNDC macro BTFSC STATUS,DC endm ================================================================== Scott -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body