From owner-freebsd-hackers Thu Nov 21 9:59:15 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 314FA37B401 for ; Thu, 21 Nov 2002 09:59:14 -0800 (PST) Received: from smtp030.tiscali.dk (smtp030.tiscali.dk [212.54.64.105]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3A15443E3B for ; Thu, 21 Nov 2002 09:59:13 -0800 (PST) (envelope-from dslb@tiscali.dk) Received: from cpmail.dk.tiscali.com ([212.54.64.52]) by smtp030.tiscali.dk (8.12.5/8.12.5) with ESMTP id gALHwxp5018228 for ; Thu, 21 Nov 2002 18:59:10 +0100 (MET) Received: from [213.237.112.252] by cpmail.dk.tiscali.com with HTTP; Thu, 21 Nov 2002 18:59:06 +0100 Date: Thu, 21 Nov 2002 18:59:06 +0100 Message-ID: <3D9FE7F60000649D@cpfe5.be.tisc.dk> From: dslb@tiscali.dk Subject: Re: Assembly and ELF To: hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2002.11.21 18:00 Bruce M Simpson wrote: > > One big question I'd have is, why are you using assembly language? 1. I like assembly 2. FreeBSD will still need assembly programms 3. To learn more about the FreeBSD kernel (internals) I do however program in C++, so if you are worried about portability don'= t. > I use assembly language, but only where it's absolutely essential to > do > so, e.g. for interacting with the BIOS, writing firmware, or for > small > embedded targets. Jep, assembly is useful to know. > Generally you shouldn't need to worry about linking. I don't, but I would just like to know "it all". > As for stack > arguments, > the reason is that x86 is register-starved. The amount of stack > shuffling, > managing the frame pointer, and saves and so forth should serve to > illustrate > why register arguments are usually a bad idea (unless you have a > very > tight piece of code which takes less than 3 arguments) on that > architecture. Ah ok, this leads to a question I forgot to ask: That in assembly language programming will change when we get ia-64? > Also, you do know that executing an INT causes standard exception > processing through a call gate anyway, right? Yes, so it is all in the kernel and thereby in the ram? Sorry of all these questions, but I am relativly new to Unix (FreeBSD sin= ce 4.5) and I am only (just turned) 21, so it is just now I've begon program= ming and such. br socketd To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message