-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: 0x4248 <60709927+0x4248@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
nasm -f elf64 -o main.o main.s | ||
ld -o main main.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
; SPDX-License-Identifier: GPL-3.0 | ||
; return | ||
; | ||
; main.asm | ||
; | ||
; Really basic program that returns 0 | ||
; | ||
; COPYRIGHT NOTICE | ||
; Copyright (C) 2024 0x4248 and contributors | ||
; Redistribution and use in source and binary forms, with or without | ||
; modification, are permitted provided that the license is not changed. | ||
; | ||
; This software is free and open source. Licensed under the GNU general | ||
; public license version 3.0 as published by the Free Software Foundation. | ||
|
||
|
||
global _start | ||
section .text | ||
|
||
main: | ||
mov rax, 60 ; exit syscall | ||
mov rdi, 0 ; Set 0 on return | ||
|
||
syscall ; Call the kernel |