猫史档案馆


汇编语言喲

用户:苏文星苏文星查看:0 回复:1 评论:0 创建时间:2022-06-20T13:29:27


.file "try.cpp"
.text
.section .rdata,"dr"
__ZStL19piecewise_construct:
.space 1
.section .text$getchar,"x"
.linkonce discard
.globl _getchar
.def _getchar; .scl 2; .type 32; .endef
_getchar:
LFB882:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $24, %esp
movl __imp___iob, %eax
movl 4(%eax), %eax
leal -1(%eax), %edx
movl __imp___iob, %eax
movl %edx, 4(%eax)
movl __imp___iob, %eax
movl 4(%eax), %eax
testl %eax, %eax
js L2
movl __imp___iob, %eax
movl (%eax), %eax
leal 1(%eax), %ecx
movl __imp___iob, %edx
movl %ecx, (%edx)
movzbl (%eax), %eax
movzbl %al, %eax
jmp L4
L2:
movl __imp___iob, %eax
movl %eax, (%esp)
call __filbuf
L4:
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE882:
.lcomm __ZStL8__ioinit,1,1
.def ___main; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC0:
.ascii "RANGE:0-65535\0"
LC1:
.ascii "Enter:\0"
LC2:
.ascii "%d\0"
LC3:
.ascii "Bigger,Try again.\0"
LC4:
.ascii "Smaller,Try again.\0"
LC5:
.ascii "Right, it is %d\12\0"
LC6:
.ascii "pause\0"
.section .text.startup,"x"
.globl _main
.def _main; .scl 2; .type 32; .endef
_main:
LFB1503:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
pushl %edi
pushl %esi
pushl %ebx
andl $-16, %esp
subl $32, %esp
.cfi_offset 7, -12
.cfi_offset 6, -16
.cfi_offset 3, -20
call ___main
movl $0, (%esp)
leal 30(%esp), %esi
call _time
movl %eax, (%esp)
call _srand
call _rand
movl $LC0, (%esp)
movl %eax, %edi
movl %eax, %ebx
call _puts
L6:
movl $LC1, (%esp)
call _printf
movl %esi, 4(%esp)
movl $LC2, (%esp)
call _scanf
call _getchar
cmpw %bx, 30(%esp)
ja L12
jnb L9
movl $LC4, (%esp)
call _puts
jmp L6
L12:
movl $LC3, (%esp)
call _puts
jmp L6
L9:
movzwl %di, %edi
movl $LC5, (%esp)
movl %edi, 4(%esp)
call _printf
movl $LC6, (%esp)
call _system
leal -12(%ebp), %esp
xorl %eax, %eax
popl %ebx
.cfi_restore 3
popl %esi
.cfi_restore 6
popl %edi
.cfi_restore 7
popl %ebp
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE1503:
.text
.def ___tcf_0; .scl 3; .type 32; .endef
___tcf_0:
LFB1973:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $8, %esp
movl $__ZStL8__ioinit, %ecx
call __ZNSt8ios_base4InitD1Ev
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE1973:
.def __Z41__static_initialization_and_destruction_0ii; .scl 3; .type 32; .endef
__Z41__static_initialization_and_destruction_0ii:
LFB1972:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $24, %esp
cmpl $1, 8(%ebp)
jne L16
cmpl $65535, 12(%ebp)
jne L16
movl $__ZStL8__ioinit, %ecx
call __ZNSt8ios_base4InitC1Ev
movl $___tcf_0, (%esp)
call _atexit
L16:
nop
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE1972:
.def __GLOBAL__sub_I_main; .scl 3; .type 32; .endef
__GLOBAL__sub_I_main:
LFB1974:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp
.cfi_def_cfa_register 5
subl $24, %esp
movl $65535, 4(%esp)
movl $1, (%esp)
call __Z41__static_initialization_and_destruction_0ii
leave
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE1974:
.section .ctors,"w"
.align 4
.long __GLOBAL__sub_I_main
.ident "GCC: (MinGW.org GCC-8.2.0-3) 8.2.0"
.def __filbuf; .scl 2; .type 32; .endef
.def _time; .scl 2; .type 32; .endef
.def _srand; .scl 2; .type 32; .endef
.def _rand; .scl 2; .type 32; .endef
.def _puts; .scl 2; .type 32; .endef
.def _printf; .scl 2; .type 32; .endef
.def _scanf; .scl 2; .type 32; .endef
.def _system; .scl 2; .type 32; .endef
.def __ZNSt8ios_base4InitD1Ev; .scl 2; .type 32; .endef
.def __ZNSt8ios_base4InitC1Ev; .scl 2; .type 32; .endef
.def _atexit; .scl 2; .type 32; .endef


回复

上一页1 页 / 共 1下一页
PlumStevenPlumSteven

挖坟,顺便,这是AT&T格式

(我比较喜欢看INTEL格式的)

点赞0


评论