Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Sep 1998 21:51:18 +0200 (SAT)
From:      Robert Nordier <rnordier@nordier.com>
To:        cyouse@artemis.syncom.net (Charles Youse)
Cc:        rnordier@nordier.com, bf20761@binghamton.edu, freebsd-hackers@FreeBSD.ORG
Subject:   Re: PC memory usage (what is PIC?)
Message-ID:  <199809211952.VAA01318@ceia.nordier.com>
In-Reply-To: <Pine.NEB.3.96.980921091656.29625B-100000@artemis.syncom.net> from Charles Youse at "Sep 21, 98 09:18:06 am"

next in thread | previous in thread | raw e-mail | index | archive | help
Charles Youse wrote:

> > Writing truly IP-independent i386 assembly code by hand (and the initial
> > portion is pure assembly code), requires completely unnatural practices.
> 
> Actually, I'm not even sure that it's possible.  i86-derived architectures
> have relied on segmentation to provide such position independence.

Well, maybe "not possible" is rather strong, though I'd go along with
"not particularly idiomatic":

	main:   call .+0x5
	        popl %ebp
	        subl $0x5,%ebp
	        pushl $msg.1-msg
	        leal msg-main(%ebp),%eax
	        pushl %eax
	        pushl $0x1
	        movl $0x4,%eax
	        call .+0x5
	        lcall $0x7,$0x0
	        pushl $0x0
	        movl $0x1,%eax
	        call .+0x5
	        lcall $0x7,$0x0
	msg:    .ascii "hello, world!\n"
	msg.1:

-- 
Robert Nordier

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199809211952.VAA01318>