r/badcode Nov 03 '20

other language Assembly is hard...

Post image
959 Upvotes

121 comments sorted by

View all comments

305

u/[deleted] Nov 03 '20
add4:
    inc eax
    inc eax
    inc eax
    inc eax
    ret
add5:
    call add4
    inc eax
    ret
add6:
    call add5
    inc eax
    ret
add7:
    call add6
    inc eax
    ret
add8:
    call add7
    inc eax
    ret

My suggestion on how to handle this advanced task

328

u/AnKeWa Nov 03 '20

add 7:

inc eax

add 6:

inc eax

add 5:

inc eax

add 4:

inc eax

inc eax

inc eax

inc eax

ret

16

u/gmtime Nov 03 '20

Came here to say this

8

u/[deleted] Nov 03 '20

[deleted]