Našel jsem si jednodušší program - přepínací LED.
Jenže zase to vyhazuje chyby na každém řádku a já nevím, v čem je problém. Používám mpasmx kompiler.
Zde je kód:
LIST P=16F876
INCLUDE<P16F876.INC>
__CONFIG _PWRTE_ON & _WDT_OFF & _RC_OSC
#DEFINE TLAC PORTA,0 ; Poznamky se pisi
#DEFINE LED PORTA,1 ; za stredniky !!!
BSF STATUS,RP0
MOVLW B'00000001'
MOVWF TRISA
BCF STATUS,RP0
BCF LED
START BTFSS TLAC
GOTO $-1
BSF LED
BTFSC TLAC
GOTO $-1
BTFSS TLAC
GOTO $-1
BCF LED
BTFSC TLAC
GOTO $-1
GOTO START
END
===============================================
A zde jsou chyby
8 : Executable code and data must be defined in an appropriate section
9 : Executable code and data must be defined in an appropriate section
10 : Register in operand not in bank 0. Ensure that bank bits are correct.
10 : Executable code and data must be defined in an appropriate section
11 : Executable code and data must be defined in an appropriate section
13 : Executable code and data must be defined in an appropriate section
15 : Labels must be defined in a code or data section when making an object file
15 : Executable code and data must be defined in an appropriate section
16 : Labels must be defined in a code or data section when making an object file
16 : Argument out of range (FFFF not between 0000 and 1FFF)
16 : Crossing page boundary – ensure page bits are set.
16 : Executable code and data must be defined in an appropriate section
17 : Executable code and data must be defined in an appropriate section
18 : Executable code and data must be defined in an appropriate section
19 : Labels must be defined in a code or data section when making an object file
19 : Argument out of range (FFFF not between 0000 and 1FFF)
19 : Crossing page boundary – ensure page bits are set.
19 : Executable code and data must be defined in an appropriate section
21 : Executable code and data must be defined in an appropriate section
22 : Labels must be defined in a code or data section when making an object file
22 : Argument out of range (FFFF not between 0000 and 1FFF)
22 : Crossing page boundary – ensure page bits are set.
22 : Executable code and data must be defined in an appropriate section
23 : Executable code and data must be defined in an appropriate section
24 : Executable code and data must be defined in an appropriate section
25 : Labels must be defined in a code or data section when making an object file
25 : Argument out of range (FFFF not between 0000 and 1FFF)
25 : Crossing page boundary – ensure page bits are set.
25 : Executable code and data must be defined in an appropriate section
27 : Operand contains unresolvable labels or is too complex
27 : Executable code and data must be defined in an appropriate section
Vůbec nevím, co s tím.