From owner-freebsd-questions@FreeBSD.ORG Wed Nov 11 20:07:07 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 A21F11065670 for ; Wed, 11 Nov 2009 20:07:07 +0000 (UTC) (envelope-from norstar39@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id 5B34C8FC19 for ; Wed, 11 Nov 2009 20:07:07 +0000 (UTC) Received: by yxe1 with SMTP id 1so1355306yxe.3 for ; Wed, 11 Nov 2009 12:07:06 -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=T3la4JfFqEuE3yA1A43mz6GzbM3+TSEy5rnZDf1Rnd14zh1lzF4SFaztPYAMc0gKTG 187qGywGjZ9MV8iBHD9lQ04kNE6kH0WIH3OcH8xJ3FedReYj2aSkjiHmol/blwiIN2U/ IO0wKWneeyirywk1HALfnxA8mfWPrCu0ZcoiQ= 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=oN4td0BEhlE3shejx9OXv2c9AKM0Za7eA9mEzh/gbGjjs06xr9qvLcuaBmmGUMX2B8 gmFhK5W2sUXpdLP5GQSMW3+4nxYHmkstT7qzp98SeVpTIXm82asnOhWwZrVyzZ42ay7V pEhHZf3i+JF3qgHFvy8yoruzcBIObFZxKqjJ8= Received: by 10.101.27.20 with SMTP id e20mr1000420anj.137.1257968625170; Wed, 11 Nov 2009 11:43:45 -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 5sm952206yxg.10.2009.11.11.11.43.43 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 11 Nov 2009 11:43:44 -0800 (PST) Message-ID: <4AFB13D9.9050507@gmail.com> Date: Wed, 11 Nov 2009 14:43:21 -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:07:07 -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.