From owner-freebsd-questions@FreeBSD.ORG Fri Jun 12 10:02:32 2015 Return-Path: Delivered-To: freebsd-questions@hub.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 59B86C54 for ; Fri, 12 Jun 2015 10:02:32 +0000 (UTC) (envelope-from mayuresh@kathe.in) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [IPv6:2001:4b98:c:538::197]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 03AF61E10 for ; Fri, 12 Jun 2015 10:02:31 +0000 (UTC) (envelope-from mayuresh@kathe.in) Received: from mfilter4-d.gandi.net (mfilter4-d.gandi.net [217.70.178.134]) by relay5-d.mail.gandi.net (Postfix) with ESMTP id E26BF41C2E1; Fri, 12 Jun 2015 12:02:29 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mfilter4-d.gandi.net Received: from relay5-d.mail.gandi.net ([217.70.183.197]) by mfilter4-d.gandi.net (mfilter4-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 1WI7IW4gQzde; Fri, 12 Jun 2015 12:02:28 +0200 (CEST) X-Originating-IP: 10.58.1.149 Received: from webmail.gandi.net (webmail9-d.mgt.gandi.net [10.58.1.149]) (Authenticated sender: mayuresh@kathe.in) by relay5-d.mail.gandi.net (Postfix) with ESMTPA id 3572841C371; Fri, 12 Jun 2015 12:02:28 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Fri, 12 Jun 2015 15:32:28 +0530 From: Mayuresh Kathe To: Mehmet Erol Sanliturk Cc: Matthew Pherigo , FreeBSD Questions Mailing List Subject: Re: randall hyde's high level assembly! Reply-To: mayuresh@kathe.in Mail-Reply-To: mayuresh@kathe.in In-Reply-To: References: <731c3f79950e679799b5f8078a5ba7f0@kathe.in> <917AE52A-45E0-42CB-A6A8-40BAAE318CC9@gmail.com> <1c5f3e6e3cafb9022d257afcce1757b3@kathe.in> <6ee4e8712a7499dd3d703e540f46059b@kathe.in> <23f251dd1a66d0a88ed041ae2593cb98@kathe.in> Message-ID: <6228039c427b13187bfdf347b1771b10@kathe.in> X-Sender: mayuresh@kathe.in User-Agent: Roundcube Webmail/1.1.1 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Jun 2015 10:02:32 -0000 On 2015-06-12 15:11, Mehmet Erol Sanliturk wrote: > On Thu, Jun 11, 2015 at 11:37 PM, Mayuresh Kathe > wrote: >=20 >> On 2015-06-12 11:24, Mehmet Erol Sanliturk wrote: >> On Thu, Jun 11, 2015 at 10:45 PM, Mayuresh Kathe >> >> wrote: >>=20 >> On 2015-06-12 11:04, Mehmet Erol Sanliturk wrote: >> On Thu, Jun 11, 2015 at 9:29 PM, Mayuresh Kathe >> wrote: >>=20 >> hi matthew, >>=20 >> no luck, I got the following message; >> root@www:~ # pkg install hla >> Updating FreeBSD repository catalogue... >> FreeBSD repository is up-to-date. >> All repositories are up-to-date. >> pkg: No packages available to install matching 'hla' have been >> found in the repositories >>=20 >> `uname -a` gives me the following; >> FreeBSD www.kathe.in [1] [1] [1] 10.1-RELEASE-p10 FreeBSD >> 10.1-RELEASE-p10 >> #0: Wed May 13 06:54:13 UTC 2015 >> root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC >> amd64 >>=20 >> `freebsd-version` gives me the following; >> 10.1-RELEASE-p11 >>=20 >> anything i might be doing wrong? >>=20 >> ~mayuresh >>=20 >> On 2015-06-12 09:26, Matthew Pherigo wrote: >> Hey Mayuresh, >>=20 >> There's actually a port in the tree already! 'pkg install hla' >>=20 >> --Matt >>=20 >> On Jun 11, 2015, at 5:52 AM, Mayuresh Kathe >> wrote: >>=20 >> has anyone been successful at working with randall hyde's high >> level assembly toolkit under freebsd 10.x? >> http://www.plantation-productions.com/Webster/ [2] [2] [2] claims >> to >> have a >> pre-built archive, but one that fails to assemble the binaries. :( >>=20 >> ~mayuresh >>=20 >> _______________________________________________ >>=20 >> Is hla able to generate 64-bit machine code for amd64 ? >>=20 >> It seems that it is for 32-bits , i.e. i386 . >>=20 >> i have been able to run and test 'hla' under amd64 systems running >> ubuntu. >> any particular reason why it will not run under freebsd 64-bit? >> one of the things that could be a problem might be the "assembler" >> itself, i couldn't find "gas" or an equivalent under freebsd. >>=20 >> ~mayuresh >>=20 >> Can you use Nasm ? >>=20 >> CD /USR/PORTS/DEVEL/NASM >> MAKE INSTALL >>=20 >> http://forum.nasm.us/index.php?topic=3D1283.0 [3] [3] >=20 > thanks for that tip mehmet, much appreciate it. >=20 > i hadn't known about "nasm", looking it up led me to a book on > assembly language programming by jeff duntemann, which seems to be a > lot more realistic than the one by randall hyde. >=20 > again, thanks a million mehmet. :) >=20 > ~mayuresh >=20 > 64 bits operating systems are different from 32 bits operating systems > . >=20 > During working with assemblers , it is necessary to distinguish this > feature . >=20 > In a 64 bits operating system , if 32 bits programs will be used , it > is necessary to have 32 bits libraries and support by the operating > system . >=20 > This means that you can not execute 32 bits programs in a 64 bits > operating system without such support . >=20 > In the following page : >=20 > http://www.duntemann.com/assembly.html [4] >=20 > read >=20 > "If You Have a 64-Bit PC..." >=20 > the especially . >=20 > "64-Bit PC" is misleading : It should be "64-Bit Operating System" . >=20 > Both Intel and AMD x86 processors mainly support both 32 and 64 bit > operating systems : They are able to execute 32 and 64 bit > instructions . >=20 > Therefore , important points are bit size of ( 32 or 64 ) operating > system , and handling capability of this feature by compilers and > availability of libraries , and support by the operating system . >=20 > It is necessary to have information about 64 bit assembly programming > in an 64 bit operating system . >=20 > http://www.amazon.com/Introduction-Intel-Assembly-Language-Programming/= dp/1478119209/ref=3Dpd_sim_14_1?ie=3DUTF8&refRID=3D15NZ1SBWCZAMH1X6KPZG > [5] >=20 > Introduction to 64 Bit Intel Assembly Language Programming for Linux: > Second Edition Paperback =E2=80=93 June 23, 2012 > by Benjamin Ray Seyfarth (Author) mehmet, thanks for the link to that book by benjamin ray seyfarth. my objective for learning assembly was to understand the inner workings=20 of the machine, but i guess that could get accomplished with a good=20 understanding of "machine organization". randall hyde's "write great code (vol 1)" is an excellent book on=20 "machine organization", just that one of the languages used for example=20 code is 'hla' and hence my inquiry into support for running 'hla' under=20 freebsd. best, ~mayuresh