Access violation error at 0x1C

0

I have the following ARM code:

            AREA prog, code, READONLY
            ENTRY

            MOV r1, #0      ;division count
            MOV r2, #41     ;Fahrenheit

            SUB r2, r2, #32             ;r2=r2-32
            ADD r3, r2, r2, LSL #2      ;r3=r2*5

LOOP
            ADD r1, r1, #1
            SUBS r3, r3, #9
            BLT LOOP

            END

And I am getting the following error:

*** error 65: access violation at 0x0000001C : no 'execute/read' permission

As soon as the debugger hits the BLT LOOP line, the Program Counter (PC) value jumps from 0x18 to 0x1C.

I am new to ARM coding, and I am using Keil to execute this code.

What's wrong with my code?

assembly
arm
keil
asked on Stack Overflow Sep 5, 2017 by Vijay Chavda

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0