Skip to content

Instantly share code, notes, and snippets.

@USA-RedDragon
Created October 26, 2022 20:59
Show Gist options
  • Save USA-RedDragon/8888da4df1550e0b03c93e1473bf7b01 to your computer and use it in GitHub Desktop.
Save USA-RedDragon/8888da4df1550e0b03c93e1473bf7b01 to your computer and use it in GitHub Desktop.
.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