Hi all, Could someone be so kind as to check the following 8 lines of code? I think I understand how macro's work, but this is only the 2nd time I'm writing PIC code. What it should do is: I type the command TRISIO 2, 1 and pin 2 becomes an input. Is this code OK for that? It's for a PIC10 and I need BSF en BCF commands on the TRIS register, but I guess you already figured that one out. TRISIO macro pin, status if status == 1 ; 1 = Input BSF RAMTRIS, pin ; Set the pin to input else BCF RAMTRIS, pin ; Set the pin to output endif MOVFW RAMTRIS TRIS GPIO ; TRIS the GPIO ports endm Thanks, Anthony Website: http://members.lycos.nl/anthonyvh --------------------------------- Do you Yahoo!? Yahoo! Search presents - Jib Jab's 'Second Term' -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist