← Back to context Comment by onderweg 13 days ago Is anyone aware of a similar example, for ARM assembly on macOS? 4 comments onderweg Reply oguz-ismail 12 days ago int main(void) { register const char *msg asm("x1") = "hello, world!\n"; asm ( "mov w0, #1\n" "mov w2, #14\n" "mov w16, #4\n" "svc #128\n" : : "r" (msg) ); } robxorb 12 days ago How does one compile this?EDIT: my bad, my source had a typo - it's as easy as you'd think: $ cc hello.c -o hello $ ./hello onderweg 12 days ago thanks! brontitall 12 days ago Not inline, but this was linked in a comment on HN a few days agohttps://github.com/below/HelloSilicon
oguz-ismail 12 days ago int main(void) { register const char *msg asm("x1") = "hello, world!\n"; asm ( "mov w0, #1\n" "mov w2, #14\n" "mov w16, #4\n" "svc #128\n" : : "r" (msg) ); } robxorb 12 days ago How does one compile this?EDIT: my bad, my source had a typo - it's as easy as you'd think: $ cc hello.c -o hello $ ./hello onderweg 12 days ago thanks!
robxorb 12 days ago How does one compile this?EDIT: my bad, my source had a typo - it's as easy as you'd think: $ cc hello.c -o hello $ ./hello
brontitall 12 days ago Not inline, but this was linked in a comment on HN a few days agohttps://github.com/below/HelloSilicon
How does one compile this?
EDIT: my bad, my source had a typo - it's as easy as you'd think:
thanks!
Not inline, but this was linked in a comment on HN a few days ago
https://github.com/below/HelloSilicon