freebsd asm
José Nicolás Castellano
jncastellano at noconname.org
Mon Jun 14 11:55:42 GMT 2004
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 at 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'
¿Where 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
More information about the freebsd-hackers
mailing list