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]