Em 21/10/2011 12:26, Electron escreveu: >> DISI is a CPU instruction and INTCON is a register. >> I don't know how you can say that you need to know this regardless of >> what language you are using, without in fact commenting on the C vs. >> ASM discussion. >> >> IIRC C30 doesn't have a built-in macro/function for DISI, requiring >> you to know what the assembler instruction would be if you are >> programming in C. So you'd kind of have to know assembler already. > And that doesn't make it portable I'm afraid. > Simply create your own DISABLEINTERRUPTS() macro with a different definition for each architecture. This way your sources will compile without changes across platforms. Usually all you have to change is one header file with the platform dependent definitions. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .