我尝试在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).
答案 0 :(得分:0)
您是否尝试在启动文件中进行更改? 使用嵌入式C语言编写此代码会更容易......
想一想!!