我尝试在 uVision(设备:Arm7)中翻译此代码,但我得到 9 个错误,这是怎么回事?我觉得我的配置是错误的。谢谢
/* Daten-Bereich */
AREA Daten, DATA, READWRITE
Wert: DW 10
Quadrat:DS 4
/********************************************************************/
/* Programm-Bereich */
AREA Programm, CODE, READONLY, AT 0x00000000
Reset_Handler: MSR CPSR_c, #0x10 ; User Mode aktivieren
/********************************************************************/
LDR R3,=Wert ; Adresse des Werts laden
LDRH R1,[R3] ; Wert laden
MUL R2,R1,R1 ; Quadrat bilden
LDR R3,=Quadrat ; Adresse des Quadrats
STR R2,[R3] ; Quadrat ablegen
endlos: B endlos
END
Assembler_Startup.s(4): error: A1163E: Unknown opcode Quadrat: , expecting opcode or Macro
Assembler_Startup.s(6): error: A1137E: Unexpected characters at end of line
Assembler_Startup.s(7): error: A1137E: Unexpected characters at end of line
Assembler_Startup.s(8): error: A1207E: Bad or unknown attribute
Assembler_Startup.s(9): error: A1163E: Unknown opcode Reset_Handler: , expecting opcode or Macro
Assembler_Startup.s(10): error: A1137E: Unexpected characters at end of line
Assembler_Startup.s(19): error: A1163E: Unknown opcode endlos: , expecting opcode or Macro
Assembler_Startup.s - 9 Error(s), 0 Warning(s).