Skip to content

Instantly share code, notes, and snippets.

@bagus2x
Created August 31, 2021 03:18
Show Gist options
  • Save bagus2x/2ab95d8aa80b35cec3ff6c760aa4e98c to your computer and use it in GitHub Desktop.
Save bagus2x/2ab95d8aa80b35cec3ff6c760aa4e98c to your computer and use it in GitHub Desktop.
hello world stdout golang syscall
package main
import (
"syscall"
"unsafe"
)
func main() {
str := []byte("Hello World")
syscall.Syscall(syscall.SYS_WRITE, uintptr(syscall.Stdout), uintptr(unsafe.Pointer(&str[0])), uintptr(len(str)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment