From owner-freebsd-hackers Fri Nov 13 11:50:09 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA21511 for freebsd-hackers-outgoing; Fri, 13 Nov 1998 11:50:09 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA21505 for ; Fri, 13 Nov 1998 11:50:07 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from o2.cs.rpi.edu (root@o2.cs.rpi.edu [128.113.96.156]) by cs.rpi.edu (8.9.1/8.9.1) with ESMTP id OAA09999; Fri, 13 Nov 1998 14:49:42 -0500 (EST) Received: from localhost (crossd@localhost) by o2.cs.rpi.edu (8.9.1a/8.9.1) with ESMTP id OAA07133; Fri, 13 Nov 1998 14:49:42 -0500 (EST) X-Authentication-Warning: o2.cs.rpi.edu: crossd owned process doing -bs Date: Fri, 13 Nov 1998 14:49:42 -0500 From: "David E. Cross" To: Robert Nordier cc: Ruslan Ermilov , hackers@FreeBSD.ORG Subject: Re: FreeBSD on i386 memory model In-Reply-To: <199811131930.VAA12575@ceia.nordier.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG That is great. Could you sprinkle a comment or 2 as to what it is doing? ie, I am not sure what the 'call .+0x5' and 'lcall $0x7,0x0' do. On Fri, 13 Nov 1998, Robert Nordier wrote: > FWIW, here's a small standalone i386 assembler program: > > 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: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message