Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

assembly instruction nop

1 view
Skip to first unread message

daniel

unread,
Jan 5, 2010, 2:11:01 AM1/5/10
to

hi?
I tried to add a nop instruction to resethandler of the startup.s like
following.

; Before modification
ResetHandler
LED_ON 0x1

; After mod
ResetHandler
LED_ON 0x1
nop

LED_ON 0x2
nop

But it creates a compile error of 'no immediate rotate operand can be
created: -1128'.
Is there anybody who is familar with assembly?

Vinoth [MCTS]

unread,
Jan 5, 2010, 2:44:01 AM1/5/10
to
is it ARM instruction set?
is LED_ON a Macro? what you are doing in LED_ON?
--
vinoth.R
http://vinoth-vinothblog.blogspot.com
http://www.e-consystems.com

daniel

unread,
Jan 5, 2010, 3:01:01 AM1/5/10
to
thanks for your interest.
LED_ON is a macro function which on/off gpio led.

AndrewScholan[MCTS]

unread,
Jan 5, 2010, 4:58:59 AM1/5/10
to
> > > Is there anybody who is familar with assembly?- Hide quoted text -
>
> - Show quoted text -

"nop" does not exist in RISC architecture processors. The assembler
understands "nop" as a pseudo-instruction and will code it to an
instruction that has no net effect. I wouldn't expect that it's the
"nop" that's causing the problem, could it be the second LED_ON macro?
Can you post the macrro definition?
Andrew.

Vinoth [MCTS]

unread,
Jan 5, 2010, 5:07:01 AM1/5/10
to
what is the instruction set? is it arm or x86?
show the LED_ON code

daniel

unread,
Jan 5, 2010, 7:08:01 PM1/5/10
to
The macro definition is following,

MACRO
LED_ON $data
ldr r10, =GPNPUD
ldr r11, [r10]
bic r11, r11, #0xFF000000 ; Pull-Up-Down Disable
str r11, [r10]

ldr r10, =GPNDAT
ldr r11, [r10]
bic r11, r11, #0xF000
ldr r12, =$data
mov r12, r12, lsl #12 ; [15:12]
orr r11, r11, r12
str r11, [r10]
ldr r10, =GPNCON
ldr r11, [r10]
bic r11, r11, #0xFF000000
orr r11, r11, #0x55000000 ; GPN[15:12] Output .
str r11, [r10]

MEND

"AndrewScholan[MCTS]" wrote:

> .
>

0 new messages