-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathreverse_string.memeasm
More file actions
49 lines (30 loc) · 1.26 KB
/
reverse_string.memeasm
File metadata and controls
49 lines (30 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
I like to have fun, fun, fun, fun, fun, fun, fun, fun, fun, fun main
sneak 100 rax
What the hell happened here? rcx counts how many characters have been read
sneak 100 rcx
upgrade
What the hell happened here? Read one character from stdin
let me in. LET ME IIIIIIIIN al
What the hell happened here? Check if it's the end of a line
corporate needs you to find the difference between al and \n
What the hell happened here? If not, we just push it to the stack (very efficient lol)
stonks rax
upvote rcx
fuck go back
they're the same picture
What the hell happened here? Now write what we've seen
banana
What the hell happened here? Check if we have reached the end of the input
who would win? rcx or 0
0 wins
What the hell happened here? rcx is <= 0, jump to end of program
return to monke uaaaaaua
rcx wins
What the hell happened here? rcx > 0, get the character and print it to stdout
not stonks rax
what can I say except al
downvote rcx
where banana
monke uaaaaaua
what can I say except \n
I see this as an absolute win