First try, assambler code PIC 16F627

Hi@all

Last weekend I tried to program my first assembler code.
It is a very simple code but it doesn’t work on the K8048.
Can anyone detect the problem? (The original Code has Tabs and Spaces)

[quote]
list p=16f627
#include <p16f627.inc>

__CONFIG			_BODEN_ON & _CP_OFF & _DATA_CP_OFF & _PWRTE_ON & _WDT_OFF & _LVP_OFF & _MCLRE_ON & _XT_OSC

		bsf		STATUS,RP0   		;switch to Bank1

					
		movlw 		B'11000000'		;RB0-RB5 are Outputs
		movwf 		TRISB
		
		movlw		B'11111111'	 	;RA0-RA7 are Inputs
		movwf 		TRISA
  
		bcf 		STATUS,RP0		;switch to Bank0
		
		clrf 		PORTB			;clear all outputs

HAUPT btfss PORTA,0 ;Sw1 activated?
goto JA

NEIN bsf PORTB,0 ;LED on
goto HAUPT

JA bcf PORTB,0 ;LED off
goto HAUPT

		end   [/quote]

You need to configure your port A inputs as digital inputs (see PIC 16F627 datasheet).

Thank you for your answer.
I configured the portA inputs as digital inputs:

[quote]BSF CMCON, CM0
BSF CMCON, CM1
BSF CMCON, CM2[/quote]

But there is another problem:
When the program is running you can turn on the light with the switch.
But I wrote something different in the code. The LED light has to turn on by doing nothing.
And by pressing the switch it has to turn off. What went wrong?