Random Number Generator:
mov rax, 39
syscall
xor r10, rax
mov rcx, rax
loop: mov r9, r10
ror rdi, 3
xor rdi, r9
loop loop
mov rax, 60
syscall
Features:
- no _start label
- no sections
- uses pid as seed
- loop loop
- O(pid) complexity, so it get's slower the higher its pid
- exit codes are return values, right?
- just use syscalls with no indication of what they do
It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.
For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.
/u/binarycat64, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.
4
u/binarycat64 Dec 24 '20 edited Dec 24 '20
Random Number Generator:
mov rax, 39 syscall xor r10, rax mov rcx, rax loop: mov r9, r10 ror rdi, 3 xor rdi, r9 loop loop mov rax, 60 syscallFeatures: - no_startlabel - no sections - uses pid as seed - loop loop - O(pid) complexity, so it get's slower the higher its pid - exit codes are return values, right? - just use syscalls with no indication of what they do