diff options
author | garhve <git@garhve.com> | 2022-12-05 19:50:08 +0800 |
---|---|---|
committer | garhve <git@garhve.com> | 2022-12-05 19:50:08 +0800 |
commit | 37decc99a7b164ca3b573749af612ff88f4c1a5b (patch) | |
tree | 0420223d6d82e540c78513c7f021c18e2cd49530 | |
parent | c6bc541ab58363d783e60a007e80e9bf9e231fda (diff) |
initialize
-rwxr-xr-x | nasm/helloworld | bin | 0 -> 8644 bytes | |||
-rwxr-xr-x | nasm/helloworld.asm | 17 | ||||
-rwxr-xr-x | nasm/helloworld.o | bin | 0 -> 624 bytes |
3 files changed, 17 insertions, 0 deletions
diff --git a/nasm/helloworld b/nasm/helloworld Binary files differnew file mode 100755 index 0000000..d3afd3a --- /dev/null +++ b/nasm/helloworld 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 Binary files differnew file mode 100755 index 0000000..39d70d4 --- /dev/null +++ b/nasm/helloworld.o |