Jestem początkujący w używaniu asemblera i dopiero uczę się programować PICi. Mam problem, kiedy chciałem skompilować przykład z książki Programem MpLab to wywaliło masę błędów jednego rodzaju, ale kompilacja bezpośrednio przez MpAsmWin kończy się powodzeniem, kłopot w tym, że MpLab ma debugger i emulator w którym mogę testować moje programy. Gdzie popełniłem błąd?
p1.asm
;program P1
;zapala diode podlaczona do RA1
;uklad eksperymentalny E1
list p=16f628, r=hex
#include p16f628.inc
__config h'3f10'
movlw h'07'
movwf cmcon
clrf porta
clrf portb
bsf status, rp0
bcf pcon, oscf
clrf trisa
clrf trisb
bcf status, rp0
bsf porta, 1
goto $
end
p1.err (wygenerowany przez MpLab)
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 9 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 10 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 13 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 15 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 16 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 16 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 17 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 17 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 18 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 18 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 19 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 21 : Executable code and data must be defined in an appropriate section
Error[150] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 23 : Labels must be defined in a code or data section when making an object file
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 23 : Executable code and data must be defined in an appropriate section
Wyjście MpLaba
----------------------------------------------------------------------
Executing: "C:\Program Files (x86)\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F628 "p1.asm" /l"p1.lst" /e"p1.err" /o"p1.o" /d__DEBUG=1 /c-
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 9 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 10 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 12 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 13 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 15 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 16 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 16 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 17 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 17 : Executable code and data must be defined in an appropriate section
Message[302] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 18 : Register in operand not in bank 0. Ensure that bank bits are correct.
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 18 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 19 : Executable code and data must be defined in an appropriate section
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 21 : Executable code and data must be defined in an appropriate section
Error[150] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 23 : Labels must be defined in a code or data section when making an object file
Error[152] C:\USERS\HUBERT\DOCUMENTS\MPLAB\TESTY\P1.ASM 23 : Executable code and data must be defined in an appropriate section
----------------------------------------------------------------------
Debug build of project `C:\Users\Hubert\Documents\mplab\testy\P1.mcp' failed.
Language tool versions: MPASMWIN.exe v5.34, mplink.exe v4.34
Preprocessor symbol `__DEBUG' is defined.
Sun Dec 06 18:51:24 2009
----------------------------------------------------------------------
BUILD FAILED
Co dokładnie oznacza błąd [152] Executable code and data must be defined in an appropriate section?