Gast
#1875364
Morgen zusammen, ich bin gerade am Versuchen, ein Makro in AVR ASM zum laufen zu bringen. Hier erst mal der Code: Functions.asm: .MACRO SetZPtr ;(Adresse) ldi ZL, LOW(@0) ldi ZH, HIGH(@0) .ENDMACRO Main.asm: .include "m8def.inc" .include "Functions.asm" .include "Data.asm" .def temp = r16 .def param = r17 ;.org 0x0000 ; Reset Handler ; rjmp boot boot: ldi temp, low(ramend) out SPL, temp ldi temp, high(ramend) out SPH, temp ; Stackpointer initalisieren ldi temp, high(UBRR_VAL) out UBRRH, temp ldi temp, low(UBRR_VAL) out UBRLL, temp ; Baudrate einstellen ldi temp, (1<<URSEL)|(3<<UCSZ0) out UCSRC, temp ; Frameformat auf 8 Bit sbi UCSRB, TXEN ; Senden (TX) aktivieren sbi UCSRB, RXEN ; Empfangen (RX) aktivieren SetZPtr boot_usart rcall Send_StringF SetZPtr boot_ok rcall Send_StringF Und Data.asm: boot_usart: .db "USART...................",0 boot_ok: .db "OK",10,13,0 Das Makro habe ich von einem Artikel in Mikrocontroller.net übernommen, also nehme ich mal an, dass hier alles stimmt. Ach ja Fehlermeldung: ....asm(38): error: SetZPtr: Unknown instruction or macro ....asm(38): error: boot_usart: Unknown instruction or macro ....asm(40): error: SetZPtr: Unknown instruction or macro ....asm(40): error: boot_ok: Unknown instruction or macro Wisst Ihr was da los ist, bzw. wie ich die Fehlermeldung weg bekomme? Danke im Vorraus I.c.h