This is the mail archive of the
binutils@sourceware.org
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: <1194625564.29036.4.camel@rapsure.rapsure.net>
Brian Beardall <brian@rapsure.net> writes:
> .arch i8086
> .code16
>
> .text
> foo:
> mov $exit,%ax
> mov $10,%cx
> loop foo
> exit:
> int $0x80
> dumb:
> .int 5,5,3,2,1,2,4,2,3,4,3,2,1,5
> again:
> .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.
Ian