diff --git a/asm/README.md b/asm/README.md new file mode 100644 index 0000000..8e25f76 --- /dev/null +++ b/asm/README.md @@ -0,0 +1,9 @@ +# ASM + +## Instructions +1. To run, make sure you have the compiler installed on your machine. ```sudo apt install nasm``` +2. Run the using the command: ```nasm -f elf program.asm -o program.o``` and ```ld -m elf_i386 program.o -o HelloWorld``` +3. Working screenshot: + + +![screenshot](./screenshot.png?raw=true) \ No newline at end of file diff --git a/asm/program.asm b/asm/program.asm new file mode 100644 index 0000000..2631df5 --- /dev/null +++ b/asm/program.asm @@ -0,0 +1,16 @@ +section .text + global _start + +_start: + mov eax, 4 + mov ebx, 1 + mov ecx, msg + mov edx, len + int 0x80 + + mov eax, 1 + int 0x80 + +section .data + msg db 'hello world !!', 0xa + len equ $ - msg \ No newline at end of file diff --git a/asm/screenshot.png b/asm/screenshot.png new file mode 100644 index 0000000..a564c58 Binary files /dev/null and b/asm/screenshot.png differ