Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .file "jmptab.c"
- .def ___main; .scl 2; .type 32; .endef
- .section .rdata,"dr"
- LC0:
- .ascii "Input: \0"
- LC1:
- .ascii "a\0"
- LC2:
- .ascii "b\0"
- LC3:
- .ascii "c\0"
- LC4:
- .ascii "default\0"
- .text
- .globl _main
- .def _main; .scl 2; .type 32; .endef
- _main:
- pushl %ebp
- movl %esp, %ebp
- andl $-16, %esp
- subl $32, %esp
- call ___main
- movl $LC0, (%esp)
- call _printf
- call _getchar
- movb %al, 31(%esp)
- movsbl 31(%esp), %eax
- cmpl $98, %eax
- je L4
- cmpl $99, %eax
- je L5
- cmpl $97, %eax
- jne L7
- L3:
- movl $LC1, (%esp)
- call _puts
- jmp L8
- L4:
- movl $LC2, (%esp)
- call _puts
- jmp L8
- L5:
- movl $LC3, (%esp)
- call _puts
- jmp L8
- L7:
- movl $LC4, (%esp)
- call _puts
- nop
- L8:
- leave
- ret
- .def _puts; .scl 2; .type 32; .endef
- .def _printf; .scl 2; .type 32; .endef
- .def _getchar; .scl 2; .type 32; .endef
Advertisement
Add Comment
Please, Sign In to add comment