; File header.asm derived from: 

; File MIDISEND.ASM
; Assembly code for a 10MHz PIC16F84 microcontroller
;
; Description: Send a midi message once every second
; Author: Ross Bencina
; Last Modified: 25 / 8 / 99

;

; CPU configuration
	processor 16f84
	include	  <p16f84.inc>
	__config  _HS_OSC & _WDT_OFF & _PWRTE_ON

; ports (on PORTA)
MIDIOUT	equ 0
WSIN	equ 4

; variables

	
temp	equ	H'1F'
xmit	equ	H'1D'

; Program

	org	0	  ; start at address 0

	
start:	
	bsf	status, rp0
	movlw	B'00010000'
	movwf	TRISA
	bcf	status, rp0	; init port A as output except for ra4
	bsf	PORTA, MIDIOUT	; init midi out pin state 

mainloop:
subloop:
	btfsc	PORTA, WSIN
	goto	subloop
	call	xmitmidi
	goto	mainloop
  
