Skip to content

Instantly share code, notes, and snippets.

@TruncatedDinoSour
Created August 27, 2023 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TruncatedDinoSour/d8e5887d8560017ef7d140b6733b0788 to your computer and use it in GitHub Desktop.
Save TruncatedDinoSour/d8e5887d8560017ef7d140b6733b0788 to your computer and use it in GitHub Desktop.
hello worlds i can write from memory
format ELF64 executable 3
segment readable executable
define SYS_exit 60
define SYS_write 1
; fasm
_start:
mov eax, SYS_write
mov edi, 1
mov esi, m
mov edx, ml
syscall
mov rax, SYS_exit
xor rdi, rdi
syscall
segment readable
m: db "hello world", 10
ml = $ - m
#include <stdio.h>
int main(void) {
puts("hello world");
return 0;
}
#include <iostream>
int main(void) {
std::cout << "hello world" << '\n';
return 0;
}
include 'std/lstd.fa'
"hello world" #puts
main :: IO ()
main =
putStrLn "hello world"
class Program {
public static void main(String args[]) {
System.out.println("hello world");
}
}
"use strict";
function main() {
console.log("hello world");
}
document.addEventListener("DOMContentLoaded", main);
#!/usr/bin/env lua
print("hello world")
#!/usr/bin/env perl
# -*- coding: utf-8 -*-
print "hello world\n"
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""hello world"""
if __name__ == "__main__":
print("hello world")
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
puts "hello world"
#!/usr/bin/env racket
#lang racket/base
(display "hello world")
(newline)
fn main() {
println!("hello world");
}
#!/usr/bin/csi -script
(display "hello world\n")
#!/usr/bin/env sh
set -eu
main() {
echo 'hello world'
}
main
"use strict";
function main() {
console.log("hello world");
}
document.addEventListener("DOMContentLoaded", main);
echo 'hello world'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment