/b/ - Random
anything goes
[Make a Post].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
>>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
>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
drag-and-drop based code is the best anyway!
>proceeds to test 10 if statements to calculate the square of user-inputted numbers
>>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.
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)
[Catalog][Overboard][Update]
[Reply]18 replies
Hello world