/b/ - Random

anything goes

V3 HIDDEN SERVICE
Post references have been added. Report issues in the global meta thread.
[Make a Post]
[X]





Anonymous No.397 [D][S][L][A][C]

Hello world

Anonymous No.399 [D]

#include <stdio.h>

int main(void)
{
printf("hello world\n");
}

Anonymous No.405 [D]

#include <iostream>

int main(){
std::cout << "Hello world\n";
}

Anonymous No.407 [D]

io.write("hello world\n");

Anonymous No.408 [D] >>411

.section text
global _start

_start:
mov rax, 1
mov rdi, 1
mov rsi, Text_01
mov rdx, Text_01_len

section .data
Text_01: db "Hello world", 10
Text_01_len: equ $-Text_01

Anonymous No.411 [D] >>413

>>408
>didn't syscall
>didn't call exit(0) afterwards
P L E B

Anonymous No.412 [D]

#!/bin/cat
Hello world

Anonymous No.413 [D] >>415

>>411
>>didn't syscall
>>didn't call exit(0) afterwards

I only forgot it, here it is:

.section text
global _start

_start:
mov rax, 1
mov rdi, 1
mov rsi, Text_01
mov rdx, Text_01_len

mov rax, 60
xor rdi, rdi
syscall

section .data
Text_01: db "Hello world", 10
Text_01_len: equ $-Text_01


Anonymous No.414 [D] >>416

>413

I have also made 2 other mistakes

section .text
global _start

_start:
mov rax, 1
mov rdi, 1
mov rsi, Text_01
mov rdx, Text_01_len
syscall

mov rax, 60
xor rdi, rdi
syscall

section .data
Text_01: db "Hello world", 10
Text_01_len: equ $-Text_01



Anonymous No.415 [D] >>416

>>413
>still didn't syscall after write()
frown.jpg

Anonymous No.416 [D]

>>415
I've corrected it: >>414

Anonymous No.434 [D]

echo 'Hello world!'



Anonymous No.860 [D]

Ada.Text_IO.Put_Line('Goodbye, cruel world!');

Anonymous No.862 [D]

[code]import std.stdio;

void main()
{
writeln("Hello World");
}
[/code]


Anonymous No.928 [D] >>930

drag-and-drop based code is the best anyway!

>proceeds to test 10 if statements to calculate the square of user-inputted numbers

Anonymous No.930 [D] >>950

>>928
I once saw a guy write a calculator in C with only if statements.
if (a 1 && b 1) {
puts("2");
} else if (a 1 && b 2) {
puts("3");
}
etc...
Not kidding. He spent 5 hours writing that calculator.

Anonymous No.950 [D] >>951

>>930
he... he was just doing that as an example of what not to do, right?

Anonymous No.951 [D][U][F]
File: 0d87c50dcd70e76c7a676a1aa6a561537c7fdbfb1d2682ddfc9bde94bca089b0.jpg (dl) (91.28 KiB)

>>950
nah, he just hadn't learned how to parse the string properly (copypasting from tutorials and shit)

Anonymous No.3588 [D]

<spoiler>fuck</spoiler>