Date: Mon, 14 Jun 2004 13:59:11 +0200 From: =?iso-8859-1?Q?Jos=E9_Nicol=E1s_Castellano?= <jncastellano@noconname.org> To: <freebsd-hackers@freebsd.org> Subject: freebsd asm Message-ID: <003801c45207$01ddfa70$0200a8c0@peron>
next in thread | raw e-mail | index | archive | help
Hello to all, I'm proud to join this mailing, having posibilities to learn some new features of freebsd system. I have to mention i did some tests in asm from freebsd-devel and i get surprised, look at this: [demon]~$ uname -a FreeBSD demon.noconname.org 5.2.1-RELEASE-p4 FreeBSD 5.2.1-RELEASE-p4 = #0: Tue Apr 6 19:35:49 CEST 2004 root@demon.noconname.org:/usr/obj/usr/src/sys/NocONName i386 [demon]~$ cat hello.asm %include 'system.inc' section .data hola db 'Hola', 0Ah hbytes equ $-hola section .text global _start _start: push dword hbytes push dword hola push dword stdout sys.write push dword 0 sys.exit [demon]~$ nasm -f elf hello.asm hello.asm:1: fatal: unable to open include file `system.inc' =BFWhere is that file?... the -current port of nasm is incomplete ? Ok... we take some modifications... << %include 'system.inc' <<push dword stdout , and we replace it with push dword 1 ok. compile... linking... [demon]~$ nasm -f elf hello.asm [demon]~$ ld -s -o hello hello.o [demon]~$ ./hello Bus error (core dumped) what's happening??? -Nico
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?003801c45207$01ddfa70$0200a8c0>