From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 29 04:23:07 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51D3D106564A for ; Thu, 29 Sep 2011 04:23:07 +0000 (UTC) (envelope-from graudeejs@gmail.com) Received: from mail-fx0-f68.google.com (mail-fx0-f68.google.com [209.85.161.68]) by mx1.freebsd.org (Postfix) with ESMTP id D0E348FC0A for ; Thu, 29 Sep 2011 04:23:06 +0000 (UTC) Received: by fxh13 with SMTP id 13so180245fxh.7 for ; Wed, 28 Sep 2011 21:23:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; bh=kFUk43NywOY00e7VSQBRpU3Hx5oyhIWZp+aytOp8g6o=; b=wRZ9pU0qovRVTahfrPlmH7R6YVm6O/Fao/t3tk9iQe4+gpVlrIX9cVD8hvSV6dp1F9 a8FEOKDHQl8sQfLISmDzb7csTPQUk5DN3+hrRuPPbgO9WyOcXb4Y3ni4iI3hv4G3Pyny 50ZctioLCYy2qyISVsWMJ18aPrncy8AyOowaI= Received: by 10.223.20.22 with SMTP id d22mr1740556fab.149.1317269108479; Wed, 28 Sep 2011 21:05:08 -0700 (PDT) Received: from desktop.pc (mpe-11-155.mpe.lv. [83.241.11.155]) by mx.google.com with ESMTPS id l9sm451568faa.26.2011.09.28.21.05.07 (version=SSLv3 cipher=OTHER); Wed, 28 Sep 2011 21:05:08 -0700 (PDT) Date: Thu, 29 Sep 2011 07:04:53 +0300 From: Aldis Berjoza Cc: freebsd-hackers@freebsd.org Message-ID: <20110929070453.28a6679a@desktop.pc> In-Reply-To: <20110928202647.GA8284@hs1.VERBENA> References: <20110928202647.GA8284@hs1.VERBENA> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/SqtNG7d0_17VK/J.DwH_Td+"; protocol="application/pgp-signature" Subject: Re: Hello World assembly language X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Sep 2011 04:23:07 -0000 --Sig_/SqtNG7d0_17VK/J.DwH_Td+ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 28 Sep 2011 13:26:47 -0700 Colin Barnabas wrote: > I found a hello world program written in assembly language which > runs on my amd64 8.2 stable box. However, I can not seem to get > it to print a new line. Any suggestions on how to print a line > feed in assembly? You need to write 0xA for newline https://github.com/graudeejs/asm4BSD/blob/master/examples/000-hello/hello.f= asm Check this out: https://github.com/graudeejs/asm4BSD For my university Assembler practical work, I picked FreeBSD There is hellow world, that will/should run on any BSD and in FreeBSD directory there are more examples All that is for i386, but there shouldn't be to much problem to convert it to amd64 Oh, and it's written in lang/fasm (http://flatassembler.net/) --=20 Aldis Berjoza http://www.bsdroot.lv/ --Sig_/SqtNG7d0_17VK/J.DwH_Td+ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iQEcBAEBAgAGBQJOg+5xAAoJECrA2xnMujn6BnEIAIXVNCs8zrac0TMKFVZJLq23 BL1qe/hulovkA8oUx9sf8JXTmkB1ucgmFcOO7b87wMomg58ZVhbrszFaIvNduUyy xQrG9gLjpNk0kF/1LJYaJtkO6W8TjIMdOO/lGDbkH3AjAE+48v314Qgoxx9KwWVt qOLNVaYEnApgZO/+7fr2Nx95DguSs3ioouRrEagVdBOGc75NUSvXs1gFElxB0a2p d96tL42urtqfvDOUPSR2tZkbNVVRW8S37gfS6sVM4MttUDh+MhGC99TVd2WFpOHf Nmhk/7UwrQdi7ZiCW4nRdd+WBldrlhVDoTeKr9TfcbgHenKXfkkl2gb6CESwTAk= =43bp -----END PGP SIGNATURE----- --Sig_/SqtNG7d0_17VK/J.DwH_Td+--