/* -------------------------------------------------- DEMO file for ldr and str instructions -------------------------------------------------- */ .global main, Stop, CodeEnd .global DataStart, DataEnd .global i, s, b /* -------------------------------------------------- Begin of the program instructions -------------------------------------------------- */ .text main: movw r1, #:lower16:b movt r1, #:upper16:b ldrsb r0, [r1] movw r1, #:lower16:s movt r1, #:upper16:s strh r0, [r1] Stop: CodeEnd: nop /* -------------------------------------------------- Begin of the permanent program variables -------------------------------------------------- */ .data DataStart: i: .4byte 0x01020304 // int typed variable s: .2byte 0x0506 // short typed variable b: .byte 0x07 // byte typed variable DataEnd: .end