From owner-freebsd-drivers@FreeBSD.ORG Tue Oct 21 17:34:38 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9008535C for ; Tue, 21 Oct 2014 17:34:38 +0000 (UTC) Received: from mail-pa0-f48.google.com (mail-pa0-f48.google.com [209.85.220.48]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5DAE9CED for ; Tue, 21 Oct 2014 17:34:37 +0000 (UTC) Received: by mail-pa0-f48.google.com with SMTP id eu11so1851245pac.7 for ; Tue, 21 Oct 2014 10:34:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=4WZ+hIRedL6KbshYYpZ9oEp6CGPWG49H5ukDBA0gcSE=; b=NYRKt4kcc5faW8Q8j0fJi2blzMk62m2Yb+5jCegJPFH7goYMI4ZmDEgee7oK4BCD8a fkLG+4G7VheiVZvKpBTXvUc2+yCEkVokCtBq5oBE93nt4xVApEw5ezt3IbvKRBNDs5YK mhs1FPz14W1b42hqCqJQvQZPYEtjW/unRtscKFSJzVzzL3LTh+Oc1rGDyhIBdWSYqEWD QcgCoY2e0OnHTbE3f08N0xcdu1/jna9C1zG3/meAAjl0IH1Y4AlKA67K1mLJKeZtJyfn PJntpGWe0ffZu9vhDFmd14NMWDe3qUO893LMmn5OOGTH6q23I9vn1uA0PuFXhKT8ZMv3 Jvzg== X-Gm-Message-State: ALoCoQn2jRbplT3/PN2E/xdJmwvKvUsE+HRVKFIqj5y43vebRhuO036iDn7rNURKP3mzOIDKs5ur X-Received: by 10.70.44.99 with SMTP id d3mr36832480pdm.46.1413912876977; Tue, 21 Oct 2014 10:34:36 -0700 (PDT) Received: from macintosh-c42c033c0b73.corp.netflix.com (dc1-prod.netflix.com. [69.53.236.251]) by mx.google.com with ESMTPSA id of9sm12350289pbc.6.2014.10.21.10.34.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 21 Oct 2014 10:34:36 -0700 (PDT) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_2FD75955-EB76-4F79-962A-6AD6B80EC665"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Exist university that teaches that is necessary coding in Assembly? From: Warner Losh In-Reply-To: Date: Tue, 21 Oct 2014 11:34:32 -0600 Message-Id: References: To: =?iso-8859-1?Q?fran=E7ai_s?= X-Mailer: Apple Mail (2.1878.6) Cc: freebsd-drivers@freebsd.org X-BeenThere: freebsd-drivers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Writing device drivers for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 17:34:38 -0000 --Apple-Mail=_2FD75955-EB76-4F79-962A-6AD6B80EC665 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Oct 21, 2014, at 10:57 AM, fran=E7ai s wrote: > Is true that very few people write directly in Assembly? Yes. People do it only when necessary. And the cases where it is = necessary have dwindled as the compiler technology has improved over the years. Now people usually just need to do it to access special bits of the = machine that aren=92t accessible via normal C. And even then, the trend has been = to create inline functions callable from C that produce the right generated = code with the users of those functions having to know or care they are in = assembler. There are also some rare occasions where people write directly in hex because the op-codes aren=92t in the assembler that they are using and = they need that functionality. Rare, but it does happen sometimes in the deep, machine-speicifc bowls of the kernel. > Exist university that teaches that is necessary coding in Assembly? It has been a few years since I was in school, but when I went to = school, people at the time said that assembler coding was rarely needed. That = said, we had a crash course in assembler so that we could write an assembler = for the VAX 11/750 running 4.2BSD as part of our course in C to teach us how the computer worked. Over the years I=92ve picked up other assemblers by reading the relevant = architectural definition manuals, gas (and other) assembler documentation and through = much trial and especially error. Warner --Apple-Mail=_2FD75955-EB76-4F79-962A-6AD6B80EC665 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJURpkoAAoJEGwc0Sh9sBEAr6EP/Rhpjf3RVEg2AkQ8HM7pQ9Gl 4WZCjWatmTyr0J4mkZX3ppqe4rHhMD2e89X2HTCtVcfJxh+c2oWM9pY/B1S1jnXk 1dvAHWdYLlk4CerPNn5bk58ftm8K7RrdCrtAqwXmPl8lAlDog/LPKYmDnFvmQlT3 RIkKNeBbhGsVxeaWk4wlCqjXkGMSjznexangt3b8FXo6FivjxkY4oa9dwFEpbPaC xMnqtKsv8I1TlptgMDP7Oc/rspK4F0a4+hCGf5qy5qIU6e81Ou9aqtSGYBDQmln4 jEi1AxraHzKkPYc0FrQnPNJoTi43Fjjs0AO1R7ImQ44wdoEA7eyyiRKn/ebPyGMv vYVnM19/kq8e5DX+JOjSkWT4hqsf8lY7/VgjFA6jx6CyJZ5V7FZaN76Wm2S+NLeQ b/Dcf4Y5xZc/uuwFehBISKzAeh859ys9DQ6fd8BFXuo9f8JfMdRV1mcNExkWrYdl m6+YAdMNAi+9xvfRDZHAf47IlwncOrQuGuuv7nBpZ38dvyfterl4rP2ZS32TXLSg 4hWue+EkwyzA/v6q2tLdE/lAB0QSDwG4LxOzoKtu2sWeSbpUj5LH/QTwpuBsa9ya MLECAb6eyG5BbU/G9k2N3WDMFRh/RsNRKQh6hmMbC2VhhZqER8vG7Xz7gLuYk/jS 6gQgtLdQdKERrUfriGgW =AtuV -----END PGP SIGNATURE----- --Apple-Mail=_2FD75955-EB76-4F79-962A-6AD6B80EC665--