Created
October 26, 2022 20:59
-
-
Save USA-RedDragon/8888da4df1550e0b03c93e1473bf7b01 to your computer and use it in GitHub Desktop.
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
.global mkdir | |
mkdir: | |
// Move mode into x2 | |
mov x2, x1 | |
// Move dirname ptr into x1 | |
mov x1, x0 | |
// Obtain FD for x0 (I have no clue what magic this is) | |
mov x0, #-0x64 | |
// Syscall 34 = mkdirat | |
mov x8, #34 | |
// Call syscall | |
svc #0 | |
// exit() with code from mkdirat syscall | |
mov x8, #93 | |
svc #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment