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

📄 c-bf-optimise.s

📁 一个编译器的例子,基于c语言,在linux下开发 现在了简单的c语言例子
💻 S
字号:
				# start of the file.include "defines.h"		# system call numbers.include "c-bf-optimise.literals"	# include the string literal file	.global _start		.bss	.align	4_data:.text	.align	4_start:	pushl %ebp		# save the ebp address	movl %esp, %ebp	subl $8, %esp		# allocate space for local variables	leal -4(%ebp), %eax	pushl %eax	movl $5, %eax		# operand int value	pushl %eax	popl %ebx	popl %eax	movl %ebx, (%eax)	pushl (%eax)	popl %eax	leal -8(%ebp), %eax	pushl %eax	movl $10, %eax		# operand int value	pushl %eax	popl %ebx	popl %eax	movl %ebx, (%eax)	pushl (%eax)	popl %eax	leal -4(%ebp), %eax	pushl %eax	movl -4(%ebp), %eax	pushl %eax	movl $5, %eax		# operand int value	pushl %eax				# arithmetic calculate	popl %ebx	popl %eax	addl %ebx, %eax	pushl %eax	movl $5, %eax		# operand int value	pushl %eax	movl $6, %eax		# operand int value	pushl %eax				# arithmetic calculate	popl %ebx	popl %eax	imull %ebx, %eax	pushl %eax				# arithmetic calculate	popl %ebx	popl %eax	addl %ebx, %eax	pushl %eax	popl %ebx	popl %eax	movl %ebx, (%eax)	pushl (%eax)	popl %eax	movl -4(%ebp), %eax	pushl %eax	popl %eax	cmpl $0, %eax	je ELSElabel0	movl -4(%ebp),%eax		# get the integer value of the ID	call ishow	movl $SYS_write, %eax		# print a "newline"	movl $STDOUT, %ebx	movl $newline, %ecx	movl $nl_length, %edx	int $0x80	jmp ENDIFlabel0ELSElabel0:ENDIFlabel0:	movl $0, %eax		# operand int value	pushl %eax	popl %eax		# save the return value in eax	movl %ebp, %esp	popl %ebp		# restore the ebp address	movl $SYS_exit,%eax	# load the exit call number	movl $0,%ebx		# load the exit code	int $0x80		# and exit!				# end of the file

⌨️ 快捷键说明

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