This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Need help to review my First assembly code communicating to GPIO of LPC2148

I am not using any start up code, Please find the below only assembly code and make sure me that, is it the right way to communicate to my GPIO on LPC2148, or any changes required for this, Some of the code is repeated since I am new to ARM assembly coding, so will take some time to understand all available instructions and usage. Thanks in advance for the help

Assembly code:

AREA ToggleTest, CODE, READONLY ENTRY

mov r0,#0x00000000 ldr r1,=0xE002C000 str r0,[r1]

mov r0,#0xFFFFFFFF ldr r1,=0xE0028008 str r0,[r1]

repeate mov r0,#0xFFFFFFFF ldr r1,=0xE0028004 str r0,[r1]

delay mov r3,#0x02
reasign mov r2,#0xFFFFFFFF
dec sbc r2,r2,#01 cmp r2,#0 bne dec sbc r3,r3,#01 cmp r3,#0 bne reasign

mov r0,#0xFFFFFFFF ldr r1,=0xE002800C str r0,[r1]

delay1 mov r3,#0x02
reasgn1 mov r2,#0xFFFFFFFF
dec1 sbc r2,r2,#01 cmp r2,#0 bne dec1 sbc r3,r3,#01 cmp r3,#0 bne reasgn1

B repeate

END

0