Assembly Welcome Program is a simple program that prints a welcome message to the console.
This section will guide you through the steps to get the assembly program up and running on your machine.
Before you begin, ensure you have the following installed:
- NASM (Netwide Assembler): For assembling the
.asm
file. - A Linux environment: The program is designed to run on Linux.
- A text editor: To view or modify the source code.
- Open Terminal: Open your terminal in the directory where your
.asm
file is located. - Assemble the Code: Use NASM to assemble the
.asm
file. - Since the file is named
welcome.asm
, the command will be:
nasm -f elf32 welcome.asm -o myprogram.o
This command creates an object file named myprogram.o
.
- Link the Object File: Next, link the object file to create an executable. The following command links
myprogram.o
to create an executable namedmyprogram
:
ld -m elf_i386 -s -o myprogram myprogram.o
-m elf_i386
specifies that the program is for 32-bit architecture.
- Execute the Program: Run the program by typing:
./myprogram
Upon execution, the program will display the message defined in the .data section of your assembly code.
- If you encounter permission issues while executing, you may need to change the permissions of the executable using
chmod +x myprogram
. - Ensure that the NASM syntax matches the version you are using, as there might be slight differences in syntax across different versions.
This project is released under the terms of The Unlicense, which allows you to use, modify, and distribute the code as you see fit.
- The Unlicense removes traditional copyright restrictions, giving you the freedom to use the code in any way you choose.
- For more details, see the LICENSE file in this repository.
Author: Scott Grivner
Email: scott.grivner@gmail.com
Website: scottgrivner.dev
Reference: Main Branch