This is the mail archive of the
mailing list for the binutils project.
Re: labels, and values for mov instructions is gas
- From: Ian Lance Taylor <iant at google dot com>
- To: Brian Beardall <brian at rapsure dot net>
- Cc: binutils at sourceware dot org
- Date: 09 Nov 2007 08:39:46 -0800
- Subject: Re: labels, and values for mov instructions is gas
- References: <email@example.com>
Brian Beardall <firstname.lastname@example.org> writes:
> .arch i8086
> mov $exit,%ax
> mov $10,%cx
> loop foo
> int $0x80
> .int 5,5,3,2,1,2,4,2,3,4,3,2,1,5
> .word 1,2,3,4,5,6,7
> .equ help, 5
> With this code I need the address that is at the label exit moved into
> the ax register. Right now all I get is 0x0000 moving into the ax
> register. How might I go about getting the correct address into ax
> without doing a as -a -o test.o test.asm , and looking at the symbol
> table, and manually entering the value?
You need to run the linker on the output of the assembler.