From 37decc99a7b164ca3b573749af612ff88f4c1a5b Mon Sep 17 00:00:00 2001 From: garhve Date: Mon, 5 Dec 2022 19:50:08 +0800 Subject: initialize --- nasm/helloworld | Bin 0 -> 8644 bytes nasm/helloworld.asm | 17 +++++++++++++++++ nasm/helloworld.o | Bin 0 -> 624 bytes 3 files changed, 17 insertions(+) create mode 100755 nasm/helloworld create mode 100755 nasm/helloworld.asm create mode 100755 nasm/helloworld.o (limited to 'nasm') diff --git a/nasm/helloworld b/nasm/helloworld new file mode 100755 index 0000000..d3afd3a Binary files /dev/null and b/nasm/helloworld differ diff --git a/nasm/helloworld.asm b/nasm/helloworld.asm new file mode 100755 index 0000000..3016f58 --- /dev/null +++ b/nasm/helloworld.asm @@ -0,0 +1,17 @@ +SECTION .data +msg db "Hello World!", 0Ah ; + +SECTION .text +global _start + +_start: + + mov edx, 13 ; number of bytes to write + mov ecx, msg ; move memory address of 'msg' to ecx + mov ebx, 1 ; write to the file STDOUT + mov eax, 4 ; invoke SYS_WRITE (kernel opcode 4) + int 80h + + mov ebx, 0 ; + mov eax, 1 ; + int 80h diff --git a/nasm/helloworld.o b/nasm/helloworld.o new file mode 100755 index 0000000..39d70d4 Binary files /dev/null and b/nasm/helloworld.o differ -- cgit v1.2.3-70-g09d2