cancel
Showing results for 
Search instead for 
Did you mean: 

How to read/write the data? I used the Armasm V6.13.1 as compiler.

DChie.1
Associate

Try.S

    AREA  RESET, DATA, READONLY

DCD 0x20001000   ; stack pointer value when stack is empty

DCD Reset_Handler ; reset vector

ALIGN

AREA Init, CODE;, READONLY

ENTRY

Reset_Handler  PROC

    EXPORT Reset_Handler        

    IMPORT Start

 LDR  R0, =Start

 BX   R0

    ENDP

 

      END

Main.S

AREA |.text|, CODE

  export Start

Start  PROC

 LDR  r0, =SRC

 LDR  r1, =DST

 MOV  r4, #0x03

Repeat

 LDR  r2, [r0], #0x04

 STR  r2, [r1], #0x04

 SUB  r4, r4, #0x01

 CMP  r4, #0x01

 BNE  Repeat

loop

      B    loop

  align

 ENDP

 

    AREA  MyData, DATA, READWRITE

       

SRC      DCD 0x1234,0x5678

DST      DCD 0x1111,0x2222    

      END

0 REPLIES 0