你好,我是学习汇编程序的。我正在编写一个我的医生的代码。这是一个:我正在使用MPASM 5.72,但是我编译时有下一个错误:你知道发生了什么吗?为什么他能编译它而我不能?谢谢
以上来自于百度翻译
以下为原文
Hello, I am learning assembler. I am trying to compile a code that a doctor of my faculty made. Is this one:
List p=16f877A
include p16f877a.inc
contador EQU 20H
CONTADOR EQU 21H
contador1 EQU 22H
contador2 EQU 23H
ORG0
goto inicio
ORG 0X04 ; atendiendo la interrupcion
goto interrupcion
org 10h
inicio
bsf STATUS,RP0 ; cambiamos al banco 1
Clrf TRISB ; configuramos el puerto b como salida
movlw b'00010000'
movwf TRISC
movlw b'11000000'
movwf SSPSTAT ; seleccion del rejol
movlw b'00000111' ; configuracion del
timer 0
movwf OPTION_REG
bcf STATUS,RP0 ;cambiamos de banco 0
bcf INTCON,T0IF
movlw b'10100000'
movwf INTCON
movlw b'00110000'
movwf SSPCON ;seleecion modo maestro y habilitacion del spi
movlw .100
movwf TMR0
movlw .25
movwf CONTADOR
movlw .0
movwf contador1
;movwf SSPBUF
programa
goto programa
interrupcion
bcf PIR1,3
bcf INTCON,T0IF ; borrar la bandera
decfsz CONTADOR,f
goto config1
goto finalizar
config1
movlw .100
movwf TMR0
retfie
finalizar
movlw .100
movwf TMR0
movlw .25
movwf CONTADOR
movfw SSPBUF
movfw contador2
addlw .1
movwf SSPBUF
movwf contador2
;loop
;btfss PIR1,3
;goto loop
retfie
retfie ;regreso de la subrutina de interrupcion
END
I am using
mpasm 5.72, but I have the next error when I compile:
Error[150] C:USERSDELFINDESKTOPUNIVERSIDADSENSORESASSEMBLER_BASICSSPI_MASTER.XSPI_MASTER.ASM 13 : Labels must be defined in a code or data section when making an object file
Error[151] C:USERSDELFINDESKTOPUNIVERSIDADSENSORESASSEMBLER_BASICSSPI_MASTER.XSPI_MASTER.ASM 15 : Operand contains unresolvable labels or is too complex
Error[152] C:USERSDELFINDESKTOPUNIVERSIDADSENSORESASSEMBLER_BASICSSPI_MASTER.XSPI_MASTER.ASM 15 : Executable code and data must be defined in an appropriate section
Do you know what's going on? Why is he able to compile it and I can't? Thanks