#include "P18F4455.INC" VAR0 EQU 0X00 ORG 0X800 CLRF TRISD CLRF PORTD GOTO MAIN table: db 0x11,0x12,0x13,0x14,0x15,0x16 Reset_Table_Ptr: MOVLW low table MOVWF TBLPTRL MOVLW high table MOVWF TBLPTRH MOVLW upper table MOVWF TBLPTRU RETURN Get_Next_Elem: TBLRD*+ MOVF TABLAT,W RETURN MAIN: MOVLW D'6' MOVWF VAR0 CALL Reset_Table_Ptr OUT_NEXT: CALL Get_Next_Elem MOVWF PORTD DECFSZ VAR0,F GOTO OUT_NEXT GOTO MAIN END