Discussion:
asm source
(too old to reply)
Manuel Bouyer
2008-02-15 20:47:33 UTC
Permalink
Hello,
I need to write short binary for I/O control in assembler.
nasm -f hello.asm
ln -s -o hello hello.o
You mean ld, not ln here, right ? an object is not an executable, it
needs some more stuff linked in.
--
Manuel Bouyer <***@antioche.eu.org>
NetBSD: 26 ans d'experience feront toujours la difference
--

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
M. Warner Losh
2008-02-16 06:46:44 UTC
Permalink
In message: <***@www.gjbi.cz>
***@gjbi.cz writes:
: In FreeBSD in first line in all sources asm codes is:
: %include 'system.inc'

There's no file named system.inc in FreeBSD, nor do any of the .S
files in FreeBSD have this file. Also %include is not found in any of
the sources.

Warner

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Thomas E. Spanjaard
2008-02-16 13:46:01 UTC
Permalink
Hello,
I need to write short binary for I/O control in assembler.
Remember that userland binaries run in ring 3 on i386.
nasm -f hello.asm
ln -s -o hello hello.o
ln?
--
Thomas E. Spanjaard
***@netphreax.net
Adam Hoka
2008-02-18 04:25:38 UTC
Permalink
Hi!

I wrote some examples to the wiki:
http://wiki.netbsd.se/NetBSD_Assembly

BTW, it shouldnt sigsegv on missing elf header, but apparently it does...
Hello,
I need to write short binary for I/O control in assembler.
nasm -f hello.asm
ln -s -o hello hello.o
$./hello
Memory fault (core dumped)
08048080 BA0E000000 mov edx, 0xe
ald> s
Program terminated with signal SIGSEGV (Segmentation fault)
ald> q
%include 'system.inc'
Can anyone write me what must by define in assembler source
for correct this problem on NetBSD platform?
Thanks Jan Vlk
--
Adam Hoka
CC if you reply, please.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...