A D wrote:
I'm having strange problem accessing a variable in a gnu assembly language program. When i write a code: .section .data x = 4 mm: .int 1, 2 .section .text .globl _start _start: nopmovl x, %ecx #can't do this
You're trying to access memory at address 4, not move the immediate value 4. Try "movl $x, %ecx".
Best, Frank - To unsubscribe from this list: send the line "unsubscribe linux-assembly" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
- References:
- Unable to use a variable in instruction
- From: A D
- Unable to use a variable in instruction
- Prev by Date: Unable to use a variable in instruction
- Next by Date: Re: Unable to use a variable in instruction
- Previous by thread: Unable to use a variable in instruction
- Next by thread: Re: Unable to use a variable in instruction
- Index(es):