0

我尝试在 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).
4

1 回答 1

0

您是否尝试在启动文件中进行更改?使用嵌入式 C 语言编写此代码会容易得多...

考虑一下!!

于 2013-07-25T06:17:59.307 回答