www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/27/15:05:39

From: Francesco Marcelloni <france AT iet DOT unipi DOT it>
Newsgroups: comp.os.msdos.djgpp
Subject: *386 assembler as problem
Date: Thu, 27 Feb 1997 17:18:31 +0100
Organization: University of Pisa
Lines: 42
Message-ID: <3315B3D7.41C67EA6@iet.unipi.it>
NNTP-Posting-Host: marcelloni.iet.unipi.it
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I am a user of *386 assembler "as".
I read in the "as" manual that it is possible to create several sections
by directive .section name.
I'd like to use several data sections in my program, but I have the
following problem. 

Let us assume the following code:

.globl j
.section proof1
        .align 2
        .type    j,@object
        .size    j,4
j:
        .long 12
.globl d
.section proof2
        .align 2
        .type    d,@object
        .size    d,4
d:
        .long 14


I'd like to refer j or d by a selector register as, for instance, %gs :
j (as written in the "as" manual). How is it possible to load in gs the
address of section proof1?

Could someone help me?

Thank you in advance.


------------------------------------------------------------------------------

Francesco Marcelloni                            
Dipartimento di Ingegneria della Informazione  || Phone: +39 50 568654
Universita' degli Studi di Pisa                || Fax:   +39 50 568522
via Diotisalvi N. 2 - 56126 PISA               ||
E-mail:france AT iet DOT unipi DOT it
ITALY
==============================================================================

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019