;**************************************************************************
; Programme name.ASM
;
; Some comment about the programme
;
;**************************************************************************

        LIST      P=16F84, R=DEC
        __FUSES   _XT_OSC &  _WDT_OFF & _CP_OFF
        include   "P16F84.inc"

;--------------------------------------------------------------------------
; Variables
;--------------------------------------------------------------------------

Ram             EQU     d'12'

first_variable  EQU     Ram+0
next_variable   EQU     Ram+1
;etc


;--------------------------------------------------------------------------
; Program Code
;--------------------------------------------------------------------------

                ORG     0               ;reset vector
Start           call    Init            ;Initialise hardware



;main program goes here




;--------------------------------------------------------------------------
; Subroutines
;--------------------------------------------------------------------------

;*****Init - set up all ports, make unused ports outputs

Init            clrf    porta           ;all of porta low
                clrf    portb           ;all of portb low

                bsf     STATUS, RP0     ;change to bank1
                clrf    TRISA           ;all of porta outputs
                clrf    TRISB           ;all of portb outputs
                bcf     STATUS, RP0     ;back to bank0

                return

                END                     ;Stop assembling here

