Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "fib.c"
- .def ___main; .scl 2; .type 32; .endef
- .section .rdata,"dr"
- LC0:
- .ascii "%d\12\0"
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- pushl %ebp
- movl %esp, %ebp
- andl $-16, %esp
- subl $32, %esp # alokasikan sebanyak 32 bytes di lokal stack
- call ___main
- L3:
- movl $0, 28(%esp)
- movl $1, 24(%esp)
- L2:
- movl 28(%esp), %eax
- movl %eax, 4(%esp)
- movl $LC0, (%esp)
- call _printf
- movl 24(%esp), %eax
- movl 28(%esp), %edx
- leal (%edx,%eax), %eax
- movl %eax, 20(%esp)
- movl 24(%esp), %eax
- movl %eax, 28(%esp)
- movl 20(%esp), %eax
- movl %eax, 24(%esp)
- cmpl $254, 28(%esp)
- jle L2 # loncat jika kurang atau sama dengan
- jmp L3 # unconditional jump (loncat tanpa kondisi)
- .def _printf; .scl 2; .type 32; .endef
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement