I have just started using Linux and I am trying to create what would be a bat file in dos my bat file in dos has the following syntax
Nasm –f bin %1.asm –o %1.com
How can I create that in Linux??
In dos I can compile asm to com and run the com file,
Which command should I use to compile it in Linux so I would be able to run it?
I have been facing some strange problem with nasm,
I have created a simple program that print a string in the monitor but when I run this program it will print the string and a lot of strange characters what could that be??
Nasm in Linux + Bach files
RE:Nasm in Linux + Bach files
To create your "bach file", properly known as a "shell script", try the following:
echo "#!/bin/sh" > foo.sh
echo "nasm -f bin $1.asm -o $1.com" >> foo.sh
chmod +x foo.sh
To create a Linux program entirely in assembly is what we refer to as a 'pain in the @$$'. There are HOWTO guides for it. I recommend you look for the 'Linux Assembly HOWTO'.
Your strange problem is caused by a bug. If you could be more specific as to how the program works, we can be more specific as to what the bug is.
--Jamethiel
echo "#!/bin/sh" > foo.sh
echo "nasm -f bin $1.asm -o $1.com" >> foo.sh
chmod +x foo.sh
To create a Linux program entirely in assembly is what we refer to as a 'pain in the @$$'. There are HOWTO guides for it. I recommend you look for the 'Linux Assembly HOWTO'.
Your strange problem is caused by a bug. If you could be more specific as to how the program works, we can be more specific as to what the bug is.
--Jamethiel
RE:Nasm in Linux + Bach files
thanks ,about the bug I have already solved, i just had to specify the origem.