Example of PIC Press Generated Code

One of PIC PRESS's many features is a "Save as HTML" function, which made it easy for us to convert an example program into the HTML version you see below.

;****************************************************************
;* Title : My Project
;* Version : 1.0
;* Author : Me
;* Pic Type : PIC16C84
;* Date : 11/22/00
;* Description :
;* A brief description of the project
;* Clock : 4.0 MHz
;* Clock Type : XTAL
;* Generated by : Pic Press, Visit www.To-Pic.com
;****************************************************************

include "P16C84.inc" ; ¨¨ PIC Include File ¨¨
LIST    P=16C84      ; •• PIC Include File ••

; ¤¤ PORTB #defines ¤¤
#define RB0 PORTB,0 ;(Output)
#define RB1 PORTB,1
;(Output)
#define RB2 PORTB,2
;(Output)
#define RB3 PORTB,3
;(Output)
#define RB4 PORTB,4
;(Output)
#define RB5 PORTB,5
;(Output)
#define RB6 PORTB,6
;(Output)
#define RB7 PORTB,7
;(Output)
; …… PORTB #defines ……

#define RA0 PORTA,0 ;(Output) ¨¨ PORTA #defines ¨¨
#define RA1 PORTA,1 ;(Output)
#define RA2 PORTA,2
;(Output)
#define RA3 PORTA,3
;(Output)
#define RA4 PORTA,4
;(Output) •• PORTA #defines ••

ORG 0x000H          ; ¨¨ Start Function ¨¨
GOTO Start          ; •• Start Function ••

Init                    ; ¨¨ Init Function ¨¨
    BSF STATUS,RP0      ; ¨¨¨ Bank 1 Init ¨¨
    MOVLW b'00000000'   ; ¨¨¨¨ TRISA Setup ¨¨
    MOVWF TRISA         ; •••• TRISA Setup ••
    MOVLW b'00000000'   ; ¨¨¨¨ TRISB Setup ¨¨
    MOVWF TRISB         ; •••• TRISB Setup ••
    BCF STATUS,RP0      ; °°° Bank 0 Init °°
    RETLW 0             ; •• Init Function ••

Start                   ; ¨¨ Main Function ¨¨
    CALL Init

;Begin your code here...
                        ; •• Main Function ••
END
Copyright ©2006 Perfect Square Ltd.