From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 17 02:12:19 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85BADBD6 for ; Mon, 17 Nov 2014 02:12:19 +0000 (UTC) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 127E9AAF for ; Mon, 17 Nov 2014 02:12:18 +0000 (UTC) Received: from mart.js.berklix.net (p57BCF9E3.dip0.t-ipconnect.de [87.188.249.227]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id sAH28FpH004724; Mon, 17 Nov 2014 02:08:17 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id sAH2C1LV063609; Mon, 17 Nov 2014 03:12:01 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id sAH2Bhtg057567; Mon, 17 Nov 2014 03:11:55 +0100 (CET) (envelope-from jhs@berklix.com) Message-Id: <201411170211.sAH2Bhtg057567@fire.js.berklix.net> To: =?UTF-8?Q?fran=C3=A7ai_s?= Subject: Re: Exist tutorial that teaches programming in machine code to FreeBSD? From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Fri, 14 Nov 2014 21:39:31 -0200." Date: Mon, 17 Nov 2014 03:11:43 +0100 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: Mon, 17 Nov 2014 02:12:19 -0000 =?UTF-8?Q?fran=C3=A7ai_s?= wrote: > A FreeBSD developer told me via private message that the most FreeBSD > developers don’t develop in machine code. > > The following link leads to tutorial that teaches programming Assembly in > to FreeBSD: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/developers-handbook/x86.html There's an x86 in your URL. Did You know that FreeBSD supports other CPUs too ? Did you decide to target the x86 CPU ? Or just come across that URL ? > Also exist tutorial that teaches programming in machine code to FreeBSD? ................................................. ^^^^^^^ I hope not! There's a difference between Assembler & Machine programming: http://en.wikipedia.org/wiki/Machine_code "While it is possible to write programs directly in numerical machine code, it is tedious and error prone to manage individual bits and calculate numerical addresses and constants manually. It is therefore rarely done today, except for situations that require extreme optimization or debugging. Almost all practical programs today are written in higher-level languages or assembly language," http://en.wikipedia.org/wiki/Assembly_language My last need to machine code program was probably for an NSC 16032 in ~1982. I had to as I had no C compiler, assembler, or computer. I hand coded Hex on paper, typed & burnt it to an Eprom on a borrowed MDS, & my logic analyser showed it ran on my co- designed & self wrapped board - Magic! Then on CPM I wrote http://berklix.com/~jhs/src/bsd/jhs/bin/local/monitor/ & we decided to avoid more machine code, & buy a compiler & assembler ! Now there's free compilers & assemblers, so more than ever: Doing much machine code programming is erroneous, (though assembly programming remains occasionaly appropriate &/or essential). Your x86 URL leads to 2 assemblers, no need to program in Machine Code. I vaguely thought there was an assembler in docs/ but a find in /usr/share failed to find an appropriate 'as'. man as Maybe some ports like binutils & gas might include refs to tutorials http://www.freebsd.org/cgi/ports.cgi?query=binutils&stype=all http://www.freebsd.org/cgi/ports.cgi?query=gas&stype=all&sektion=all http://svnweb.freebsd.org/ports/head/lang/intel2gas/ http://www.freebsd.org/cgi/ports.cgi?query=nasm&stype=all&sektion=all This list might discuss ports/ components that deliver tutorials: freebsd-toolchain@freebsd.org http://lists.freebsd.org/mailman/listinfo/freebsd-toolchain Cheers, Julian -- Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com Indent previous with "> ". Interleave reply paragraphs like a play script. Send plain text, not quoted-printable, HTML, base64, or multipart/alternative. From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 17 02:21:42 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56417E18 for ; Mon, 17 Nov 2014 02:21:42 +0000 (UTC) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DACFDB85 for ; Mon, 17 Nov 2014 02:21:41 +0000 (UTC) Received: from mart.js.berklix.net (p57BCF9E3.dip0.t-ipconnect.de [87.188.249.227]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id sAH2HlUj005112; Mon, 17 Nov 2014 02:17:48 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id sAH2LXbL063675; Mon, 17 Nov 2014 03:21:33 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id sAH2LFec057660; Mon, 17 Nov 2014 03:21:27 +0100 (CET) (envelope-from jhs@berklix.com) Message-Id: <201411170221.sAH2LFec057660@fire.js.berklix.net> Subject: Re: Exist tutorial that teaches programming in machine code to FreeBSD? From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Mon, 17 Nov 2014 03:11:43 +0100." Date: Mon, 17 Nov 2014 03:21:15 +0100 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: Mon, 17 Nov 2014 02:21:42 -0000 "Julian H. Stacey" wrote: > Maybe some ports like binutils & gas might include refs to tutorials Found via FSF.org: http://sourceware.org/binutils/docs/as/index.html Julian -- Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com Indent previous with "> ". Interleave reply paragraphs like a play script. Send plain text, not quoted-printable, HTML, base64, or multipart/alternative. From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 17 10:49:27 2014 Return-Path: Delivered-To: freebsd-drivers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E6DAF71A for ; Mon, 17 Nov 2014 10:49:26 +0000 (UTC) Received: from mail-pd0-f175.google.com (mail-pd0-f175.google.com [209.85.192.175]) (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 B5B6D119 for ; Mon, 17 Nov 2014 10:49:26 +0000 (UTC) Received: by mail-pd0-f175.google.com with SMTP id y10so2196416pdj.6 for ; Mon, 17 Nov 2014 02:49:20 -0800 (PST) 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=Y3rD19eMQo+v/vWd1WviJrO4EUGOdIDH0wupi3xsy5I=; b=lqsLYn2ncfS0xzJdtSo1LVX87RSPnET+I4mKXgT1k729+WYkXVUAsOpM4N5pZS9zOq T/sWBZ/juC9b2DEZBTIHBysJvkFJqTuOt6r5USANJkAxFhUGF04SLgAVG2nvcv083dHw rE0ItYCaHcnAV2SalVASAZ0MENi1aiTZkYZAOXusVSgNRro8H7rxX6XwSJHxiiatb3Ft ybh94v87sUJsCVvtWnP1FnFgVG085PjukHHhakgggyjwA4/lf9UcKj/gcg7G7Asv2jBL Zhz6gIvWnQ31exMkeBokCnSFO7vZoUxk3hF6/bAGK+8SQpW+DpFiixGvS0iYezPUhse1 fM0w== X-Gm-Message-State: ALoCoQkBiiFN6UArfducK/jhqcxYpAhHMiAbqTW3Z7n0zPBXn6bgMfHdxuT62SqmwNpgJzr/vJKN X-Received: by 10.66.192.42 with SMTP id hd10mr18860349pac.55.1416221360509; Mon, 17 Nov 2014 02:49:20 -0800 (PST) Received: from lgwl-achen.corp.netflix.com ([69.53.236.236]) by mx.google.com with ESMTPSA id x10sm34843116pdr.11.2014.11.17.02.49.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 02:49:19 -0800 (PST) Sender: Warner Losh Content-Type: multipart/signed; boundary="Apple-Mail=_AC82D96C-8821-4512-AC6A-2466F70C7C9D"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: Exist tutorial that teaches programming in machine code to FreeBSD? From: Warner Losh In-Reply-To: <201411170211.sAH2Bhtg057567@fire.js.berklix.net> Date: Mon, 17 Nov 2014 03:49:10 -0700 Message-Id: References: <201411170211.sAH2Bhtg057567@fire.js.berklix.net> To: "Julian H. Stacey" 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: Mon, 17 Nov 2014 10:49:27 -0000 --Apple-Mail=_AC82D96C-8821-4512-AC6A-2466F70C7C9D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 You=92re being trolled=85 This person is a well known troll in the = forums. He starts this fright over machine code over and over and over = and stirs the pot. People say =93never=94 when they should say =93rarely=94= since it is done in FreeBSD when as doesn=92t support the opcodes = needed for low-level machine things. Then after much churn, the = moderators step in and end it. Warner --Apple-Mail=_AC82D96C-8821-4512-AC6A-2466F70C7C9D 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 iQIcBAEBCgAGBQJUadKmAAoJEGwc0Sh9sBEAkcQP/iC8x82hJyawea83k4anXdKi VgCtQxeOUnBdqMfmJwxn3Gv8prCbtCGPBw2gHToUxw1dV4PFDsxYGZfABh02vREr cIY03HRl0p9d5K3g7K3BDAfQdVsbseEfweGHVg4bnTmLmnsA5XQNb9XK2fwgVldH ZSjIvVA4nDa+1jUbfo3sAWLxgZ7qYKKMfRPVsa10R7LVlhTurroOEQmJdluctI8A vUG+yV7cVHY1kQw6GaOb0KF6wrOxXFwgX9PSRuJp8xMbQ+8qtFKNWRj1VpI68pE9 j47aTmehnOS+xeJr+cMF2Qs3MzamVjjArusMrTZGYLMqbTFmT1MEryNJxOBNHtxI hqqpRNIdhpojuPVmOIzkOhA7cNgHGtvWKFrNYQLkZ9ZxuM5JnuIil9YhEaIJdU2E BAx+d09iT8n6t3mmtvNbJLa9jpZw+xFfAB7KpmZ8z9V1wbfVQ0XgsQkzCemHq7gA u2SMRCx9LbMJajG4yaMBwAIbNGqRZu7Badr+ZsyzKDTXjwc8ssbERtE1+Uep7WII Ivey/8LI1D7Q9pfVu3dnI54ywNb9WuJSEedOMwUPV80ht5g+3lrAe4zvqVLl7swl xsZlfvcbLQnb125wnKWtEvUKvlph/e2I6M+gY308YfAz3KpqB8RRxH1hm+Ks9E6I uqO6w+pXrj95u43wWDIR =eTFs -----END PGP SIGNATURE----- --Apple-Mail=_AC82D96C-8821-4512-AC6A-2466F70C7C9D-- From owner-freebsd-drivers@FreeBSD.ORG Mon Nov 17 11:52:45 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 19516BC9 for ; Mon, 17 Nov 2014 11:52:45 +0000 (UTC) Received: from land.berklix.org (land.berklix.org [144.76.10.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BD31A3A for ; Mon, 17 Nov 2014 11:52:44 +0000 (UTC) Received: from mart.js.berklix.net (p57BCF9E3.dip0.t-ipconnect.de [87.188.249.227]) (authenticated bits=128) by land.berklix.org (8.14.5/8.14.5) with ESMTP id sAHBme0t024903; Mon, 17 Nov 2014 11:48:41 GMT (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by mart.js.berklix.net (8.14.3/8.14.3) with ESMTP id sAHBqScf065975; Mon, 17 Nov 2014 12:52:29 +0100 (CET) (envelope-from jhs@berklix.com) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.14.7/8.14.7) with ESMTP id sAHBq4o6067279; Mon, 17 Nov 2014 12:52:16 +0100 (CET) (envelope-from jhs@berklix.com) Message-Id: <201411171152.sAHBq4o6067279@fire.js.berklix.net> To: Warner Losh Subject: Re: Exist tutorial that teaches programming in machine code to FreeBSD? From: "Julian H. Stacey" Organization: http://berklix.com BSD Unix Linux Consultants, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://www.berklix.com In-reply-to: Your message "Mon, 17 Nov 2014 03:49:10 -0700." Date: Mon, 17 Nov 2014 12:52:04 +0100 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: Mon, 17 Nov 2014 11:52:45 -0000 > You=92re being trolled=85 This person is a well known troll in the = > forums. He starts this fright over machine code over and over and over = > and stirs the pot. People say =93never=94 when they should say =93rarely=94= > since it is done in FreeBSD when as doesn=92t support the opcodes = > needed for low-level machine things. Then after much churn, the = > moderators step in and end it. > > Warner Oh dear, I fell for it ! Thanks Warner ! Cheers, Julian -- Julian Stacey, BSD Linux Unix C Sys Eng Consultant Munich http://berklix.com Indent previous with "> ". Interleave reply paragraphs like a play script. Send plain text, not quoted-printable, HTML, base64, or multipart/alternative.