From owner-freebsd-questions@FreeBSD.ORG Wed Nov 11 20:23:27 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69A4D1065693 for ; Wed, 11 Nov 2009 20:23:27 +0000 (UTC) (envelope-from djackson452@gmail.com) Received: from mail-yw0-f119.google.com (mail-yw0-f119.google.com [209.85.211.119]) by mx1.freebsd.org (Postfix) with ESMTP id 207F38FC26 for ; Wed, 11 Nov 2009 20:23:26 +0000 (UTC) Received: by ywh17 with SMTP id 17so163660ywh.3 for ; Wed, 11 Nov 2009 12:23:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=JQh+OfUUJVGcBOtvjq7JlrRE43TK1k4SzLXB3KRBshM=; b=S2sII+2OTz7Nn57HgqovancRcLOGOQNOCqMxG0i03aR9eeKoq6Q0j5JnYrCwQQVMyG n8UQQpdMQPmSIuR5q9ujxRrHupS7ZRpipzIYdwhJoK9bohrXtqNGdz8hyQ05994aHLVd mpCKq89tN57emgJz1yecrIxStSA9EycbSN8mE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=BAb2a5nwyfn8zxgdgrawSDnMqXDMOh+c5Q5qQCMGYpEmLn44/tXrn60Zx3QiIue4CV IKh24zafIJfhw1B1zpnRFQbALWciczsoZSrN3Um3nE9Whh0wLCl0K5c538ZpWgF39tO7 5ZGjsYhRf8DufGMWN2DWJcFA/UU+L5JEAlGf8= Received: by 10.150.23.10 with SMTP id 10mr3459243ybw.329.1257970148388; Wed, 11 Nov 2009 12:09:08 -0800 (PST) Received: from ?192.168.1.103? (pool-96-254-203-152.tampfl.fios.verizon.net [96.254.203.152]) by mx.google.com with ESMTPS id 16sm977856gxk.11.2009.11.11.12.09.07 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 11 Nov 2009 12:09:07 -0800 (PST) Message-ID: <4AFB19CC.9090407@gmail.com> Date: Wed, 11 Nov 2009 15:08:44 -0500 From: David Jackson User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Problems with freebsd assembly X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2009 20:23:27 -0000 I am having great difficulty running a very simple assembler program on FreeBSD on x86 in my efforts to learn some assembly programming on FreeBSD. I have tried to compile the following with nasm, however i get nothing in response when I attempt to run this program: section .data hello db 'Hello, World!', 0xa hbytes equ $ - hello section .text global _start _start: push dword hbytes push dword hello push dword 1 mov eax,0x4 int 0x80 add esp,12 push dword 0 mov eax,0x1 int 0x80 nasm -f elf -o hello1s.o hello1.s ld -s -o hello1s hello1s.o ./hello1s prints nothing. What is wrong here? It should print "hello world". Thanks in advance for your help, it is greatly appreciated.