⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fshow.s

📁 一个编译器的例子,基于c语言,在linux下开发 现在了简单的c语言例子
💻 S
字号:
	.file	"fshow.c"	.version	"01.01"gcc2_compiled.:.section	.rodata	.align 8.LC0:	.long 0x0,0x40240000	.align 8.LC1:	.long 0xa0b5ed8d,0x3ea0c6f7	.align 4.LC2:	.long 0x41200000.text	.align 4.globl fdigits	.type	 fdigits,@functionfdigits:	pushl %ebp	movl %esp,%ebp	subl $56,%esp	movl $buf,-16(%ebp)	flds 8(%ebp)	fldz	fucompp	fnstsw %ax	andb $68,%ah	xorb $64,%ah	jne .L3	movl -16(%ebp),%eax	movb $48,(%eax)	incl -16(%ebp)	movl -16(%ebp),%eax	movb $46,(%eax)	incl -16(%ebp)	movl -16(%ebp),%eax	movb $48,(%eax)	incl -16(%ebp)	jmp .L4	.p2align 4,,7.L3:	flds 8(%ebp)	fldz	fcompp	fnstsw %ax	andb $69,%ah	jne .L5	movl -16(%ebp),%eax	movb $45,(%eax)	incl -16(%ebp)	flds 8(%ebp)	fchs	fstps 8(%ebp).L5:	movl $1,-4(%ebp)	.p2align 4,,7.L6:	flds 8(%ebp)	fld1	fcompp	fnstsw %ax	andb $69,%ah	je .L8	jmp .L7	.p2align 4,,7.L8:	flds 8(%ebp)	fldl .LC0	fmulp %st,%st(1)	fstps 8(%ebp)	decl -4(%ebp)	jmp .L6	.p2align 4,,7.L7:	nop	.p2align 4,,7.L9:	flds 8(%ebp)	fldl .LC0	fcompp	fnstsw %ax	andb $69,%ah	decb %ah	cmpb $64,%ah	jb .L11	jmp .L10	.p2align 4,,7.L11:	flds 8(%ebp)	fldl .LC0	fdivrp %st,%st(1)	fstps 8(%ebp)	incl -4(%ebp)	jmp .L9	.p2align 4,,7.L10:	flds 8(%ebp)	fldl .LC1	faddp %st,%st(1)	fstps 8(%ebp)	movl $7,-8(%ebp)	cmpl $0,-4(%ebp)	jle .L12	.p2align 4,,7.L13:	cmpl $0,-4(%ebp)	jle .L16	cmpl $0,-8(%ebp)	jg .L15	jmp .L16	.p2align 4,,7.L16:	jmp .L14	.p2align 4,,7.L15:	flds 8(%ebp)	fnstcw -34(%ebp)	movw -34(%ebp),%dx	orw $3072,%dx	movw %dx,-36(%ebp)	fldcw -36(%ebp)	fistpl -12(%ebp)	fldcw -34(%ebp)	fildl -12(%ebp)	flds 8(%ebp)	fsubp %st,%st(1)	flds .LC2	fmulp %st,%st(1)	fstps 8(%ebp)	movl -16(%ebp),%eax	movb -12(%ebp),%dl	addb $48,%dl	movb %dl,(%eax)	incl -16(%ebp)	decl -8(%ebp)	decl -4(%ebp)	jmp .L13	.p2align 4,,7.L14:	nop	.p2align 4,,7.L17:	cmpl $0,-4(%ebp)	jg .L19	jmp .L18	.p2align 4,,7.L19:	movl -16(%ebp),%eax	movb $48,(%eax)	incl -16(%ebp)	decl -4(%ebp)	jmp .L17	.p2align 4,,7.L18:	cmpl $0,-8(%ebp)	jle .L20	movl -16(%ebp),%eax	movb $46,(%eax)	incl -16(%ebp)	.p2align 4,,7.L21:	cmpl $0,-8(%ebp)	jg .L23	jmp .L20	.p2align 4,,7.L23:	flds 8(%ebp)	fnstcw -34(%ebp)	movw -34(%ebp),%ax	orw $3072,%ax	movw %ax,-36(%ebp)	fldcw -36(%ebp)	fistpl -12(%ebp)	fldcw -34(%ebp)	fildl -12(%ebp)	flds 8(%ebp)	fsubp %st,%st(1)	flds .LC2	fmulp %st,%st(1)	fstps 8(%ebp)	movl -16(%ebp),%eax	movb -12(%ebp),%dl	addb $48,%dl	movb %dl,(%eax)	incl -16(%ebp)	decl -8(%ebp)	jmp .L21	.p2align 4,,7.L22:.L20:	jmp .L4	.p2align 4,,7.L12:	movl -16(%ebp),%eax	movb $48,(%eax)	incl -16(%ebp)	movl -16(%ebp),%eax	movb $46,(%eax)	incl -16(%ebp)	.p2align 4,,7.L25:	cmpl $0,-4(%ebp)	jl .L27	jmp .L26	.p2align 4,,7.L27:	movl -16(%ebp),%eax	movb $48,(%eax)	incl -16(%ebp)	incl -4(%ebp)	jmp .L25	.p2align 4,,7.L26:	nop	.p2align 4,,7.L28:	cmpl $0,-8(%ebp)	jg .L30	jmp .L4	.p2align 4,,7.L30:	flds 8(%ebp)	fnstcw -34(%ebp)	movw -34(%ebp),%ax	orw $3072,%ax	movw %ax,-36(%ebp)	fldcw -36(%ebp)	fistpl -12(%ebp)	fldcw -34(%ebp)	fildl -12(%ebp)	flds 8(%ebp)	fsubp %st,%st(1)	flds .LC2	fmulp %st,%st(1)	fstps 8(%ebp)	movl -16(%ebp),%eax	movb -12(%ebp),%dl	addb $48,%dl	movb %dl,(%eax)	incl -16(%ebp)	decl -8(%ebp)	jmp .L28	.p2align 4,,7.L29:.L24:.L4:	movl -16(%ebp),%edx	subl $buf,%edx	movl %edx,%eax	jmp .L2	.p2align 4,,7.L2:	leave	ret.Lfe1:	.size	 fdigits,.Lfe1-fdigits.section	.rodata	.align 8.LC3:	.long 0x0,0x40240000.text	.align 4.globl fgather	.type	 fgather,@functionfgather:	pushl %ebp	movl %esp,%ebp	subl $56,%esp	movl $buf,-4(%ebp)	movl $0,-8(%ebp)	movl $0,-12(%ebp)	movl $0,-16(%ebp)	.p2align 4,,7.L32:	cmpl $0,8(%ebp)	jle .L35	movl -4(%ebp),%eax	cmpb $47,(%eax)	jle .L34	movl -4(%ebp),%eax	cmpb $57,(%eax)	jg .L34	jmp .L35	.p2align 4,,7.L35:	jmp .L33	.p2align 4,,7.L34:	movl -4(%ebp),%eax	cmpb $45,(%eax)	jne .L36	movl $1,-16(%ebp).L36:	decl 8(%ebp)	incl -4(%ebp)	jmp .L32	.p2align 4,,7.L33:	nop	.p2align 4,,7.L37:	cmpl $0,8(%ebp)	jle .L40	movl -4(%ebp),%eax	cmpb $47,(%eax)	jle .L40	movl -4(%ebp),%eax	cmpb $57,(%eax)	jle .L39	jmp .L40	.p2align 4,,7.L40:	jmp .L38	.p2align 4,,7.L39:	flds -8(%ebp)	fldl .LC3	fmulp %st,%st(1)	movl -4(%ebp),%eax	movsbl (%eax),%edx	leal -48(%edx),%eax	movl %eax,-36(%ebp)	fildl -36(%ebp)	faddp %st,%st(1)	fstps -8(%ebp)	decl 8(%ebp)	incl -4(%ebp)	jmp .L37	.p2align 4,,7.L38:	cmpl $0,8(%ebp)	jle .L41	movl -4(%ebp),%eax	cmpb $46,(%eax)	jne .L41	decl 8(%ebp)	incl -4(%ebp)	.p2align 4,,7.L42:	cmpl $0,8(%ebp)	jle .L45	movl -4(%ebp),%eax	cmpb $47,(%eax)	jle .L45	movl -4(%ebp),%eax	cmpb $57,(%eax)	jle .L44	jmp .L45	.p2align 4,,7.L45:	jmp .L43	.p2align 4,,7.L44:	flds -8(%ebp)	fldl .LC3	fmulp %st,%st(1)	movl -4(%ebp),%eax	movsbl (%eax),%edx	leal -48(%edx),%eax	movl %eax,-36(%ebp)	fildl -36(%ebp)	faddp %st,%st(1)	fstps -8(%ebp)	incl -12(%ebp)	decl 8(%ebp)	incl -4(%ebp)	jmp .L42	.p2align 4,,7.L43:	nop	.p2align 4,,7.L46:	cmpl $0,-12(%ebp)	jg .L48	jmp .L41	.p2align 4,,7.L48:	flds -8(%ebp)	fldl .LC3	fdivrp %st,%st(1)	fstps -8(%ebp)	decl -12(%ebp)	jmp .L46	.p2align 4,,7.L47:.L41:	cmpl $0,-16(%ebp)	je .L49	flds -8(%ebp)	fchs	fstps -8(%ebp).L49:	flds -8(%ebp)	jmp .L31	.p2align 4,,7.L31:	leave	ret.Lfe2:	.size	 fgather,.Lfe2-fgather	.ident	"GCC: (GNU) 2.95.3 20010315 (release)"

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -