hello.cpp
1 #include <unistd.h> 2 #include <sys/syscall.h> 3 4 int main() { 5 const char msg[] = "Hello, World!\n"; 6 // Direct syscall: write(1, msg, length) 7 syscall(SYS_write, 1, msg, sizeof(msg) - 1); 8 return 0; 9 }
1 #include <unistd.h> 2 #include <sys/syscall.h> 3 4 int main() { 5 const char msg[] = "Hello, World!\n"; 6 // Direct syscall: write(1, msg, length) 7 syscall(SYS_write, 1, msg, sizeof(msg) - 1); 8 return 0; 9 }